Water quality multi-parameter synchronous inversion method based on spectral slope adaptive resampling and pyramid convolutional neural network

CN122692969BActive Publication Date: 2026-10-30SICHUAN PASTEUR ENVIRONMENTAL PROTECTION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611160857.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-30
Estimated Expiration
2046-08-03

AI Technical Summary

Technical Problem

[0007]本发明提供了基于光谱斜率自适应重采样与金字塔卷积神经网络的水质多参数同步反演方法,旨在解决高维光谱输入冗余大、均匀重采样信息保留不充分、局部波段组合特征提取与水质敏感波段脱节、多指标同步预测缺乏物理一致性以及模型可解释性差等技术问题

Benefits of technology

[0018]精准的特征保留与降维:自适应重采样依据光谱斜率动态分配采样点,在光谱变化剧烈处加密、平缓区稀疏,既显著降低输入维度,又完整保留光谱关键结构。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122692969B_ABST
    Figure CN122692969B_ABST
Patent Text Reader

Abstract

The present application provides a water quality multi-parameter synchronous inversion method based on spectral slope adaptive resampling and pyramid convolutional neural network, belonging to the cross technical field of water environment monitoring and artificial intelligence, which comprises: obtaining original hyperspectral reflectivity; adaptive resampling; constructing double-channel input; correlation coefficient analysis; determining pyramid convolution kernel size; pyramid convolution multi-scale feature extraction; inter-layer cross-scale feature splicing; convolution fusion and dimensionality reduction compression; global average pooling and regression prediction; joint loss training and inverse normalization output. The present application aims to solve the technical problems of high-dimensional spectral input redundancy, insufficient uniform resampling information retention, disconnection between local band combination feature extraction and water quality sensitive band, lack of physical consistency in multi-index synchronous prediction, and poor model interpretability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water environment monitoring and artificial intelligence, specifically to a method for simultaneous inversion of multiple parameters of water quality based on adaptive resampling of spectral slope and pyramid convolutional neural network. Background Technology

[0002] Existing hyperspectral water quality inversion technology mainly faces the following problems:

[0003] Insufficient information utilization: The input dimension is too high, and it is difficult to effectively extract local band combination features.

[0004] Fixed sampling method: Fixed-interval resampling ignores changes in spectral slope, undersamples near absorption features and oversamples in flat regions, resulting in information loss.

[0005] The model lacks physical constraints: Purely data-driven black-box models lack the utilization of the optical mechanisms of water bodies, and the prediction results may violate physical laws.

[0006] Poor interpretability: The kernel size of the convolution is mostly set based on experience and lacks direct correlation with the sensitive bands of the target water quality parameters, resulting in insufficient interpretability and generalization ability of the model. Summary of the Invention

[0007] This invention provides a method for synchronous inversion of multiple parameters of water quality based on adaptive resampling of spectral slope and pyramid convolutional neural network. It aims to solve technical problems such as large redundancy of high-dimensional spectral input, insufficient retention of uniform resampling information, disconnect between local band combination feature extraction and water quality sensitive bands, lack of physical consistency in synchronous prediction of multiple indicators, and poor model interpretability.

[0008] This specification discloses a method for simultaneous inversion of multiple parameters of water quality based on adaptive resampling of spectral slope and pyramid convolutional neural network, including:

[0009] Acquire single-point hyperspectral raw reflectance data of water bodies in the wavelength range of 400 nanometers to 850 nanometers;

[0010] Adaptive resampling is performed based on the spectral slope of the original reflectance data to obtain a resampled reflectance sequence consisting of N sampling points, each sampling point corresponding to its own wavelength value and reflectance value.

[0011] By utilizing the correlation coefficient between the reflectance values ​​of each sampling point in the resampled reflectance sequence and the concentrations of various water quality indicators, the sensitive wavelength ranges corresponding to the various water quality indicators are determined. Based on the number of sampling points corresponding to the sensitive wavelength ranges in the resampled reflectance sequence, the size of each layer of the convolutional kernel in the pyramid one-dimensional convolutional neural network is set. The pyramid one-dimensional convolutional neural network includes an encoding segment and a decoding segment. The size of each layer of the convolutional kernel in the encoding segment decreases from wide to narrow, while the size of each layer of the convolutional kernel in the decoding segment increases from narrow to wide.

[0012] The resampled reflectance sequence is input into the pyramid one-dimensional convolutional neural network for multi-scale feature extraction. The feature maps of each layer of the encoding segment are obtained by extracting the feature maps of each layer of the decoding segment.

[0013] The feature maps output from each layer of the coding segment are concatenated with the feature maps output from the corresponding layers of the decoding segment along the channel dimension to obtain fused features.

[0014] The fused features are subjected to dimensionality reduction and compression, global average pooling, and regression prediction to output predicted values ​​of various water quality indicators in the normalized space.

[0015] The predicted values ​​of the various water quality indicators are denormalized to obtain the final concentration values ​​of each water quality indicator;

[0016] During training, a joint loss function consisting of data fitting loss and optical prior constraint loss is used to optimize network parameters. The optical prior constraint loss is constructed based on the ratio of the reflectance of the water body at wavelengths of 440 nm and 675 nm.

[0017] The embodiments described in this specification can achieve at least the following beneficial effects:

[0018] Precise feature preservation and dimensionality reduction: Adaptive resampling dynamically allocates sampling points based on the spectral slope, densifying the sampling points in areas of drastic spectral changes and sparsening them in areas of gentle spectral changes, which significantly reduces the input dimensionality while fully preserving the key spectral structure.

[0019] Targeted feature extraction: The size of the pyramid convolution kernel is determined by the correlation coefficient spectrum and the distribution of resampling points, so that the receptive field of each layer accurately covers the sensitive band range of the target water quality parameters, overcoming the blindness of setting the convolution kernel based on experience.

[0020] Rich multi-scale representation: Inter-layer cross-scale feature splicing integrates the spectral responses of wide and narrow windows, further enriching the multi-scale representation.

[0021] Physical consistency and generalization ability: By introducing physical constraint loss at the absorption peaks of chlorophyll a at 440nm and 675nm, the optical mechanism is embedded in the training process, so that the prediction results have both data fitting accuracy and physical law consistency, and can effectively suppress overfitting, especially in the case of small samples.

[0022] Synergistic effect of multiple mechanisms: The synergistic effect of adaptive resampling, correlation coefficient-guided convolutional kernel design and physical constraints produces unexpected technical effects that go beyond the simple superposition of individual modules.

[0023] Efficient deployment: Seven water quality indicators are output simultaneously in one inference, reducing deployment costs; supports ONNX export, facilitating applications in embedded and online monitoring systems. Attached Figure Description

[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0025] Figure 1 This is a flowchart illustrating the method for synchronous inversion of multiple parameters of water quality based on adaptive resampling of spectral slope and pyramid convolutional neural network.

[0026] Figure 2 This is a schematic diagram of the adaptive sampling network involved in this invention.

[0027] Figure 3 This is a schematic diagram of the uniform sampling network involved in this invention.

[0028] Figure 4 This is a schematic diagram of the adaptive resampling, average spectrum, and sampling points involved in this invention.

[0029] Figure 5 This is a schematic diagram of the second derivative of the spectrum and the adaptive sampling position involved in this invention.

[0030] Figure 6 This is a schematic diagram of the cumulative distribution of sampling points allocated according to the second derivative weights involved in this invention.

[0031] Figure 7 This is a schematic diagram illustrating the local sampling density reflected by the spacing between adjacent sampling points involved in this invention.

[0032] Figure 8 This is a schematic diagram of the spectral comparison before and after resampling (average of training set) involved in this invention.

[0033] Figure 9 This is a schematic diagram of the pyramid-shaped one-dimensional convolutional neural network structure involved in this invention.

[0034] Figure 10 This is a schematic diagram showing the relationship between the total phosphorus index band ratio and water quality concentration involved in this invention.

[0035] Figure 11 This is a schematic diagram showing the relationship between the total nitrogen index band ratio and water quality concentration involved in this invention.

[0036] Figure 12 This is a schematic diagram showing the relationship between the ammonia nitrogen index band ratio and water quality concentration involved in this invention.

[0037] Figure 13 This is a schematic diagram showing the relationship between the chemical oxygen demand (COD) index band ratio and water quality concentration involved in this invention.

[0038] Figure 14 This is a schematic diagram showing the relationship between the permanganate index band ratio and water quality concentration involved in this invention.

[0039] Figure 15 This is a schematic diagram showing the relationship between the chlorophyll a index band ratio and water quality concentration involved in this invention.

[0040] Figure 16 This is a schematic diagram showing the relationship between the suspended solids index band ratio and water concentration involved in this invention.

[0041] Figure 17 This is a schematic diagram illustrating the determination of the optimal window for comprehensive consideration involved in this invention.

[0042] Figure 18 This is a schematic diagram of the test scatter plot of the permanganate index index involved in this invention. Detailed Implementation

[0043] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0044] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0045] like Figure 1 As shown, this embodiment provides a method for simultaneous inversion of multiple water quality parameters based on adaptive spectral slope resampling and pyramid convolutional neural networks, including:

[0046] Acquire single-point hyperspectral raw reflectance data of water bodies in the wavelength range of 400 nanometers to 850 nanometers;

[0047] Adaptive resampling is performed based on the spectral slope of the original reflectance data to obtain a resampled reflectance sequence consisting of N sampling points, each sampling point corresponding to its own wavelength value and reflectance value; the value of N is determined by cross-validation on the training set, and is selected based on the reconstruction error of the validation set or the downstream inversion accuracy. In this preferred embodiment, N=46.

[0048] By utilizing the correlation coefficient between the reflectance values ​​of each sampling point in the resampled reflectance sequence and the concentrations of various water quality indicators, the sensitive wavelength ranges corresponding to the various water quality indicators are determined. Based on the number of sampling points corresponding to the sensitive wavelength ranges in the resampled reflectance sequence, the size of each layer of the convolutional kernel in the pyramid one-dimensional convolutional neural network is set. The pyramid one-dimensional convolutional neural network includes an encoding segment and a decoding segment. The size of each layer of the convolutional kernel in the encoding segment decreases from wide to narrow, while the size of each layer of the convolutional kernel in the decoding segment increases from narrow to wide.

[0049] The resampled reflectance sequence is input into the pyramid one-dimensional convolutional neural network for multi-scale feature extraction. The feature maps of each layer of the encoding segment are obtained by extracting the feature maps of each layer of the decoding segment.

[0050] The feature maps output from each layer of the coding segment are concatenated with the feature maps output from the corresponding layers of the decoding segment along the channel dimension to obtain fused features.

[0051] The fused features are subjected to dimensionality reduction and compression, global average pooling, and regression prediction to output predicted values ​​of various water quality indicators in the normalized space.

[0052] The predicted values ​​of the various water quality indicators are denormalized to obtain the final concentration values ​​of each water quality indicator;

[0053] During training, a joint loss function consisting of data fitting loss and optical prior constraint loss is used to optimize network parameters. The optical prior constraint loss is constructed based on the ratio of the reflectance of the water body at wavelengths of 440 nm and 675 nm.

[0054] In some embodiments, the adaptive resampling based on the spectral slope of the original reflectance data specifically includes:

[0055] The raw reflectance data of multiple samples in the wavelength range of 400 nm to 850 nm and the true concentration values ​​of various water quality indicators corresponding to each sample are obtained, and the multiple samples are divided into training set, validation set and test set.

[0056] The average spectrum of the training set is obtained by calculating the arithmetic mean of the reflectance of all samples in the training set at the original wavelength point.

[0057] The second derivative of the average spectrum of the training set along the wavelength direction is obtained to obtain the curvature weight at each original wavelength point.

[0058] An equidistant fine grid is constructed within the wavelength range, and the curvature weight interpolation is mapped to the equidistant fine grid.

[0059] A normalized cumulative distribution function is constructed on the equidistant fine grid, and the function value axis of the normalized cumulative distribution function is divided into equidistant parts. The final sampling wavelength sequence is obtained by inverse function mapping.

[0060] Based on the final sampled wavelength sequence, cubic spline interpolation is performed on the original reflectance data (with the boundary condition being the first derivative natural boundary) to obtain the resampled reflectance sequence.

[0061] In some embodiments, setting the size of each convolutional kernel in the pyramid one-dimensional convolutional neural network according to the number of sampling points corresponding to the sensitive wavelength range in the resampled reflectance sequence specifically includes:

[0062] The Pearson correlation coefficient between band specific reflectance and the concentration of each water quality index is calculated only on the training set, where the band specific reflectance is the ratio of reflectance at any two different resampling points.

[0063] Extract the continuous wavelength range where the absolute value of the correlation coefficient corresponding to each water quality indicator is greater than the preset threshold.

[0064] All continuous wavelength intervals corresponding to water quality indicators are merged and the union is taken as the sensitive wavelength interval.

[0065] Count the number of sampling points covered by the sensitive wavelength range in the resampled reflectance sequence, and let this number be . Then the size of the first convolutional kernel in the encoding segment is taken as... And take the smallest odd number not less than that value (if Corresponding to 17, then =33, in this embodiment, we take 33; if =15, then =29);

[0066] The kernel sizes of the remaining layers of the encoding segment are obtained by decreasing the kernel size of the first layer of the encoding segment layer by an integer multiple of one-half;

[0067] The kernel size of each layer in the decoding section is the same as the kernel size of the corresponding layer in the encoding section.

[0068] In some embodiments, the pyramid one-dimensional convolutional neural network includes seven convolutional layers, with the encoding segment consisting of a first convolutional layer, a second convolutional layer, a third convolutional layer, and a fourth convolutional layer, and the decoding segment consisting of a fifth convolutional layer, a sixth convolutional layer, and a seventh convolutional layer, with the kernel size of the first to fourth layers of the encoding segment decreasing sequentially, and the kernel size of the fifth to seventh layers of the decoding segment increasing sequentially to the same size as the kernel size of the first layer of the encoding segment.

[0069] In some embodiments, the step of concatenating the feature maps output by each layer of the coding segment with the feature maps output by the corresponding layer of the decoding segment along the channel dimension across scales specifically includes:

[0070] The feature map output from the second layer of the coding segment and the feature map output from the sixth layer of the decoding segment are concatenated along the channel dimension to obtain the first concatenated feature.

[0071] The feature map output from the first layer of the coding segment and the feature map output from the seventh layer of the decoding segment are concatenated along the channel dimension to obtain the second concatenated feature.

[0072] The first splicing feature and the second splicing feature are merged along the channel dimension to obtain the fused feature.

[0073] In some embodiments, the dimensionality reduction and compression of the fused features specifically involves compressing the number of channels of the fused features to a preset number of channels through a one-to-one convolution.

[0074] In some embodiments, the optical prior constraint loss is constructed by linearly fitting the ratio of reflectance of each sample in the training set at wavelengths of 440 nm and 675 nm with the chlorophyll a concentration to obtain a linear prior model.

[0075] The output of the linear prior model is used as the optical prior estimate of chlorophyll a;

[0076] The pyramid one-dimensional convolutional neural network is used to predict chlorophyll a to obtain a predicted value. The mean square error between the predicted value and the optical prior estimate is calculated as the optical prior constraint loss.

[0077] In some embodiments, the joint loss function is a weighted sum of the data fitting loss and the optical prior constraint loss, the data fitting loss is the mean square error between the predicted values ​​of various water quality indicators output by the pyramid one-dimensional convolutional neural network and the corresponding true values, and the corresponding true values ​​are derived from the training set.

[0078] In some embodiments, the multiple water quality indicators include total phosphorus, total nitrogen, ammonia nitrogen, chemical oxygen demand, permanganate index, chlorophyll a, and suspended solids.

[0079] In some embodiments, before inputting the resampled reflectance sequence into the pyramid one-dimensional convolutional neural network, the wavelength values ​​corresponding to each sampling point are normalized to a preset numerical range, and the normalized wavelength sequence is concatenated with the resampled reflectance sequence in the channel dimension to construct a dual-channel input tensor.

[0080] In some embodiments, to further embed spectral curvature a priori information into multi-scale feature representations and improve the model's feature response sensitivity in spectral abrupt change regions (such as near absorption peaks and inflection points), a spectral curvature-guided decoding feature recalibration step is introduced after step S5 and before step S6, specifically including:

[0081] Step S5-1: Obtain the curvature weight sequence on the resampled grid.

[0082] Extract the original curvature weights calculated in step S2. (Defined in step S2, (The index of the original 450 wavelength points) is linearly interpolated and mapped to the adaptive resampling grid finally obtained in step S2. Above, obtain the curvature weight sequence on the resampled grid. The calculation method is as follows:

[0083] ;

[0084] in This indicates linear interpolation or cubic spline interpolation (cubic spline interpolation is preferred, and the boundary condition is a natural boundary with the first derivative). Total number of adaptive resampling points (in this preferred embodiment) ). The dimension is .

[0085] Step S5-2: Perform sequence length adaptation on the feature maps of each layer of the decoded segment.

[0086] Let the feature maps output by the third (seventh) convolutional layer, the second (sixth) convolutional layer, and the first (fifth) convolutional layer of the pyramid one-dimensional convolutional neural network decoding segment be respectively... Their sequence lengths are respectively Because each decoding layer undergoes convolution and padding operations, the sequence length is different from the input sequence length. Maintaining consistency (i.e.) In this embodiment Therefore, no additional interpolation is needed. If the sequence length changes due to adjustments in the step size or padding strategy, adaptive average pooling will be used to... Unify the pooling to the corresponding layer sequence length.

[0087] Step S5-3: Construct the curvature-guided scaling vector.

[0088] For the decoded segment layer( (corresponding to the fifth, sixth, and seventh convolutional layers), utilizing curvature weight sequences Generate the element-wise scaling vector of the feature map of this layer. ,in The number of convolution channels (in this embodiment) ), For the first Layer sequence length (in this embodiment) The specific calculation process is as follows:

[0089] First, Input to a lightweight convolutional layer with a one-dimensional kernel size of 3 And sequentially through batch normalization layers and Sigmoid activation function To obtain intermediate variables :

[0090] ;

[0091] in ,Will Each element is compressed to Interval. The input channel has 1, the output channel has 1, and the padding method is same padding (single-sided padding). ), to ensure The sequence length is still .

[0092] Secondly, Copy and extend along the channel dimension This yields the scaling vector. :

[0093] ;

[0094] Right now Each channel is connected to They are exactly the same, sharing the same curvature-guided scaling mode.

[0095] Step S5-4: Perform feature recalibration.

[0096] The first decoded segment Original feature map of the layer With scaling vector Channel-by-channel element-by-element multiplication (Hadamard product) is used to obtain the feature map of the recalibrated decoded segment. :

[0097] ;

[0098] in This represents element-wise multiplication (Hadamard product), i.e. .

[0099] Step S5-5: Replace the original decoded segment feature map with the recalibrated decoded segment feature map and perform cross-scale stitching.

[0100] The sixth layer feature map of the recalibrated decoded segment With the second layer feature map of the coded segment The first concatenated feature is obtained by concatenating along the channel dimension; the seventh layer feature map of the recalibrated decoded segment is then used. With the first layer feature map of the coded segment The first and second splicing features are spliced ​​along the channel dimension to obtain the second splicing feature; the first and second splicing features are merged along the channel dimension to obtain the fused feature. Obtained after recalibration It is used for feature transfer within subsequent decoding segments, but does not directly participate in cross-scale splicing.

[0101] In this embodiment, curvature weight It reflects the degree of curvature of the spectrum at different wavelength positions—regions with greater curvature (such as the 440nm absorption peak of chlorophyll and the vicinity of the 675nm absorption / fluorescence characteristic peak). The larger the value, the more it will be after Sigmoid mapping. The closer to 1, the more enhanced the features at the corresponding location; the smaller the curvature of the flat region, the better. The closer the value is to 0, the more the features at that location are suppressed. Through this mechanism, the network can adaptively focus on regions with significant spectral physical features during the decoding and reconstruction stage, suppressing noise or redundant information in flat regions.

[0102] By using the curvature weight of the input spectrum as a gating signal, the intermediate feature map of the decoding segment is recalibrated element by element. This operation embeds the a priori depth of the spectral curvature of the physical domain into the feature domain. Unlike the conventional approach of applying physical constraint loss only at the output end, this represents a substantial leap from "output constraint" to "process constraint".

[0103] The technical concept of this invention is as follows:

[0104] The method for synchronous inversion of multiple parameters of water quality based on adaptive resampling of spectral slope and pyramid convolutional neural network includes the following steps.

[0105] Step S1: Obtain single-point hyperspectral raw reflectance data in the range of 400~850nm, with the measurement geometry being vertical observation; ambient lighting: no shadows, no water surface reflections, and no bottom sediment reflections.

[0106] Step S2: Wavelength range and sampling interval of the original spectrum. The original hyperspectral reflectance data obtained in Step S1, after merging and cleaning, has an effective wavelength range of 400nm to 850nm, with a total of 450 discrete wavelength sampling points. The wavelength sequence is denoted as... ( (representing wavelength), the corresponding reflectance sequence is: The 450 wavelength points are distributed with an overall spacing of approximately 1 nm along the wavelength axis, and the spectral coverage is approximately (850-400=450) nm. It should be noted that due to the instrument's export format and column name resolution, the spacing between adjacent wavelengths is not strictly equal.

[0107] It can fluctuate slightly around 1nm. ( The difference in wavelengths represents the interval between adjacent wavelengths. For the first One wavelength, For the first Each wavelength.

[0108] In subsequent derivative calculations, the fixed step size assumption is not used to replace the actual wavelength coordinates; instead, the measured wavelength sequence is used. The spacing, as an independent variable, directly participates in the numerical differentiation. Therefore, the accuracy of the derivative calculation is consistent with the effective sampling density of the original spectrum (approximately 1 nm / spot in this embodiment); the smaller the original spacing, the more finely it characterizes the local spectral structure (absorption shoulders, inflection points, etc.). If the original spacing increases, the second derivative's ability to resolve short-scale variations decreases accordingly.

[0109] To avoid using validation and test set information in the grid design, this implementation method only utilizes the training set to construct the global resampling grid. The arithmetic mean of the reflectance of all samples in the training set at 450 original wavelength points is calculated to obtain the average spectrum of the training set:

[0110] ;

[0111] in This represents the number of training samples. This is the average reflectance of all training samples at the i-th wavelength position. The index variable k in the summation symbol represents the sample number in the training set, with a value ranging from 1 to... .

[0112] The specific method for calculating the derivative: This method uses the second derivative to characterize the intensity of the curvature change of the spectrum along the wavelength direction, rather than the first derivative (slope). The purpose is that the first derivative mainly reflects the overall trend of reflectivity rising and falling with wavelength, while the second derivative is more sensitive to inflection points, shoulder peaks, and regions of rapid curvature change caused by absorption characteristics, and is more suitable as a weighting basis for the "degree of intensity of characteristic changes".

[0113] At discrete wavelength points, non-uniform spacing center difference calculation is used:

[0114] The first step is to calculate the first derivative. Central difference is used for internal points, and one-sided difference is used for boundary points, with the difference step size being the actual interval between adjacent wavelengths. To adapt to non-equal interval sampling.

[0115] The second step involves further refining the sequence of first derivatives. Taking the derivative, we obtain the second derivative. For boundary wavelength points, after the first derivative is calculated using one-sided difference, the second derivative value at the boundary point is directly taken as an approximation of the second derivative value of the adjacent internal wavelength point.

[0116] The third step is to take the absolute value and add a small positive number to obtain the curvature weight:

[0117] ;in Let be the curvature weight of the i-th band.

[0118] in This is used to avoid the cumulative distribution from being unable to be normalized due to all weights being zero.

[0119] The above numerical differentiation corresponds to the following in program implementation: For the spacing parameter, The numerical gradient calculation is called twice consecutively. No smoothing filter is applied to the average spectrum before differentiation; Savitzky-Golay filtering, moving average, or Gaussian convolution are not used for preprocessing. Therefore, the second derivative calculation result is entirely determined by the original average spectrum and its measured wavelength interval. This approach preserves spectral details but may amplify high-frequency perturbations in noisy environments. For engineering applications requiring higher robustness, a smoothing step can be added before differentiation without departing from the spirit of the invention; however, this step is not included in the current preferred embodiment.

[0120] Number and method of subinterval partitioning

[0121] The "sub-interval partitioning" described in this invention comprises two levels, which should be distinguished:

[0122] (1) Intermediate fine grid layer (used to construct the weight accumulation distribution):

[0123] In the original 450-point curvature weight Based on this, an equidistant fine mesh is constructed within the closed interval [400, 850] nm:

[0124] ;

[0125] in nm, =850nm. The number of fine mesh points M is:

[0126] ;

[0127] That is, the fine mesh step size is approximately 0.2 nm. Linear interpolation is used to... Mapping to a finer mesh yields the interpolation weights on that mesh. The superscript "fine" indicates that the weight is the interpolation result on a fine grid.

[0128] The 2000-point equidistant fine grid is only used for continuous weighting and constructing the cumulative distribution function (CDF). It is not the final resampled output point, nor is it the direct output after dividing 400-850nm into 2000 fixed physical sub-regions.

[0129] (2) Final adaptive sampling grid layer (non-equidistant wavelength division):

[0130] Construct a normalized cumulative distribution on a fine mesh:

[0131] ;

[0132] To normalize the cumulative distribution, For the minimum wavelength, For the maximum wavelength. Discrete implementation as a pair Perform cumulative summation and normalize to [0,1].

[0133] Subsequently, equidistant divisions are made on the CDF axis: (N) equally spaced quantiles are taken.

[0134] ;

[0135] K: The index of the sampling point, with values ​​of 1, 2, ..., N; N: The total number of sampling points (i.e., how many wavelength points to take in total). : The normalized cumulative probability value (or quantile) corresponding to the kth sampling point.

[0136] The final sampling wavelength is obtained through inverse function mapping:

[0137] ;

[0138] F: Cumulative Distribution Function; The inverse function of F (i.e., the quantile function); : The wavelength obtained from the final sampling. That is, the specific wavelength value corresponding to the k-th sampling point after mapping by the inverse function.

[0139] Therefore, the partitioning method of this invention is as follows: The CDF is divided into equidistant segments under the meaning of "curvature-weighted measure," thereby forming non-equidistant adaptive sampling points on the physical wavelength axis. In segments with high curvature, the accumulated weight increases rapidly per unit wavelength, resulting in denser sampling points; in segments with low curvature, the sampling points are sparser. For example... Figure 4 , Figure 5 and Figure 6 As shown, based on the second derivative curvature weights calculated from the average spectrum of the training set, and through the equidistant partitioning of the normalized cumulative distribution function, non-equidistant adaptive sampling wavelength points are obtained by reverse lookup. The sampling density is positively correlated with the magnitude of the absolute value of the second derivative of the spectrum. Figure 7 and Figure 8 As shown, the original hyperspectral reflectance curve is superimposed and compared with the reflectance curve of discrete sampling points obtained after adaptive resampling. It can be seen that the adaptive sampling points are more densely sampled in regions where spectral features change drastically (such as near absorption peaks and inflection points), and more sparsely sampled in flat regions. The discrete points after resampling can effectively characterize the key structural features of the original spectrum.

[0140] Preferably, the first and last sampling points are forced to align with the original band range:

[0141] ;

[0142] The results of the reverse lookup of the quantiles are deduplicated; if the number of points after deduplication is less than N, new wavelength points are added to the deduplicated point list at uniform intervals according to wavelength until N points are added. After the addition is completed, the points are sorted in ascending order according to wavelength value and the first N points are taken; if there are more than N points, the points are downsampled to N points according to wavelength value.

[0143] The final mesh obtained through the above steps The wavelengths are not evenly spaced. Taking the preferred embodiment of this method (N=46) as an example, the wavelength spacing between adjacent sampling points varies from about 6nm to 17nm (depending on the local curvature), which is significantly different from the fixed spacing of about 10nm under uniform resampling.

[0144] (3) Comparison with uniform division:

[0145] In contrast, this embodiment also constructs a uniform resampling grid. That is, N points are taken at equal intervals on the [400, 850] nm axis, which are only used for visualization and comparison and do not participate in subsequent model training input. Figure 2 and Figure 3 As shown in the figure, this embodiment constructs an interval comparison between a uniform resampling grid and an adaptive resampling grid. The figure clearly shows the distribution characteristics of adaptive sampling: dense sampling points in regions with drastic changes in spectral curvature and sparse sampling points in regions with gentle changes, which is in stark contrast to the fixed interval of uniform sampling.

[0146] Step S3: Input the 2×N tensor of the resampled reflectance sequence to enable the network to simultaneously perceive spectral intensity and wavelength shape information.

[0147] In this implementation, standardization and destandardization are performed only on the output side of water quality indicators; the input side of reflectance is not standardized. The network is trained and predicts within the normalized 7-dimensional water quality space, and after inference, each indicator is destandardized to restore it to physical concentration units.

[0148] (1) Input side: reflectivity;

[0149] We will not standardize, nor will we use Min-Max or Z-score.

[0150] Let the resampled reflectance sequence obtained in step S2 be... (k=1, The network input tensor is directly obtained as follows:

[0151] ;

[0152] The shape is (2) N) (dual-channel one-dimensional convolution input). That is:

[0153] ;

[0154] (2) Output side: Water quality indicators - Min-Max normalization of each indicator.

[0155] For the seven water quality indicators (total phosphorus, total nitrogen, ammonia nitrogen, chemical oxygen demand, permanganate index, chlorophyll a, and suspended solids), Min-Max normalization to ([0,1]) was used instead of Z-score.

[0156] For the (j)th indicator ((j=1,...,7)), the forward standardization formula is:

[0157] ;

[0158] in: These are the values ​​processed before entering the Min-Max sequence;

[0159] , These are the minimum and maximum values ​​of the indicator on the training set; the mapping interval is ([0,1]).

[0160] when When this metric remains unchanged on the training set, division by zero should be avoided during implementation.

[0161] Specific methods of de-standardization:

[0162] Suppose the network output is a 7-dimensional vector in normalized space. Destandardization involves two steps.

[0163] (1) Min-Max inverse transformation for each index

[0164] For the (j)th indicator:

[0165] ;

[0166] in , As with forward standardization, all samples are taken from the training set.

[0167] Step S4: Determine the convolution kernel size of each layer of the pyramid based on sensitive band analysis. Calculate the Pearson correlation coefficient between the band-specific reflectance of each sampling point after adaptive resampling and total phosphorus, total nitrogen, ammonia nitrogen, chemical oxygen demand, permanganate index, chlorophyll a, and suspended matter concentration, and obtain the continuous wavelength ranges where each indicator is significantly correlated (|r|>0.5).

[0168] The correlation coefficient is calculated only on the training set, without using the validation set, test set, or all samples.

[0169] Specifically:

[0170] Input spectrum: Reflectance matrix of the training set after adaptive resampling in step S2 ;

[0171] Water quality label: Original concentration matrix of the training set (This step does not use the Min-Max normalized labels to avoid scaling affecting the correlation analysis.)

[0172] For each water quality index (t=1,...,7), and for any numerator band index i and denominator band index j on the resampled sequence, Calculate the band ratio reflectance between each sampling point after adaptive resampling. Pearson correlation coefficient with index t Validation or test set samples should not be included in the correlation matrix to avoid leakage of receptive field design into the model evaluation process.

[0173] Based on all the indicators, four key receptive field wavelength ranges W1 (widest), W2, W3, and W4 are determined. The convolution kernel sizes k1, k2, k3, and k4 are set according to the number of sampling points in the resampled sequence within the corresponding wavelength range (e.g., 17, 9, 5, and 3 respectively) to ensure that each convolutional layer can cover the corresponding width of the sensitive spectral window.

[0174] Maximum receptive field acquisition method: A maximum receptive field is determined solely by correlation analysis. For other scales, no separate correlation analysis is performed; instead, the pyramid convolution kernel sequence is obtained through geometric contraction. The corresponding network layer scale order is as follows: . This indicates taking the smallest odd number that is not less than the value of the independent variable.

[0175] Determine the order: Calculate the correlation ratio of the 7 index bands on the training set;

[0176] Combining all indicators Take the position of each wavelength ( The threshold (0.5) and the bounding box of the union are used to determine the union. and ;Depend on( The remaining kernel widths are obtained by recursively calculating (1 / 2, 1 / 4, 1 / 8); the symmetric decoding segments are restored to ( ) in reverse order. ).

[0177] Step S5: This method uses a single-branch symmetric pyramid one-dimensional convolutional neural network. Let the kernel width corresponding to the maximum receptive field be ( (Determined by step S4), then the seven-layer convolutional kernel sequence is:

[0178] ;

[0179] Let the output feature maps of each layer be ( , ,..., Following this, symmetrical inter-layer channel stitching (CAT), 1×1 convolutional compression, Dropout, and global average pooling are performed, and then a fully connected regression head is used to output a 7-dimensional water quality prediction vector. The padding method for each convolutional layer is as follows:

[0180] (1) Padding type: Zero-padding is used for all one-dimensional convolutions, that is, zero values ​​are added to both ends of the sequence; reflection padding, replication padding or circular padding are not used.

[0181] (2) Calculation of padding value: For a one-dimensional convolution with a kernel width of (k) (in this embodiment, (k) is always an odd number), the padding length on one side is: In other words, in the program, padding = (k-1) / / 2. When the step size (s=1) and kernel width are odd numbers, this setting ensures that the output sequence length is consistent with the input sequence length (same padding).

[0182] ;

[0183] For example: when k=33, p=16; when k=7, p=3; when k=3, p=1; when 1×1 fused convolution, p=0.

[0184] A dual-channel input tensor (composed of a reflectance sequence and a normalized wavelength sequence concatenated along the channel dimension) is input into a pyramid-shaped one-dimensional convolutional neural network. It is then sequentially passed through four one-dimensional convolutional layers with kernel sizes k1, k2, k3, and k4 (each convolutional layer has 64 channels, the same symmetric decoding layer, and ReLU activation function), yielding feature maps f1, f2, f3, and f4 respectively. In the wavelength dimension, weighted summation of continuous bands from wide to narrow windows (approximately W1, W2, W3, and W4) is performed to extract multi-scale spectral features from coarse to fine.

[0185] Step S6: Concatenate the feature map f2 output from the second layer of the coding segment and the feature map f6 output from the sixth layer of the decoding segment along the channel dimension to obtain the first concatenated feature; concatenate the feature map f1 output from the first layer of the coding segment and the feature map f7 output from the seventh layer of the decoding segment along the channel dimension to obtain the second concatenated feature; merge the first concatenated feature and the second concatenated feature along the channel dimension to obtain the fused feature.

[0186] Step S7: Compress the fused features to 64 channels using a 1×1 convolution, then pass them through Dropout (0.2), global average pooling, and a regression layer to output a 7-dimensional standardized water quality prediction vector. (See attached image.) Figure 9 As shown, the pyramid one-dimensional convolutional neural network structure used in this invention includes four convolutional layers in the encoding segment and three convolutional layers in the decoding segment. The kernel size of the encoding segment convolution decreases from wide to narrow, while the kernel size of the decoding segment convolution increases from narrow to wide. The feature maps output by the corresponding layers of the encoding and decoding segments are spliced ​​across scales along the channel dimension, and then compressed by one-to-one convolution, discard regularization, global average pooling, and a fully connected regression layer to output a seven-dimensional standardized water quality prediction vector.

[0187] Step S8: Denormalize the output results index by index to obtain total phosphorus, total nitrogen, ammonia nitrogen, chemical oxygen demand, permanganate index, chlorophyll a and suspended matter concentration.

[0188] Step S9: During training, the loss function is jointly composed of the data fitting term and the physical constraint term:

[0189] ;

[0190] in The optical prior estimation function for chlorophyll a, constructed using the reflectance ratio at 440 nm and 675 nm, is obtained through linear fitting of the training set, i.e.: ×( / )+b, where a and b are linear fitting coefficients. This is the balance coefficient. Before calculating this loss, the predicted chlorophyll a value output by the network is used. Denormalize to the original concentration space to ensure consistency with The outputs are of the same dimension.

[0191] This constraint forces the network to predict chlorophyll a according to the optical mechanism of the characteristic absorption peak, improving physical consistency and small sample generalization ability.

[0192] In this method, both training and validation use a batch size of BatchSize=16, meaning each mini-batch contains 16 samples. The training set DataLoader is set to shuffle randomly (True), while the validation and test sets are set to not shuffle (False).

[0193] When the number of samples in a certain partition is not divisible by 16, the last batch takes the remaining samples (even if it is less than 16). For example, when the validation set has about 16 items, it is usually a complete batch.

[0194] The maximum number of training rounds is: This means a maximum of 200 epochs of training. The actual number of effective epochs is usually less than 200, and the training is terminated early by an early stopping strategy.

[0195] The Adam optimizer is used to update all learnable parameters of the network (convolutional layers, (1×1) fused convolutions, fully connected layers and their biases), with the learning rate... .

[0196] Early stopping involves calculating the same multi-metric equal MSE loss as during training on the validation set after each epoch. Early stopping and optimal model selection are both based on Based on this, a patience value P=30 is set, meaning training stops when the validation set loss does not decrease for 30 consecutive epochs.

[0197] Step S10: Export the trained network as an ONNX model for deployment by online monitoring devices via ONNX Runtime.

[0198] The ONNX model file exported by this method is named water_quality_model.onnx. The input and output names and shapes are shown in Table 1 below.

[0199] Table 1. Input and Output Naming and Shape Table

[0200]

[0201] Settings when exporting dynamic axes:

[0202] dynamic_axes = {

[0203] "spectrum": {0: "batch"},

[0204] "water_quality": {0: "batch"},

[0205] }

[0206] That is, the batch size (0th dimension) is variable, and batch=1,2,8,… can be used during inference;

[0207] The channel dimension is fixed at 2, and the sequence length dimension is fixed at (N) (46 in this method), without setting the sequence length as a dynamic axis. Therefore, changing the batch size at the deployment end does not require re-exporting; however, if the number of resampling points (N) is changed, ONNX must be retrained and re-exported. ONNX only contains the neural network itself and does not include pre-processing and post-processing.

[0208] The preferred embodiment of the present invention is illustrated below using single-point hyperspectral monitoring data of a river channel as an example. The training set, validation set, and test set are divided in a 7:2:1 ratio, and the input consists of 46 wavelength-reflectivity pairs obtained by adaptive resampling within the range of 400~850nm.

[0209] "Adaptive resampling and data preparation: Following the method in step S2, curvature weights are constructed based on the second derivative of the average spectrum of the training set, and a normalized cumulative distribution function is constructed. 46 adaptive sampling wavelength points are obtained by equidistant quantile back lookup. Then, the reflectance value at each sampling point is obtained by cubic spline interpolation and spliced ​​with the normalized wavelength sequence to form a (2,46) dual-channel input tensor."

[0210] Correlation coefficient-guided convolution kernel size determination: The correlation coefficients between the reflectance of 46 sampling points and 7 water quality indicators were calculated, and the correlation coefficient spectrum was plotted. For example... Figures 10 to 16As shown, for seven water quality indicators—total phosphorus, total nitrogen, ammonia nitrogen, chemical oxygen demand, permanganate index, chlorophyll a, and suspended solids—the Pearson correlation coefficient between the band reflectance and the concentration of each indicator at each resampling point was calculated, and a correlation coefficient spectrum was plotted. The figure marks the continuous wavelength range where the absolute value of the correlation coefficient for each indicator is greater than a preset threshold. Continuous bands with |r|>0.5 for each indicator were extracted, and the widest sensitive range was obtained after synthesis: approximately 480~770nm (corresponding to a wavelength width of 290nm). With a sampling point count of 17, the kernel_size of the first layer was set to 29; the second layer to 29 / 2; the third layer to 29 / 4; and the fourth layer to 29 / 8. This forms a pyramid convolutional structure to ensure that the convolutional windows of each layer match the actual optical sensitivity scale. Figure 17 As shown, the significantly correlated continuous bands of the seven water quality indicators are merged into a union. The bounding box of the union is used to determine the maximum sensitive wavelength range and the number of resampling points within that range. Based on this, the size of the first layer convolution kernel of the pyramid one-dimensional convolutional neural network coding segment is determined. The sizes of the convolution kernels of the remaining layers are obtained by decreasing the size of the first layer convolution kernel proportionally.

[0211] Network Structure and Training: The network type is SpectralPyramidConvNet. The input channel count is 2. Four 1D convolutional kernels with the dimensions shown above, each with 64 channels, and ReLU activation function. Concatenation strategy: Cat(f2,f6) and Cat(f1,f7) are merged to obtain 256 channels of features. Dimensionality is reduced to 64 channels via 1×1 convolution, followed by Dropout (0.2), global average pooling, and Linear (64→7) output.

[0212] Optimizer Adam, learning rate 1×10 -3 Weight decay 1×10 -4 Add a physical constraint term to the loss function: Use the training set data to establish Chla_phys=a×( / The model uses a linear prior model of α + b, where a = 1.28, b = -1.23, and α is set to 0.1 (an empirical value). During training, the combined loss is minimized, and the optimal model is selected based on the performance on the validation set.

[0213] Example Test Results: On the test set of this example, due to the synergistic effect of physical constraints and adaptive mechanisms, the model exhibits better generalization stability on the independent test set, and no signs of overfitting are observed. Figure 18 As shown, taking the permanganate index as an example, the prediction effect of the method of the present invention on an independent test set is demonstrated. The scatter plots of the measured values ​​and predicted values ​​are closely distributed near the diagonal line. See the scatter plot of measured values ​​versus predicted values. Figure 18 Training set: coefficient of determination R2 =0.883, RMSE=0.517; Validation set: Coefficient of determination R 2 =0.894, RMSE=0.578; Test set: Coefficient of determination R 2 =0.754, RMSE=0.936. Detailed performance evaluation results of the seven water quality indicators on the training, validation, and test sets are shown in Table 2, where the coefficient of determination R for the test set is 0.754, RMSE=0.936. 2 The values ​​were: total phosphorus 0.445, total nitrogen 0.668, ammonia nitrogen 0.611, chemical oxygen demand 0.782, permanganate index 0.754, chlorophyll a 0.733, and suspended solids 0.789. These results demonstrate that the method of this invention exhibits high prediction accuracy and generalization stability when simultaneously retrieving multiple water quality indicators.

[0214] Table 2. Detailed Performance Evaluation Results of Seven Water Quality Indicators

[0215] In summary, several specific embodiments of the present invention have been disclosed. Without contradiction, the various embodiments can be freely combined to form new embodiments. That is, embodiments that are alternative solutions can be freely substituted for each other, but cannot be combined with each other; embodiments that are not alternative solutions can be combined with each other. These new embodiments are also part of the substantive content of the present invention.

[0216] The above embodiments describe several specific implementations of the present invention. However, those skilled in the art should understand that various changes or modifications can be made to these implementations without departing from the principles and essence of the present invention, but all such changes and modifications fall within the protection scope of the present invention.

Claims

1. A method for simultaneous inversion of multiple parameters of water quality based on adaptive resampling of spectral slope and pyramid convolutional neural network, characterized in that, include: Acquire single-point hyperspectral raw reflectance data of water bodies in the wavelength range of 400 nanometers to 850 nanometers; Adaptive resampling is performed based on the spectral slope of the original reflectance data to obtain a resampled reflectance sequence consisting of N sampling points, each sampling point corresponding to its own wavelength value and reflectance value. By utilizing the correlation coefficient between the reflectance values ​​of each sampling point in the resampled reflectance sequence and the concentrations of various water quality indicators, the sensitive wavelength ranges corresponding to the various water quality indicators are determined. Based on the number of sampling points corresponding to the sensitive wavelength ranges in the resampled reflectance sequence, the size of each layer of the convolutional kernel in the pyramid one-dimensional convolutional neural network is set. The pyramid one-dimensional convolutional neural network includes an encoding segment and a decoding segment. The size of each layer of the convolutional kernel in the encoding segment decreases from wide to narrow, while the size of each layer of the convolutional kernel in the decoding segment increases from narrow to wide. The resampled reflectance sequence is input into the pyramid one-dimensional convolutional neural network for multi-scale feature extraction. The feature maps of each layer of the encoding segment are obtained by extracting the feature maps of each layer of the decoding segment. The feature maps output from each layer of the coding segment are concatenated with the feature maps output from the corresponding layers of the decoding segment along the channel dimension to obtain fused features. The fused features are subjected to dimensionality reduction and compression, global average pooling, and regression prediction to output predicted values ​​of various water quality indicators in the normalized space. The predicted values ​​of the various water quality indicators are denormalized to obtain the final concentration values ​​of each water quality indicator; During training, a joint loss function consisting of data fitting loss and optical prior constraint loss is used to optimize network parameters. The optical prior constraint loss is constructed based on the ratio of the reflectance of the water body at wavelengths of 440 nm and 675 nm. The adaptive resampling based on the spectral slope of the original reflectance data specifically includes: The raw reflectance data of multiple samples in the wavelength range of 400 nm to 850 nm and the true concentration values ​​of various water quality indicators corresponding to each sample are obtained, and the multiple samples are divided into training set, validation set and test set. The average spectrum of the training set is obtained by calculating the arithmetic mean of the reflectance of all samples in the training set at the original wavelength point. The second derivative of the average spectrum of the training set along the wavelength direction is obtained to obtain the curvature weight at each original wavelength point. An equidistant fine grid is constructed within the wavelength range, and the curvature weight interpolation is mapped to the equidistant fine grid. A normalized cumulative distribution function is constructed on the equidistant fine grid, and the function value axis of the normalized cumulative distribution function is divided into equidistant parts. The final sampling wavelength sequence is obtained by inverse function mapping. The original reflectance data is interpolated based on the final sampled wavelength sequence to obtain the resampled reflectance sequence.

2. The method for simultaneous inversion of multiple water quality parameters based on adaptive spectral slope resampling and pyramid convolutional neural network according to claim 1, characterized in that, The step of setting the size of each convolutional kernel in the pyramid one-dimensional convolutional neural network according to the number of sampling points corresponding to the sensitive wavelength range in the resampled reflectance sequence specifically includes: The Pearson correlation coefficient between band specific reflectance and the concentration of each water quality index is calculated only on the training set, where the band specific reflectance is the ratio of reflectance at any two different resampling points. Extract the continuous wavelength range where the absolute value of the correlation coefficient corresponding to each water quality indicator is greater than the preset threshold. All continuous wavelength intervals corresponding to water quality indicators are merged and the union is taken as the sensitive wavelength interval. The number of sampling points covered by the sensitive wavelength range in the resampled reflectance sequence is counted, and the size of the first convolutional kernel of the coding segment is determined by this number. The kernel sizes of the remaining layers of the encoding segment are obtained by decreasing the kernel size of the first layer of the encoding segment layer by an integer multiple of one-half; The kernel size of each layer in the decoding section is the same as the kernel size of the corresponding layer in the encoding section.

3. The method for simultaneous inversion of multiple water quality parameters based on adaptive spectral slope resampling and pyramid convolutional neural network according to claim 1, characterized in that, The pyramid one-dimensional convolutional neural network contains seven convolutional layers. The encoding segment consists of the first, second, third, and fourth convolutional layers, and the decoding segment consists of the fifth, sixth, and seventh convolutional layers. The kernel size of the first to fourth layers of the encoding segment decreases sequentially, while the kernel size of the fifth to seventh layers of the decoding segment increases sequentially until it is the same as the kernel size of the first layer of the encoding segment.

4. The method for simultaneous inversion of multiple water quality parameters based on adaptive spectral slope resampling and pyramid convolutional neural network according to claim 1, characterized in that, The step of concatenating the feature maps output from each layer of the encoding segment with the feature maps output from the corresponding layers of the decoding segment along the channel dimension across scales specifically includes: The feature map output from the second layer of the coding segment and the feature map output from the sixth layer of the decoding segment are concatenated along the channel dimension to obtain the first concatenated feature. The feature map output from the first layer of the coding segment and the feature map output from the seventh layer of the decoding segment are concatenated along the channel dimension to obtain the second concatenated feature. The first splicing feature and the second splicing feature are merged along the channel dimension to obtain the fused feature.

5. The method for simultaneous inversion of multiple water quality parameters based on adaptive spectral slope resampling and pyramid convolutional neural network according to claim 1, characterized in that, The dimensionality reduction and compression of the fused features specifically involves compressing the number of channels of the fused features to a preset number of channels through a one-to-one convolution.

6. The method for simultaneous inversion of multiple water quality parameters based on adaptive spectral slope resampling and pyramid convolutional neural network according to claim 1, characterized in that, The specific construction method of the optical prior constraint loss is as follows: linearly fitting the ratio of reflectance of each sample in the training set at wavelengths of 440 nm and 675 nm with the chlorophyll a concentration to obtain a linear prior model. The output of the linear prior model is used as the optical prior estimate of chlorophyll a; The pyramid one-dimensional convolutional neural network is used to predict chlorophyll a to obtain a predicted value. The mean square error between the predicted value and the optical prior estimate is calculated as the optical prior constraint loss.

7. The method for simultaneous inversion of multiple water quality parameters based on adaptive spectral slope resampling and pyramid convolutional neural network according to claim 1, characterized in that, The joint loss function is a weighted sum of the data fitting loss and the optical prior constraint loss. The data fitting loss is the mean square error between the predicted values ​​of various water quality indicators output by the pyramid one-dimensional convolutional neural network and the corresponding true values. The corresponding true values ​​are derived from the training set.

8. The method for simultaneous inversion of multiple water quality parameters based on adaptive spectral slope resampling and pyramid convolutional neural network according to claim 1, characterized in that, The various water quality indicators include total phosphorus, total nitrogen, ammonia nitrogen, chemical oxygen demand, permanganate index, chlorophyll a, and suspended solids.

9. The method for simultaneous inversion of multiple water quality parameters based on adaptive spectral slope resampling and pyramid convolutional neural network according to claim 1, characterized in that, Before inputting the resampled reflectance sequence into the pyramid one-dimensional convolutional neural network, the wavelength values ​​corresponding to each sampling point are normalized to a preset numerical range. The normalized wavelength sequence is then concatenated with the resampled reflectance sequence in the channel dimension to construct a dual-channel input tensor.

Citation Information

Patent Citations

  • Water quality detection method based on spectrum inversion analysis

    CN114739919A

  • Lake turbidity mapping method for constructing BP-TURB based on optical water body type and BP neural network algorithm

    CN114965300A