Bayesian optimization-based seasonal remote sensing water quality inversion model updating method
By dynamically adjusting the parameters of the remote sensing water quality inversion model based on the Bayesian optimization method, the problems of poor generalization and large impact of seasonal changes in the traditional model are solved, and high-precision and seasonally adaptable water quality monitoring is achieved.
Patent Information
- Application Number
- CN202510695973.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-19
AI Technical Summary
Traditional remote sensing water quality inversion models rely on measured data for calibration, resulting in poor model generalization and significant impact from seasonal variations, making it difficult to maintain high accuracy.
A Bayesian optimization-based method was used to combine measured water quality samples and remote sensing image data, dynamically adjust model parameters, perform preliminary and re-optimization, and obtain the seasonal optimal remote sensing water quality inversion model.
It has improved the accuracy and seasonal adaptability of the model, enhanced the precise decision-making capabilities of water environment management, and promoted the development of water quality monitoring towards intelligence and predictiveness.
Smart Images

Figure CN120670748A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of remote sensing technology, and in particular to a method for updating a seasonal remote sensing water quality inversion model based on Bayesian optimization. Background Art
[0002] With the impact of global climate change and human activities, changes in water quality have become a major issue in environmental protection and resource management. To effectively monitor and manage water quality, remote sensing technology, thanks to its non-contact, wide-area coverage, and efficient data acquisition capabilities, has been widely used in water quality monitoring. However, despite its enormous potential for application in water quality monitoring, remote sensing technology still faces several unresolved challenges in terms of accuracy and practicality.
[0003] First, the limitations of remote sensing water quality inversion models are very obvious. Traditional remote sensing water quality inversion models mainly rely on physical optics models or statistical regression methods. Although these methods can provide certain water quality parameter estimates, they rely on a large amount of measured data to calibrate the model. Measured data is sparse and has significant seasonal fluctuations, which leads to poor model generalization.
[0004] Second, seasonal variations significantly impact water quality monitoring. Due to seasonal variations in light conditions, water temperature, and other factors, water reflectivity changes accordingly. This makes it difficult for traditional remote sensing water quality inversion models to maintain high accuracy year-round.
[0005] The root causes of these two issues lie in the sparsity of measured data and significant spatiotemporal heterogeneity. Water quality data typically relies on manual sampling, which is susceptible to geographical and cost constraints and results in low spatiotemporal resolution. Traditional deep learning models typically only utilize deep, abstract semantic features, lacking the ability to integrate and utilize multi-level features. Further research is needed to effectively increase data diversity and integrate multi-source data to optimize models. Summary of the Invention
[0006] In order to solve the above technical problems, the embodiments of the present application propose a seasonal remote sensing water quality inversion model updating method based on Bayesian optimization, which aims to combine field measurement data with advanced machine learning algorithms, dynamically optimize model parameters according to the captured seasonal specific differences, continuously improve model accuracy, enhance the precise decision-making ability of water environment management, and promote water quality monitoring from "extensive and lagging" to "intelligent and predictive", providing key technical support for building a modern water governance system for harmonious coexistence of man and nature.
[0007] On the first aspect, the embodiment of the present application proposes a seasonal remote sensing water quality inversion model updating method based on Bayesian optimization, which is suitable for water quality monitoring of target water areas, including: obtaining remote sensing image data and measured water quality samples of the water system in the target area, and performing corresponding preprocessing on the obtained remote sensing image data and measured water quality samples; selecting the water quality parameters to be measured and the basic remote sensing water quality inversion model of the corresponding season, using the basic remote sensing water quality inversion model to predict the preprocessed remote sensing image data, obtaining the estimated values of the water quality parameters, and performing decomposition on the preprocessed measured water quality samples. The method is to remove outliers and missing values to obtain the measured values of water quality parameters; based on the estimated values and measured values of water quality parameters, the basic remote sensing water quality inversion model is preliminarily adjusted and optimized to obtain a preliminary remote sensing water quality inversion model; using the Bayesian method, based on a small number of measured water quality samples, the preliminary remote sensing water quality inversion model is readjusted and optimized to obtain a mature remote sensing water quality inversion model; according to seasonal changes, actual water samples of the target area water system are collected regularly, and the mature remote sensing water quality inversion model corresponding to the current season is regularly adjusted and optimized to obtain the seasonal optimal remote sensing water quality inversion model.
[0008] Optionally, the acquired remote sensing image data and measured water quality samples of the target area water system cover different seasons. While collecting the remote sensing image data of the target area water system, measured water quality samples corresponding to the remote sensing image data of the target area water system are collected; when collecting the measured water quality samples, a multispectral scanner equipped with sensors of multiple different wavelengths is used to capture the spectral data of the water body to determine the presence of various pollutants in the water body and measure the relative reflectivity; when collecting the measured water quality samples, the required water quality parameters are recorded, including but not limited to chlorophyll A, suspended matter concentration, dissolved organic matter, chemical oxygen demand, ammonia nitrogen, total phosphorus, and total nitrogen.
[0009] Optionally, an ASD FS4 spectrometer is used to measure the relative reflectance of the water system in the target area, and an all-in-one handheld multi-parameter high-precision water quality meter TE-3500 is used to measure chlorophyll A, chemical oxygen demand, ammonia nitrogen, total phosphorus, and total nitrogen in the water body of the water system in the target area.
[0010] Optionally, the corresponding preprocessing of the acquired remote sensing image data includes radiation correction, geometric correction and filtering processing in sequence, so as to obtain preprocessed remote sensing image data; among which, radiation correction is used to eliminate atmospheric influences to improve the quality of remote sensing image data, geometric correction is used to ensure that the remote sensing image data is consistent with the actual geographic coordinates, and filtering processing is used to reduce noise interference.
[0011] Optionally, the basic remote sensing water quality inversion model is preliminarily adjusted and optimized based on the estimated values of water quality parameters and the measured values of water quality parameters to obtain a preliminary remote sensing water quality inversion model, including: comparing the estimated values of water quality parameters and the measured values of water quality parameters to calculate error index values; based on the error index values, using the Bayesian inversion method to perform multiple parameter inversions on the basic remote sensing water quality inversion model, dynamically adjusting the parameters to adapt to environmental changes, so as to achieve preliminary adjustment and optimization of the basic remote sensing water quality inversion model to obtain a preliminary remote sensing water quality inversion model.
[0012] Optionally, a Bayesian approach can be used to readjust and optimize the preliminary remote sensing water quality inversion model based on a small number of measured water quality samples to obtain a mature remote sensing water quality inversion model, including:
[0013] Based on domain knowledge and experience, the prior distribution of the model parameter θ is set. It is assumed that the model parameter θ obeys a Gaussian distribution, that is, P(θ) = N(μ0,∑0), where μ0 and ∑0 are the mean and covariance matrix of the prior distribution respectively.
[0014] Define the likelihood function, which describes the probability distribution of the measured data when the model parameter θ is given. Assuming that the error obeys the Gaussian distribution, the likelihood function is expressed by the formula:
[0015]
[0016] D={(x1,y1),(x2,y2),…,(x N ,y N )};
[0017] Among them, D is the measured data set, f(x i ; θ) is the initial remote sensing water quality inversion model for input x under model parameter θ i Estimated values of water quality parameters, y i For x i The corresponding measured value of water quality parameter, σ is the observation error;
[0018] The posterior distribution of the model parameter θ is calculated using the Bayesian formula to obtain the optimal parameter estimate. The posterior distribution of the model parameter θ is expressed by the formula:
[0019] P(θ|D)=P(D|θ)P(θ) / P(D);
[0020] Where P(θ|D) is the posterior distribution of the model parameter θ;
[0021] The Metropolis-Hastings algorithm is used for sampling to optimize the optimal parameter estimation;
[0022] After multiple iterations, a set of optimal parameters was finally obtained. The optimal parameters were applied to the preliminary remote sensing water quality inversion model for readjustment and optimization to obtain a mature remote sensing water quality inversion model.
[0023] Optionally, a Metropolis-Hastings algorithm is used for sampling to optimize the optimal parameter estimation, including:
[0024] Choose an initial model parameter θ0 and select the proposed distribution Q(θ′|θ t )=N(μ t ,∑) extracts a new model parameter θ′, where ∑ is the covariance matrix of the proposed distribution, θ r is the current model parameter;
[0025] Calculate the current model parameters θ t The likelihood function P(D|θ t ) and the prior distribution P(θ t ), then calculate the likelihood function P(D|θ′) and prior distribution P(θ′) of the new model parameter θ′;
[0026] Calculate the ratio of the proposed distribution and calculate the acceptance probability α based on the ratio of the proposed distribution. The calculation of the acceptance probability α is expressed by the formula:
[0027] α=min[1,P(D|θ′)P(θ′)Q(θ t |θ′) / P(D|θ t )P(θ t )Q(θ′|θ t )];
[0028] Among them, Q(θ t |θ′) / Q(θ′|θ t ) is the ratio of the proposed distribution;
[0029] The above iterative process is repeated until the preset convergence condition is met. The preset convergence condition is that the difference between the estimated value of the water quality parameter and the measured value of the water quality parameter is less than 0.01.
[0030] Optionally, the Metropolis-Hastings algorithm is combined with the particle swarm optimization algorithm and chaos theory. The particle swarm optimization algorithm is used to accelerate the convergence of model parameters, and the chaos theory is introduced to optimize the distribution of initial model parameters to avoid local optimality problems.
[0031] First, a chaotic map is used to generate the initial particle positions and the initial state of the Metropolis-Hastings chain. The covariance matrix of the proposal distribution of the Metropolis-Hastings algorithm is adjusted according to the global optimal position of the particle swarm optimization algorithm. The acceptance probability of the Metropolis-Hastings algorithm is combined with the fitness function of the particle swarm optimization algorithm to encourage particles to move to areas with high acceptance probability. Finally, a proposal point is generated with the global optimal position of the particle swarm optimization algorithm as the center, and the Metropolis-Hastings algorithm sampling is executed. The global optimal position is updated by running several generations of the particle swarm optimization algorithm. At the same time, chaotic variables are periodically used to perturb the particle positions of the particle swarm optimization algorithm or the covariance matrix of the Metropolis-Hastings algorithm to continuously optimize the model parameters.
[0032] Optionally, actual water samples of the water system in the target area are collected regularly according to seasonal changes, and the mature remote sensing water quality inversion model corresponding to the current season is regularly adjusted and optimized to obtain the seasonal optimal remote sensing water quality inversion model, including: defining the four seasons of spring, summer, autumn and winter according to the seasonal time window divided by historical data, or defining the seasons according to the time period divided by regional climate characteristics; at the end of each season, actual water samples of the water system in the target area are collected, and combined with the newly added measured data, the model parameters are incrementally updated using the Bayesian online learning algorithm to achieve regular adjustment and optimization of the mature remote sensing water quality inversion model corresponding to the current season, and obtain the seasonal optimal remote sensing water quality inversion model.
[0033] This application proposes a method for updating a seasonal remote sensing water quality inversion model based on Bayesian optimization. First, remote sensing image data and measured water quality samples of the water system in the target area are obtained, and corresponding preprocessing is performed on each of them. Subsequently, the water quality parameters to be measured and the basic remote sensing water quality inversion model of the corresponding season are selected, and the preprocessed remote sensing image data are predicted using the basic remote sensing water quality inversion model to obtain estimated values of the water quality parameters. The preprocessed measured water quality samples are then digested to remove outliers and missing values to obtain measured values of the water quality parameters. Next, based on the estimated values of the water quality parameters and the measured values of the water quality parameters, the basic remote sensing water quality inversion model is preliminarily adjusted and optimized to obtain a preliminary remote sensing water quality inversion model. After that, the Bayesian method is used to readjust and optimize the preliminary remote sensing water quality inversion model based on a small amount of measured water quality samples to obtain a mature remote sensing water quality inversion model. Finally, actual water samples from the target area's water system are collected regularly according to seasonal changes, and the mature remote sensing water quality inversion model corresponding to the current season is adjusted and optimized to obtain the seasonally optimal remote sensing water quality inversion model. The initial optimization and re-optimization design can efficiently estimate the posterior distribution of model parameters from small sample measured data, solving the problem of quantifying the uncertainty of model parameters in high-dimensional, nonlinear models. The resulting seasonally optimal remote sensing water quality inversion model has high accuracy and excellent seasonal adaptability, effectively improving the precise decision-making capabilities of water environment management, promoting the transition of water quality monitoring from "extensive and lagging" to "intelligent and predictive", and providing key technical support for building a modern water governance system for harmonious coexistence between man and nature.
[0034] On the second aspect, the embodiment of the present application proposes a seasonal remote sensing water quality inversion model updating system based on Bayesian optimization, which is suitable for water quality monitoring of target water areas. The system includes: a preprocessing module for acquiring remote sensing image data and measured water quality samples of the water system in the target area, and performing corresponding preprocessing on the acquired remote sensing image data and measured water quality samples; an estimated value acquisition module for selecting the water quality parameters to be measured and the basic remote sensing water quality inversion model of the corresponding season, and using the basic remote sensing water quality inversion model to predict the preprocessed remote sensing image data to obtain water quality parameter estimates; a measured value acquisition module for performing preprocessing on the measured water quality samples The model is used to perform data digestion to remove outliers and missing values and obtain the measured values of water quality parameters; the preliminary optimization module is used to make preliminary adjustments and optimizations to the basic remote sensing water quality inversion model based on the estimated values and measured values of water quality parameters to obtain a preliminary remote sensing water quality inversion model; the re-optimization module is used to use the Bayesian method to readjust and optimize the preliminary remote sensing water quality inversion model based on a small number of measured water quality samples to obtain a mature remote sensing water quality inversion model; the seasonal optimization module is used to collect actual water samples of the target area water system at regular intervals according to seasonal changes, and to regularly adjust and optimize the mature remote sensing water quality inversion model corresponding to the current season to obtain the seasonal optimal remote sensing water quality inversion model.
[0035] It can be understood that the beneficial effects of the second aspect mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related technologies, the following is a brief introduction to the drawings required for use in the embodiments of the present application or the description of the related technologies. Obviously, the following drawings are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. The drawings described here are only used to explain the present application and are not used to limit the present application.
[0037] Figure 1 This is a flowchart of a method for updating a seasonal remote sensing water quality inversion model based on Bayesian optimization, provided in one embodiment of the present application;
[0038] Figure 2 This is a detailed flow chart of a method for updating a seasonal remote sensing water quality inversion model based on Bayesian optimization, provided in one embodiment of the present application;
[0039] Figure 3 This is a comparison chart of chlorophyll A in two phases provided in one embodiment of the present application;
[0040] Figure 4This is a comparison chart of total phosphorus in two phases provided in one embodiment of the present application;
[0041] Figure 5 This is a comparison chart of total nitrogen in two phases provided in one embodiment of the present application;
[0042] Figure 6 This is a comparison chart of chemical oxygen demand in two phases provided in one embodiment of the present application;
[0043] Figure 7 This is a comparison chart of suspended solids concentrations in two phases provided in one embodiment of the present application;
[0044] Figure 8 Another embodiment of the present application provides a schematic structural diagram of a seasonal remote sensing water quality inversion model update system based on Bayesian optimization; DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, each embodiment of the present application will be described in detail below with reference to the accompanying drawings. Those skilled in the art will appreciate that in each embodiment of the present application, many technical details are provided to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in the present application can be implemented. The division of the following embodiments is for convenience of description and should not constitute any limitation on the specific implementation of the present application. The various embodiments can be combined with each other and referenced to each other under the premise of no contradiction.
[0046] One embodiment of the present application proposes a seasonal remote sensing water quality inversion model update method based on Bayesian optimization, which is suitable for water quality monitoring of target water areas and is applied to electronic devices, where the electronic device can be a terminal or a server. This embodiment and the following embodiments are all described using a server as an example. The following is a detailed description of the implementation details of the seasonal remote sensing water quality inversion model update method based on Bayesian optimization proposed in this embodiment. The following content is only the implementation details provided for ease of understanding and is not required for the implementation of this solution.
[0047] The specific process of the seasonal remote sensing water quality inversion model updating method based on Bayesian optimization proposed in this embodiment is as follows: Figure 1 The details of the process are as shown in Figure 2 As shown, the method includes:
[0048] Step 101: Acquire remote sensing image data and measured water quality samples of the target area water system, and perform corresponding preprocessing on the acquired remote sensing image data and measured water quality samples.
[0049] In the specific implementation, the server first needs to obtain the remote sensing image data and measured water quality samples of the water system in the target area, and perform corresponding preprocessing on the obtained remote sensing image data and measured water quality samples respectively.
[0050] In one example, the acquired remote sensing image data and measured water quality samples of the target area water system cover different seasons. The server needs to collect the measured water quality samples corresponding to the remote sensing image data of the target area water system at the same time as collecting the remote sensing image data of the target area water system.
[0051] In one example, when collecting water quality samples for measurement, a multispectral scanner equipped with sensors at multiple wavelengths is used to capture spectral data of the water to determine the presence of various pollutants and measure relative reflectance. When collecting water quality samples for measurement, required water quality parameters are also recorded, including but not limited to chlorophyll A, suspended solids concentration, dissolved organic matter, chemical oxygen demand, ammonia nitrogen, total phosphorus, and total nitrogen.
[0052] In one example, an ASD FS4 spectrometer was used to measure the relative reflectance of the water system in the target area, and an all-in-one handheld multi-parameter high-precision water quality meter TE-3500 was used to measure the chlorophyll A, chemical oxygen demand, ammonia nitrogen, total phosphorus, and total nitrogen in the water system in the target area.
[0053] In one example, the server preprocesses the acquired remote sensing image data through radiometric correction, geometric correction, and filtering, thereby obtaining preprocessed remote sensing image data. Radiometric correction is used to eliminate atmospheric effects to improve the quality of the remote sensing image data, geometric correction is used to ensure that the remote sensing image data is consistent with the actual geographic coordinates, and filtering is used to reduce noise interference.
[0054] Step 102: Select the water quality parameters to be measured and the basic remote sensing water quality inversion model of the corresponding season, use the basic remote sensing water quality inversion model to predict the preprocessed remote sensing image data to obtain the estimated values of the water quality parameters, and digest the preprocessed measured water quality samples to remove outliers and missing values to obtain the measured values of the water quality parameters.
[0055] In the specific implementation, the server selects the water quality parameters that need to be measured and the basic remote sensing water quality inversion model of the corresponding season as the basis, uses the basic remote sensing water quality inversion model to predict the preprocessed remote sensing image data, obtains the estimated values of the water quality parameters, and digests the preprocessed measured water quality samples to remove outliers and missing values to obtain the measured values of the water quality parameters.
[0056] Step 103 : Based on the estimated values of water quality parameters and the measured values of water quality parameters, preliminary adjustment and optimization are performed on the basic remote sensing water quality inversion model to obtain a preliminary remote sensing water quality inversion model.
[0057] In the specific implementation, after obtaining the estimated values of water quality parameters and the measured values of water quality parameters, the server can make preliminary adjustments and optimizations to the basic remote sensing water quality inversion model based on the estimated values of water quality parameters and the measured values of water quality parameters to obtain a preliminary remote sensing water quality inversion model.
[0058] In one example, the server compares the estimated values of water quality parameters with the measured values of water quality parameters, calculates the error index value, and then uses the Bayesian inversion method based on the error index value to perform multiple parameter inversions on the basic remote sensing water quality inversion model, dynamically adjust the parameters to adapt to environmental changes, and achieve preliminary adjustment and optimization of the basic remote sensing water quality inversion model to obtain a preliminary remote sensing water quality inversion model.
[0059] In one example, the server uses a basic remote sensing water quality inversion model to process the total phosphorus, total nitrogen, chlorophyll A, and other parameters of pre-processed remote sensing image data. This involves inverting the model using the band ratio method of the remote sensing spectrum, then selecting the optimal model. After multiple parameter inversions, the server dynamically adjusts the parameters to adapt to environmental changes. For example, by fusing hyperspectral images with water body extraction images, the server selects spectral bands that are strongly correlated with water quality parameters, such as total phosphorus, total nitrogen, and chlorophyll A. The server then optimizes the model framework based on the selected data, and continuously selects parameters for dynamic calibration and adjustment.
[0060] For example, the timeframe for total phosphorus and total nitrogen can be adjusted, with weekly data collected and compared with the model's predicted values. Bayesian methods are used to inversely adjust the model's sedimentation rate and algal growth rate parameters, and the model is updated and optimized. After the model is updated, chlorophyll A concentrations are predicted for the following week to verify its accuracy and further optimize the model.
[0061] Step 104 , using the Bayesian method, based on a small amount of measured water quality samples, readjust and optimize the preliminary remote sensing water quality inversion model to obtain a mature remote sensing water quality inversion model.
[0062] In practice, after completing initial optimization and obtaining a preliminary remote sensing water quality inversion model, the server uses a Bayesian approach to further adjust and optimize the model based on a small number of measured water quality samples, ultimately achieving a mature remote sensing water quality inversion model. The goal of this re-optimization design is to integrate data through learning algorithms, dynamically optimize the model, and continuously improve accuracy.
[0063] In one example, the server uses the Bayesian method to readjust and optimize the preliminary remote sensing water quality inversion model based on a small number of measured water quality samples as follows:
[0064] First, we need to select a prior distribution. The server sets the prior distribution of the model parameter θ based on domain knowledge and experience. It assumes that the model parameter θ follows a Gaussian distribution, that is, P(θ) = N(μ0,∑0), where μ0 and ∑0 are the mean and covariance matrix of the prior distribution, respectively.
[0065] Next, we define the likelihood function, which describes the probability distribution of the measured data when the model parameters θ are given. Assuming that the error follows a Gaussian distribution, the likelihood function is expressed by the formula:
[0066]
[0067] D={(x1,y1),(x2,y2),…,(x N ,y N )};
[0068] Among them, D is the measured data set, f(x i ; θ) is the initial remote sensing water quality inversion model for input x under model parameter θ i Estimated values of water quality parameters, y i For x i The corresponding measured values of water quality parameters, σ is the observation error.
[0069] The Bayesian formula is then used to calculate the posterior distribution of the model parameter θ to obtain the optimal parameter estimate. The posterior distribution of the model parameter θ is expressed by the formula:
[0070] P(θ|D)=P(D|θ)P(θ) / P(D);
[0071] Where P(θ|D) is the posterior distribution of the model parameter θ.
[0072] Then the Metropolis-Hastings algorithm is used for sampling to optimize the optimal parameter estimation.
[0073] Finally, after multiple iterations, a set of optimal parameters was obtained. The optimal parameters were applied to the preliminary remote sensing water quality inversion model for readjustment and optimization to obtain a mature remote sensing water quality inversion model.
[0074] In one example, the Metropolis-Hastings algorithm is used for sampling to optimize the optimal parameter estimation process as follows:
[0075] First, an initial model parameter θ0 is selected and the proposed distribution Q(θ′|θ t )=N(μ t ,∑) extracts a new model parameter θ′, where ∑ is the covariance matrix of the proposed distribution, ∑ can be adjusted according to actual needs and experience, θ tare the current model parameters.
[0076] Next, we need to calculate the current model parameters θ t The likelihood function P(D|θ t ) and the prior distribution P(θ t ), and then calculate the likelihood function P(D|θ′) and prior distribution P(θ′) of the new model parameters θ′.
[0077] Then calculate the ratio of the proposed distribution, and calculate the acceptance probability α based on the ratio of the proposed distribution. The calculation of the acceptance probability α is expressed by the formula:
[0078] α=min[1,P(D|θ′)P(θ′)Q(θ t |θ′) / P(D|θ t )P(θ t )Q(θ′|θ t )];
[0079] Among them, Q(θ t |θ′) / Q(θ′|θ t ) is the ratio of the proposed distribution.
[0080] Finally, the above iterative process is repeated until the preset convergence condition is met. The preset convergence condition is that the difference between the estimated value of the water quality parameter and the measured value of the water quality parameter is less than 0.01.
[0081] In one example, the Metropolis-Hastings algorithm is combined with the particle swarm optimization algorithm and chaos theory. The particle swarm optimization algorithm is used to accelerate the convergence of model parameters, and chaos theory is introduced to optimize the distribution of initial model parameters to avoid local optimal problems.
[0082] Specifically, the server uses chaotic mapping to generate the initial particle positions and the initial state of the Metropolis-Hastings chain. It adjusts the covariance matrix of the proposal distribution of the Metropolis-Hastings algorithm according to the global optimal position of the particle swarm optimization algorithm. The acceptance probability of the Metropolis-Hastings algorithm is combined with the fitness function of the particle swarm optimization algorithm to encourage particles to move to areas with high acceptance probability. Finally, a proposal point is generated with the global optimal position of the particle swarm optimization algorithm as the center, and Metropolis-Hastings algorithm sampling is executed. The global optimal position is updated by running several generations of the particle swarm optimization algorithm. At the same time, chaotic variables are periodically used to perturb the particle positions of the particle swarm optimization algorithm or the covariance matrix of the Metropolis-Hastings algorithm to continuously optimize the model parameters.
[0083] In one example, a lightweight Metropolis-Hastings algorithm can be embedded in IoT water quality monitoring equipment to achieve real-time Bayesian inference and continuously improve the model.
[0084] In one example, in order to better verify the water quality measurement accuracy of a mature remote sensing water quality inversion model, the server uses root mean square error (RMSE) and mean absolute error (MAE) as evaluation indicators. Specifically, RMSE measures the degree of deviation between the observed value and the true value. The closer the value is to 0, the better, which can better reflect the average level of error; MAE reflects the mean absolute deviation between the predicted value and the true value. The closer the value is to 0, the better, and MAE is relatively less sensitive to outliers.
[0085] Step 105 , collect actual water samples of the target area water system regularly according to seasonal changes, regularly adjust and optimize the mature remote sensing water quality inversion model corresponding to the current season, and obtain the seasonal optimal remote sensing water quality inversion model.
[0086] In the specific implementation, in order to improve seasonal adaptability, the server needs to collect actual water samples from the target area water system on a regular basis according to seasonal changes, and regularly adjust and optimize the mature remote sensing water quality inversion model corresponding to the current season to obtain the seasonal optimal remote sensing water quality inversion model.
[0087] In one example, the server defines the four seasons of spring, summer, autumn, and winter by dividing seasonal time windows based on historical data, or by defining seasons based on time periods characterized by regional climate characteristics. At the end of each season, actual water samples are collected from the target area's water system. Combined with newly measured data, the model parameters are incrementally updated using a Bayesian online learning algorithm. This allows for regular adjustments and optimization of the established remote sensing water quality inversion model for the current season, resulting in the optimal seasonal remote sensing water quality inversion model.
[0088] This embodiment proposes a seasonal remote sensing water quality inversion model updating method based on Bayesian optimization. First, remote sensing image data and measured water quality samples of the water system in the target area are obtained and preprocessed accordingly. Then, the water quality parameters to be measured and the basic remote sensing water quality inversion model of the corresponding season are selected. The preprocessed remote sensing image data are predicted using the basic remote sensing water quality inversion model to obtain water quality parameter estimates. The preprocessed measured water quality samples are digested to remove outliers and missing values to obtain water quality parameter measured values. Next, based on the water quality parameter estimates and water quality parameter measured values, the basic remote sensing water quality inversion model is preliminarily adjusted and optimized to obtain a preliminary remote sensing water quality inversion model. After that, the Bayesian method is used to readjust and optimize the preliminary remote sensing water quality inversion model based on a small amount of measured water quality samples to obtain a mature remote sensing water quality inversion model. Finally, actual water samples from the target area's water system are collected regularly according to seasonal changes, and the mature remote sensing water quality inversion model corresponding to the current season is adjusted and optimized to obtain the seasonally optimal remote sensing water quality inversion model. The initial optimization and re-optimization design can efficiently estimate the posterior distribution of model parameters from small sample measured data, solving the problem of quantifying the uncertainty of model parameters in high-dimensional, nonlinear models. The resulting seasonally optimal remote sensing water quality inversion model has high accuracy and excellent seasonal adaptability, effectively improving the precise decision-making capabilities of water environment management, promoting the transition of water quality monitoring from "extensive and lagging" to "intelligent and predictive", and providing key technical support for building a modern water governance system for harmonious coexistence between man and nature.
[0089] The steps of the various methods described above are divided for clarity of description only. They can be combined into a single step, or some steps can be broken down into multiple steps. As long as they share the same logical relationships, they are all within the scope of protection of this application. Adding minor modifications or introducing minor design changes to the algorithm or process, but not changing the core design of the algorithm or process, is also within the scope of protection of this application.
[0090] In one embodiment, in order to verify the water quality monitoring performance of the method proposed in this application, a simulation experiment was conducted using the Linux 18.04 operating system, Python 3.7 software, and PyTorch 1.7 software. Remote sensing data was obtained using the Sentinel-2 satellite to obtain images of the waters of Shaanxi Province. Image data from spring (March 2025) and winter (November 2024) were used as examples. The specific experimental process is as follows:
[0091] (1) Since the original images of the above two phases are 10980×10980 and the data volume is large, the data is subjected to strict band screening and preprocessing operations, and the remote sensing image data of the target area water system with a size of 376×357 is obtained. The spatial resolution is 10m and the spectral range covers 443nm to 2190nm. This spectral range can capture multiple key band information related to water quality.
[0092] (2) The root mean square error (RMSE) and mean absolute error (MAE) were used to evaluate the water quality detection accuracy of the method proposed in this application.
[0093] (3) According to the simulation results, the remote sensing water quality inversion model has a root mean square error (RMSE) and a mean absolute error (MAE) that are consistent with the fish fin when there are only 80 training samples in the new domain. The water quality detection performance is good and has been greatly improved compared with other methods. For example, the convolutional neural network algorithm in the traditional method has a significant reduction in RMSE and MAE. This fully demonstrates that the method proposed in this application can perform water quality detection more accurately and has significantly improved the water quality detection performance compared with existing methods.
[0094] like Figures 3 to 7 As shown, in order to more accurately and intuitively verify the accuracy of the seasonal optimal remote sensing water quality inversion model obtained in this application, we compared the images generated by the seasonal optimal remote sensing water quality inversion model with the actual water quality detection values. Taking chlorophyll A, total phosphorus, total nitrogen, chemical oxygen demand and suspended solids concentration as examples, Figure 3 This is a comparison of chlorophyll A in two phases. Figure 4 This is a comparison chart of total phosphorus in the two phases. Figure 5 This is a comparison chart of total nitrogen in the two phases. Figure 6 The comparison chart of chemical oxygen demand in two phases is shown in Figure 2. Figure 7 The figure is a comparison of the suspended solids concentration in two phases. Figures 3 to 7 As can be seen in the figure (data from November 2024 on the left and data from March 2025 on the right), the chlorophyll A content increased significantly from November 2024 to March 2025. The total phosphorus, total nitrogen, chemical oxygen demand, and suspended solids concentrations in some parts of the water area also changed significantly. After random sampling of water quality, it was found that the actual measurement was basically consistent with the image changes, further demonstrating that the method proposed in this application has a high detection effect. In addition, the ammonia nitrogen inversion error is greatly reduced compared to the traditional model, and the average absolute error of total nitrogen and chlorophyll A is small. The error of the inversion model is significantly reduced, which can accurately capture the content of total nitrogen and chlorophyll A in complex scenarios in multiple seasons, meeting the needs of periodic water quality monitoring.
[0095] Another embodiment of the present application proposes a seasonal remote sensing water quality inversion model update system based on Bayesian optimization, which is suitable for water quality monitoring of target water areas. The following is a detailed description of the seasonal remote sensing water quality inversion model update system based on Bayesian optimization proposed in this embodiment. The following content is only for the convenience of understanding the implementation details provided and is not necessary for the implementation of this example. Figure 8 This is a structural diagram of a seasonal remote sensing water quality inversion model update system based on Bayesian optimization proposed in this embodiment, including: a preprocessing module 201, an estimated value acquisition module 202, a measured value acquisition module 203, a preliminary optimization module 204, a re-optimization module 205 and a seasonal optimization module 206.
[0096] The preprocessing module 201 is used to obtain remote sensing image data and measured water quality samples of the water system in the target area, and perform corresponding preprocessing on the obtained remote sensing image data and measured water quality samples.
[0097] The estimated value acquisition module 202 is used to select the water quality parameters to be measured and the basic remote sensing water quality inversion model of the corresponding season, and use the basic remote sensing water quality inversion model to predict the pre-processed remote sensing image data to obtain the estimated values of the water quality parameters.
[0098] The measured value acquisition module 203 is used to digest the pre-processed measured water quality samples, remove abnormal values and missing values, and obtain the measured values of water quality parameters.
[0099] The preliminary optimization module 204 is used to perform preliminary adjustment and optimization on the basic remote sensing water quality inversion model based on the estimated values of water quality parameters and the measured values of water quality parameters to obtain a preliminary remote sensing water quality inversion model.
[0100] The re-optimization module 205 is used to readjust and optimize the preliminary remote sensing water quality inversion model based on a small amount of measured water quality samples using the Bayesian method to obtain a mature remote sensing water quality inversion model.
[0101] The seasonal optimization module 206 is used to collect actual water samples of the target area water system according to seasonal changes, and regularly adjust and optimize the mature remote sensing water quality inversion model corresponding to the current season to obtain the seasonal optimal remote sensing water quality inversion model.
[0102] It is not difficult to find that this embodiment is a system embodiment corresponding to the above-mentioned method embodiment, and this embodiment can be implemented in conjunction with the above-mentioned method embodiment. The relevant technical details and technical effects mentioned in the above-mentioned method embodiment are still valid in this embodiment, and to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above-mentioned method embodiment.
[0103] It is worth mentioning that all modules and modules involved in this embodiment are logical modules. In actual applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, to highlight the innovation of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application. However, this does not mean that other units do not exist in this embodiment.
[0104] Another embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it can implement a seasonal remote sensing water quality inversion model updating method based on Bayesian optimization as described in the above method embodiment.
[0105] That is, those skilled in the art will understand that all or part of the steps in the above-described embodiments can be implemented by instructing the relevant hardware through a program, which is stored in a storage medium and includes a number of instructions for causing a device (such as a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. Storage media include: U disk, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk, etc., various media that can store program code.
[0106] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application. In actual applications, various modifications may be made to the embodiments in form and detail without departing from the spirit and scope of the present application. Those skilled in the art will appreciate that improvements and modifications may be made without departing from the principles of the present application, and such improvements and modifications are also considered to be within the scope of protection of the present application.
Claims
1. A seasonal remote sensing water quality inversion model updating method based on Bayesian optimization, suitable for water quality monitoring of target waters, characterized by: The method comprises: Obtain remote sensing image data and measured water quality samples of the target area water system, and perform corresponding preprocessing on the obtained remote sensing image data and measured water quality samples respectively; Select the water quality parameters to be measured and the basic remote sensing water quality inversion model of the corresponding season, use the basic remote sensing water quality inversion model to predict the preprocessed remote sensing image data, obtain the estimated values of the water quality parameters, and digest the preprocessed measured water quality samples to remove outliers and missing values to obtain the measured values of the water quality parameters; Based on the estimated and measured values of water quality parameters, the basic remote sensing water quality inversion model was preliminarily adjusted and optimized to obtain a preliminary remote sensing water quality inversion model. Using the Bayesian method, based on a small number of measured water quality samples, the preliminary remote sensing water quality inversion model was readjusted and optimized to obtain a mature remote sensing water quality inversion model; Actual water samples of the target area water system are collected regularly according to seasonal changes, and the mature remote sensing water quality inversion model corresponding to the current season is regularly adjusted and optimized to obtain the seasonal optimal remote sensing water quality inversion model.
2. The seasonal remote sensing water quality inversion model updating method based on Bayesian optimization according to claim 1 is characterized in that: The acquired remote sensing image data and measured water quality samples of the target area water system cover different seasons. While collecting the remote sensing image data of the target area water system, the measured water quality samples corresponding to the remote sensing image data of the target area water system are also collected. When collecting water quality samples for measurement, a multispectral scanner equipped with sensors at multiple wavelengths is used to capture spectral data of the water to determine the presence of various pollutants in the water and measure relative reflectance; When collecting measured water quality samples, record the required water quality parameters, including but not limited to chlorophyll A, suspended solids concentration, dissolved organic matter, chemical oxygen demand, ammonia nitrogen, total phosphorus, and total nitrogen.
3. The seasonal remote sensing water quality inversion model updating method based on Bayesian optimization according to claim 2 is characterized in that: An ASD FS4 spectrometer was used to measure the relative reflectance of the water system in the target area, and an integrated handheld multi-parameter high-precision water quality meter TE-3500 was used to measure the chlorophyll A, chemical oxygen demand, ammonia nitrogen, total phosphorus, and total nitrogen in the water system in the target area.
4. The seasonal remote sensing water quality inversion model updating method based on Bayesian optimization according to claim 2 is characterized in that: The corresponding preprocessing of the acquired remote sensing image data includes radiation correction, geometric correction and filtering processing in sequence, so as to obtain the preprocessed remote sensing image data; among them, radiation correction is used to eliminate the influence of the atmosphere to improve the quality of the remote sensing image data, geometric correction is used to ensure that the remote sensing image data is consistent with the actual geographic coordinates, and filtering processing is used to reduce noise interference.
5. The seasonal remote sensing water quality inversion model updating method based on Bayesian optimization according to claim 4 is characterized in that: Based on the estimated and measured values of water quality parameters, the basic remote sensing water quality inversion model was preliminarily adjusted and optimized to obtain a preliminary remote sensing water quality inversion model, including: Compare the estimated values of water quality parameters with the measured values of water quality parameters and calculate the error index value; Based on the error index value, the Bayesian inversion method is used to perform multiple parameter inversions on the basic remote sensing water quality inversion model, and the parameters are dynamically adjusted to adapt to environmental changes, so as to achieve preliminary adjustment and optimization of the basic remote sensing water quality inversion model and obtain a preliminary remote sensing water quality inversion model.
6. The seasonal remote sensing water quality inversion model updating method based on Bayesian optimization according to claim 5 is characterized in that: Using the Bayesian approach, based on a small number of measured water quality samples, the preliminary remote sensing water quality inversion model was readjusted and optimized to obtain a mature remote sensing water quality inversion model, including: Based on domain knowledge and experience, the prior distribution of the model parameter θ is set. It is assumed that the model parameter θ obeys a Gaussian distribution, that is, P(θ) = N(μ0,∑0), where μ0 and ∑0 are the mean and covariance matrix of the prior distribution respectively. Define the likelihood function, which describes the probability distribution of the measured data when the model parameter θ is given. Assuming that the error obeys the Gaussian distribution, the likelihood function is expressed by the formula: D={(x1,y1),(x2,y2),…,(x N ,y N )}; Among them, D is the measured data set, f(x i ; θ) is the initial remote sensing water quality inversion model for input x under model parameter θ i Estimated values of water quality parameters, y i For x i The corresponding measured value of water quality parameter, σ is the observation error; The posterior distribution of the model parameter θ is calculated using the Bayesian formula to obtain the optimal parameter estimate. The posterior distribution of the model parameter θ is expressed by the formula: P(θ|D)=P(D|θ)P(θ) / P(D); Where P(θ|D) is the posterior distribution of the model parameter θ; The Metropolis-Hastings algorithm is used for sampling to optimize the optimal parameter estimation; After multiple iterations, a set of optimal parameters was finally obtained. The optimal parameters were applied to the preliminary remote sensing water quality inversion model for readjustment and optimization to obtain a mature remote sensing water quality inversion model.
7. The method for updating a seasonal remote sensing water quality inversion model based on Bayesian optimization according to claim 6, characterized in that: The Metropolis-Hastings algorithm is used for sampling to optimize the optimal parameter estimation, including: Choose an initial model parameter θ0 and select the proposed distribution Q(θ′|θ t )=N(μ t ,∑) extracts a new model parameter θ′, where ∑ is the covariance matrix of the proposed distribution, θ r is the current model parameter; Calculate the current model parameters θ r The likelihood function P(D|θ t ) and the prior distribution P(θ t ), then calculate the likelihood function P(D|θ′) and prior distribution P(θ′) of the new model parameter θ′; Calculate the ratio of the proposed distribution and calculate the acceptance probability α based on the ratio of the proposed distribution. The calculation of the acceptance probability α is expressed by the formula: α=min[1,P(D|θ′)P(θ′)Q(θ t |θ′) / P(D|θ t )P(θ t )Q(θ′|θ t )]; Among them, Q(θ t |θ′) / Q(θ′|θ t ) is the ratio of the proposed distribution; The above iterative process is repeated until the preset convergence condition is met. The preset convergence condition is that the difference between the estimated value of the water quality parameter and the measured value of the water quality parameter is less than 0.
01.
8. The method for updating a seasonal remote sensing water quality inversion model based on Bayesian optimization according to claim 7, characterized in that: The Metropolis-Hastings algorithm is combined with the particle swarm optimization algorithm and chaos theory. The particle swarm optimization algorithm is used to accelerate the convergence of model parameters. The distribution of initial model parameters is optimized by introducing chaos theory to avoid local optimal problems. First, a chaotic map is used to generate the initial particle positions and the initial state of the Metropolis-Hastings chain. The covariance matrix of the proposal distribution of the Metropolis-Hastings algorithm is adjusted according to the global optimal position of the particle swarm optimization algorithm. The acceptance probability of the Metropolis-Hastings algorithm is combined with the fitness function of the particle swarm optimization algorithm to encourage particles to move to areas with high acceptance probability. Finally, a proposal point is generated with the global optimal position of the particle swarm optimization algorithm as the center, and the Metropolis-Hastings algorithm sampling is executed. The global optimal position is updated by running several generations of the particle swarm optimization algorithm. At the same time, chaotic variables are periodically used to perturb the particle positions of the particle swarm optimization algorithm or the covariance matrix of the Metropolis-Hastings algorithm to continuously optimize the model parameters.
9. A seasonal remote sensing water quality inversion model updating method based on Bayesian optimization according to any one of claims 1 to 8, characterized in that: Actual water samples from the target area's water system are collected regularly according to seasonal changes. The mature remote sensing water quality inversion model corresponding to the current season is regularly adjusted and optimized to obtain the seasonal optimal remote sensing water quality inversion model, including: Define the four seasons of spring, summer, autumn, and winter by dividing seasonal time windows based on historical data, or define seasons by time periods based on regional climate characteristics; At the end of each season, actual water samples from the target area’s water system are collected. Combined with newly added measured data, the model parameters are incrementally updated using the Bayesian online learning algorithm to achieve regular adjustment and optimization of the mature remote sensing water quality inversion model corresponding to the current season, and obtain the seasonal optimal remote sensing water quality inversion model.
10. A seasonal remote sensing water quality inversion model updating system based on Bayesian optimization, suitable for water quality monitoring of target waters, characterized by: The system comprises: The preprocessing module is used to obtain remote sensing image data and measured water quality samples of the target area water system, and perform corresponding preprocessing on the obtained remote sensing image data and measured water quality samples respectively; The estimated value acquisition module is used to select the water quality parameters to be measured and the basic remote sensing water quality inversion model of the corresponding season, and use the basic remote sensing water quality inversion model to predict the pre-processed remote sensing image data to obtain the estimated values of the water quality parameters; The measured value acquisition module is used to digest the pre-processed measured water quality samples, remove abnormal values and missing values, and obtain the measured values of water quality parameters; The preliminary optimization module is used to make preliminary adjustments and optimizations to the basic remote sensing water quality inversion model based on the estimated values and measured values of water quality parameters, and obtain a preliminary remote sensing water quality inversion model; The re-optimization module is used to readjust and optimize the preliminary remote sensing water quality inversion model based on a small number of measured water quality samples using the Bayesian method to obtain a mature remote sensing water quality inversion model; The seasonal optimization module is used to collect actual water samples from the target area water system according to seasonal changes, and to regularly adjust and optimize the mature remote sensing water quality inversion model corresponding to the current season to obtain the seasonal optimal remote sensing water quality inversion model.