A method and system for predicting water quality variable concentration
By using the deep learning-based ConvLSTM regression model combined with remote sensing image processing methods, the accuracy problem of water quality variable concentration assessment in small lakes or rivers was solved, and reliable monitoring and assessment of water quality parameters were achieved.
Patent Information
- Application Number
- CN202410174923.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-07
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-02-07
AI Technical Summary
Existing technologies make it difficult to accurately assess the concentration of water quality variables in small lakes or rivers through surface reflectance, resulting in a lack of effective water quality parameter assessment methods.
The ConvLSTM regression model based on deep learning is used, combined with remote sensing image preprocessing and special processing methods. By preprocessing the spectral reflectance and special processing methods, image features are extracted to predict the concentration of water quality variables.
Accurately assess the concentration of water quality variables through image features such as spectral reflectance, monitor the dynamic changes in water quality of lakes or rivers, and provide reliable water quality variable parameters for evaluating the water quality of lakes or rivers.
Smart Images

Figure CN118115824B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a method and system for predicting water quality variable concentration. Background Art
[0002] Different regions of the world are facing water environmental problems. For local environmental use, the use of traditional in situ observation techniques to extract different spatiotemporal characteristics has traditionally been considered too costly, which inevitably poses challenges in solving aquatic problems and public health issues. To date, many studies have explored the potential and utility of remote sensing technology in better understanding environmental characteristics at different temporal and spatial scales. Satellites equipped with a variety of optical and thermal sensors have advantages over on-site measurements, providing an increasing stream of geospatial data, covering large areas, with high resolution, and more economical. They have been used by researchers for water quality assessment for many years, and studies conducted in large rivers and lakes, estuaries and coastal areas or at a regional scale have demonstrated the applicability of satellite-based water quality assessment.
[0003] However, due to the limited spatial information available on small lakes or rivers, current methods are not suitable for monitoring these areas. In urban water quality assessments, non-photosensitive parameters such as chemical oxygen demand (COD), biological oxygen demand (BOD), total nitrogen (TN), chemical oxygen demand permanganate (CODMn), ammonia (NH3-N), and total phosphorus (TP) are primarily used as important reference indicators. For small lakes or rivers, however, the complex nonlinear relationship between observed water quality parameters and surface reflectance makes it difficult to accurately assess the concentration of water quality variables using surface reflectance. Consequently, there is a lack of water quality variable parameters that can be used to assess lakes or rivers. Summary of the Invention
[0004] In order to solve the problem that for small lakes or rivers, due to the complex nonlinear relationship between the observed values of water quality parameters and surface reflectivity, it is difficult to accurately evaluate the concentration of water quality variables through surface reflectivity, resulting in a lack of technical problems that can be used to evaluate water quality variable parameters of lakes or rivers, the present invention provides a water quality variable concentration prediction method and system.
[0005] The technical solutions provided by the present invention are as follows:
[0006] First aspect
[0007] The present invention provides a method for predicting water quality variable concentration, comprising:
[0008] S1: Acquire remote sensing images;
[0009] S2: Preprocessing the remote sensing image;
[0010] S3: extracting image features of the pre-processed remote sensing image;
[0011] S4: Using a deep learning-based ConvLSTM regression model, the concentration of water quality variables is predicted based on the image features.
[0012] Second aspect
[0013] The present invention provides a water quality variable concentration prediction system, comprising: a processor and a memory for storing processor executable instructions; the processor is configured to call the instructions stored in the memory to execute the water quality variable concentration prediction method described in the first aspect.
[0014] Compared with the prior art, the above technical solution has at least the following beneficial effects:
[0015] In the present invention, lakes or rivers are covered by remote sensing images, and the complex nonlinear relationship between image features such as spectral reflectance and water quality parameters is accurately captured through the ConvLSTM regression model based on deep learning. The concentration of water quality variables is accurately evaluated through image features such as spectral reflectance, and the dynamic changes of water quality in lakes or rivers are monitored, providing reliable water quality variable parameters for evaluating the water quality of lakes or rivers. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0017] Figure 1 A schematic flow chart of a method for predicting water quality variable concentration provided by the present invention;
[0018] Figure 2 This is a structural diagram of a water quality variable concentration prediction system provided by the present invention. DETAILED DESCRIPTION
[0019] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the described embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0020] Unless otherwise defined, the technical or scientific terms used in the present invention shall have the usual meaning understood by persons of ordinary skill in the field to which the present invention belongs. The words "first", "second" and similar terms used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one", "an" or "the" do not indicate a quantity limitation, but rather indicate the presence of at least one. Words such as "include" or "comprise" mean that the elements or objects preceding the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connect" or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.
[0021] It should be noted that the terms "up", "down", "left", "right", "front" and "back" used in the present invention are only used to indicate relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.
[0022] Reference Manual Figure 1 , which shows a flow chart of a water quality variable concentration prediction method provided by the present invention.
[0023] An embodiment of the present invention provides a method for predicting water quality variable concentration, comprising:
[0024] S1: Acquire remote sensing images.
[0025] Specifically, large-scale remote sensing images can be acquired through satellites. Landsat 8OLI, launched by the National Aeronautics and Space Administration (NASA) on February 11, 2013, is one of the satellites most commonly used for water quality monitoring.
[0026] S2: Preprocess the remote sensing image.
[0027] In one possible implementation, preprocessing includes geometric correction, radiation calibration, and atmospheric correction. S2 specifically includes sub-steps S201 to S203:
[0028] S201: Perform geometric correction on the remote sensing image.
[0029] Among them, geometric correction includes: orthorectification, geographic registration and image registration.
[0030] Furthermore, orthorectification is a form of geometric correction that further corrects the image by taking into account terrain elevation information, thereby resolving parallax distortion caused by terrain. This is particularly important in mountainous areas and areas with variable terrain.
[0031] The georeferencing process establishes a relationship between the pixel coordinates of a remote sensing image and the geographic coordinates of the earth's surface, enabling the image to be accurately positioned on the earth's surface, and the geographic location information can be directly obtained through the pixel coordinates of the image.
[0032] Image registration is used to align remote sensing imagery with a geographic coordinate system so that the imagery can be accurately located on the Earth's surface.
[0033] In the present invention, geometric correction can correct image deformation caused by the geometric difference between the earth's surface and the satellite orbit, thereby improving the accuracy of remote sensing images on the map.
[0034] S202: Performing radiometric calibration on the geometrically corrected remote sensing image.
[0035] In a possible implementation, S202 specifically includes performing radiation calibration according to the following formula:
[0036] L=Gain×DN+Bias
[0037] Where L represents the top-of-atmosphere radiance of the sensor's spectral channel, DN represents the grayscale value of the remote sensing image, Gain represents the gain of the sensor calibration, and Bias represents the offset of the sensor calibration.
[0038] It should be noted that radiometric calibration converts the digital values (DN) of remote sensing images into actual radiation quantities, namely the top-of-atmosphere radiance (L) of the sensor's spectral channels. This gives the digital values in the image a physically interpretable meaning, reflecting the radiation characteristics of the Earth's surface.
[0039] In the present invention, radiation calibration ensures that remote sensing data acquired at different times and by different sensors have consistent radiation units, making it easier to compare and analyze data at different time points and from different sensors, thereby improving the consistency and comparability of the data.
[0040] S203: Perform atmospheric correction on the remote sensing image after radiation calibration.
[0041] In a possible implementation, S203 specifically includes performing atmospheric correction according to the following formula:
[0042]
[0043] Among them, ρ tg Indicates the surface reflectivity of the target, L ds Indicates the radiation brightness value at the sensor, L ts represents the dark object radiance at the sensor, E0·d represents the solar radiance at the top of the atmosphere, and θ0 represents the solar zenith angle.
[0044] In this invention, atmospheric correction helps eliminate the influence of the atmosphere on remote sensing images. Gases and particulate matter in the atmosphere absorb, scatter, and reflect light, causing disturbances in the brightness values in the image. Atmospheric correction can more accurately restore the true reflectivity of the target surface. Atmospheric correction also makes remote sensing data from different times and locations more comparable. This is crucial for time series analysis, monitoring environmental changes, and comparative studies across different regions.
[0045] S3: Extract image features of the preprocessed remote sensing image.
[0046] In one possible implementation, the image features include multiple water quality variables, specifically:
[0047]
[0048] Among them, p represents the water quality variable, R1 represents the reflectivity of the first band, R2 represents the reflectivity of the second band, α, β, and γ represent regression coefficients, and the first band and the second band are one band or a combination of multiple bands.
[0049] By using reflectance values across multiple wavelengths, this method can comprehensively leverage optical information from different wavelengths, helping to more comprehensively capture the spectral characteristics of the Earth's surface. Furthermore, the use of nonlinear relationships can better capture the complex relationship between water quality variables and reflectance, helping to improve prediction accuracy.
[0050] In a possible embodiment, the image features include: coastal band reflectance R1, blue band reflectance R2, green band reflectance R3, red band reflectance R4, NIR band reflectance R5, SWIR1 band reflectance R6, SWIR2 band reflectance R7, Karakoram Mountain band reflectance R9, and the reflectance ratio between the green band and the red band. Reflectance ratio between the red and green bands Reflectance ratio between green and blue bands Reflectance ratio between blue and green bands Reflectance ratio between the red and blue bands Reflectance ratio between the blue and red bands Reflectance ratio between the red and near-infrared bands Reflectivity ratio between near-infrared band and infrared band Reflectance ratio between green and near-infrared bands Reflectance ratio between the near-infrared band and the green band Reflectance ratio between the blue band and the near-infrared band Reflectance ratio between the near-infrared band and the blue band Normalized difference between the green and red bands Normalized difference between near-infrared and red bands Normalized difference between the near infrared band and the SWIR1 band Normalized difference between green and near-infrared bands Normalized differences between SWIR1 and SWIR2 bands Normalized difference between the green band and the SWIR1 band
[0051] In the present invention, the use of reflectivity information from multiple bands allows for a comprehensive consideration of the optical properties of the Earth's surface. Different bands respond differently to surface objects, and by combining these bands, the spectral characteristics of the Earth's surface can be more comprehensively described. Different bands have different spatial and optical resolutions, which can provide multi-scale surface observations, and are very important for monitoring surface changes and characteristics at different scales. At the same time, indicators such as the normalized difference index and reflectivity ratio are powerful tools for a more in-depth analysis of surface characteristics. These indicators can better capture the characteristics of different objects such as water bodies, which is of great significance for environmental monitoring and ecological research.
[0052] Furthermore, the specific calculation method of the reflectivity of each band is: taking the average value of the reflectivity values represented by each pixel in each band.
[0053] In the present invention, taking the average value of each band helps to reduce the impact caused by noise or outliers in a certain band. The calculation of the average value can smooth the data to a certain extent and improve the stability of the overall data.
[0054] S4: The concentration of water quality variables is predicted based on image features using a deep learning-based ConvLSTM regression model.
[0055] ConvLSTM (Convolutional Long Short-Term Memory) is a neural network model that combines a convolutional neural network (CNN) and a long short-term memory network (LSTM). ConvLSTM is widely used to process sequence data with spatiotemporal information.
[0056] Furthermore, LSTM is a variant of recurrent neural networks (RNNs) specifically designed for processing sequential data. CNN is a neural network specifically designed for image processing, effectively extracting spatial features from images through structures such as convolutional and pooling layers. ConvLSTM introduces a convolution operation at each time step of the LSTM to allow the model to capture spatial structure in time series.
[0057] Specifically, by stacking multiple recurrent ConvLSTM layers (similar to the layers in LSTM, but with the internal matrix multiplications swapped) and convolution operations, the algorithm includes convolutional structures in both input-to-state and state-to-state transformations.
[0058] In a possible implementation, S5 specifically includes:
[0059] S401: Input the image feature sequence X into the ConvLSTM regression model based on deep learning.
[0060] S402: Determine the hidden state at each moment through the ConvLSTM regression model:
[0061]
[0062]
[0063] C t '=tanh(W XC *X t +W HC *H t-1 +b C )
[0064]
[0065]
[0066]
[0067] Among them, I t represents the activation output vector of the input gate at time t, σ() represents the activation function, W XI Represents the weight matrix between the image feature sequence and the input gate, X t represents the image feature sequence at time t, W HI represents the weight matrix between the hidden state and the input gate, H t-1 represents the hidden state at time t-1, W CI represents the weight matrix between the cell storage unit and the input gate, C t-1 represents the activation output vector of the cell storage unit at time t-1, b I represents the bias term of the input gate, F t represents the activation output vector of the forget gate at time t, W XF Represents the weight matrix between the image feature sequence and the forget gate, W HF Represents the weight matrix between the hidden state and the forget gate, W CF represents the weight matrix between the cell storage unit and the forget gate, b F represents the bias term of the forget gate, Ct represents the activation output vector of the cell storage unit at time t, C t ' represents the candidate output vector of the cell storage unit at time t, tanh() represents the tanh activation function, W XC Represents the weight matrix between the image feature sequence and the cell storage unit, W HC represents the weight matrix between the hidden state and the cell storage unit, b C represents the bias term of the cell storage unit, O t represents the activation output vector of the output gate at time t, W XO Represents the weight matrix between the image feature sequence and the output gate, W HO Represents the weight matrix between the hidden state and the output gate, W CO represents the weight matrix between the cell storage unit and the output gate, b O Represents the bias term of the output gate, H t represents the hidden state at time t, * represents the convolution operation, Represents the Hadamard product operation.
[0068] The Hadamard product refers to an operation of multiplying corresponding elements in two matrices or vectors of the same dimension one by one.
[0069] It is important to note that the introduction of input, forget, and output gates allows for better control of the flow of information, helping to selectively retain and forget previous information, enabling the model to adapt to inputs at different time steps. Memory cells are used to maintain and update past information. Memory cell updates are achieved through the activation of the input gate, candidate outputs, and the forget gate, enabling the model to effectively remember and forget information at different time steps. The introduction of convolution operations enables the model to process spatial information from the input image feature sequence. Convolution operations help extract spatial features and better capture structural information in images.
[0070] S403: Determine the predicted value of the water quality variable concentration based on the hidden state at each moment.
[0071] In a possible implementation, S403 specifically includes determining a predicted value of the concentration of the water quality variable according to the following formula:
[0072] d t =σ(W DH H t +b D )
[0073] Among them, d t represents the predicted concentration of water quality variables at time t, W DH represents the water quality variable concentration prediction weight matrix, bD Represents the bias term in the prediction of water quality variable concentration.
[0074] In the present invention, by using the hidden state at each moment, the model can make full use of time series information and capture the dynamic changes in the concentration of water quality variables over time. It is more applicable to water quality data with time series properties, enabling the model to better understand and predict the changing trends of variables and improve the accuracy of the prediction of water quality variable concentrations.
[0075] Furthermore, a smaller input size and a moderate number of convolutional layers can improve model performance. A number of layers between 2 and 7 is generally ideal for accurate modeling results. The input kernel size was optimized to take into account the spatial resolution and computational cost of remote sensing imagery. The overall structure of the designed regression model consists of three convolutional layers and three fully connected layers. A dropout layer is located between the three convolutional and fully connected layers. This layer serves as a control measure to prevent overfitting by randomly discarding information between layers. Within each convolutional layer, batch normalization and the ReLU activation function are employed. Through these layers, the spectral features are ultimately converted into estimated water concentrations.
[0076] Compared with the prior art, the above technical solution has at least the following beneficial effects:
[0077] In the present invention, lakes or rivers are covered by remote sensing images, and the complex nonlinear relationship between image features such as spectral reflectance and water quality parameters is accurately captured through the ConvLSTM regression model based on deep learning. The concentration of water quality variables is accurately evaluated through image features such as spectral reflectance, and the dynamic changes of water quality in lakes or rivers are monitored, providing reliable water quality variable parameters for evaluating the water quality of lakes or rivers.
[0078] Reference Manual Figure 2 , which shows a structural schematic diagram of a water quality variable concentration prediction system provided by the present invention.
[0079] The present invention also provides a water quality variable concentration prediction system 20, comprising: a processor 201 and a memory 202 for storing instructions executable by the processor 201. The processor 201 is configured to call the instructions stored in the memory 202 to execute the above-mentioned water quality variable concentration prediction method.
[0080] The water quality variable concentration prediction system 20 provided by the present invention can execute the above-mentioned water quality variable concentration prediction method and achieve the same or similar technical effects. To avoid repetition, the present invention will not elaborate on it.
[0081] Compared with the prior art, the above technical solution has at least the following beneficial effects:
[0082] In the present invention, lakes or rivers are covered by remote sensing images, and the complex nonlinear relationship between image features such as spectral reflectance and water quality parameters is accurately captured through the ConvLSTM regression model based on deep learning. The concentration of water quality variables is accurately evaluated through image features such as spectral reflectance, and the dynamic changes of water quality in lakes or rivers are monitored, providing reliable water quality variable parameters for evaluating the water quality of lakes or rivers.
[0083] There are a few points to note:
[0084] (1) The drawings of the embodiments of the present invention only relate to the structures related to the embodiments of the present invention. Other structures may refer to conventional designs.
[0085] (2) For the sake of clarity, the thickness of layers or regions in the drawings used to describe embodiments of the present invention are exaggerated or reduced, i.e., these drawings are not drawn to scale. It is understood that when an element such as a layer, film, region, or substrate is referred to as being "on" or "under" another element, the element may be "directly" on or "under" the other element or intervening elements may be present.
[0086] (3) In the absence of conflict, the embodiments of the present invention and the features therein may be combined with each other to form new embodiments.
[0087] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. The protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A method for predicting water quality variable concentration, characterized in that: include: S1: Acquire remote sensing images; S2: Preprocessing the remote sensing image; S3: extracting image features of the pre-processed remote sensing image; The image features include multiple water quality variables, which are specifically: Among them, p represents the water quality variable, R x Represents the reflectivity of the first band, R y represents the reflectivity of the second band, α, β, and γ represent regression coefficients, and the first band and the second band are one band or a combination of multiple bands; The image features include: coastal area band reflectance R1, blue band reflectance R2, green band reflectance R3, red band reflectance R4, NIR band reflectance R5, SWIR1 band reflectance R6, SWIR2 band reflectance R7, Karakoram Mountain band reflectance R8, and the reflectance ratio between the green and red bands. Reflectance ratio between the red and green bands Reflectance ratio between green and blue bands Reflectance ratio between blue and green bands Reflectance ratio between the red and blue bands Reflectance ratio between the blue and red bands Reflectance ratio between the red and near-infrared bands Reflectivity ratio between near-infrared band and infrared band Reflectance ratio between green and near-infrared bands Reflectance ratio between the near-infrared band and the green band Reflectance ratio between the blue band and the near-infrared band Reflectance ratio between the near-infrared band and the blue band Normalized difference between the green and red bands Normalized difference between near-infrared and red bands Normalized difference between the near infrared band and the SWIR1 band Normalized difference between green and near-infrared bands Normalized differences between SWIR1 and SWIR2 bands Normalized difference between the green band and the SWIR1 band S4: Input the image feature sequence into the deep learning-based ConvLSTM regression model, and predict the concentration of the water quality variable according to the image features through the deep learning-based ConvLSTM regression model.
2. The water quality variable concentration prediction method according to claim 1, characterized in that: Preprocessing includes geometric correction, radiation calibration, and atmospheric correction; The S2 specifically includes: S201: performing geometric correction on the remote sensing image, where the geometric correction includes orthorectification, geo-registration and image registration; S202: Performing radiometric calibration on the geometrically corrected remote sensing image; S203: Perform atmospheric correction on the remote sensing image after radiation calibration.
3. The water quality variable concentration prediction method according to claim 2, characterized in that: The S202 is specifically as follows: Perform radiometric calibration according to the following formula: L=Gain×DN+Bias Where L represents the top-of-atmosphere radiance of the sensor's spectral channel, DN represents the grayscale value of the remote sensing image, Gain represents the gain of the sensor calibration, and Bias represents the offset of the sensor calibration.
4. The water quality variable concentration prediction method according to claim 2, characterized in that: The S203 is specifically as follows: Atmospheric correction is performed according to the following formula: Among them, ρ tg Indicates the surface reflectivity of the target, L ds Indicates the radiation brightness value at the sensor, L ts represents the dark object radiance at the sensor, E0·d represents the solar radiance at the top of the atmosphere, and θ0 represents the solar zenith angle.
5. The method for predicting water quality variable concentration according to claim 1, characterized in that: The specific calculation method of the reflectivity of each band is to take the average value of the reflectivity value represented by each pixel in each band.
6. The method for predicting water quality variable concentration according to claim 1, characterized in that: The S4 specifically includes: S401: Input the image feature sequence X into the ConvLSTM regression model based on deep learning; S402: Determine the hidden state at each moment through the ConvLSTM regression model: C t '=tanh(W XC *X t +W HC *H t-1 +b C ) Among them, I t represents the activation output vector of the input gate at time t, σ() represents the activation function, W XI Represents the weight matrix between the image feature sequence and the input gate, X t represents the image feature sequence at time t, W HI represents the weight matrix between the hidden state and the input gate, H t-1 represents the hidden state at time t-1, W CI represents the weight matrix between the cell storage unit and the input gate, C t-1 represents the activation output vector of the cell storage unit at time t-1, b I represents the bias term of the input gate, F t represents the activation output vector of the forget gate at time t, W XF Represents the weight matrix between the image feature sequence and the forget gate, W HF Represents the weight matrix between the hidden state and the forget gate, W CF represents the weight matrix between the cell storage unit and the forget gate, b F represents the bias term of the forget gate, C t Represents the activation output vector of the cell storage unit at time t, C′ t represents the candidate output vector of the cell storage unit at time t, tanh() represents the tanh activation function, W XC Represents the weight matrix between the image feature sequence and the cell storage unit, W HC represents the weight matrix between the hidden state and the cell storage unit, b C represents the bias term of the cell storage unit, O t represents the activation output vector of the output gate at time t, W XO Represents the weight matrix between the image feature sequence and the output gate, W HO Represents the weight matrix between the hidden state and the output gate, W CO represents the weight matrix between the cell storage unit and the output gate, b O Represents the bias term of the output gate, H t represents the hidden state at time t, * represents the convolution operation, represents the Hadamard product operation; S403: Determine the predicted value of the water quality variable concentration based on the hidden state at each moment.
7. The method for predicting water quality variable concentration according to claim 6, characterized in that: The S403 is specifically as follows: Determine the predicted values of the water quality variable concentrations according to the following formula: d t =σ(W DH H t +b D ) Among them, d t represents the predicted concentration of water quality variables at time t, W DH represents the water quality variable concentration prediction weight matrix, b D Represents the bias term in the prediction of water quality variable concentration.
8. A water quality variable concentration prediction system, characterized in that: It comprises a processor and a memory for storing processor-executable instructions; the processor is configured to call the instructions stored in the memory to execute the water quality variable concentration prediction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
River and lake water quality monitoring method based on high-resolution satellite images
CN112051222A
Small watershed water quality monitoring method based on spectral analysis
CN114324202A