Water quality intelligent monitoring method, device and system based on unmanned aerial vehicle sampling
Patent Information
- Application Number
- CN202611441001.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-10-20
AI Technical Summary
目前,无人机水质采样监测技术采用预设固定航线、均匀间隔布点或单纯基于局部信息熵的路径规划模式,属于被动式定点采样作业,无法结合水域实时环境变化、污染动态扩散方向及水体纹理演化规律自适应调整探索策略
本申请首先对高光谱图像降维,仅保留核心信息获取主成分影像;由于污染物扩散区域的梯度变化规律与污染物扩散趋势高度契合,根据梯度幅值确定局部窗口位置对应的污染物实际物理扩散方向,即局部窗口所在位置的主导纹理方向,评价相邻帧主成分影像对应的时间段内污染物扩散趋势的稳定程度,计算主成分影像的惯性差异,进而对像素点的水质数据的缺失程度进行评价,获取局部飞行可达域内每一像素点的后验方差,后验方差的取值越大,对应像素点的水质数据缺失度越高、采样监测价值越高;进一步的,根据典型污染水体的光谱特征向量与局部飞行可达域内像素点的光谱特征向量的相似程度,剔除局部飞行可达域内对应风浪、光斑等的无效高熵区域,并计算剩余像素点的认知增益密度,局部飞行可达域内像素点的认知增益密度越大,像素点位置对全域水域水质识别的提升效果越显著,采样优先级越高,并结合高光谱图像采集位置的状态信息,提取目标采样点并拟合航线;最后,根据连续相邻帧高光谱图像的无人机位置的电导率的差异,识别无人机停止采样的时刻,并输出水质监测数据,解决无人机水质检测无法结合水域环境变化和污染扩散方向实现,导致探索路径冗余的问题,避免无人机取样的路径冗余。
Smart Images

Figure FT_1 
Figure FT_2 
Figure SMS_1
Abstract
Description
Technical Field
[0001] This application relates to the field of water quality monitoring technology, specifically to intelligent water quality monitoring methods, equipment, and systems based on unmanned aerial vehicle (UAV) sampling. Background Technology
[0002] The core development direction in the fields of smart water management and intelligent environmental monitoring lies in using drones equipped with hyperspectral sensors and water quality detection sensors to conduct autonomous inspections and sampling of large-scale water areas. Currently, drone water quality sampling and monitoring technology employs preset fixed routes, uniformly spaced sampling points, or path planning modes based solely on local information entropy. This passive, fixed-point sampling operation cannot adaptively adjust its exploration strategy based on real-time environmental changes, dynamic pollution diffusion directions, and water texture evolution patterns. This passive, fixed-point sampling mode easily leads to drones getting stuck in local high-entropy areas and repeatedly sampling, causing over-probing in local areas and insufficient coverage of the entire water area. It also makes it difficult to construct a complete water area cognitive model with spatiotemporal correlation, resulting in significant errors in monitoring and predicting pollution boundaries and diffusion trends.
[0003] Meanwhile, in passive fixed-point sampling operations, environmental modeling, path planning, and flight control are disconnected from each other. It is impossible to update the aquatic environment cognition model online based on real-time sampling data and dynamically optimize the exploration path. Furthermore, it lacks coordinated constraints on the efficiency of overall cognition and the consumption of equipment resources. This can easily lead to problems such as redundant flight paths and frequent repeated explorations during UAV water quality inspections, resulting in the ineffective waste of resources such as UAV battery power and computing power. It is impossible to achieve high-precision and full-coverage collection of water quality information across the entire area under limited operational resources. Summary of the Invention
[0004] To address the aforementioned technical problems, the purpose of this application is to provide a method, equipment, and system for intelligent water quality monitoring based on unmanned aerial vehicle (UAV) sampling. The specific technical solution adopted is as follows: In a first aspect, embodiments of this application provide a method for intelligent water quality monitoring based on unmanned aerial vehicle (UAV) sampling, the method comprising the following steps: Collect continuous frame hyperspectral images of the water body to be sampled, along with the status information and conductivity of the image acquisition location. Reduce the dimensionality of the hyperspectral images to obtain principal component images. Based on the gradient magnitude of the pixels within the local window of a preset size in the principal component image, the dominant texture direction at the location of the local window is calculated. Based on the dominant texture vectors of the principal component images in adjacent frames, the inertial difference between the previous principal component images in adjacent frames is calculated. Based on the state information of the hyperspectral image acquisition location and the corresponding principal component image, the local flight reachable region is divided from the corresponding principal component image, and sparse observation anchors are identified. Based on the Euclidean distance between the pixels in the local flight reachable region and the sparse observation anchors, and the gradient direction of the pixels in the local flight reachable region, the posterior variance of each pixel in the local flight reachable region is obtained. Extract the spectral feature vectors of pixels within the local flight reachable domain. Based on the similarity between the spectral feature vectors of pixels within the local flight reachable domain and the spectral feature vectors in the pre-built water pollution prior feature library, remove some pixels within the local flight reachable domain and calculate the cognitive gain density of the remaining pixels. Combine the state information of the hyperspectral image acquisition location to extract target sampling points and fit the flight path. Based on the difference in conductivity of the drone's location in consecutive adjacent frames of hyperspectral images, the moment when the drone stopped sampling is identified, and water quality monitoring data is output.
[0005] Furthermore, the process for determining the dominant texture direction at the location of the local window is as follows: A local window of a preset size is used to traverse the principal component image. For a local window located at any position in the principal component image, a second-order structure tensor is constructed based on the gradient magnitude of all pixels within the local window, and eigenvalue decomposition is performed. The eigenvector corresponding to the largest eigenvalue is selected as the dominant texture direction of the local window at that position.
[0006] Furthermore, the process for constructing the inertial differences of the principal component images is as follows: The ratio of the inner product of the dominant texture vectors of adjacent principal component images to the product of the modulus is denoted as the first ratio of adjacent principal component images. The difference between the absolute value of the number 1 and the first ratio of adjacent principal component images is denoted as the inertial difference of the previous principal component image in the adjacent frames.
[0007] Furthermore, the specific process of dividing the local flight reachability domain from the corresponding principal component image based on the state information of the hyperspectral image acquisition location and the corresponding principal component image, and identifying sparse observation anchor points, includes the following: The status information includes the location of the UAV; within the principal component image, a circular local flight reachable domain is divided with the GPS coordinates of the UAV corresponding to the principal component image as the center and a preset local radius as the radius; the pixels within the local flight reachable domain in the principal component image are clustered, and the cluster centers of all obtained clusters are recorded as sparse observation anchor points.
[0008] Furthermore, the process for determining the posterior variance of the pixel is as follows: Based on the gradient direction of pixels in the principal component image, a rotation matrix for each pixel is constructed. The midpoint of a line segment with two pixels as endpoints is selected, and the two-dimensional coordinate difference vector between the two pixels is extracted. The rotation matrix corresponding to the selected midpoint is used to perform a rotation transformation on the two-dimensional coordinate difference vector between the endpoints of the line segment corresponding to the midpoint, mapping the two-dimensional coordinate difference vector to a coordinate system perpendicular to the diffusion direction of pollutants. The spatial correlation distance between the two pixels is calculated based on the transformed coordinate components. The spatial correlation distance between the two pixels is introduced into the radial basis function to construct an anisotropic spatial covariance kernel function. The formula for calculating the posterior variance is:
[0009] in, This indicates the pixels within the local flight reachable domain of the principal component image. The posterior variance; Represents pixels With pixels The anisotropic space covariance kernel function; Represents pixels The row vector determined by the anisotropic spatial covariance kernel function of all sparse observation anchors; Represents all sparse observation anchor points and pixels. The column vectors determined by the anisotropic space covariance kernel function; This represents the matrix determined by the anisotropic spatial covariance kernel function among all sparse observation anchors.
[0010] Furthermore, the specific process of eliminating some pixels within the local flight reachable domain based on the similarity between the spectral feature vectors of pixels within the local flight reachable domain and the spectral feature vectors in the pre-built water pollution prior feature library, and calculating the cognitive gain density of the remaining pixels, includes the following: The normalized value of the maximum cosine similarity between the pixel within the local flight reachable region and all spectral feature vectors in the prior feature library of water pollution is denoted as the pollution similarity of the pixel within the local flight reachable region. The product of the difference between the pollution similarity of the pixel within the local flight reachable region and the preset reference parameter and the preset stretching parameter is denoted as the first product of the pixel within the local flight reachable region. The negative of the first product is taken as the exponent of the power of the natural constant. The reciprocal of the sum of the calculated power and the number 1 is denoted as the pollution region confidence of the pixel within the local flight reachable region. Pixels with a confidence level of less than a preset disturbance threshold in the polluted area are removed from the local flight reachable domain. The normalized value of the product of the inertial difference of the principal component image and the digit 1, and the product of the confidence of the contaminated region of the pixel in the local flight reachable domain of the principal component image and the posterior variance, is denoted as the cognitive gain density of the pixel in the local flight reachable domain of the principal component image.
[0011] Furthermore, the extraction process of the target sampling points is as follows: The top 10% of local flight reachable pixels with the highest cognitive gain density are selected as candidate sampling points of the principal component image. The straight-line distance between the UAV position corresponding to the principal component image and the candidate sampling point is recorded as the flight straight-line distance of the candidate sampling point. The product of the UAV's turning angle to the candidate sampling point and the preset turning parameter, plus the number 1, is recorded as the UAV turning cost of the candidate sampling point. The product of the flight straight-line distance of the candidate sampling point and the UAV turning cost is recorded as the flight cost of the candidate sampling point. Using a path search algorithm, the candidate sampling point with the highest cognitive gain density and the lowest flight cost is selected as the target sampling point.
[0012] Furthermore, the process of identifying the moment when the drone stops sampling based on the difference in conductivity of the drone's position in consecutive adjacent frames of hyperspectral images includes the following steps: The mean of the squared differences between the conductivity of the UAV positions in all acquired hyperspectral images and the simulated conductivity values is recorded as the global average error assessment value of the UAV position in the last hyperspectral image. The absolute value of the difference between the UAV position in the hyperspectral image and the global average error assessment value of the UAV position in the previous adjacent hyperspectral image is calculated, and the ratio of the absolute value of the difference to the global average error assessment value of the UAV position in the previous adjacent hyperspectral image is recorded as the residual change amplitude of the UAV position in the hyperspectral image. When the residual change amplitude of the UAV position in three consecutive frames of hyperspectral images is less than or equal to the preset stable amplitude, UAV sampling is stopped.
[0013] Secondly, embodiments of this application also provide a smart water quality monitoring device based on UAV sampling. The smart water quality monitoring device includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any of the methods described above.
[0014] Thirdly, embodiments of this application provide a water quality intelligent monitoring system based on UAV sampling. The water quality intelligent monitoring system includes: a data acquisition module, a posterior variance determination module, a sampling point extraction module, and a sampling stop module.
[0015] The data acquisition module is used to acquire continuous frames of hyperspectral images of the water body to be sampled, the status information of the image acquisition location and the conductivity, and to reduce the dimensionality of the hyperspectral images to obtain principal component images; The posterior variance determination module is used to calculate the dominant texture direction at the location of the local window based on the gradient magnitude of the pixel at the location of the local window of a preset size in the principal component image; calculate the inertial difference of the previous principal component image in adjacent frames based on the texture dominant vector of the principal component images in adjacent frames; divide the local flight reachable domain from the corresponding principal component image based on the state information of the hyperspectral image acquisition location and the corresponding principal component image, and identify sparse observation anchors; and obtain the posterior variance of each pixel in the local flight reachable domain based on the Euclidean distance between the pixel in the local flight reachable domain and the sparse observation anchors, as well as the gradient direction of the pixel in the local flight reachable domain. The sampling point extraction module is used to extract the spectral feature vectors of pixels within the local flight reachable domain. Based on the similarity between the spectral feature vectors of pixels within the local flight reachable domain and the spectral feature vectors in the pre-built water pollution prior feature library, some pixels within the local flight reachable domain are removed, and the cognitive gain density of the remaining pixels is calculated. Combined with the state information of the hyperspectral image acquisition location, the target sampling points are extracted and the flight path is fitted. The stop sampling module is used to identify the moment when the drone stops sampling based on the difference in conductivity of the drone's position in consecutive adjacent frames of hyperspectral images, and output water quality monitoring data.
[0016] As can be seen from the above embodiments, the intelligent water quality monitoring method, equipment, and system based on UAV sampling provided in this application have at least the following beneficial effects: This application first performs dimensionality reduction on the hyperspectral image, retaining only the core information to obtain the principal component image. Since the gradient variation pattern of the pollutant diffusion region highly matches the pollutant diffusion trend, the actual physical diffusion direction of the pollutant corresponding to the local window position is determined based on the gradient amplitude, i.e., the dominant texture direction at the location of the local window. The stability of the pollutant diffusion trend within the time period corresponding to adjacent frames of principal component images is evaluated, and the inertial difference of the principal component images is calculated. This allows for the evaluation of the degree of missing water quality data at each pixel, obtaining the posterior variance of each pixel within the local flight reachable domain. The larger the posterior variance value, the higher the degree of missing water quality data and the higher the sampling and monitoring value of the corresponding pixel. Furthermore, based on the spectral feature vector of typical polluted water bodies and the local flight reachable domain... The similarity of the spectral feature vectors of pixels within the reachable domain is used to eliminate invalid high-entropy regions corresponding to wind waves, light spots, etc., within the reachable domain of local flight. The cognitive gain density of the remaining pixels is calculated. The higher the cognitive gain density of pixels within the reachable domain of local flight, the more significant the improvement effect of the pixel location on the water quality identification of the entire water area, and the higher the sampling priority. Combined with the state information of the hyperspectral image acquisition location, target sampling points are extracted and flight paths are fitted. Finally, based on the difference in conductivity of the UAV position in consecutive adjacent frames of hyperspectral images, the time when the UAV stops sampling is identified, and water quality monitoring data is output. This solves the problem that UAV water quality detection cannot be combined with changes in the water environment and the direction of pollution diffusion, resulting in redundancy in the exploration path, and avoids path redundancy in UAV sampling. Attached Figure Description
[0017] Figure 1 A flowchart illustrating the steps of an intelligent water quality monitoring method based on unmanned aerial vehicle (UAV) sampling, as provided in one embodiment of this application; Figure 2 This is a schematic diagram of the structure of an intelligent water quality monitoring system based on UAV sampling, provided as an embodiment of this application. Detailed Implementation
[0018] Please see Figure 1 The diagram illustrates a flowchart of a method for intelligent water quality monitoring based on unmanned aerial vehicle (UAV) sampling, according to an embodiment of this application. The method includes the following steps: S001: Acquire continuous frames of hyperspectral images of the water body to be sampled, the status information of the image acquisition location, and the conductivity; reduce the dimensionality of the hyperspectral images to obtain principal component images.
[0019] Hyperspectral cameras can capture the characteristic spectra of pollutants in water, such as the 680nm absorption peak of cyanobacteria and the 250nm absorption peak of petroleum, providing basic data for subsequent pollution identification.
[0020] Therefore, when using drones to sample water quality, the drone starts flying from the starting point. In order to determine the sampling path based on the direction in which the pollution is most likely to spread and the boundaries worth exploring, a hyperspectral camera is needed to acquire continuous frames of hyperspectral images of the water body to be sampled.
[0021] Specifically, a lightweight hyperspectral camera weighing less than or equal to 1.5 kg is used on a drone, with a field of view of 45°, a frame rate of 1 frame / 2 seconds, and a sampling resolution of 10 nm. Before the drone flies, it avoids the strong light period from 12:00 to 14:00 noon to avoid interference from light spots on the water surface. The drone maintains an altitude of 50 meters during flight to ensure that a single frame of image covers an area of approximately 1,000 square meters of water. For each frame of hyperspectral image acquired, the drone's GPS coordinates, flight altitude, remaining battery power, and other status information are recorded simultaneously. The hyperspectral image in this embodiment contains 200 bands, and each pixel corresponds to a 200-dimensional spectral vector.
[0022] Hyperspectral images contain a large amount of redundant data. Therefore, preprocessing is performed on the hyperspectral images, including removing dark current noise and radiometric calibration. Specifically, this embodiment uses the built-in dark field correction function of the hyperspectral camera to remove dark current noise and uses reflectance data from a standard gray card to correct the spectral intensity, thus achieving radiometric calibration.
[0023] Principal component analysis (PCA) was used to reduce the dimensionality of the hyperspectral image, retaining principal components with a cumulative variance contribution rate greater than or equal to 90%, and thus obtaining principal component images.
[0024] Using a drone equipped with a lifting multi-parameter water quality electrochemical probe, the probe is lowered into the water body at the hyperspectral image acquisition position. The ionic conductivity of the water body is measured in real time through electrodes, and the conductivity is obtained after temperature compensation and transmitted back to the onboard terminal in real time.
[0025] At this point, the principal component images have been obtained.
[0026] S002: Based on the gradient magnitude of the pixels within the local window of a preset size in the principal component image, calculate the dominant texture direction at the location of the local window. Based on the dominant texture vectors of the principal component images in adjacent frames, calculate the inertial difference of the previous principal component image in adjacent frames. Based on the state information of the hyperspectral image acquisition location and the corresponding principal component image, divide the local flight reachable region from the corresponding principal component image and identify sparse observation anchors. Based on the Euclidean distance between the pixels in the local flight reachable region and the sparse observation anchors, and the gradient direction of the pixels in the local flight reachable region, obtain the posterior variance of each pixel in the local flight reachable region.
[0027] First, since the gradient variation pattern of the pollutant diffusion area highly matches the pollutant diffusion trend, the local gradient field of the principal component image is calculated, a structural tensor model is built, and the main extension direction of the water body spectral texture and the pollutant diffusion direction are accurately extracted to determine the pollutant propagation pattern and boundary dynamic change characteristics of the water body. Simultaneously, by comparing the texture direction changes of consecutive frames of principal component images, the texture evolution inertia is calculated. Based on the inertial change characteristics, it is determined whether there is new pollution diffusion, flow field disturbance, or environmental anomalies in the water body, thus completing the accurate extraction of the dynamic change characteristics of the water environment.
[0028] Specifically, the Sobel operator is used to calculate the gradient magnitude and gradient direction of each pixel in the principal component image. The gradient magnitude reflects the intensity of the water texture, and the gradient direction reflects the extension trend of the water texture, which can provide basic data for subsequent structural tensor modeling.
[0029] The gradient direction of pixels in the pollutant diffusion area shows a high degree of consistency, which can intuitively reflect the pattern of pollution diffusion.
[0030] A 3×3 local window is slid across the principal component image to allow the local window to traverse the principal component image. For a local window located at any position in the principal component image, a second-order structure tensor is constructed based on the gradient magnitude of all pixels within the local window. The structure tensor is then decomposed into eigenvalues to obtain two sets of eigenvalues and corresponding eigenvectors. The eigenvector corresponding to the largest eigenvalue is selected as the dominant texture direction of the local window at the given position.
[0031] The second-order structure tensor can comprehensively characterize the direction and intensity of local water texture; the dominant texture direction is the actual physical diffusion direction of pollutants corresponding to the local window position.
[0032] To quantify the dynamic changes in the actual physical diffusion direction of pollutants, the texture dominant vectors of adjacent principal component images are compared, and the inertial difference between the previous principal component image in adjacent frames is calculated.
[0033] Specifically, the ratio of the inner product of the texture dominant vectors of adjacent principal component images to the product of the modulus is denoted as the first ratio of adjacent principal component images, and the difference between the absolute value of the number 1 and the first ratio of adjacent principal component images is denoted as the inertial difference of the previous principal component image in adjacent frames.
[0034] In calculating the inertia difference, the inner product is divided by the product of the modulus to normalize the calculation result.
[0035] The smaller the inertial difference of the principal component images, the more stable the pollutant diffusion trend is within the time period corresponding to the principal component image and the next adjacent principal component image.
[0036] When the inertial difference of the principal component image is less than 0.1, the pollution distribution of the principal component image is determined to be stable; when the inertial difference of the principal component image is greater than or equal to 0.1 and less than or equal to 0.3, the pollution distribution of the principal component image is determined to change slowly; when the inertial difference of the principal component image is greater than 0.3, the pollution distribution of the principal component image is determined to change abruptly.
[0037] Under the condition of limited airborne computing power, strategies such as local flight reachability domain constraints, sparse anchor sampling, anisotropic kernel function reconstruction, and incremental update can be adopted to reduce computational complexity.
[0038] Specifically, within the principal component image, a circular local flight reachable region is divided with the GPS coordinates of the UAV corresponding to the principal component image as the center and a preset local radius as the radius. The local flight reachable region within the principal component image is then extrapolated. The number of clusters is set to the rounded-up value of 10% of the number of pixels within the local flight reachable region of the principal component image. Pixels within the local flight reachable region of the principal component image are then clustered, and the cluster centers of all obtained clusters are recorded as sparse observation anchor points.
[0039] The preset local radius is determined based on the UAV's flight time, with a maximum value of 100 meters. In this embodiment, the preset local radius is set to 50 meters. All extracted sparse observation anchor points can represent the water quality characteristics distribution of a local area within the reachable region of the local flight, reducing the amount of subsequent calculations. In this embodiment, the K-means clustering algorithm is used to implement clustering.
[0040] Based on the gradient direction of pixels within the principal component image, a rotation matrix is constructed for each pixel. Specifically, when the gradient direction of pixels within the principal component image is... The rotation matrix of the pixel is .
[0041] The midpoint of a line segment with two endpoints is selected, and the two-dimensional coordinate difference vector between the two pixels is extracted. The rotation matrix corresponding to the selected midpoint is used to rotate and transform the two-dimensional coordinate difference vector between the endpoints of the line segment corresponding to the midpoint, mapping the two-dimensional coordinate difference vector to a coordinate system perpendicular to the pollutant diffusion direction. The spatial correlation distance between the two pixels is then calculated based on the transformed coordinate components. This spatial correlation distance is incorporated into the radial basis function to construct an anisotropic spatial covariance kernel function, correcting the direction of the spatial distance between pixels, strengthening the spatial correlation of the pollutant diffusion direction, conforming to the physical laws of real water diffusion, and improving prediction accuracy.
[0042] Specifically, the formula for calculating the anisotropic space covariance kernel function is:
[0043] in, Represents pixels With pixels The anisotropic space covariance kernel function; Represents pixels With pixels The square of the spatially related distance; This represents the signal variance; in this embodiment, the signal variance is set to 1. The length is indicated by a value of 10 meters in this embodiment.
[0044] It is important to note that when calculating the anisotropic spatial covariance kernel function between a pixel and itself, the spatial correlation distance between a pixel and its own pixels is 0.
[0045] Based on the anisotropic spatial covariance kernel function, the posterior variance of each pixel within the local flight reachability domain is determined. The formula for calculating the posterior variance is:
[0046] in, This indicates the pixels within the local flight reachable domain of the principal component image. The posterior variance; Represents pixels With pixels The anisotropic space covariance kernel function; Represents pixels The row vectors are determined by the anisotropic spatial covariance kernel function of all sparse observation anchors, with the anisotropic spatial covariance kernel functions arranged in order of sparse observation anchors and pixels. The Euclidean distances are arranged from closest to farthest. Represents all sparse observation anchor points and pixels. The column vectors are determined by the anisotropic spatial covariance kernel function, and the order of the anisotropic spatial covariance kernel functions is based on the sparse observation anchor points and pixels. The Euclidean distances are arranged from closest to farthest. This represents the matrix determined by the anisotropic spatial covariance kernel function among all sparse observation anchors.
[0047] Posterior variance is used to quantify the uncertainty of water quality information of pixels within the local flight reachable domain. The larger the value of posterior variance, the higher the water quality data missingness of the corresponding pixel and the higher the sampling and monitoring value.
[0048] At this point, the posterior variance of each pixel within the local flight reachable domain is obtained.
[0049] S003: Extract the spectral feature vectors of pixels within the local flight reachable domain. Based on the similarity between the spectral feature vectors of pixels within the local flight reachable domain and the spectral feature vectors in the pre-built water pollution prior feature library, remove some pixels within the local flight reachable domain and calculate the cognitive gain density of the remaining pixels. Combine the state information of the hyperspectral image acquisition location to extract the target sampling point and fit the flight path.
[0050] To eliminate natural disturbances such as wind, waves, and water surface glare, the probability that each pixel location within the reachable area of a local flight zone is a real contaminated area is evaluated.
[0051] A priori feature library for water pollution is pre-built. Specifically, for typical polluted water bodies such as cyanobacterial blooms, oil spills, and heavy metal pollution, hyperspectral data of various polluted water bodies are collected, preprocessed, and dimensionality reduced. For each type of polluted water body, 100 sets of representative pixel spectral feature vectors are selected and stored to form the priori feature library for water pollution, providing a unified reference standard for subsequent spectral feature matching and pollution authenticity determination. The spectral feature vectors are formed by arranging the hyperspectral data of the selected pixels in the principal component image obtained through dimensionality reduction, and can intuitively characterize the specific spectral characteristics of various types of pollution.
[0052] Extract the spectral feature vector of each pixel within the local flight reachable domain. The normalized value of the maximum cosine similarity between the pixel within the local flight reachable domain and all spectral feature vectors in the prior feature library of water pollution is denoted as the pollution similarity of the pixel within the local flight reachable domain. The product of the difference between the pollution similarity of the pixel within the local flight reachable domain and a preset reference parameter, and a preset stretching parameter, is denoted as the first product of the pixels within the local flight reachable domain. The negative of the first product is used as the exponent of a power raised to the power of the natural constant. The reciprocal of the sum of the calculated exponent and the number 1 is denoted as the pollution region confidence of the pixel within the local flight reachable domain.
[0053] It should be noted that this embodiment uses the sigmoid function to calculate the normalized value. In practical applications, implementers may use other methods of existing technology, such as the tanh function or the maximum-minimum normalization method, to calculate the normalized value, and no limitation is made here.
[0054] In this embodiment, the preset reference parameter for the benchmark point is set to 0.7, and the preset tensile parameter is set to 15.
[0055] Pixels with a confidence level of less than a preset perturbation threshold in the polluted area are removed from the local flight reachable domain.
[0056] In this embodiment, the preset disturbance threshold is set to 0.1. Pixels with a confidence level of less than the preset disturbance threshold in the polluted area are deleted, which can eliminate invalid high-entropy areas in the local flight reachable domain, such as wind waves and light spots.
[0057] The normalized value of the product of the inertial difference of the principal component image and the digit 1, and the product of the confidence of the contaminated region of the pixel in the local flight reachable domain of the principal component image and the posterior variance, is denoted as the cognitive gain density of the pixel in the local flight reachable domain of the principal component image.
[0058] It should be noted that this embodiment uses the maximum-minimum normalization method to calculate the normalized value of the product. In the maximum-minimum normalization method, when the difference between the maximum and minimum values is 0, the sum of this difference and a preset non-zero infinitesimal constant is used as the denominator to calculate the normalized value. In this embodiment, the preset non-zero infinitesimal constant is set to a value of [value missing]. In practical applications, implementers may use other methods from existing technologies, such as the tanh function or the sigmoid function, to calculate the normalized value; no restrictions are imposed here.
[0059] The greater the cognitive gain density of pixels within the reachable domain of local flight, the more significant the improvement effect of pixel location on water quality identification of the entire water area, and the higher the sampling priority.
[0060] The top 10% of local flight reachable pixels with the highest cognitive gain density are selected as candidate sampling points for the principal component image. The straight-line distance between the UAV's position in the principal component image and the candidate sampling point is recorded as the flight straight-line distance of the candidate sampling point. The product of the UAV's turning angle to the candidate sampling point and the preset turning parameter, plus the number 1, is recorded as the UAV turning cost of the candidate sampling point. The product of the flight straight-line distance of the candidate sampling point and the UAV turning cost is recorded as the flight cost of the candidate sampling point. Using a path search algorithm, the candidate sampling point with the highest cognitive gain density and the lowest flight cost is selected as the target sampling point. Bézier curves are used to fit the flight path, and the curvature of the flight path is controlled to be less than or equal to 10° / meter to avoid the UAV from making large-angle sharp turns. A smooth, continuous flight path that adapts to the flight characteristics of the UAV is generated to guide the UAV to complete an efficient and accurate autonomous sampling operation.
[0061] In this embodiment, the A-star algorithm is selected as the path search algorithm to determine the target sampling point. The use of the path search algorithm to select the optimal sampling point and the use of Bézier curves to complete the route fitting are well-known techniques and will not be described in detail here.
[0062] At this point, the target sampling points and flight paths have been obtained.
[0063] S004: Based on the difference in conductivity of the UAV's position in consecutive adjacent frames of hyperspectral images, identify the moment when the UAV stops sampling and output water quality monitoring data.
[0064] The Gaussian process regression algorithm is used to determine the simulated values of conductivity at the locations of all drones that acquired hyperspectral images. The mean of the squares of the differences between the conductivity at the locations of all drones that acquired hyperspectral images and the simulated values of conductivity is recorded as the global average error assessment value of the drone location in the last frame of the hyperspectral image.
[0065] Calculate the absolute value of the difference between the drone position in the hyperspectral image and the global average error assessment value of the drone position in the previous adjacent frame of the hyperspectral image. The ratio of the absolute value of the difference to the global average error assessment value of the drone position in the previous adjacent frame of the hyperspectral image is denoted as the residual change amplitude of the drone position in the hyperspectral image.
[0066] In the process of calculating the ratio, to avoid the denominator being zero, a preset value needs to be added to the denominator. An example of this preset value is... .
[0067] The residual variation amplitude is used to evaluate the convergence of the corresponding UAV to water quality identification after sampling at a new location. When the convergence tends to stabilize, the sampling operation of the UAV can be terminated, and complete water monitoring results can be output to avoid the power and computing power loss caused by invalid flights.
[0068] Specifically, when the residual change amplitude of the UAV position in three consecutive hyperspectral images is less than or equal to the preset stable amplitude, the water quality monitoring is determined to be converged. If the new sampling cannot significantly improve the accuracy of the overall water quality prediction, the UAV sampling is stopped and the water quality monitoring data is output.
[0069] In this embodiment, the preset stable amplitude is set to 5%.
[0070] The water quality monitoring data includes the drone flight trajectory, conductivity at the drone location, pollution distribution in the principal component image, and hyperspectral images of each drone location.
[0071] This completes the water quality monitoring.
[0072] Based on the same inventive concept as the above methods, this application also provides a water quality intelligent monitoring device based on UAV sampling, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of any one of the above-described water quality intelligent monitoring methods based on UAV sampling.
[0073] Please see Figure 2 , Figure 2This is a schematic diagram of the structure of a water quality intelligent monitoring system based on UAV sampling, provided in one embodiment of this application. In this embodiment, the units included in the water quality intelligent monitoring system are used to execute the steps in the corresponding embodiment of the water quality intelligent monitoring method based on UAV sampling. See also... Figure 2 The intelligent water quality monitoring system includes: a data acquisition module, a posterior variance determination module, a sampling point extraction module, and a sampling stop module.
[0074] The data acquisition module is used to acquire continuous frames of hyperspectral images of the water body to be sampled, the status information of the image acquisition location and the conductivity, and to reduce the dimensionality of the hyperspectral images to obtain principal component images; The posterior variance determination module is used to calculate the dominant texture direction at the location of the local window based on the gradient magnitude of the pixel at the location of the local window of a preset size in the principal component image; calculate the inertial difference of the previous principal component image in adjacent frames based on the texture dominant vector of the principal component images in adjacent frames; divide the local flight reachable domain from the corresponding principal component image based on the state information of the hyperspectral image acquisition location and the corresponding principal component image, and identify sparse observation anchors; and obtain the posterior variance of each pixel in the local flight reachable domain based on the Euclidean distance between the pixel in the local flight reachable domain and the sparse observation anchors, as well as the gradient direction of the pixel in the local flight reachable domain. The sampling point extraction module is used to extract the spectral feature vectors of pixels within the local flight reachable domain. Based on the similarity between the spectral feature vectors of pixels within the local flight reachable domain and the spectral feature vectors in the pre-built water pollution prior feature library, some pixels within the local flight reachable domain are removed, and the cognitive gain density of the remaining pixels is calculated. Combined with the state information of the hyperspectral image acquisition location, the target sampling points are extracted and the flight path is fitted. The stop sampling module is used to identify the moment when the drone stops sampling based on the difference in conductivity of the drone's position in consecutive adjacent frames of hyperspectral images, and output water quality monitoring data.
[0075] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the protection scope of this application.
Claims
1. A water quality intelligent monitoring method based on UAV sampling, characterized in that, The method includes the following steps: Collect continuous frame hyperspectral images of the water body to be sampled, along with the status information and conductivity of the image acquisition location. Reduce the dimensionality of the hyperspectral images to obtain principal component images. Based on the gradient magnitude of the pixels within the local window of a preset size in the principal component image, the dominant texture direction at the location of the local window is calculated. Based on the dominant texture vectors of the principal component images in adjacent frames, the inertial difference between the previous principal component images in adjacent frames is calculated. Based on the state information of the hyperspectral image acquisition location and the corresponding principal component image, the local flight reachable region is divided from the corresponding principal component image, and sparse observation anchors are identified. Based on the Euclidean distance between the pixels in the local flight reachable region and the sparse observation anchors, and the gradient direction of the pixels in the local flight reachable region, the posterior variance of each pixel in the local flight reachable region is obtained. Extract the spectral feature vectors of pixels within the local flight reachable domain. Based on the similarity between the spectral feature vectors of pixels within the local flight reachable domain and the spectral feature vectors in the pre-built water pollution prior feature library, remove some pixels within the local flight reachable domain and calculate the cognitive gain density of the remaining pixels. Combine the state information of the hyperspectral image acquisition location to extract target sampling points and fit the flight path. Based on the difference in conductivity of the drone's location in consecutive adjacent frames of hyperspectral images, the moment when the drone stopped sampling is identified, and water quality monitoring data is output.
2. The intelligent water quality monitoring method based on UAV sampling as described in claim 1, characterized in that, The process for determining the dominant texture direction at the location of the local window is as follows: A local window of a preset size is used to traverse the principal component image. For a local window located at any position in the principal component image, a second-order structure tensor is constructed based on the gradient magnitude of all pixels within the local window, and eigenvalue decomposition is performed. The eigenvector corresponding to the largest eigenvalue is selected as the dominant texture direction of the local window at that position.
3. The intelligent water quality monitoring method based on UAV sampling as described in claim 1, characterized in that, The process of constructing the inertial differences of the principal component images is as follows: The ratio of the inner product of the dominant texture vectors of adjacent principal component images to the product of the modulus is denoted as the first ratio of adjacent principal component images. The difference between the absolute value of the number 1 and the first ratio of adjacent principal component images is denoted as the inertial difference of the previous principal component image in the adjacent frames.
4. The intelligent water quality monitoring method based on UAV sampling as described in claim 1, characterized in that, The specific process of dividing the local flight reachability domain from the corresponding principal component image and identifying sparse observation anchors based on the state information of the hyperspectral image acquisition location and the corresponding principal component image includes: The status information includes the location of the UAV; within the principal component image, a circular local flight reachable domain is divided with the GPS coordinates of the UAV corresponding to the principal component image as the center and a preset local radius as the radius; the pixels within the local flight reachable domain in the principal component image are clustered, and the cluster centers of all obtained clusters are recorded as sparse observation anchor points.
5. The intelligent water quality monitoring method based on UAV sampling as described in claim 1, characterized in that, The process for determining the posterior variance of the pixel is as follows: Based on the gradient direction of pixels in the principal component image, a rotation matrix for each pixel is constructed. The midpoint of a line segment with two pixels as endpoints is selected, and the two-dimensional coordinate difference vector between the two pixels is extracted. The rotation matrix corresponding to the selected midpoint is used to perform a rotation transformation on the two-dimensional coordinate difference vector between the endpoints of the line segment corresponding to the midpoint, mapping the two-dimensional coordinate difference vector to a coordinate system perpendicular to the diffusion direction of pollutants. The spatial correlation distance between the two pixels is calculated based on the transformed coordinate components. The spatial correlation distance between the two pixels is introduced into the radial basis function to construct an anisotropic spatial covariance kernel function. The formula for calculating the posterior variance is: in, This indicates the pixels within the local flight reachable domain of the principal component image. The posterior variance; Represents pixels With pixels The anisotropic space covariance kernel function; Represents pixels The row vector determined by the anisotropic spatial covariance kernel function of all sparse observation anchors; Represents all sparse observation anchor points and pixels. The column vectors determined by the anisotropic space covariance kernel function; This represents the matrix determined by the anisotropic spatial covariance kernel function among all sparse observation anchors.
6. The intelligent water quality monitoring method based on UAV sampling as described in claim 1, characterized in that, The specific process of removing some pixels within the local flight reachable domain based on the similarity between the spectral feature vectors of pixels within the local flight reachable domain and the spectral feature vectors in a pre-built water pollution prior feature database, and then calculating the cognitive gain density of the remaining pixels, includes the following: The normalized value of the maximum cosine similarity between the pixel within the local flight reachable region and all spectral feature vectors in the prior feature library of water pollution is denoted as the pollution similarity of the pixel within the local flight reachable region. The product of the difference between the pollution similarity of the pixel within the local flight reachable region and the preset reference parameter and the preset stretching parameter is denoted as the first product of the pixel within the local flight reachable region. The negative of the first product is taken as the exponent of the power of the natural constant. The reciprocal of the sum of the calculated power and the number 1 is denoted as the pollution region confidence of the pixel within the local flight reachable region. Pixels with a confidence level of less than a preset disturbance threshold in the polluted area are removed from the local flight reachable domain. The normalized value of the product of the inertial difference of the principal component image and the digit 1, and the product of the confidence of the contaminated region of the pixel in the local flight reachable domain of the principal component image and the posterior variance, is denoted as the cognitive gain density of the pixel in the local flight reachable domain of the principal component image.
7. The intelligent water quality monitoring method based on UAV sampling as described in claim 4, characterized in that, The process for extracting the target sampling points is as follows: The top 10% of local flight reachable pixels with the highest cognitive gain density are selected as candidate sampling points of the principal component image. The straight-line distance between the UAV position corresponding to the principal component image and the candidate sampling point is recorded as the flight straight-line distance of the candidate sampling point. The product of the UAV's turning angle to the candidate sampling point and the preset turning parameter, plus the number 1, is recorded as the UAV turning cost of the candidate sampling point. The product of the flight straight-line distance of the candidate sampling point and the UAV turning cost is recorded as the flight cost of the candidate sampling point. Using a path search algorithm, the candidate sampling point with the highest cognitive gain density and the lowest flight cost is selected as the target sampling point.
8. The intelligent water quality monitoring method based on UAV sampling as described in claim 4, characterized in that, The process of identifying the moment when the drone stops sampling based on the difference in conductivity of the drone's position in consecutive adjacent frames of hyperspectral images includes the following: The mean of the squared differences between the conductivity of the UAV positions in all acquired hyperspectral images and the simulated conductivity values is recorded as the global average error assessment value of the UAV position in the last frame of the hyperspectral image. Calculate the absolute value of the difference between the drone position in the hyperspectral image and the global average error assessment value of the drone position in the previous adjacent frame of the hyperspectral image. The ratio of the absolute value of the difference to the global average error assessment value of the drone position in the previous adjacent frame of the hyperspectral image is denoted as the residual change amplitude of the drone position in the hyperspectral image. When the residual change amplitude of the UAV position in three consecutive frames of hyperspectral images is less than or equal to the preset stable amplitude, UAV sampling is stopped.
9. A smart water quality monitoring device based on UAV sampling, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1-8.
10. A smart water quality monitoring system based on UAV sampling, implementing the method as described in claim 1, characterized in that, The intelligent water quality monitoring system includes: The data acquisition module is used to acquire continuous frames of hyperspectral images of the water body to be sampled, the status information of the image acquisition location and the conductivity, and to reduce the dimensionality of the hyperspectral images to obtain principal component images; The posterior variance determination module is used to calculate the dominant texture direction at the location of the local window based on the gradient magnitude of the pixel at the location of the local window of a preset size in the principal component image; calculate the inertial difference of the previous principal component image in adjacent frames based on the texture dominant vector of the principal component images in adjacent frames; divide the local flight reachable domain from the corresponding principal component image based on the state information of the hyperspectral image acquisition location and the corresponding principal component image, and identify sparse observation anchors; and obtain the posterior variance of each pixel in the local flight reachable domain based on the Euclidean distance between the pixel in the local flight reachable domain and the sparse observation anchors, as well as the gradient direction of the pixel in the local flight reachable domain. The sampling point extraction module is used to extract the spectral feature vectors of pixels within the local flight reachable domain. Based on the similarity between the spectral feature vectors of pixels within the local flight reachable domain and the spectral feature vectors in the pre-built water pollution prior feature library, some pixels within the local flight reachable domain are removed, and the cognitive gain density of the remaining pixels is calculated. Combined with the state information of the hyperspectral image acquisition location, the target sampling points are extracted and the flight path is fitted. The stop sampling module is used to identify the moment when the drone stops sampling based on the difference in conductivity of the drone's position in consecutive adjacent frames of hyperspectral images, and output water quality monitoring data.