Optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring
By selecting the optimal multispectral channels and using hyperspectral reconstruction methods, the problem of high-frequency, real-time monitoring in complex water bodies using traditional water quality monitoring technologies has been solved. This has enabled high-precision and rapid inversion of water quality parameters, making it suitable for lightweight deployment on UAV platforms and improving the overall accuracy and real-time performance of water quality monitoring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 陕西省环境监测中心站
- Filing Date
- 2026-02-28
- Publication Date
- 2026-06-09
AI Technical Summary
Existing water quality monitoring technologies are unable to achieve high-precision and rapid water quality parameter inversion, especially in high-frequency and real-time monitoring of complex water bodies such as rivers, nearshore zones, sewage outlets, and aquaculture areas. Furthermore, traditional hyperspectral imaging systems are large in size and weight, making it difficult to achieve lightweight deployment on UAV platforms.
An optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring is adopted. By acquiring hyperspectral reflectance data and water quality parameter label data, a cascaded neural network model is constructed, and end-to-end joint optimization is performed to select the optimal multispectral channel parameters. A hyperspectral reconstruction sub-model and a water quality inversion sub-model are established to achieve the reconstruction of hyperspectral data and accurate prediction of water quality parameters.
It improves the accuracy and timeliness of water quality monitoring, reduces reliance on traditional laboratory analysis, realizes real-time and automated water quality monitoring, facilitates large-scale and efficient monitoring, reduces errors, and saves time and costs.
Smart Images

Figure CN121740771B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of water quality testing technology, and in particular to the optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring. Background Technology
[0002] Water quality monitoring is a crucial technical means for water environment management and pollution control. Existing water quality monitoring methods mainly include manual sampling combined with laboratory analysis, fixed automatic monitoring stations, and remote sensing-based spectral monitoring technology. Manual sampling and fixed-site monitoring can only reflect the water quality status at local locations and specific times, with limited spatial coverage. They are difficult to obtain continuous distribution information of water pollution, and the sampling and analysis cycles are long, with slow response times, making it difficult to respond promptly to sudden water pollution events.
[0003] Space-based hyperspectral remote sensing possesses continuous spectral information, giving it an advantage in identifying water components. However, its spatial resolution is typically only tens of meters, making it difficult to meet the monitoring needs of smaller-scale water bodies with complex boundaries, such as rivers, nearshore zones, sewage outlets, and aquaculture areas, and it is prone to pixel mixing issues. Furthermore, its temporal resolution and real-time performance are poor due to factors such as orbital period and cloud cover, making it difficult to achieve high-frequency, emergency monitoring.
[0004] To compensate for the shortcomings of space-based monitoring, UAV-borne airborne monitoring methods are gradually being applied. Existing airborne platforms mostly employ multispectral imagers, which, while offering advantages such as high spatial resolution and high mobility, have significant technical limitations: First, the number of bands is limited and their configuration is fixed; the channel design is primarily geared towards vegetation monitoring and has not been optimized for water quality parameter retrieval. Second, the spectral resolution is relatively low, and the channel bandwidth is wide, making it difficult to distinguish the subtle spectral characteristics of different substances in the water, easily leading to spectral confusion and decreased retrieval accuracy in turbid or eutrophic water bodies. Furthermore, traditional hyperspectral imaging systems are bulky and heavy, making lightweight deployment on UAV platforms difficult. These problems restrict the application of high-precision, rapid water quality monitoring technologies. Summary of the Invention
[0005] This application addresses the technical problems existing in the background art by proposing an optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring.
[0006] To solve the technical problem, the technical solution of this application is:
[0007] An optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring, the method comprising:
[0008] The hyperspectral reflectance data of the water body and the spatiotemporally matched water quality parameter label data of the hyperspectral reflectance data are acquired, and multiple candidate multispectral channels are represented as a set of trainable parameters including center wavelength and bandwidth; the hyperspectral reflectance data is filtered according to the spectral response function defined by the set of trainable parameters to generate simulated multispectral data;
[0009] A cascaded neural network model is established, including a hyperspectral reconstruction sub-model and a water quality inversion sub-model. The hyperspectral reconstruction sub-model maps the simulated multispectral data into reconstructed hyperspectral data, and the water quality inversion sub-model maps the reconstructed hyperspectral data into predicted water quality parameters.
[0010] A joint loss function is constructed, which includes the reconstruction error between the reconstructed hyperspectral data and the hyperspectral reflectance data, the inversion error between the predicted water quality parameters and the labeled water quality parameters, and the sparsity constraint on the trainable parameter set. With the goal of minimizing the joint loss function, the parameters of the trainable parameter set and the cascaded neural network model are jointly optimized end-to-end, and the final multispectral channel parameters are determined based on the optimized trainable parameter set.
[0011] Furthermore, the method also includes: obtaining multispectral observation data of the target water body based on the final multispectral channel parameters, and using the optimized cascaded neural network model to obtain the water quality parameters of the target water body.
[0012] Furthermore, the spectral response function is a Gaussian function; for the first... i Candidate channels, spectral response function Represented as:
[0013]
[0014] in:
[0015] For spectral wavelength variables;
[0016] The first one defined in the set of trainable parameters i The center wavelength of each channel;
[0017] For the first i The width parameter of the Gaussian spectral response function of the candidate multispectral channels is defined by the first parameter defined in the set of trainable parameters. i Bandwidth parameters of each channel It is obtained after nonlinear transformation.
[0018] Furthermore, the hyperspectral reflectance data is filtered, including:
[0019] For the i One candidate channel, simulated multispectral channel value Calculated by the following formula:
[0020]
[0021] in, The hyperspectral reflectance data; For the first i Spectral response function of each channel; This indicates the effective wavelength range of the hyperspectral data;
[0022] Traverse all N Each candidate channel will have its corresponding simulated multispectral channel value. Combine to generate a N 3D simulated multispectral data vector:
[0023]
[0024] Iterate through all samples in the training set to generate a simulated multispectral dataset:
[0025]
[0026] in, Indicates the first K The simulated multispectral data vector corresponding to each sample K This represents the number of samples.
[0027] Furthermore, the joint loss function Simultaneously used to constrain the accuracy of hyperspectral reconstruction, the accuracy of water quality parameter inversion, and the number of multispectral channels, it is expressed as:
[0028]
[0029] in, This is used to measure the reconstruction error between the reconstructed hyperspectral data and the true hyperspectral reflectance data; This is used to measure the inversion error between predicted water quality parameters and labeled water quality parameter data; This is a sparsity constraint term applied to the set of trainable parameters, used to suppress redundant multispectral channels; , , These are the corresponding weighting coefficients.
[0030] Furthermore, the end-to-end joint optimization includes:
[0031] The first stage of pre-training involves fixing the set of trainable parameters and training the parameters of the cascaded neural network model until the hyperspectral reconstruction sub-model and the water quality inversion sub-model initially converge.
[0032] The second stage involves joint optimization; unfreezing the set of trainable parameters and all parameters of the cascaded neural network model, performing overall training with the goal of minimizing the joint loss function, and simultaneously updating the channel parameters and network parameters through gradient backpropagation; thereby optimizing the multispectral channel parameters under the constraint of water quality parameter inversion error.
[0033] Furthermore, the water quality parameter label data and the predicted water quality parameter values include: chlorophyll concentration, suspended solids concentration, colored dissolved organic matter absorption coefficient, total phosphorus concentration, total nitrogen concentration, and chemical oxygen demand.
[0034] Furthermore, acquiring multispectral observation data of the target water body specifically includes:
[0035] Based on the final multispectral channel parameters, a corresponding filter is customized; the filter is integrated into the multispectral imaging system, and the target water body is imaged to obtain multispectral image data with spatial registration for each channel, thus obtaining the multispectral observation data.
[0036] Furthermore, the multispectral observation data is input into the optimized hyperspectral reconstruction sub-model to obtain a reconstructed hyperspectral data cube; the reconstructed hyperspectral data cube is input into the optimized water quality inversion sub-model to directly output a spatial distribution map of water quality parameters concentration.
[0037] Furthermore, after joint optimization is completed, channel pruning is performed on the trainable parameter set according to a preset threshold to remove multispectral channels with weights lower than the threshold, and the final multispectral channel parameters are determined, including the number of multispectral channels and the corresponding center wavelength and bandwidth parameters.
[0038] This application has the following advantages:
[0039] First, by selecting water bodies with diverse spectral characteristics for data collection, the optical properties under different water quality conditions can be comprehensively reflected, improving the accuracy and timeliness of water quality monitoring. This method not only covers the spectral characteristics of clean and polluted water bodies but also considers the impact of different seasons and climate changes on water body conditions, thereby enhancing the spatiotemporal representativeness of the dataset.
[0040] Secondly, this method employs an advanced hyperspectral imaging system for data acquisition and effectively combines hyperspectral data with field-measured water quality parameters by establishing precise spatiotemporal matching relationships. This makes the subsequent training of the water quality parameter inversion network more reliable. Furthermore, the constructed joint optimization network can achieve accurate prediction of water quality parameters while reconstructing hyperspectral data, effectively reducing errors caused by multispectral acquisition. This process not only improves the overall accuracy of water quality monitoring but also reduces reliance on traditional laboratory analysis methods, saving time and costs.
[0041] Finally, by utilizing a multispectral imaging system mounted on a UAV, this method achieves real-time and automated water quality monitoring, facilitating efficient monitoring over large areas. In conclusion, the method presented in this application has broad application prospects, can provide a scientific basis for water environment protection and management, and promote the continuous development of water quality monitoring technology. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 A technical roadmap for the optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring provided in the embodiments of this application;
[0044] Figure 2 The optimal multispectral channel response function diagram provided for the embodiments of this application;
[0045] Figure 3 The hyperspectral reconstruction comparison curves provided for the embodiments of this application are shown. Detailed Implementation
[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0047] Example 1:
[0048] This application provides an optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring, such as... Figure 1As shown, this method is based on end-to-end joint optimization of trainable multispectral channel parameters and cascaded neural network models. The specific implementation steps are as follows:
[0049] Step 1: Acquisition of hyperspectral reflectance data and water samples;
[0050] Representative water bodies with diverse water quality were selected as data collection points, including different types of water bodies such as nearshore seas, lakes, rivers, and reservoirs. The selected water bodies cover a variety of water quality conditions, from clean to polluted, and from oligotrophic to eutrophic, to ensure the diversity and representativeness of the samples in terms of optical properties. At the same time, the changes in water body conditions under different seasons and climatic conditions were comprehensively considered to enhance the spatiotemporal generalization ability of the dataset.
[0051] A commercial hyperspectral imaging system was used to acquire hyperspectral reflectance data of the water body. Before data acquisition, the hyperspectral imaging system was calibrated in the laboratory and validated in the field to ensure the accuracy and consistency of the acquired hyperspectral data.
[0052] Step 2: Obtaining and matching water quality parameter label data;
[0053] At the synchronous locations where hyperspectral images were acquired, surface water samples were collected in accordance with relevant standards and specifications. Parameters such as chlorophyll concentration, turbidity, and pH were measured on-site using calibrated portable equipment; and water quality parameters such as suspended solids concentration, colored dissolved organic matter absorption coefficient, total phosphorus concentration, total nitrogen concentration, and chemical oxygen demand were analyzed in the laboratory according to national standard methods.
[0054] The obtained water quality parameter concentration values are used as water quality parameter label data. This data is used for training and validation of subsequent water quality inversion sub-models. A precise spatiotemporal matching relationship is established between all water quality parameter label data and their corresponding hyperspectral reflectance data.
[0055] Step 3: Preprocessing of hyperspectral reflectance data;
[0056] The acquired raw hyperspectral data undergoes systematic preprocessing, including:
[0057] Radiometric calibration converts digital quantization values into radiance.
[0058] Atmospheric correction models are used to eliminate the effects of atmospheric scattering and absorption, and surface reflectance data are obtained.
[0059] The process includes repairing damaged pixels, removing strip noise, and performing geometric correction.
[0060] The final result is a high-quality hyperspectral data cube of surface reflectance, which serves as the baseline data source for subsequent multispectral simulations, hyperspectral reconstruction, and water quality inversion. This data cube will then be used as the hyperspectral reflectance data in the following steps. .
[0061] Step 4: Construction of end-to-end joint optimization model;
[0062] Construct a differentiable end-to-end cascaded neural network model, which includes trainable multispectral channel parameters, a hyperspectral reconstruction sub-model, and a water quality inversion sub-model, specifically including the following modules;
[0063] (1) Trainable multispectral channel parameter modeling;
[0064] Each candidate multispectral channel Represented as a set of parameters in the trainable parameter set, denoted by the center wavelength. and bandwidth parameters Definition. Construct a Gaussian spectral response function based on the parameters. Its expression is:
[0065]
[0066] in, For spectral wavelength variables, For the first i The width parameter of the Gaussian spectral response function of the candidate multispectral channel is defined in the set of trainable parameters. i Bandwidth parameters of each channel It is obtained through nonlinear transformation, specifically as follows:
[0067]
[0068] in, is the bandwidth scaling factor; the spectral response function is a continuously differentiable function that supports gradient backpropagation.
[0069] During the joint optimization process, the center wavelength was... and Physical realizability constraints are imposed to ensure that the learned spectral response function falls within the feasible range of actual filter manufacturing processes.
[0070] After each parameter update in the joint optimization, the center wavelength will be... Project / truncate to a preset manufacturable band range and the bandwidth parameters corresponding to Project to To ensure the manufacturability of the filter; The width parameter represents the response function to a Gaussian spectrum. σThe allowed range (lower limit and upper limit).
[0071] (2) Simulate multispectral data generation;
[0072] Using the hyperspectral reflectance data obtained in step 3 The spectral response function defined based on the current set of trainable parameters. The hyperspectral data is filtered to generate simulated multispectral channel values. For the first... Each candidate channel has a simulated multispectral channel value. Calculated by the following formula:
[0073]
[0074] Wherein, the integration interval Effective wavelength range covering hyperspectral reflectance data.
[0075] Traverse all N Each candidate channel will have its corresponding simulated multispectral channel value. Combine to generate a N A 3D simulated multispectral data vector;
[0076]
[0077] Iterate through all samples in the training set to generate a simulated multispectral dataset;
[0078]
[0079] in, Indicates the first K The simulated multispectral data vector corresponding to each sample K This represents the number of samples.
[0080] (3) Hyperspectral reconstruction sub-model;
[0081] Simulated multispectral data Input a hyperspectral reconstruction sub-model, output reconstructed hyperspectral data The network parameters of the hyperspectral reconstruction sub-model are denoted as... .
[0082] (4) Water quality inversion sub-model;
[0083] Reconstructed hyperspectral data Input the water quality inversion sub-model and output the predicted values of water quality parameters. The network parameters of the water quality inversion sub-model are denoted as... The mapping relationship is expressed as follows:
[0084]
[0085] The predicted water quality parameters include chlorophyll concentration, suspended solids concentration, colored dissolved organic matter absorption coefficient, total phosphorus concentration, total nitrogen concentration, and chemical oxygen demand.
[0086] The multispectral channel parameters are not optimized solely to minimize the hyperspectral reconstruction error. Instead, they are jointly optimized under the direct constraint of the water quality parameter inversion error. This ensures that the final set of retained multispectral channels has the maximum discriminative ability for the target water quality parameters within the channel size determined by sparse constraints and pruning rules, thereby achieving task-driven optimal multispectral channel selection.
[0087] Step 5: Construction of joint loss function and end-to-end optimization;
[0088] Construct a joint loss function to constrain the accuracy of hyperspectral reconstruction, the accuracy of water quality parameter inversion, and the number of multispectral channels. Its expression is:
[0089]
[0090] in:
[0091] To reconstruct hyperspectral data Compared with real hyperspectral reflectance data Reconstruction error between;
[0092] , which are predicted values of water quality parameters Water quality parameter label data Inversion error between;
[0093] , which is a sparse constraint term applied to the set of trainable parameters, used to suppress redundant multispectral channels;
[0094] These are the weighting coefficients;
[0095] With the objective of minimizing the joint loss function, the parameter set... :
[0096]
[0097] End-to-end joint optimization includes:
[0098] Pre-training phase: Fix the set of trainable parameters Train the network parameters of the hyperspectral reconstruction sub-model and the water quality inversion sub-model until the model initially converges;
[0099] Joint optimization phase: Unfreeze all parameters and update channel parameters and network parameters simultaneously through gradient backpropagation, so that the multispectral channel parameters are optimized under the constraint of water quality parameter inversion error;
[0100] Channel pruning phase: After training, based on preset thresholds... Remove The candidate channels are selected to determine the final number of multispectral channels and their corresponding center wavelength and bandwidth parameters.
[0101] threshold The value is determined based on the training process. The statistical distribution characteristics are set, when When the gradient is close to zero, the gradient contribution of the corresponding channel to the joint loss function is negligible, thus achieving adaptive compression of the number of channels without significantly reducing the accuracy of water quality inversion. Set as after training The quantile threshold, or set as the minimum threshold that ensures the increment of water quality inversion error in the validation set does not exceed the preset upper limit.
[0102] Step 6: Construction of the multispectral imaging system;
[0103] Based on the determined final multispectral channel parameters, a corresponding filter is customized and integrated into the multispectral imaging system.
[0104] Step 7: Multispectral observation of the target water body;
[0105] The multispectral imaging system was mounted on an unmanned aerial vehicle (UAV) platform to acquire images of the target water body. During the monitoring process, the multispectral imaging system hovered stably at the sampling point, sequentially switching filters and simultaneously exposing the image to obtain spatially registered multispectral observation data.
[0106] Step 8: Hyperspectral reconstruction and water quality parameter inversion;
[0107] The acquired multispectral observation data is input into the optimized hyperspectral reconstruction sub-model to obtain the reconstructed hyperspectral data cube; then the hyperspectral data cube is input into the optimized water quality inversion sub-model to directly output the spatial distribution map of the concentration of each water quality parameter in the target water body.
[0108] It is understood that this application achieves a direct mapping from algorithm optimization results to specific optical device parameters by trainingable modeling of the center wavelength and bandwidth parameters of multispectral filters, thereby transforming the output of deep learning models into a manufacturable and deployable multispectral imaging system configuration, solving the problem that traditional algorithms are difficult to implement.
[0109] Example 2:
[0110] This embodiment takes a typical river network in Ningbo City as the research object to verify the effectiveness of the optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring described in this application in practical applications. The specific implementation steps are as follows.
[0111] Step 1: Acquisition of hyperspectral reflectance data;
[0112] Representative water bodies, including the Yaojiang River, Fenghua River, and Yongjiang River, were selected as data collection points within Ningbo City. The Shuangli Hepu GaiaSky-mini2VNIR airborne hyperspectral imaging system was used for data acquisition. This imaging system has a spectral coverage range of 400–1000 nm and a spectral resolution of 3.8 nm. A total of 436 sets of valid water body data were collected and screened, and randomly divided into a training set of 305 sets, a validation set of 87 sets, and a test set of 44 sets in a 7:2:1 ratio.
[0113] Before the flight, a standard reflectivity plate is used to perform on-site radiometric reference calibration at the takeoff site to ensure the radiometric consistency and accuracy of the collected hyperspectral data.
[0114] Step 2: Obtaining and matching water quality parameter label data;
[0115] Multiple water surface sampling points were deployed at the synchronous time and spatial locations acquired from the hyperspectral imagery. Water temperature, pH, dissolved oxygen, turbidity, and chlorophyll a fluorescence values were measured on-site using a multi-parameter water quality monitor. Simultaneously, a 1L surface water sample was collected at a depth of 0.5m below the water surface using a water sampler, stored at low temperature in a brown glass bottle, and sent to the laboratory for analysis.
[0116] Water quality parameters were measured according to national standard methods, including:
[0117] Chlorophyll concentration was determined according to HJ897-2017 (range: 2.1–156.3 μg / L);
[0118] The concentration of suspended solids was determined according to GB / T11901-1989 (range: 5.4–287.6 mg / L).
[0119] Total nitrogen concentration was determined according to HJ636-2012 (range: 0.82–8.45 mg / L).
[0120] Total phosphorus concentration was determined according to GB11893-1989 (range: 0.05–1.32 mg / L).
[0121] At the same time, other water quality parameters such as chemical oxygen demand are also obtained.
[0122] All water quality parameter data are used as water quality parameter labeling data. It also establishes a unique coding relationship with the corresponding hyperspectral pixels to achieve accurate spatiotemporal matching.
[0123] Step 3: Preprocessing of hyperspectral reflectance data;
[0124] The acquired raw hyperspectral data cube was preprocessed. First, radiometric calibration was performed using the device's built-in calibration coefficients to convert the digital quantization value (DN) into the radiance of the top atmosphere. Then, atmospheric correction was performed using the FLAASH module in ENVI 5.6 software, and the synchronously measured aerosol optical thickness and water vapor content data were input to obtain hyperspectral data of surface reflectance.
[0125] Further processing using bad pixel repair and destriping algorithms yielded a high-quality hyperspectral data cube of surface reflectance, which served as the baseline hyperspectral reflectance data. .
[0126] Step 4: Construction of end-to-end joint optimization model;
[0127] An end-to-end cascaded neural network model was constructed within the PyTorch deep learning framework, including trainable multispectral channel parameters, a hyperspectral reconstruction sub-model, and a water quality inversion sub-model.
[0128] (1) Trainable multispectral channel parameter initialization;
[0129] Set the initial number of candidate multispectral channels to Each candidate channel Parameterized into trainable variables, based on the center wavelength and bandwidth parameters Definition. Wherein, The initial value is in Evenly distributed within the range, Initialize to 0.
[0130] Constructing a Gaussian spectral response function:
[0131]
[0132] in:
[0133]
[0134] Bandwidth scaling factor .
[0135] (2) Simulate multispectral data generation;
[0136] Using the hyperspectral reflectance data obtained in step 3 According to the current spectral response function Filtering is performed to generate simulated multispectral channel values:
[0137]
[0138]
[0139] Iterate through all samples in the training set to generate a simulated multispectral dataset;
[0140]
[0141] in, This represents the simulated multispectral data vector corresponding to the Kth sample, where K is the number of samples.
[0142] (3) Hyperspectral reconstruction sub-model;
[0143] The simulated multispectral data The hyperspectral reconstruction sub-model is input, and the MST++ (Multi-stage Spectral-wise Transformer) network structure is used to realize the mapping from multispectral to hyperspectral, outputting the reconstructed hyperspectral data. Its network parameters are denoted as .
[0144] This network reconstructs spectral channels by cascading multiple single-stage spectral transformers. Its encoder extracts multi-scale spectral features, capturing a wide range of spectral information from local details to global patterns. At the heart of each SST is a spectral multi-head self-attention mechanism that treats each spectral feature map as an independent label, enabling self-attention computation along the spectral dimension. This design allows the network to effectively capture the correlations between different spectral bands, enhancing its ability to leverage the inherent self-similarity of hyperspectral data. Subsequently, the spectral features are further refined, enhancing the network's ability to identify and preserve key spectral information. Finally, the decoder upsamples these spectral features to reconstruct the spectral channels, ensuring that crucial spectral details are fully preserved in the output.
[0145] (4) Water quality inversion sub-model;
[0146] Reconstructed hyperspectral data The water quality inversion sub-model is input, and a four-layer fully connected neural network structure is used to invert chlorophyll concentration, suspended solids concentration, colored dissolved organic matter absorption coefficient, total phosphorus concentration, total nitrogen concentration, and chemical oxygen demand. The activation function is ReLU (Rectified Linear Unit), and the network parameters are denoted as follows. The mapping relationship is expressed as follows:
[0147]
[0148] The end-to-end joint optimization model is a three-level cascaded structure, including: (1) a multispectral channel parameter module, used to map hyperspectral reflectance data to simulated multispectral data; (2) a hyperspectral reconstruction sub-model, used to reconstruct simulated multispectral data into hyperspectral reflectance data with continuous spectral dimensions; and (3) a water quality inversion sub-model, used to map the reconstructed hyperspectral reflectance data to target water quality parameters. The modules are connected sequentially according to the data flow direction, with the output of the previous module serving as the input of the next module, forming a differentiable end-to-end network structure.
[0149] Step 5: Construction of joint loss function and end-to-end optimization;
[0150] Construct the joint loss function:
[0151]
[0152] in:
[0153]
[0154]
[0155]
[0156] The joint loss function is used to simultaneously constrain the accuracy of hyperspectral reconstruction, the accuracy of water quality parameter inversion, and the number of multispectral channels.
[0157] To minimize For the target, for the parameter set:
[0158]
[0159] The end-to-end joint optimization process is as follows:
[0160] Pre-training phase: Fixed Using the Adam optimizer and The training process consisted of 150 training cycles with a learning rate of 0.001; during the pre-training phase, only the network parameters were updated. and Channel parameters and Keep them fixed; during the joint optimization phase, update the channel parameters simultaneously. , and network parameters , .
[0161] Joint optimization phase: Unfreeze all parameters, adjust the learning rate to 0.0005, continue training for 250 epochs, simultaneously update channel parameters and network parameters through gradient backpropagation, and... Apply constraints to keep it always in Within the range;
[0162] Channel pruning phase: After training is complete, set a threshold. Cut The passage.
[0163] like Figure 2 As shown, five optimal multispectral channels were ultimately retained, with center wavelengths of 432nm, 558nm, 624nm, 687nm and 761nm, and corresponding full width at half maximum (FWHM) of approximately 23nm, 27nm, 22nm, 29nm and 15nm, respectively.
[0164] Specifically, the 432nm blue light band is primarily sensitive to the absorption of colored dissolved organic matter in water, and its concentration changes are directly related to the chemical oxygen demand and transparency of the water. The 558nm green light band is near the reflectance peak of clean water and is also a sensitive region for chlorophyll reflectance characteristics. The 624nm orange-red light band is adjacent to the strong absorption valley of chlorophyll and is often used as a reference band to correct and enhance the extraction of features at 687nm. The 687nm red light band is located near the fluorescence emission peak of chlorophyll a. When the density of phytoplankton in the water is high, the solar-excited chlorophyll fluorescence will increase the reflectance of this band. Therefore, this band is a key channel for detecting algal blooms, red tides, and for high-precision quantitative inversion of chlorophyll concentration. The 761nm near-infrared band is located in the strong absorption region of water. Pure water has extremely low reflectance in this band, but it is sensitive to the backscattering of suspended particulate matter in the water and is the basis for inverting water turbidity and suspended solids concentration.
[0165] By accurately capturing the CDOM absorption signal at 432nm, the chlorophyll reflection signal at 558nm, the chlorophyll fluorescence signal at 687nm, and the suspended matter scattering signal at 761nm, and using 624nm for auxiliary correction, the optical composition information of the water body can be interpreted, enabling effective, real-time, and wide-area monitoring of algal bloom dynamics, eutrophication level, turbidity, and organic pollution levels.
[0166] Step 6: Construction of the multispectral imaging system;
[0167] Based on the determined final multispectral channel parameters, the filter was customized and optimized using TFCalc software, and the filter was manufactured using electron beam evaporation. The prepared filter was then integrated into the multispectral imaging system.
[0168] Step 7: Multispectral observation of the target water body;
[0169] The multispectral imaging system is mounted on an unmanned aerial vehicle (UAV) platform. During monitoring, the system hovers stably at the sampling point, sequentially switches filters and simultaneously exposes, automatically acquiring images of each spectral band to form spatially registered multispectral observation data.
[0170] Step 8: Verification of hyperspectral reconstruction and water quality parameter inversion results;
[0171] The collected multispectral observation data is input into the trained hyperspectral reconstruction sub-model to obtain a reconstructed hyperspectral data cube. Compared with the real hyperspectral reflectance data, its root mean square error (RMSE) is 0.0087, and its average spectral angle (SAM) is 2.3°. The reconstructed spectrum is compared with the real spectrum as follows: Figure 3 As shown, the reconstruction accuracy is high.
[0172] The reconstructed hyperspectral data was further input into the water quality inversion sub-model. The inversion accuracy of key water quality parameters is shown in Table 1. The inversion accuracy of COD concentration reached 81.25%, and the inversion accuracy of suspended solids concentration reached 91.84%, which verified the effectiveness of the method in actual water body monitoring. In Table 1, the units of different water quality parameters are adopted according to the corresponding standards. For example, chlorophyll is μg / L, and the others can be mg / L.
[0173] Table 1 - Accuracy of Water Quality Parameter Retrieval
[0174]
[0175] It is understood that the innovation of this application does not lie in the specific hyperspectral reconstruction network structure itself, but in the end-to-end joint optimization of trainable multispectral channel parameters with hyperspectral reconstruction and water quality inversion models, thereby achieving the optimal design of multispectral channels under task-driven constraints.
[0176] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0177] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for optimal multispectral channel selection and hyperspectral reconstruction for water quality monitoring, characterized in that, The method includes: The hyperspectral reflectance data of the water body and the spatiotemporally matched water quality parameter label data of the hyperspectral reflectance data are acquired, and multiple candidate multispectral channels are represented as a set of trainable parameters including center wavelength and bandwidth; the hyperspectral reflectance data is filtered according to the spectral response function defined by the set of trainable parameters to generate simulated multispectral data; A cascaded neural network model is established, including a hyperspectral reconstruction sub-model and a water quality inversion sub-model. The hyperspectral reconstruction sub-model maps the simulated multispectral data into reconstructed hyperspectral data, and the water quality inversion sub-model maps the reconstructed hyperspectral data into predicted water quality parameters. A joint loss function is constructed, which includes the reconstruction error between the reconstructed hyperspectral data and the hyperspectral reflectance data, the inversion error between the predicted water quality parameters and the labeled water quality parameters, and the sparsity constraint on the trainable parameter set. With the goal of minimizing the joint loss function, the parameters of the trainable parameter set and the cascaded neural network model are jointly optimized end-to-end, and the final multispectral channel parameters are determined based on the optimized trainable parameter set. The joint loss function Simultaneously used to constrain the accuracy of hyperspectral reconstruction, the accuracy of water quality parameter inversion, and the number of multispectral channels, it is expressed as: in, This is used to measure the reconstruction error between the reconstructed hyperspectral data and the true hyperspectral reflectance data; This is used to measure the inversion error between predicted water quality parameters and labeled water quality parameter data; This is a sparsity constraint term applied to the set of trainable parameters, used to suppress redundant multispectral channels; , , These are the corresponding weighting coefficients; The simulated multispectral data is input into the hyperspectral reconstruction sub-model, and the MST++ network structure is used to realize the mapping from multispectral to hyperspectral, outputting the reconstructed hyperspectral data. Its network parameters are denoted as ; Reconstructed hyperspectral data Input the water quality inversion sub-model and output the predicted values of water quality parameters. A four-layer fully connected neural network structure was used to invert chlorophyll concentration, suspended solids concentration, colored dissolved organic matter absorption coefficient, total phosphorus concentration, total nitrogen concentration, and chemical oxygen demand. The ReLU activation function was employed, and the network parameters were denoted as follows: The mapping relationship is expressed as follows: .
2. The optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring according to claim 1, characterized in that, The method further includes: obtaining multispectral observation data of the target water body based on the final multispectral channel parameters, and using the optimized cascaded neural network model to obtain the water quality parameters of the target water body.
3. The optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring according to claim 1, characterized in that, The spectral response function is a Gaussian function; for the first... i Candidate channels, spectral response function Represented as: in: For spectral wavelength variables; The first one defined in the set of trainable parameters i The center wavelength of each channel; For the first i The width parameter of the Gaussian spectral response function of the candidate multispectral channels is defined by the first parameter defined in the set of trainable parameters. i Bandwidth parameters of each channel It is obtained after nonlinear transformation.
4. The optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring according to claim 1, characterized in that, Filtering the hyperspectral reflectance data includes: For the i One candidate channel, simulated multispectral channel values Calculated by the following formula: in, The hyperspectral reflectance data; Let be the spectral response function of the i-th channel; This indicates the effective wavelength range of the hyperspectral data; Traverse all N Each candidate channel will have its corresponding simulated multispectral channel value. Combine to generate a N 3D simulated multispectral data vector : Iterate through all samples in the training set to generate a simulated multispectral dataset. : in, Indicates the first K The simulated multispectral data vector corresponding to each sample K This represents the number of samples.
5. The optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring according to claim 1, characterized in that, The end-to-end joint optimization includes: The first stage of pre-training involves fixing the set of trainable parameters and training the parameters of the cascaded neural network model until the hyperspectral reconstruction sub-model and the water quality inversion sub-model initially converge. The second stage involves joint optimization: unfreezing the set of trainable parameters and all parameters of the cascaded neural network model, performing overall training with the goal of minimizing the joint loss function, and simultaneously updating the channel parameters and network parameters through gradient backpropagation.
6. The optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring according to claim 1, characterized in that, The water quality parameter label data and the predicted values of the water quality parameters include: chlorophyll concentration, suspended solids concentration, colored dissolved organic matter absorption coefficient, total phosphorus concentration, total nitrogen concentration, and chemical oxygen demand.
7. The optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring according to claim 2, characterized in that, Acquiring multispectral observation data of the target water body specifically includes: Based on the final multispectral channel parameters, a corresponding filter is customized; the filter is integrated into the multispectral imaging system, and the target water body is imaged to obtain multispectral image data with spatial registration for each channel, thus obtaining the multispectral observation data.
8. The optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring according to claim 7, characterized in that, The multispectral observation data is input into the optimized hyperspectral reconstruction sub-model to obtain a reconstructed hyperspectral data cube; the reconstructed hyperspectral data cube is input into the optimized water quality inversion sub-model to directly output a spatial distribution map of water quality parameters concentration.
9. The optimal multispectral channel selection and hyperspectral reconstruction method for water quality monitoring according to claim 1, characterized in that, After joint optimization is completed, channel pruning is performed on the trainable parameter set according to a preset threshold to remove multispectral channels with weights lower than the threshold, and the final multispectral channel parameters are determined, including the number of multispectral channels and the corresponding center wavelength and bandwidth parameters.