Unmanned aerial vehicle hyperspectral intelligent inversion model construction method for water environment prediction
By constructing a joint spectral-spatial data matrix and performing neighborhood spectral convolution operations, combined with multi-scale feature embedding algorithms and local anomaly processing, the stability and accuracy issues of hyperspectral data in complex aquatic environments were resolved, enabling high-precision prediction of aquatic environmental parameters.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU VOCATIONAL COLLEGE OF BUSINESS
- Filing Date
- 2026-04-21
- Publication Date
- 2026-07-07
Smart Images

Figure CN122090328B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water environment remote sensing monitoring technology, specifically to a method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction. Background Technology
[0002] In scenarios such as eutrophication monitoring of lakes, nearshore seas, and reservoirs, UAVs equipped with hyperspectral sensors are widely used to invert water environment parameters such as chlorophyll-a, suspended solids, and dissolved organic matter. However, complex aquatic environments often exhibit microscale surface disturbances, local aerosol reflections, and shoreline shadowing, which can easily lead to anomalous drift in hyperspectral data within a narrow band. This makes it difficult for traditional inversion methods to distinguish the coupling effect between the real water body's spectral response and local environmental noise when building models, resulting in decreased parameter prediction stability. Existing technologies often focus on spectral feature selection or simple machine learning modeling, lacking a joint modeling mechanism for flight trajectory disturbances, spatial neighborhood spectral coupling, and time-series reflectance distortion. This leads to problems such as large fluctuations in inversion accuracy and difficulty in identifying local anomalies in small-scale water environment prediction tasks. Therefore, it is necessary to propose a UAV-based intelligent hyperspectral inversion model construction method for water environment prediction to improve the stability and reliability of parameter prediction under complex water environment conditions. Summary of the Invention
[0003] The purpose of this invention is to provide a method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction, so as to overcome the shortcomings of the prior art.
[0004] To achieve the above objectives, the present invention provides the following technical solution: a method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction, comprising:
[0005] Acquire multi-band reflectance data of water bodies and corresponding flight trajectory attitude parameters collected by a hyperspectral sensor mounted on a UAV, construct a spectral-spatial joint data matrix, and generate an initial spectral feature matrix containing band gradients and spatial reflectance differences through neighborhood spectral convolution operation;
[0006] Based on the spatial coordinate relationship of the initial spectral feature matrix, a spectral coupling network for the water body neighborhood is constructed, and the spectral perturbation transfer weights between each node are calculated to obtain a set of spectral coupling weights representing the local water body reflection and propagation relationship.
[0007] The spectral coupling weight set is input into the flight attitude disturbance compensation model, and the initial spectral feature matrix is subjected to trajectory correction mapping to generate a stable spectral feature sequence.
[0008] Based on the stable spectral feature sequence, a water environment parameter response function is constructed, and a nonlinear mapping relationship between spectral features and water environment parameters is established using a multi-scale feature embedding algorithm to generate an inversion model;
[0009] Based on the inversion model, the spatial distribution of predicted water environment parameters is calculated, and neighborhood propagation analysis is performed on the prediction residuals to extract local anomaly spectral indices.
[0010] When the local anomaly spectral index exceeds a preset threshold, the inversion model is adaptively updated with weights, and the final water environment parameter prediction results are output.
[0011] Preferably, the process of generating an initial spectral feature matrix containing band gradients and spatial reflection differences through neighborhood spectral convolution operations includes:
[0012] A fixed neighborhood window is established based on the two-dimensional spatial coordinates of each pixel in the spectral-spatial joint data matrix. The central pixel and its eight surrounding neighboring pixels form a spatial neighborhood set, and the multi-band reflectance sequence corresponding to each pixel in the spatial neighborhood set is extracted.
[0013] The reflectance difference between adjacent bands in the multi-band reflectance sequence in the spatial neighborhood set is calculated according to the wavelength order to obtain the band gradient sequence characterizing the spectral change trend. The band gradient sequence is then spliced with the original multi-band reflectance sequence to form an extended spectral vector.
[0014] Using the extended spectral vector as input, a neighborhood spectral convolution kernel is constructed. By performing a weighted convolution operation on the extended spectral vectors of each pixel in the spatial neighborhood set, the reflectance difference response value between the center pixel and the neighboring pixels is calculated.
[0015] The convolution response values of each central pixel are arranged according to their two-dimensional spatial positions to generate an initial spectral feature matrix.
[0016] Preferably, the process of calculating the spectral perturbation transfer weights between nodes includes:
[0017] The spatial distance between any two pixels is calculated based on the two-dimensional spatial coordinates corresponding to each pixel in the initial spectral feature matrix. A preset neighborhood distance threshold is used as the connection criterion. When the spatial distance between two pixels is less than the neighborhood distance threshold, a node connection relationship is established, thereby forming a set of nodes and a set of edges of the water body neighborhood spectral coupling network.
[0018] Extract the initial spectral feature vector corresponding to each node in the water body neighborhood spectral coupling network, and calculate the spectral difference value between adjacent nodes;
[0019] A joint weighting function is constructed based on the spatial distance and spectral difference value, and the coupling weight between nodes is calculated by multiplying the distance attenuation coefficient and the spectral similarity coefficient.
[0020] The coupling weights are normalized to obtain the spectral perturbation transfer weights between nodes, and the spectral perturbation transfer weights are assigned to the corresponding connection edges in the water body neighborhood spectral coupling network.
[0021] Preferably, the process of performing trajectory correction mapping on the initial spectral feature matrix to generate a stable spectral feature sequence includes:
[0022] Extract the heading angle, pitch angle and roll angle recorded during the flight of the UAV, and construct an attitude rotation matrix based on the flight attitude parameters. At the same time, match the spectral coupling weight set with the spatial coordinates of each pixel to form joint feature data containing attitude information and spectral coupling weight.
[0023] The spatial mapping position of each pixel under ideal vertical observation state is calculated based on the attitude rotation matrix, and the initial spectral feature vector of the neighboring pixels around the mapping position is weighted and propagated according to the spectral coupling weight set to obtain the spectral response value after attitude disturbance compensation.
[0024] The spectral response values after attitude perturbation compensation and the spatial mapping positions of the corresponding pixels are reordered to construct the trajectory-corrected spectral feature matrix;
[0025] The trajectory-corrected spectral feature matrix is sequentially arranged according to the UAV flight time sequence to obtain a stable spectral feature sequence.
[0026] Preferably, the process of establishing a nonlinear mapping relationship between spectral features and water environment parameters using a multi-scale feature embedding algorithm to generate an inversion model includes:
[0027] The stable spectral feature vectors corresponding to each pixel are extracted from the stable spectral feature sequence, and a training sample set is constructed by combining the measured values of water environment parameters collected synchronously on site. The response band set is determined by calculating the correlation coefficient between each spectral feature dimension and the water environment parameters, and the water environment parameter response function is constructed based on the response band set.
[0028] The stable spectral feature vector is input into a multi-scale feature embedding algorithm. By calculating the sliding window spectral statistical features within different spectral band scales, a multi-scale spectral feature vector is generated. The features at different scales are then weighted and combined to obtain a multi-scale embedded feature vector.
[0029] Using the multi-scale embedded feature vector as input and the measured values of water environment parameters as output, a nonlinear mapping function is constructed, and the inversion model parameters are trained by iteratively minimizing the prediction error.
[0030] The trained nonlinear mapping function is combined with the water environment parameter response function to form an inversion model for predicting water environment parameters.
[0031] Preferably, the process of calculating the spatial distribution results of predicted water environment parameters based on the inversion model includes:
[0032] The stable spectral feature vectors of each pixel in the stable spectral feature sequence are input into the inversion model. The corresponding predicted values of water environment parameters are calculated pixel by pixel, and the two-dimensional spatial coordinates of each pixel are recorded, thereby forming a parameter prediction data set containing spatial coordinates and predicted values.
[0033] A regular spatial grid is established based on the two-dimensional spatial coordinates of each pixel in the parameter prediction data set, and the predicted water environment parameters of the corresponding pixels are mapped to the spatial grid cells to obtain the initial water environment parameter distribution matrix.
[0034] The parameter gradient values between adjacent grid cells are calculated in the initial water environment parameter distribution matrix, and the gradient anomaly region is adjusted by neighborhood weighting according to a preset spatial smoothing threshold.
[0035] The adjusted water environment parameter distribution matrix is reconstructed according to the two-dimensional spatial coordinate order to generate the spatial distribution results of water environment parameters in a continuous spatial expression.
[0036] Preferably, the process of performing neighborhood propagation analysis on the predicted residuals and extracting local anomaly spectral indices includes:
[0037] The predicted values of water environment parameters obtained from the inversion model are used to calculate the prediction residuals with the measured values of water environment parameters of the corresponding pixels. The prediction residuals are then associated with the two-dimensional spatial coordinates of the pixels to form a set of residual spatial distributions.
[0038] A fixed neighborhood window is constructed based on the two-dimensional spatial coordinates of the pixels in the residual spatial distribution set, and the residual difference value between the predicted residual of the center pixel and the predicted residual of the neighboring pixels is calculated. The residual difference value is used to characterize the local residual propagation intensity.
[0039] The residual difference value is jointly calculated with the stable spectral feature vector of the corresponding pixel. The local abnormal spectral response value is obtained by multiplying each dimension of the stable spectral feature vector by the residual propagation intensity and then performing a weighted sum.
[0040] The local abnormal spectral response values are normalized, and abnormal pixels are screened according to a preset abnormality judgment threshold, thereby extracting the local abnormal spectral index.
[0041] Preferably, the process of adaptively updating the weights of the inversion model and outputting the final water environment parameter prediction results includes:
[0042] The system iterates through the local abnormal spectral indices corresponding to each pixel. When a local abnormal spectral index exceeds a preset abnormality threshold, the pixel is marked as an abnormal sample pixel. The system then extracts the stable spectral feature vectors and the water environment parameter prediction residuals corresponding to the abnormal sample pixels to construct an abnormal sample set. Based on the abnormal sample set, the system calculates the contribution of each stable spectral feature dimension to the prediction residuals. By normalizing the correlation coefficients between each dimension of the stable spectral feature vector and the prediction residuals, feature weight adjustment coefficients are generated. These feature weight adjustment coefficients are applied to the connection weights of the corresponding input features in the inversion model. The inversion model weights are iteratively corrected using a gradient descent update algorithm to reduce the prediction residuals corresponding to the abnormal samples. The updated inversion model is then re-input into the stable spectral feature sequence to perform water environment parameter prediction calculations. Finally, the system outputs the water environment parameter prediction results according to the pixel two-dimensional spatial coordinate order.
[0043] The technical effects and advantages provided by the present invention in the above technical solution are as follows:
[0044] 1. This invention constructs a joint spectral-spatial data matrix and introduces neighborhood spectral convolution operations to extract an initial spectral feature matrix that simultaneously contains band gradient features and spatial reflectance difference features. Based on this, a water body neighborhood spectral coupling network is further constructed, and spectral perturbation propagation weights are calculated, thereby characterizing the propagation relationship of water reflectance within a local spatial range. This approach not only effectively utilizes the continuous spectral information of hyperspectral data but also combines the spatial coupling relationship between water body neighborhood pixels to suppress spectral anomalies caused by local water disturbances, microscale suspended matter aggregation, or local illumination changes in complex aquatic environments. This significantly enhances the feature representation capability of hyperspectral data and improves the stability and reliability of the water environment parameter inversion process.
[0045] 2. This invention constructs a flight attitude disturbance compensation model to perform trajectory correction mapping on the initial spectral feature matrix, and combines a multi-scale feature embedding algorithm to establish a nonlinear mapping relationship between stable spectral features and water environment parameters. Simultaneously, it utilizes prediction residual neighborhood propagation analysis to extract local anomalous spectral indices, and adaptively updates the weights of the inversion model when the local anomalous spectral indices exceed a threshold. Through these techniques, local anomalous regions caused by complex water environment changes can be dynamically identified during water environment prediction, and the inversion model can be specifically corrected. This reduces the interference of local anomalous samples on the overall prediction results, ultimately achieving high-precision prediction of the spatial distribution of water environment parameters and improving the application effect of UAV hyperspectral technology in the refined monitoring of lakes, reservoirs, and nearshore waters. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0047] Figure 1 This is a flowchart of a method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction according to the present invention.
[0048] Figure 2 This is a flowchart of the inversion model update method of the present invention. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] For examples, please refer to Figure 1 , 2 As shown in this embodiment, the method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction includes:
[0051] The system acquires multi-band reflectance data of water bodies and corresponding flight trajectory attitude parameters collected by a hyperspectral sensor mounted on a UAV, constructs a spectral-spatial joint data matrix, and generates an initial spectral feature matrix containing band gradients and spatial reflectance differences through neighborhood spectral convolution operation.
[0052] In this embodiment, the steps for acquiring multi-band reflectivity data of water bodies and corresponding flight trajectory attitude parameters collected by a hyperspectral sensor mounted on a UAV, and constructing a spectral-spatial joint data matrix are as follows.
[0053] First, a pushbroom hyperspectral imager mounted on a drone is used to collect data by low-altitude scanning of the target water area. The hyperspectral imager has a spectral range of 400 nm to 1000 nm and a spectral resolution of 5 nm. Samples are taken at fixed intervals between adjacent bands to form a continuous spectral sequence. The drone flies at a constant altitude, between 80 m and 120 m, along a preset flight path, maintaining a speed of 3 m / s to 5 m / s to ensure at least 20% overlap between adjacent scan strips.
[0054] During the UAV's flight, the onboard inertial measurement unit synchronously records the UAV's flight trajectory and attitude parameters. These parameters include a timestamp, three-dimensional geographic coordinates, heading angle, pitch angle, and roll angle. The three-dimensional geographic coordinates are acquired via a Global Navigation Satellite System receiver and recorded as longitude, latitude, and altitude information. The inertial measurement unit records attitude change data at a sampling frequency of 100 Hz and aligns it with the hyperspectral image acquisition time according to a unified time reference.
[0055] Subsequently, the acquired raw hyperspectral image data underwent radiometric calibration. Radiometric calibration is performed by converting the raw digital quantization values into apparent radiance. Specifically, the calculation method is as follows: the raw digital quantization value of each pixel in the k-th band is denoted as... Using the gain coefficient obtained from laboratory calibration With bias coefficient The radiance was calculated. The expression is: The gain and bias coefficients were obtained from the factory calibration of the hyperspectral sensor. After obtaining the radiance, the apparent reflectance of the water body was calculated. A standard white board reflectance calibration method was introduced, and a standard white board with a known reflectance of 0.99 was placed within the flight area. The radiance of the corresponding wavelength band in the white board area was denoted as... The radiance of water body pixels is denoted as The reflectance of the water in the k-th waveband is... Calculate using the following formula: The reflectance sequence of each pixel across all bands is obtained through the above calculations, thus forming multi-band reflectance data of the water body.
[0056] Subsequently, the spatial coordinates of each pixel are determined. First, the ground projection position is calculated based on the longitude, latitude, and altitude information recorded by the UAV. Then, geometric correction is performed on the image by combining the camera's internal parameter matrix and attitude angles. The camera's internal parameter matrix is obtained through camera calibration and includes focal lengths fx and fy, as well as principal point coordinates cx and cy. When converting the image pixel coordinates (u,v) to ground coordinates (X,Y), a rotation matrix is constructed using attitude angles, and coordinate transformation is performed to obtain the two-dimensional position of each pixel in geographic space.
[0057] After spatial positioning is completed, the spatial coordinates of each pixel are combined with its corresponding multi-band reflectance sequence. Assuming the study area has N effective pixels, and each pixel contains M spectral bands, the two-dimensional spatial coordinates of the i-th pixel are then... Its reflectance sequence Concatenate the data according to a unified structure to construct a data vector: ;in, Let represent the reflectance of the i-th pixel in the M-th spectral band. All pixel data vectors are arranged in pixel number order to obtain a spectral-spatial joint data matrix of dimension N×(M+2). This spectral-spatial joint data matrix simultaneously contains water body spectral information and spatial location relationships, providing fundamental data for subsequent spectral feature extraction and water environment parameter inversion.
[0058] In this embodiment, the steps for generating an initial spectral feature matrix containing band gradients and spatial reflection differences through neighborhood spectral convolution operations are as follows.
[0059] A fixed neighborhood window is established based on the two-dimensional spatial coordinates of each pixel in the spectral-spatial joint data matrix. Specifically, taking any pixel as the center pixel, a three-row, three-column spatial neighborhood window is constructed by taking one pixel's distance in both the horizontal and vertical directions according to the two-dimensional spatial coordinates, so that the center pixel and its eight surrounding pixels form a spatial neighborhood set. For pixels located at the boundary, a mirror-fill method is used to fill in the missing pixels, so that the neighborhood window always maintains a three-row, three-column structure. Subsequently, the multi-band reflectance sequences corresponding to each pixel in the spatial neighborhood set are extracted from the spectral-spatial joint data matrix and arranged according to the spatial position of the pixels to form a neighborhood spectral data set.
[0060] The reflectance difference between adjacent bands in the multi-band reflectance sequence of the spatial neighborhood set is calculated in ascending order of wavelength to obtain the band gradient sequence. Specifically, the calculation method is as follows: Let the reflectance of a pixel in the k-th band be... Then the band gradient value corresponding to the k-th band Calculate using the following formula: The value of k ranges from 1 to the total number of bands minus 1. The above calculation yields a band gradient sequence with a length equal to the total number of bands minus 1. Subsequently, the original multi-band reflectance sequence and the corresponding band gradient sequence are concatenated in the same band order to form an extended spectral vector. This extended spectral vector is composed of the original reflectance information and spectral variation trend information, and is used to enhance the expressive power of spectral shape features.
[0061] A neighborhood spectral convolution kernel is constructed using the extended spectral vector as input, and convolution calculation is performed. The neighborhood spectral convolution kernel adopts a three-row, three-column structure, and its weights are defined according to spatial distance. Let the weight of the center pixel be... The weights of the four horizontal and vertical neighboring pixels are: The weights of the neighboring pixels in the four diagonal directions are The weight values are determined according to the inverse relationship of distance, and the calculation method is as follows: Then, all weights are normalized so that the sum of all weights is 1. During convolution calculation, the extended spectral vector of each pixel in the neighborhood window is multiplied with the corresponding convolution weight, and the product results are accumulated to obtain the convolution response vector corresponding to the center pixel. The convolution response vector reflects the degree of spectral difference between the center pixel and its neighboring pixels.
[0062] Finally, the convolutional response vectors calculated for each central pixel are arranged according to their two-dimensional spatial coordinates and associated with the spatial location of the corresponding pixel for storage. Assuming the study area contains N pixels and each convolutional response vector has a length of P, the initial spectral feature matrix, arranged in pixel order, forms a dimension N×P. This initial spectral feature matrix simultaneously contains band gradient information and spatial reflectance difference information, providing fundamental feature data for subsequent water environment parameter inversion calculations.
[0063] Based on the spatial coordinate relationship of the initial spectral feature matrix, a spectral coupling network for the water body neighborhood is constructed, and the spectral perturbation transfer weights between each node are calculated to obtain a set of spectral coupling weights representing the local water body reflection and propagation relationship.
[0064] In this embodiment, the specific implementation steps for constructing a water body neighborhood spectral coupling network based on the spatial coordinate relationship of the initial spectral feature matrix and calculating the spectral perturbation transfer weight between each node are as follows.
[0065] Calculate the spatial distance between any two pixels based on the two-dimensional spatial coordinates corresponding to each pixel in the initial spectral feature matrix. Let the two-dimensional spatial coordinates of the i-th pixel be... The two-dimensional spatial coordinates of the j-th pixel are The spatial distance between the two Calculate using the following formula: After calculating the spatial distance between all pixels, a neighborhood distance threshold is set. This threshold is determined based on the spatial resolution of the UAV imagery, specifically three times the image spatial resolution. For example, when the image spatial resolution is 0.5 meters, the neighborhood distance threshold is set to 1.5 meters. When the spatial distance between any two pixels is less than the neighborhood distance threshold, a connection is established between them, and the corresponding pixel is defined as a node in the water body neighborhood spectral coupling network. The connection between nodes is defined as an edge. By traversing all pixels and establishing node connections according to the above connection rules, a water body neighborhood spectral coupling network structure containing a set of nodes and a set of edges is formed.
[0066] Extract the initial spectral feature vector corresponding to each node from the initial spectral feature matrix. Let the initial spectral feature vector of the i-th node be: ; where p represents the dimension of the initial spectral eigenvector. This represents the value of the i-th node in the p-th spectral feature dimension. For any connected nodes i and j, calculate their spectral difference value. The spectral difference value is calculated using Euclidean distance, and the specific formula is as follows: The spectral difference value between each pair of adjacent nodes is obtained through the above calculation. The spectral difference value is used to characterize the degree of spectral perturbation between nodes. This represents the value of the i-th node in the k-th spectral feature dimension. This represents the value of the j-th node in the k-th spectral feature dimension.
[0067] Then, a joint weighting function is constructed based on the spatial distance and spectral difference values to calculate the coupling weights between nodes. First, a distance attenuation coefficient is constructed, calculated according to an exponential attenuation function: ;in The distance attenuation control parameter is set to half the neighborhood distance threshold, and is used to control the influence of spatial distance on the degree of weight attenuation. Subsequently, the spectral similarity coefficient is constructed, calculated according to the following formula: This calculation method results in a larger spectral similarity coefficient for smaller spectral differences. The coupling weights between nodes are then calculated by multiplying the distance attenuation coefficient and the spectral similarity coefficient. The initial coupling weights corresponding to all connecting edges in the water body neighborhood spectral coupling network are obtained through the above calculations.
[0068] Finally, the calculated coupling weights are normalized to obtain the spectral perturbation propagation weights. Specifically, for any node i, the sum of the coupling weights between all its neighboring nodes is calculated: ;in This represents the set of all adjacent nodes connected to node i. Then, the spectral perturbation transfer weight from node i to node j is calculated. The expression is: Through the above normalization process, the sum of the spectral perturbation transfer weights of node i pointing to all its neighboring nodes is made to be 1. Finally, the spectral perturbation transfer weights calculated between all nodes are assigned to the corresponding connection edges in the water body neighborhood spectral coupling network, thereby forming a set of spectral coupling weights representing the local water body reflection and propagation relationship.
[0069] The spectral coupling weight set is input into the flight attitude disturbance compensation model, and the initial spectral feature matrix is subjected to trajectory correction mapping to generate a stable spectral feature sequence.
[0070] In this embodiment, the specific steps for inputting the spectral coupling weight set into the flight attitude disturbance compensation model, performing trajectory correction mapping on the initial spectral feature matrix, and generating a stable spectral feature sequence are as follows.
[0071] The flight attitude parameters recorded during the UAV's flight are extracted, and a flight attitude rotation matrix is constructed. The UAV records the heading angle, pitch angle, and roll angle at the corresponding timestamp for each hyperspectral image acquisition moment. Let the heading angle be ψ, the pitch angle be θ, and the roll angle be ϕ. Based on the three-dimensional spatial attitude transformation rules, three basic rotation matrices are constructed. The rotation matrix around the roll axis is: The rotation matrix about the pitch axis is: The rotation matrix for rotating about the heading axis is: ;
[0072] Perform matrix multiplication on the three rotation matrices in the order of flight attitude to obtain the flight attitude rotation matrix: Subsequently, the spectral coupling weight set is matched with the two-dimensional spatial coordinates of each pixel in the initial spectral feature matrix, so that each pixel simultaneously has spatial coordinates, the initial spectral feature vector, and the spectral perturbation transfer weight between adjacent pixels, thereby forming joint feature data containing flight attitude parameters and spectral coupling weight information.
[0073] The spatial mapping position of each pixel under ideal vertical observation is calculated based on the flight attitude rotation matrix. Let the spatial position vector of a certain pixel in the UAV coordinate system be: ;in Let this be the drone's flight altitude. The spatial position vector is transformed using a flight attitude rotation matrix, and the corrected spatial position is calculated. ;in The inverse of the flight attitude rotation matrix is used to calculate the corrected two-dimensional spatial position. Subsequently, taking this spatial location as the center, pixels connected to it within its neighborhood are retrieved, and the initial spectral feature vectors corresponding to the neighboring pixels are weighted and propagated according to the spectral perturbation transfer weights in the spectral coupling weight set. Let the set of neighboring nodes of node i be N(i), and the initial spectral feature vectors corresponding to the neighboring nodes be... The spectral perturbation transfer weight is The spectral response vector after attitude perturbation compensation Calculate using the following formula: The spectral response value of each pixel after attitude disturbance compensation is obtained through the above calculation.
[0074] The spectral response vector after attitude perturbation compensation is reordered with its corresponding spatial mapping position. Specifically, based on the corrected two-dimensional spatial coordinates... All pixels are rearranged in spatial order from left to right and top to bottom, and the spectral response vectors corresponding to each pixel are combined in the same order to form the trajectory-corrected spectral feature matrix. If the study area contains N pixels and each spectral response vector has dimension p, then the dimension of the trajectory-corrected spectral feature matrix is N×p.
[0075] Finally, the trajectory-corrected spectral feature matrix is sequentially arranged according to the UAV's flight time. Specifically, based on the timestamp information recorded during hyperspectral data acquisition, all pixels are sorted from earliest to latest acquisition time, and the corresponding spectral response vectors are arranged sequentially to form a time-series data structure. This arrangement yields a stable spectral feature sequence, which reflects the true spectral changes in the water body after eliminating the effects of flight attitude disturbances, and provides stable input data for subsequent water environment parameter inversion calculations.
[0076] Based on the stable spectral feature sequence, a water environment parameter response function is constructed, and a nonlinear mapping relationship between spectral features and water environment parameters is established using a multi-scale feature embedding algorithm to generate an inversion model.
[0077] In this embodiment, the water environment parameter response function is constructed based on the stable spectral feature sequence, and the nonlinear mapping relationship between spectral features and water environment parameters is established using a multi-scale feature embedding algorithm. The specific implementation steps for generating the inversion model are as follows.
[0078] The stable spectral feature vectors corresponding to each pixel are extracted from the stable spectral feature sequence, and a training sample set is constructed by combining them with the measured values of water environment parameters collected synchronously on-site. Let the stable spectral feature vector of the i-th pixel be... Where p represents the spectral feature dimension. Simultaneously, the measured values of the water environment parameters corresponding to this pixel are recorded. The Pearson correlation coefficient between each spectral feature and aquatic environmental parameters was calculated for all samples. The formula for calculating the correlation coefficient is: Where n is the number of samples, Let be the average value of the k-th feature. This represents the average value of water environment parameters. The response band selection threshold is set to 0.35. At that time, the corresponding feature dimensions are included in the response band set. Then, the water environment parameter response function is constructed using the response band set, which is expressed as a weighted linear combination: Where S represents the set of response bands, The response coefficient is calculated using the least squares method.
[0079] Stable spectral feature vectors are input into a multi-scale feature embedding algorithm to generate multi-scale spectral feature vectors. The multi-scale feature embedding algorithm is implemented by constructing sliding windows with different band widths. The sliding window widths are set to 3, 5, and 7 consecutive spectral feature dimensions. For each window, three statistics are calculated within the window range: mean, variance, and maximum / minimum difference. Taking a window width of 3 as an example, the mean of the k-th window... The calculation formula is: The variance is calculated using the statistical variance formula, with the maximum and minimum difference being the maximum value minus the minimum value within the window. By repeating the above calculation for different window scales, statistical features at multiple scales are formed, and all statistical features are concatenated in sequence to obtain a multi-scale spectral feature vector.
[0080] A nonlinear mapping function is constructed using multi-scale spectral feature vectors as input and measured values of water environment parameters as output. This nonlinear mapping function is implemented using a three-layer feedforward neural network structure. The number of nodes in the input layer equals the number of dimensions of the multi-scale spectral features, the number of nodes in the hidden layer is set to half the number of nodes in the input layer, and the output layer consists of a single node representing the predicted value of the water environment parameter. The activation function for the hidden layer is the hyperbolic tangent function. The model training uses gradient descent to optimize parameters. Let the predicted value be... The measured value is The loss function is defined as the mean squared error: The network weights are continuously updated using the backpropagation algorithm, and training stops when the loss function decreases by less than 0.0001 in 20 consecutive iterations.
[0081] The trained nonlinear mapping function is combined with the water environment parameter response function to form an inversion model. Specifically, the water environment parameter response function is first used to calculate initial predicted values for stable spectral feature sequences. Then, these initial predicted values, along with multi-scale spectral feature vectors, are input into the nonlinear mapping function for final calculation, thus obtaining the water environment parameter prediction results. This process completes the inversion model for UAV hyperspectral water environment prediction.
[0082] Based on the inversion model, the spatial distribution of predicted water environment parameters is calculated, and neighborhood propagation analysis is performed on the prediction residuals to extract local anomalous spectral indices.
[0083] In this embodiment, the spatial distribution results of the predicted water environment parameters are calculated based on the inversion model, and the neighborhood propagation analysis is performed on the prediction residuals to extract local anomaly spectral indices. The specific implementation steps are as follows.
[0084] The stable spectral feature vectors of each pixel in the stable spectral feature sequence are input into the inversion model, and the corresponding predicted values of water environment parameters are calculated pixel by pixel. Let the stable spectral feature vector of the i-th pixel be... The stable spectral feature vector is input into the trained inversion model to obtain the predicted values of the corresponding water environment parameters. Simultaneously record the two-dimensional spatial coordinates corresponding to that pixel. The spatial coordinates are then combined with the predicted values to form a parameter prediction data vector: Arrange the parameter prediction data vectors of all pixels in order of pixel number to form a parameter prediction data set.
[0085] A regular spatial grid is established based on the two-dimensional spatial coordinates of each pixel in the parameter prediction dataset, and the predicted water environment parameters of the corresponding pixels are mapped to the spatial grid cells. The regular spatial grid is constructed with a fixed grid size, set to twice the image spatial resolution. Let the spatial grid cell number be... When pixel space coordinates When the value falls within the corresponding grid cell range, the predicted value will be... The values are assigned to the corresponding grid cell. If a single grid cell contains multiple pixels, the average of all predicted values within that cell is calculated as the parameter value for that cell, thus obtaining the initial water environment parameter distribution matrix. ; where k represents the number of pixels falling into that grid cell.
[0086] Then, the parameter gradient values between adjacent grid cells are calculated in the initial water environment parameter distribution matrix. Let a certain grid cell be... Its right adjacent grid cell is The adjacent grid cells below are The gradient values of the parameters are then calculated as follows: Then calculate the combined gradient value: The spatial smoothing threshold is set to 1.5 times the average gradient value of all grid cells. When the gradient value of a certain grid cell exceeds this spatial smoothing threshold, it is identified as a gradient anomaly region. For this region, a neighborhood weighted adjustment method is used for correction. Specifically, the weighted average of the parameter values of the eight surrounding grid cells is calculated as the update value, and the weights are distributed according to the reciprocal of the distance, thereby reducing the prediction bias caused by local abrupt changes.
[0087] The adjusted water environment parameter distribution matrix is reconstructed according to the two-dimensional spatial coordinate order to make the matrix index consistent with the actual spatial coordinates, thereby generating the spatial distribution results of water environment parameters in a continuous spatial expression.
[0088] After obtaining the spatial distribution results of water environment parameters, neighborhood propagation analysis is performed on the prediction residuals to extract local anomaly spectral indices.
[0089] The prediction residual is calculated based on the predicted values of water environment parameters obtained from the inversion model and the measured values of water environment parameters for the corresponding pixels. Let the measured value of the water environment parameter for the i-th pixel be... The predicted value is The formula for calculating the predicted residual is: The predicted residuals are then combined with the two-dimensional spatial coordinates of the pixels to form a set of residual spatial distributions. A fixed neighborhood window is constructed based on the two-dimensional spatial coordinates of the pixels in the residual spatial distribution set. The neighborhood window adopts a three-row, three-column structure, with the center pixel as the center, and eight neighboring pixels around it forming a neighborhood set. For each center pixel, the difference between its predicted residual and the predicted residuals of the neighboring pixels is calculated. Let the residual of the center pixel be... The residual of the neighboring pixels is The residual difference value is: Then, the average residual difference between the center pixel and all neighboring pixels is calculated as the residual propagation intensity: ; where n represents the number of neighboring pixels.
[0090] The residual propagation intensity is jointly calculated with the stable spectral eigenvector of the corresponding pixel. Let the stable spectral eigenvector be... The local anomalous spectral response value is calculated by multiplying each stable spectral feature by the residual propagation intensity and summing the results. This response value reflects the overall intensity of spectral changes under the influence of local residual propagation. The local anomalous spectral response values are normalized. Let the maximum value of the local anomalous spectral response values for all pixels be... The minimum value is Then the normalized local anomaly spectral index is: The anomaly detection threshold is set at 0.7, and the local anomaly spectral index is... When the value is ≥0.7, the pixel is identified as an anomalous pixel. The above steps are used to extract local anomalous spectral indices characterizing the degree of local spectral anomalies, which are then used to identify local anomalous areas in water environment prediction.
[0091] When the local anomaly spectral index exceeds a preset threshold, the inversion model is adaptively updated with weights, and the final water environment parameter prediction results are output.
[0092] In this embodiment, when the local abnormal spectral index exceeds a preset threshold, the inversion model is updated with adaptive weights, and the final water environment parameter prediction results are output. The specific implementation steps are as follows.
[0093] The local anomaly spectral indices corresponding to all pixels are iterated and compared with a preset anomaly detection threshold. The anomaly detection threshold is set to 0.7. When the local anomaly spectral index of a certain pixel... If the value is greater than 0.7, the pixel is identified as an anomalous sample pixel. Subsequently, the stable spectral feature vector corresponding to the anomalous sample pixel is extracted. and its water environment parameter prediction residuals All anomalous sample pixels are then aggregated in numerical order to construct an anomalous sample set. This anomalous sample set is used to identify regions where the inversion model produces prediction bias under specific spectral characteristics.
[0094] The contribution of each stable spectral feature dimension to the prediction residual is calculated based on the set of outlier samples. Specifically, the Pearson correlation coefficient between each stable spectral feature dimension and the prediction residual is calculated. Then, the absolute values of all correlation coefficients are normalized to obtain the feature weight adjustment coefficients: The feature weight adjustment coefficient is used to represent the degree of influence of each stable spectral feature dimension on the prediction error.
[0095] The feature weight adjustment coefficients are applied to the input feature connection weights in the inversion model, and the model weights are iteratively corrected using a gradient descent update algorithm. Let the connection weight corresponding to the k-th feature between the input layer and the hidden layer of the inversion model be... The updated weight calculation method is as follows: In the formula, Let L represent the updated weights, L denote the model loss function (still using the mean squared error function), and η represent the learning rate, set to 0.01. The gradient of the loss function with respect to each connection weight is calculated using the backpropagation algorithm, and the weight parameters are updated according to the formula above. Iterative training continues until the loss function decreases by less than 0.00005 over 15 consecutive iterations, at which point the update stops, resulting in the updated inversion model.
[0096] Finally, the updated inversion model is reapplied to the stable spectral feature sequence, and the stable spectral feature vectors of all pixels are recalculated to obtain new predicted values for water environment parameters. Subsequently, the predicted values are spatially arranged according to the two-dimensional spatial coordinates corresponding to each pixel, mapping them to their corresponding spatial locations, thereby outputting the final predicted water environment parameters, which characterize the spatial distribution of water environment parameters in the target water area.
[0097] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction, characterized by: include: Acquire multi-band reflectance data of water bodies and corresponding flight trajectory attitude parameters collected by a hyperspectral sensor mounted on a UAV, construct a spectral-spatial joint data matrix, and generate an initial spectral feature matrix containing band gradients and spatial reflectance differences through neighborhood spectral convolution operation; Based on the spatial coordinate relationship of the initial spectral feature matrix, a spectral coupling network for the water body neighborhood is constructed, and the spectral perturbation transfer weights between each node are calculated to obtain a set of spectral coupling weights representing the local water body reflection and propagation relationship. The process of calculating the spectral perturbation transfer weights between nodes includes: The spatial distance between any two pixels is calculated based on the two-dimensional spatial coordinates corresponding to each pixel in the initial spectral feature matrix. A preset neighborhood distance threshold is used as the connection criterion. When the spatial distance between two pixels is less than the neighborhood distance threshold, a node connection relationship is established, thereby forming a set of nodes and a set of edges of the water body neighborhood spectral coupling network. Extract the initial spectral feature vector corresponding to each node in the water body neighborhood spectral coupling network, and calculate the spectral difference value between adjacent nodes; A joint weighting function is constructed based on the spatial distance and spectral difference value, and the coupling weight between nodes is calculated by multiplying the distance attenuation coefficient and the spectral similarity coefficient. The coupling weights are normalized to obtain the spectral perturbation transfer weights between nodes, and the spectral perturbation transfer weights are assigned to the corresponding connection edges in the water body neighborhood spectral coupling network. Among them, the distance attenuation coefficient Calculated according to the exponential decay function: In the formula, For distance attenuation control parameters, The spatial distance is used; and a spectral similarity coefficient is constructed, which is calculated according to the following formula: In the formula, This represents the spectral difference value. The spectral coupling weight set is input into the flight attitude disturbance compensation model, and the initial spectral feature matrix is subjected to trajectory correction mapping to generate a stable spectral feature sequence. Based on the stable spectral feature sequence, a water environment parameter response function is constructed, and a nonlinear mapping relationship between spectral features and water environment parameters is established using a multi-scale feature embedding algorithm to generate an inversion model; Based on the inversion model, the spatial distribution of predicted water environment parameters is calculated, and neighborhood propagation analysis is performed on the prediction residuals to extract local anomaly spectral indices. When the local anomaly spectral index exceeds a preset threshold, the inversion model is adaptively updated with weights, and the final water environment parameter prediction results are output.
2. The method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction according to claim 1, characterized in that: The process of generating an initial spectral feature matrix containing band gradients and spatial reflection differences through neighborhood spectral convolution operations includes: A fixed neighborhood window is established based on the two-dimensional spatial coordinates of each pixel in the spectral-spatial joint data matrix. The central pixel and its eight surrounding neighboring pixels form a spatial neighborhood set, and the multi-band reflectance sequence corresponding to each pixel in the spatial neighborhood set is extracted. The reflectance difference between adjacent bands in the multi-band reflectance sequence in the spatial neighborhood set is calculated according to the wavelength order to obtain the band gradient sequence characterizing the spectral change trend. The band gradient sequence is then spliced with the original multi-band reflectance sequence to form an extended spectral vector. Using the extended spectral vector as input, a neighborhood spectral convolution kernel is constructed. By performing a weighted convolution operation on the extended spectral vectors of each pixel in the spatial neighborhood set, the reflectance difference response value between the center pixel and the neighboring pixels is calculated. The convolution response values of each central pixel are arranged according to their two-dimensional spatial positions to generate an initial spectral feature matrix.
3. The method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction according to claim 1, characterized in that: The process of performing trajectory correction mapping on the initial spectral feature matrix to generate a stable spectral feature sequence includes: Extract the heading angle, pitch angle and roll angle recorded during the flight of the UAV, and construct an attitude rotation matrix based on the flight attitude parameters. At the same time, match the spectral coupling weight set with the spatial coordinates of each pixel to form joint feature data containing attitude information and spectral coupling weight. The spatial mapping position of each pixel under ideal vertical observation state is calculated based on the attitude rotation matrix, and the initial spectral feature vector of the neighboring pixels around the mapping position is weighted and propagated according to the spectral coupling weight set to obtain the spectral response value after attitude disturbance compensation. The spectral response values after attitude perturbation compensation and the spatial mapping positions of the corresponding pixels are reordered to construct the trajectory-corrected spectral feature matrix; The trajectory-corrected spectral feature matrix is sequentially arranged according to the UAV flight time sequence to obtain a stable spectral feature sequence.
4. The method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction according to claim 1, characterized in that: The process of establishing a nonlinear mapping relationship between spectral features and water environment parameters using a multi-scale feature embedding algorithm to generate an inversion model includes: The stable spectral feature vectors corresponding to each pixel are extracted from the stable spectral feature sequence, and a training sample set is constructed by combining the measured values of water environment parameters collected synchronously on site. The response band set is determined by calculating the correlation coefficient between each spectral feature dimension and the water environment parameters, and the water environment parameter response function is constructed based on the response band set. The stable spectral feature vector is input into a multi-scale feature embedding algorithm. By calculating the sliding window spectral statistical features within different spectral band scales, a multi-scale spectral feature vector is generated. The features at different scales are then weighted and combined to obtain a multi-scale embedded feature vector. Using the multi-scale embedded feature vector as input and the measured values of water environment parameters as output, a nonlinear mapping function is constructed, and the inversion model parameters are trained by iteratively minimizing the prediction error. The trained nonlinear mapping function is combined with the water environment parameter response function to form an inversion model for predicting water environment parameters.
5. The method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction according to claim 1, characterized in that: The process of calculating and predicting the spatial distribution of water environment parameters based on the inversion model includes: The stable spectral feature vectors of each pixel in the stable spectral feature sequence are input into the inversion model. The corresponding predicted values of water environment parameters are calculated pixel by pixel, and the two-dimensional spatial coordinates of each pixel are recorded, thereby forming a parameter prediction data set containing spatial coordinates and predicted values. A regular spatial grid is established based on the two-dimensional spatial coordinates of each pixel in the parameter prediction data set, and the predicted water environment parameters of the corresponding pixels are mapped to the spatial grid cells to obtain the initial water environment parameter distribution matrix. The parameter gradient values between adjacent grid cells are calculated in the initial water environment parameter distribution matrix, and the gradient anomaly region is adjusted by neighborhood weighting according to a preset spatial smoothing threshold. The adjusted water environment parameter distribution matrix is reconstructed according to the two-dimensional spatial coordinate order to generate the spatial distribution results of water environment parameters in a continuous spatial expression.
6. The method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction according to claim 5, characterized in that: The process of performing neighborhood propagation analysis on the predicted residuals and extracting local anomaly spectral indices includes: The predicted values of water environment parameters obtained from the inversion model are used to calculate the prediction residuals with the measured values of water environment parameters of the corresponding pixels. The prediction residuals are then associated with the two-dimensional spatial coordinates of the pixels to form a set of residual spatial distributions. A fixed neighborhood window is constructed based on the two-dimensional spatial coordinates of the pixels in the residual spatial distribution set, and the residual difference value between the predicted residual of the center pixel and the predicted residual of the neighboring pixels is calculated. The residual difference value is used to characterize the local residual propagation intensity. The residual difference value is jointly calculated with the stable spectral feature vector of the corresponding pixel. The local abnormal spectral response value is obtained by multiplying each dimension of the stable spectral feature vector by the residual propagation intensity and then performing a weighted sum. The local abnormal spectral response values are normalized, and abnormal pixels are screened according to a preset abnormality judgment threshold, thereby extracting the local abnormal spectral index.
7. The method for constructing a UAV hyperspectral intelligent inversion model for water environment prediction according to claim 1, characterized in that: The process of adaptively updating the weights of the inversion model and outputting the final predicted water environment parameters includes: The system iterates through the local abnormal spectral indices corresponding to each pixel. When a local abnormal spectral index exceeds a preset abnormality threshold, the pixel is marked as an abnormal sample pixel. The system then extracts the stable spectral feature vectors and the water environment parameter prediction residuals corresponding to the abnormal sample pixels to construct an abnormal sample set. Based on the abnormal sample set, the system calculates the contribution of each stable spectral feature dimension to the prediction residuals. By normalizing the correlation coefficients between each dimension of the stable spectral feature vector and the prediction residuals, feature weight adjustment coefficients are generated. These feature weight adjustment coefficients are applied to the connection weights of the corresponding input features in the inversion model. The inversion model weights are iteratively corrected using a gradient descent update algorithm to reduce the prediction residuals corresponding to the abnormal samples. The updated inversion model is then re-input into the stable spectral feature sequence to perform water environment parameter prediction calculations. Finally, the system outputs the water environment parameter prediction results according to the pixel two-dimensional spatial coordinate order.