Training method, identification method, system, equipment and medium for black and odorous water body model

The training method improves the identification accuracy and applicability of black and odorous water bodies by preprocessing and fusing satellite data to create a model that quantitatively assesses blackness and odor levels.

CN117876809BActive Publication Date: 2024-12-17GUANGDONG RES INST OF WATER RESOURCES & HYDROPOWER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311708539.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-12
Publication Date
2024-12-17
Estimated Expiration
2043-12-12

AI Technical Summary

Technical Problem

Existing remote sensing technologies for identifying black and odorous water bodies have limited applicability and accuracy, particularly in narrow rivers and small ponds, due to the use of high spatial resolution satellite data with fewer band settings and wider wavelength intervals, leading to misjudgments and inability to quantify the degree of blackness and odor.

Method used

A training method that includes spectral and spatial correction preprocessing, spectral fusion, and model parameter updating using multispectral and high spatial resolution satellite data to create a trained black and odorous water body model, capable of quantitatively evaluating the degree of blackness and odor.

Benefits of technology

Enhances the applicability and recognition accuracy of water body identification, allowing for quantitative evaluation of blackness and odor levels in water bodies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117876809B_ABST
    Figure CN117876809B_ABST
Patent Text Reader

Abstract

The present invention discloses a training method, identification method, system, equipment and medium for a black and odorous water body model, wherein the training method obtains an original satellite water body data set; performs correction preprocessing on the satellite water body data set to obtain a correction data set, the correction data set includes spectral correction data and spatial correction data; performs spectral fusion processing on the spectral correction data according to the spatial correction data to obtain a fused data set, the fused data set includes multiple fused images, each fused image is used to record the spectral reflectance of the water body in the red light band, green light band, blue light band, near infrared band and short-wave infrared band; according to the fused data set, the parameters of the initialized black and odorous water body model are updated to obtain a trained black and odorous water body model. The training method can effectively improve the scope of application and recognition accuracy of water body identification, and can quantitatively evaluate the black and odor degree of the water body. The present invention relates to the field of image processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a training method, an identification method, a system, a device and a medium for a black and odorous water body model. Background Art

[0002] The formation of black and smelly water bodies is mainly caused by the corruption of organic matter in the water and sewage discharge. Most of them exist in narrow rivers and small ponds in urban or rural areas. The water body has poor fluidity, which seriously affects the surrounding ecological environment and human health.

[0003] At present, the methods for identifying black and odorous water bodies through remote sensing technology mainly include the threshold method based on spectral reflectance characteristics, the colorimetric method based on water body color characteristics, and the water quality parameter discrimination method based on water body parameters. These methods have a narrow scope of application and can only realize the identification of the black and odorous degree of specific water bodies. The accuracy of identifying non-specific water bodies is low; for example, the threshold method is heavily dependent on the selected fixed threshold and has a certain degree of subjectivity. When the water body under detection changes, the accuracy of the water body identification result is often unsatisfactory; or, general water bodies such as lakes in cities also appear dark, and the colorimetric method is prone to misjudgment of black and odorous water bodies when identifying urban water bodies; for another example, due to the non-optical activity of water quality parameters such as water transparency, total nitrogen, and dissolved oxygen, the water quality discrimination method needs to set independent inversion rules for each water body during remote sensing inversion to ensure the accuracy of water body identification, and the scope of application is narrow.

[0004] In addition, since black and odorous water bodies mostly exist in narrow rivers, ponds and other small water bodies, the existing methods of identifying black and odorous water bodies through remote sensing technology are mainly based on high spatial resolution satellite data. However, this type of remote sensing data has fewer band settings and wider wavelength intervals, and the phenomenon of different objects having the same spectrum often occurs. The identification accuracy of black and odorous water bodies is relatively low, and it is impossible to quantitatively evaluate the degree of blackness and odor of the water bodies.

[0005] Therefore, the problems existing in the prior art still need to be solved and optimized. Summary of the invention

[0006] The purpose of the present invention is to solve one of the technical problems existing in the related art to at least a certain extent.

[0007] To this end, the first purpose of an embodiment of the present invention is to provide a training method for a black and smelly water body model, which can effectively improve the applicability and recognition accuracy of water body identification, and can quantitatively evaluate the degree of blackness and odor of the water body.

[0008] The second purpose of the embodiment of the present application is to provide a method for identifying a black and smelly water body model.

[0009] The third purpose of the embodiment of the present application is to provide a training system for a black and smelly water body model.

[0010] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present application include:

[0011] In a first aspect, an embodiment of the present application provides a method for training a black and odorous water body model, comprising:

[0012] Get raw satellite water datasets;

[0013] Performing correction preprocessing on the satellite water body data set to obtain a correction data set, wherein the correction data set includes spectral correction data and spatial correction data;

[0014] According to the spatial correction data, the spectral correction data is subjected to spectral fusion processing to obtain a fused data set, wherein the fused data set includes a plurality of fused images, each fused image is used to record the spectral reflectance of the water body in a red light band, a green light band, a blue light band, a near infrared band, and a short-wave infrared band;

[0015] According to the fused data set, the parameters of the initialized black and odorous water body model are updated to obtain a trained black and odorous water body model.

[0016] In addition, the training method according to the above embodiment of the present application may also have the following additional technical features:

[0017] Further, in one embodiment of the present application, the correction preprocessing of the satellite water body dataset to obtain the corrected dataset includes:

[0018] Performing radiometric calibration processing on the satellite water body dataset to obtain a radiometric calibration dataset;

[0019] Performing atmospheric correction processing on the radiation calibration data set to obtain the corrected data set.

[0020] Further, in one embodiment of the present application, performing spectral fusion processing on the spectral correction data according to the spatial correction data to obtain a fused data set includes:

[0021] According to the spatial correction data, the spectral correction data is spatially registered to obtain a spectral registration data set;

[0022] According to the spectral registration data set and the spectral correction data, the spatial correction data is registered and fused to obtain the fused data set.

[0023] Further, in one embodiment of the present application, performing registration and fusion processing on the spatial correction data according to the spectral registration data set and the spectral correction data to obtain the fused data set includes:

[0024] According to the spectral correction data, the spatial correction data is subjected to a scale reduction process to obtain spatial scale reduction data;

[0025] According to the spectral registration data set, the spatial downscaling data and the spectral correction data, the spatial correction data is subjected to short-wave infrared fusion processing to obtain a short-wave infrared fusion data set;

[0026] According to the spectral registration data set and the spatial downscaling data, the spatial correction data is subjected to spatial band fusion processing to obtain a spatial band fusion data set;

[0027] The spatial band fusion data set and the shortwave infrared fusion data set are subjected to water body feature extraction processing to obtain the fusion data set.

[0028] Furthermore, in one embodiment of the present application, the training method further includes:

[0029] Obtain preset water quality sample data sets and weight factors;

[0030] According to the weight factors, the water quality sample data set is subjected to index optimization processing to obtain a water quality index data set.

[0031] Further, in one embodiment of the present application, the parameters of the initialized black and odorous water body model are updated according to the fused data set to obtain a trained black and odorous water body model, including:

[0032] Get the preset sampling ratio threshold;

[0033] According to the sampling ratio threshold, the fused data set is sampled and screened to obtain a plurality of fused sampling sets;

[0034] According to the water quality index data set, all the fused sampling sets are input into the initialized black and odorous water body model for identification, and a plurality of sampling identification results are obtained;

[0035] Perform weighted average processing on all sample recognition results to obtain the fusion recognition result;

[0036] According to the fusion recognition result, the model parameters of the initialized black and odorous water body model are updated to obtain the trained black and odorous water body model.

[0037] In a second aspect, the present application embodiment provides a method for identifying a black and odorous water body model, comprising:

[0038] Acquire remote sensing images of water bodies to be identified;

[0039] The remote sensing image of the water body to be identified is input into the black and odorous water body model obtained by the training method of the black and odorous water body model as described in the first aspect above, to obtain a water body identification result.

[0040] In a third aspect, the present application embodiment provides a training system for a black and odorous water body model, comprising:

[0041] The acquisition module is used to obtain the original satellite water data set;

[0042] A correction module, used for performing correction preprocessing on the satellite water body data set to obtain a correction data set, wherein the correction data set includes spectral correction data and spatial correction data;

[0043] A fusion module, used for performing spectral fusion processing on the spectral correction data according to the spatial correction data to obtain a fused data set, wherein the fused data set includes a plurality of fused images, each fused image is used to record the spectral reflectance of the water body in a red light band, a green light band, a blue light band, a near infrared band and a short-wave infrared band;

[0044] The updating module is used to update the parameters of the initialized black and odorous water body model according to the fused data set to obtain a trained black and odorous water body model.

[0045] In a fourth aspect, an embodiment of the present application further provides a computer device, including:

[0046] at least one processor;

[0047] at least one memory for storing at least one program;

[0048] When the at least one program is executed by the at least one processor, the at least one processor implements the above method.

[0049] In a fifth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a program executable by a processor, and the program executable by the processor is used to implement the above method when executed by the processor.

[0050] The advantages and benefits of the present application will be partially given in the following description, and partially become apparent from the following description, or be understood through the practice of the present application:

[0051] The training method, identification method, system, equipment and medium of a black and odorous water body model disclosed in the embodiment of the present application, wherein the training method obtains an original satellite water body data set; performs correction preprocessing on the satellite water body data set to obtain a correction data set, wherein the correction data set includes spectral correction data and spatial correction data; performs spectral fusion processing on the spectral correction data according to the spatial correction data to obtain a fused data set, wherein the fused data set includes multiple fused images, each fused image is used to record the spectral reflectance of the water body in the red light band, green light band, blue light band, near infrared band and short-wave infrared band; according to the fused data set, the parameters of the initialized black and odorous water body model are updated to obtain a trained black and odorous water body model. The training method spectrally fuses the spectral correction data and the spatial correction data, broadens the spectral band of the fused data set, reduces the wavelength interval, can effectively improve the scope of application and recognition accuracy of water body identification, and can quantitatively evaluate the degree of black and odor of the water body. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the embodiments of the present application or the drawings of the related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly expressing some embodiments of the technical solutions of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0053] Figure 1 A schematic flow chart of a method for training a black and odorous water body model provided in an embodiment of the present application;

[0054] Figure 2 A schematic diagram of the structure of a training system for a black and odorous water body model provided in an embodiment of the present application;

[0055] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0056] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and are not to be construed as limitations on the present application. For the step numbers in the following embodiments, they are only provided for the convenience of explanation, and the order between the steps is not limited in any way, and the execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0058] At present, the methods for identifying black and odorous water bodies through remote sensing technology mainly include the threshold method based on spectral reflectance characteristics, the colorimetric method based on water body color characteristics, and the water quality parameter discrimination method based on water body parameters. The scope of application of these methods is relatively narrow, and they can only realize the identification of the degree of black and odorousness of specific water bodies, and the accuracy is low when identifying non-specific water bodies; for example, the threshold method is heavily dependent on the selected fixed threshold and has a certain degree of subjectivity. When the water body under detection changes, the accuracy of the water body identification result is often unsatisfactory; or, general water bodies such as lakes in cities also appear dark, and the colorimetric method is prone to misjudgment of black and odorous water bodies when identifying urban water bodies; for another example, due to the non-optical activity of water quality parameters such as water transparency, total nitrogen, and dissolved oxygen, the water quality discrimination method needs to set independent inversion rules for each water body during remote sensing inversion to ensure the accuracy of water body identification, and the scope of application is relatively narrow.

[0059] In addition, since black and odorous water bodies mostly exist in narrow rivers, ponds and other small water bodies, the existing methods of identifying black and odorous water bodies through remote sensing technology are mainly based on high spatial resolution satellite data. However, this type of remote sensing data has fewer band settings and wider wavelength intervals, and the phenomenon of different objects having the same spectrum often occurs. The identification accuracy of black and odorous water bodies is relatively low, and it is impossible to quantitatively evaluate the degree of blackness and odor of the water bodies.

[0060] In view of this, an embodiment of the present invention provides a training method for a black and odorous water body model, which can effectively improve the application scope and recognition accuracy of water body identification, and can quantitatively evaluate the black and odor degree of the water body.

[0061] Reference Figure 1 In an embodiment of the present application, a method for training a black and odorous water body model comprises:

[0062] Step 110: Obtaining an original satellite water body data set;

[0063] In an embodiment of the present application, the satellite water body data set can be obtained by photographing water bodies through satellites. Specifically, the satellite water body data set includes multispectral satellite data and high spatial resolution satellite data. Among them, the multispectral satellite data can be obtained through the Sentinel-2 satellite, and the high spatial resolution satellite data can be obtained by using the PlanetScope satellite constellation composed of approximately 130 satellites. There are many ways to obtain specific satellite water body data, which will not be elaborated in this application.

[0064] Step 120, performing correction preprocessing on the satellite water body data set to obtain a correction data set, wherein the correction data set includes spectral correction data and spatial correction data;

[0065] The step 120, performing correction preprocessing on the satellite water body data set to obtain a correction data set, wherein the correction data set includes spectral correction data and spatial correction data, including:

[0066] Step 121, performing radiometric calibration processing on the satellite water body dataset to obtain a radiometric calibration dataset;

[0067] Step 122: Perform atmospheric correction processing on the radiation calibration data set to obtain the corrected data set.

[0068] It can be understood that the multispectral satellite data obtained through the official website of the Sentinel-2 satellite has undergone geometric correction, radiometric calibration and atmospheric correction, while the high spatial resolution satellite data of the PlanetScope satellite constellation has only undergone geometric correction, so the high spatial resolution satellite data uses dimensionless digital quantization values ​​to record spectral information. Therefore, in the embodiment of the present application, the high spatial resolution satellite data in the satellite water body data set can first be subjected to radiometric calibration processing to obtain a radiometric calibration data set, wherein the equivalent formula of a radiometric calibration data in the radiometric calibration data set can be expressed as:

[0069] L λ =Gain*DN+Offset

[0070] Among them, L λ is the radiation calibration data, Gain is the gain of the satellite remote sensing sensor, DN is the digital quantization value, and Offset is the offset of the satellite remote sensing sensor.

[0071] It can also be understood that after obtaining the radiation calibration data set, atmospheric correction can be performed on each radiation calibration data in the radiation calibration data set according to the relative radiation normalization method; specifically, for a certain radiation calibration data, high spatial resolution satellite data with a transit time close to that of the radiation calibration data can be first determined, and then the high spatial resolution satellite data can be used as reference data, and then the surface reflectivity is calculated based on the reference data, and finally a linear regression equation is established based on the surface reflectivity, and the linear regression equation is superimposed on the radiation calibration data, so as to complete the atmospheric correction of the radiation calibration data.

[0072] It should be noted that the remaining radiometric calibration data are similar to the examples, and the present application will not repeat them in detail. After all the radiometric calibration data after atmospheric correction are obtained, the multispectral satellite data and the radiometric calibration data after atmospheric correction can be used as the correction data set.

[0073] In addition, the multi-spectral satellite data mentioned in this application is data that has undergone geometric correction, radiometric calibration and atmospheric correction. This example is for illustration only and does not impose any limitation on this application. Specifically, the multi-spectral satellite data mentioned in this application may also be data that has not undergone radiometric calibration and atmospheric correction. In this case, the correction preprocessing process of the multi-spectral satellite data can be obtained by referring to the aforementioned content on high spatial resolution satellite data, and this application will not elaborate on it here.

[0074] Step 130: performing spectral fusion processing on the spectral correction data according to the spatial correction data to obtain a fused data set, wherein the fused data set includes a plurality of fused images, each fused image is used to record the spectral reflectance of the water body in a red light band, a green light band, a blue light band, a near infrared band, and a short-wave infrared band;

[0075] The step 130, performing spectral fusion processing on the spectral correction data according to the spatial correction data to obtain a fused data set, includes:

[0076] Step 131, performing spatial registration processing on the spectral correction data according to the spatial correction data to obtain a spectral registration data set;

[0077] In an embodiment of the present application, for a certain spectrally corrected image in the spectrally corrected data, and, in the spatially corrected data, for a spatially corrected image that is the same as the map projection of the spectrally corrected image, each pixel point of the spectrally corrected image can first be geographically aligned with each pixel point of the corresponding spatially corrected image. Specifically, the pixel point of the geographical location in the spectrally corrected image and the pixel point of the spatially corrected image can be determined based on the geographical location, and then the two pixel points are aligned and mapped to determine the alignment mapping relationship between the pixel points; then, according to the resolution of the spatially corrected image and the alignment mapping relationship, the spectrally corrected image is linearly resampled to obtain spectrally aligned data; finally, all spectrally aligned data are used as spectrally aligned data sets.

[0078] It can be understood that in the four bands of visible light (including red, green and blue light) and near-infrared, the resolution of satellite data provided to the outside world by the Sentinel-2 satellite official website is 10m and / or 20m, while the resolution of satellite data provided to the outside world by the PlanetScope satellite constellation is 3m. Therefore, the spectrally corrected image can be linearly resampled from a resolution of 10m to a resolution of 3m, which is consistent with the resolution of the spatially corrected image, to obtain a spectrally registered image, and then all the obtained spectrally registered images are used as spectrally registered data.

[0079] Step 132: Perform registration and fusion processing on the spatial correction data according to the spectral registration data set and the spectral correction data to obtain the fused data set.

[0080] The step 132, performing registration and fusion processing on the spatial correction data according to the spectral registration data set and the spectral correction data to obtain the fused data set, includes:

[0081] Step 1321: performing dimension reduction processing on the spatial correction data according to the spectral correction data to obtain spatial dimension reduction data;

[0082] Step 1322: According to the spectral registration data set, the spatial downscaling data and the spectral correction data, the spatial correction data is subjected to shortwave infrared fusion processing to obtain a shortwave infrared fusion data set;

[0083] Step 1323: performing spatial band fusion processing on the spatial correction data according to the spectral registration data set and the spatial downscaling data to obtain a spatial band fusion data set;

[0084] Step 1324: perform water body feature extraction processing on the spatial band fusion dataset and the shortwave infrared fusion dataset to obtain the fusion dataset.

[0085] In an embodiment of the present application, the scale reduction processing of the spatial correction data can be performed by using a 2D convolution filter (OpenCV module) to reduce the scale of the visible light to infrared band in the spatial correction data. Specifically, the resolution corresponding to the visible light to infrared band in the spatial correction data can be reduced to the resolution corresponding to the spectral correction data (10m and / or 20m). The present application takes the scale reduction of the resolution of the spatial correction data from 3m to 10m as an example.

[0086] For example, taking a pixel point with a horizontal coordinate of i and a vertical coordinate of j in a certain spatial correction image as an example, the equivalent formula of the filter weight matrix corresponding to the scale reduction processing can be expressed as:

[0087]

[0088] in, is the filter weight matrix corresponding to the pixel point with abscissa i and ordinate j, σ f,λ is the standard deviation of the modulation transfer function (MTF) corresponding to the spectral correction data in the spectral working band λ, f is the downscaling ratio, and pr is the spatial resolution of the spatial correction image.

[0089] It should be noted that for the spectral working band λ, the specific value of each spectral working band can be obtained from the official website of the Sentinel-2 satellite, and the downscaling ratio can be flexibly set according to the resolution of the spectral correction data. For example, when the resolution of the spectral correction data is 10m, the downscaling ratio can be 0.05; when the resolution of the spectral correction data is 20m, the downscaling ratio can be 0.025. In addition, before the spatial correction image is scaled down according to the filter weight matrix, the filter weight matrix can be normalized to ensure that the sum of the weights is 1. There are many specific ways of normalization, and this application will not be repeated here.

[0090] It can be understood that after the spatial correction data is scaled down, the obtained spatial scaled data includes multiple scaled images, specifically scaled images of the red light band, the green light band, the blue light band and the near infrared band. For step 1322, firstly, a multivariate linear regression equation can be constructed based on the spectral registration data set and the spatial scaled data. Specifically, the spatial scaled data under each subdivided band can be used as an independent variable, and the short-wave infrared band in the spectral registration data set can be used as a dependent variable to obtain the multivariate linear regression coefficient value corresponding to each subdivided band. For a certain spectral correction image in the spectral correction data, the calculation formula of the multivariate linear regression coefficient value corresponding to each subdivided band can be expressed as:

[0091]

[0092] in, The image value of the spectral correction image in the spectral working band λ; is the image value of the scaled-down image in the blue light band corresponding to the spectral correction image; is the image value of the scaled image in the green band corresponding to the spectral correction image; is the image value of the scaled-down image in the red light band corresponding to the spectral correction image; is the image value of the reduced-scale image in the near-infrared band corresponding to the spectral correction image; ω BLUE,λ is the multivariate linear regression coefficient value of the blue light band and the spectral working band λ; ω Green,λ is the multivariate linear regression coefficient value of the green light band and the spectral working band λ; ω red,λ is the multivariate linear regression coefficient value of the red light band and the spectral working band λ; ω nIR,λ is the multivariate linear regression coefficient value of the near-infrared band and the spectral working band λ.

[0093] It can be understood that the spectral working band λ of the spectral correction image can be a short-wave infrared band. After obtaining the multivariate linear regression coefficient values ​​of each subdivided band, the fused image value of the spatially corrected image in the short-wave infrared band can be determined based on the multivariate linear regression coefficient values ​​of each subdivided band and the spatially corrected image corresponding to the spectral correction image. The equivalent formula of the fused image value can be expressed as:

[0094]

[0095] in, is the fused image value of the pixel point with abscissa i and ordinate j in the spatial correction image in the spectral working band λ; The blue light band image value of the pixel point with the horizontal coordinate i and the vertical coordinate j in the spatial correction image; The green light band image value of the pixel point with the horizontal coordinate i and the vertical coordinate j in the spatial correction image; The red light band image value of the pixel point with the horizontal coordinate i and the vertical coordinate j in the spatial correction image; The near-infrared band image value of the pixel point with the horizontal coordinate i and the vertical coordinate j in the spatial correction image.

[0096] Then, according to the fused image value, the spectral registration image in the corresponding spectral registration data, and the spatial scale reduction image in the corresponding spatial scale reduction data, it is determined to be short-wave infrared fusion data. The equivalent formula of short-wave infrared fusion data can be expressed as:

[0097]

[0098] in, is the image value of the short-wave infrared fusion data of the pixel point with abscissa i and ordinate j; is the image value of the spectral registration image; is the image value of the spatial scaled image; It is the fused image value of the pixel point with the horizontal coordinate i and the vertical coordinate j in the spectral working band λ of the spatial correction image.

[0099] It can also be understood that, for step 1323, it is similar to step 1322 and can be simply deduced by analogy. Specifically, the spatial band fusion data set includes multiple spatial band fusion data. The spatial band fusion data in step 1323 of the embodiment of the present application can be deduced based on the equivalent formula of the shortwave infrared fusion data in step 1322, and the embodiment of the present application will not be repeated here. In addition, after obtaining the shortwave infrared fusion data set of the spatial band fusion data set, the band information of the two fused data sets can be fused to determine a multi-spectral fusion data set. The multi-spectral fusion data set has more spectral bands and reduces the wavelength interval, which can broaden the scope of application and effectively improve the recognition accuracy of the black and smelly degree of small and micro water bodies.

[0100] For step 1324, the water feature extraction process can be to calculate the normalized water index (NDWI) based on the multispectral fusion data set (i.e., the spatial band fusion data set and the shortwave infrared fusion data set) to obtain a histogram corresponding to the normalized water index; then the histogram is divided into two groups according to a preset binary threshold. Figure 2 The water body is extracted based on the binary distribution map of water body. The specific extraction can be based on the water body pixel frequency of the multi-period water body binary distribution map. When the water body pixel occurrence frequency is greater than a certain frequency ratio, the water body pixel is considered to be a stable pixel, thereby completing the water body extraction. Then, the fused data set is obtained based on the extracted water body and the multispectral fusion data set.

[0101] For example, the present application may use the green light band and the near infrared band to calculate the normalized water index. The equivalent formula of the normalized water index can be expressed as:

[0102]

[0103] Among them, NDWI is the normalized water index, B G is the reflectivity of the high spatial resolution satellite data in the green band, B NIR It is the reflectivity of high spatial resolution satellite data in the near-infrared band.

[0104] It is worth mentioning that the binary threshold and frequency ratio can be set according to actual conditions. For example, the binary threshold can be 0.5, or it can be the average of the two rightmost peaks in the histogram; the frequency ratio can be any one of 0.7, 0.8, 0.8, etc. The examples in this application are for illustration only and do not impose any limitations on this application.

[0105] Step 140: Update the parameters of the initialized black and odorous water body model according to the fused data set to obtain a trained black and odorous water body model.

[0106] In the embodiment of the present application, before the black and odorous water body model is put into use, it needs to be trained to adjust its internal parameters so as to achieve a better prediction effect. Specifically, when training the model, a batch of fused images can be obtained, the input data of the model is the fused image, the fused image is predicted by the model, and the output data of the model is the black and odorous water body recognition result. After obtaining the black and odorous water body recognition result output by the model, the accuracy of the model prediction can be evaluated according to the black and odorous water body recognition result, so as to update the parameters of the model.

[0107] Specifically, for machine learning models, the accuracy of model prediction results can be measured by a loss function (LossFunction), which is defined on a single training data and is used to measure the prediction error of a training data. Specifically, the loss value of the training data is determined by the label of a single training data and the prediction result of the model for the training data. During actual training, a training data set has a lot of training data, so a cost function (CostFunction) is generally used to measure the overall error of the training data set. The cost function is defined on the entire training data set and is used to calculate the average value of the prediction error of all training data, which can better measure the prediction effect of the model. For general machine learning models, based on the aforementioned cost function, plus a regularization term that measures the complexity of the model, it can be used as the objective function of the training, and the loss value of the entire training data set can be calculated based on the objective function. There are many types of commonly used loss functions, such as 0-1 loss function, square loss function, absolute loss function, logarithmic loss function, cross entropy loss function, etc., which can all be used as loss functions of machine learning models, which will not be described one by one here. In the embodiment of the present application, one loss function can be selected to determine the loss value of the training, such as the cross entropy loss function. Based on the training loss value, the back propagation algorithm is used to update the parameters of the model. After several iterations, a trained black and odorous water body model can be obtained. The specific number of iterations can be set in advance, or the training is considered complete when the test set meets the accuracy requirements.

[0108] In some embodiments, the training method further comprises:

[0109] Step 150: Obtain a preset water quality sample data set and weight factor;

[0110] Step 160: Perform index optimization processing on the water quality sample data set according to the weight factor to obtain a water quality index data set.

[0111] In the embodiment of the present application, the water quality sample data set can be monthly or quarterly observation data of a fixed or mobile water quality monitoring section; or it can be water sample data collected by field investigation, and chemical indicators related to black and odorous water bodies are selected, including transparency (SD), oxidation-reduction potential (ORP), ammonia nitrogen (NH3-N) and dissolved oxygen (DO), etc. The indicator optimization process is used to obtain an indicator-optimized water quality indicator data set.

[0112] For example, the water quality index data set of the present application can be the Nemerow pollution index after index optimization. The Nemerow pollution index after index optimization comprehensively considers the differences and relative importance of various evaluation indicators, introduces weight factors, and makes up for the relative deficiency of the traditional Nemerow index method in fully considering the maximum concentration pollution factor and over-emphasizing the influence of the maximum value on water quality evaluation. In addition, the black and smelly degree of the water body can be continuously evaluated. Specifically, the equivalent formula of the water quality index data set can be:

[0113]

[0114] Among them, P′ is the Nemerow pollution index after index optimization, F i represents the pollution index of the i-th monitoring indicator, F i,max F i The maximum value, F w The pollution index F with the largest weight factor among all pollution indices i .

[0115] Furthermore, in some embodiments, the step 140, updating the parameters of the initialized black and odorous water body model according to the fused data set to obtain a trained black and odorous water body model, comprises:

[0116] Step 141, obtaining a preset sampling ratio threshold;

[0117] Step 142: performing sampling and screening processing on the fused data set according to the sampling ratio threshold to obtain a plurality of fused sampling sets;

[0118] Step 143: according to the water quality index data set, all the fused sampling sets are input into the initialized black and odorous water body model for identification, and a plurality of sampling identification results are obtained;

[0119] Step 144: Perform weighted average processing on all sample recognition results to obtain a fusion recognition result;

[0120] Step 145: update the model parameters of the initialized black and odorous water body model according to the fusion recognition result to obtain the trained black and odorous water body model.

[0121] In the embodiment of the present application, the sampling ratio threshold is used as the threshold for random sampling with replacement. Specifically, the sampling ratio threshold can be any one of 0.7, 0.75, 0.8, etc.; the embodiment of the present application can first randomly sample the fused data set according to the sampling ratio threshold to generate a number of fused sampling sets; then the water quality indicator data set is used as the corresponding target variable, and each fused sampling set is independently predicted through the initialized black and odorous water body model to obtain a number of sampling identification results; finally, these sampling identification results are summarized in a sampling weighted average manner to obtain a fused identification result output by the initialized black and odorous water body model, so as to update the parameters of the black and odorous water body model according to the fused identification result to obtain a training number of black and odorous water body models. The specific updating method can be implemented according to a loss function and the like, which will not be elaborated in this application.

[0122] It is understandable that, since the spectral characteristics of black and odorous water bodies are a mixture of the spectral characteristics of multiple water quality parameters, the spectral characteristics of black and odorous water bodies have multimodal characteristics, so the black and odorous water body model is a mixed density neural network (MixtureDensity Neural Network, MDN) model is a better choice for the embodiment of the present application, and the black and odorous water body model can invert the continuously distributed values ​​in a multimodal situation. Exemplarily, the output layer of the mixed density neural network model includes multiple neurons, each neuron corresponds to a potential peak value, and the overall output distribution can be obtained by mixing these probability distributions. Specifically, according to the maximum likelihood estimation hypothesis, the output value distribution of the mixed density neural network model is the most likely to be at the target variable y. In addition, when generating a fused sampling set, the embodiment of the present application can further divide the fused sampling set into a training data set and a verification training set, and perform verification and evaluation through the K-fold cross-validation method. There are many specific implementation methods, and this application will not be redundantly described here.

[0123] In addition, the present application embodiment provides a method for identifying a black and odorous water body model, comprising:

[0124] Step 170, obtaining a remote sensing image of a water body to be identified;

[0125] Step 180: input the remote sensing image of the water body to be identified into the black and odorous water body model obtained by the training method of the black and odorous water body model as described above, to obtain a water body identification result.

[0126] In the embodiment of the present application, the black and odorous degree of the water body in the test area can be evaluated through the trained black and odorous water body model, and due to the Nemerow pollution index after the index optimization, the water body identification result can not only qualitatively determine the black and odorous category of the water body, but also quantitatively evaluate the black and odorous water bodies of the same degree.

[0127] It is understandable that the water body identification result can be in numerical form. Exemplarily, in the embodiment of the present application, the water body has a distinction value of 1 for no black odor and mild black odor, a distinction value of 2 for mild black odor and severe black odor, and a maximum value of 10 for severe black odor. When the water body identification result is greater than 0 and less than or equal to 1, it can be considered that the water body has no black odor; when the water body identification result is greater than 1 and less than or equal to 2, it can be considered that the water body has mild black odor; when the water body identification result is greater than 2 and less than or equal to 10, it can be considered that the water body has severe black odor.

[0128] It should be noted that, taking the heavy black and smelly degree of water bodies as an example, the closer the water body identification result in the embodiment of the present application is to the maximum value of 10 for heavy black and smelly degree, the more serious the heavy black and smelly degree represented is; and the closer the water body identification result is to the distinguishing value 2 between light black and smelly degree and heavy black and smelly degree, the lighter the heavy black and smelly degree represented is. For the other black and smelly degrees, they can be simply deduced based on the above content. The examples in this application are only for illustration and do not limit this application in any way.

[0129] The following describes in detail the training system of the black and odorous water body model proposed in accordance with the embodiment of the present application with reference to the accompanying drawings.

[0130] Reference Figure 2 The training system of the black and odorous water body model proposed in the embodiment of the present application comprises:

[0131] An acquisition module 101 is used to acquire an original satellite water body data set;

[0132] A correction module 102 is used to perform correction preprocessing on the satellite water body data set to obtain a correction data set, wherein the correction data set includes spectral correction data and spatial correction data;

[0133] A fusion module 103 is used to perform spectral fusion processing on the spectral correction data according to the spatial correction data to obtain a fused data set, wherein the fused data set includes a plurality of fused images, each fused image is used to record the spectral reflectance of the water body in a red light band, a green light band, a blue light band, a near infrared band, and a short-wave infrared band;

[0134] The updating module 104 is used to update the parameters of the initialized black and odorous water body model according to the fused data set to obtain a trained black and odorous water body model.

[0135] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0136] Reference Figure 3, the embodiment of the present application further provides a computer device, including:

[0137] at least one processor 201;

[0138] At least one memory 202, used to store at least one program;

[0139] When the at least one program is executed by the at least one processor 201, the at least one processor 201 implements the above method embodiment.

[0140] Similarly, it can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0141] The embodiment of the present application further provides a computer-readable storage medium, in which a program executable by the processor 201 is stored. The program executable by the processor 201 is used to implement the above-mentioned method embodiment when executed by the processor 201.

[0142] Similarly, the contents of the above method embodiments are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0143] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the application is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part described as a larger operation is performed independently.

[0144] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical device and / or software module, or one or more functions and / or features can be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present application. More specifically, in view of the properties, functions, and internal relationships of the various functional modules in the device disclosed herein, the actual implementation of the module will be understood within the conventional techniques of the engineer. Therefore, those skilled in the art can implement the present application set forth in the claims without excessive experimentation using ordinary techniques. It is also understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the attached claims and their equivalents.

[0145] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

[0146] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0147] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0148] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0149] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0150] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

[0151] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the embodiments. Technical personnel familiar with the field can make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. A training method for a black and odorous water body model, characterized in that: include: Get raw satellite water datasets; Performing correction preprocessing on the satellite water body data set to obtain a correction data set, wherein the correction data set includes spectral correction data and spatial correction data; the spectral correction data and the spatial correction data have different data sources; According to the spatial correction data, the spectral correction data is subjected to spectral fusion processing to obtain a fused data set, wherein the fused data set includes a plurality of fused images, each fused image is used to record the spectral reflectance of the water body in a red light band, a green light band, a blue light band, a near infrared band, and a short-wave infrared band; According to the fused data set, updating the parameters of the initialized black and odorous water body model to obtain a trained black and odorous water body model; The step of performing spectral fusion processing on the spectral correction data according to the spatial correction data to obtain a fused data set includes: According to the spatial correction data, the spectral correction data is spatially registered to obtain a spectral registration data set; According to the spectral registration data set and the spectral correction data, the spatial correction data is subjected to registration and fusion processing to obtain the fused data set; The step of performing registration and fusion processing on the spatial correction data according to the spectral registration data set and the spectral correction data to obtain the fused data set includes: According to the spectral correction data, the spatial correction data is subjected to a scale reduction process to obtain spatial scale reduction data; According to the spectral registration data set, the spatial scale reduction data and the spectral correction data, the spatial correction data is subjected to shortwave infrared fusion processing to obtain a shortwave infrared fusion data set; the shortwave infrared fusion data set is used to characterize a set of image values ​​of the shortwave infrared fusion data; According to the spectral registration data set and the spatial downscaling data, the spatial correction data is subjected to spatial band fusion processing to obtain a spatial band fusion data set; The spatial band fusion data set and the shortwave infrared fusion data set are subjected to water body feature extraction processing to obtain the fusion data set.

2. The training method for the black and odorous water body model according to claim 1, characterized in that: The step of performing correction preprocessing on the satellite water body dataset to obtain a corrected dataset includes: Performing radiometric calibration processing on the satellite water body dataset to obtain a radiometric calibration dataset; Performing atmospheric correction processing on the radiation calibration data set to obtain the corrected data set.

3. The training method of the black and odorous water body model according to claim 1, characterized in that: The training method further comprises: Obtain preset water quality sample data sets and weight factors; According to the weight factors, the water quality sample data set is subjected to index optimization processing to obtain a water quality index data set.

4. The training method for the black and odorous water body model according to claim 3, characterized in that: The method of updating the parameters of the initialized black and odorous water body model according to the fused data set to obtain a trained black and odorous water body model comprises: Get the preset sampling ratio threshold; According to the sampling ratio threshold, the fused data set is sampled and screened to obtain a plurality of fused sampling sets; According to the water quality index data set, all the fused sampling sets are input into the initialized black and odorous water body model for identification, and a plurality of sampling identification results are obtained; Perform weighted average processing on all sample recognition results to obtain the fusion recognition result; According to the fusion recognition result, the model parameters of the initialized black and odorous water body model are updated to obtain the trained black and odorous water body model.

5. A method for identifying a black and odorous water body model, characterized in that: include: Acquire remote sensing images of water bodies to be identified; The remote sensing image of the water body to be identified is input into the black and odorous water body model obtained by the training method of the black and odorous water body model as described in any one of claims 1 to 4 to obtain a water body identification result.

6. A training system for a black and odorous water body model, characterized in that: include: The acquisition module is used to obtain the original satellite water data set; A correction module is used to perform correction preprocessing on the satellite water body data set to obtain a correction data set, wherein the correction data set includes spectral correction data and spatial correction data; the spectral correction data and the spatial correction data have different data sources; A fusion module, used for performing spectral fusion processing on the spectral correction data according to the spatial correction data to obtain a fused data set, wherein the fused data set includes a plurality of fused images, each fused image is used to record the spectral reflectance of the water body in a red light band, a green light band, a blue light band, a near infrared band and a short-wave infrared band; An updating module, used for updating the parameters of the initialized black and odorous water body model according to the fused data set to obtain a trained black and odorous water body model; The step of performing spectral fusion processing on the spectral correction data according to the spatial correction data to obtain a fused data set includes: According to the spatial correction data, the spectral correction data is spatially registered to obtain a spectral registration data set; According to the spectral registration data set and the spectral correction data, the spatial correction data is subjected to registration and fusion processing to obtain the fused data set; The step of performing registration and fusion processing on the spatial correction data according to the spectral registration data set and the spectral correction data to obtain the fused data set includes: According to the spectral correction data, the spatial correction data is subjected to a scale reduction process to obtain spatial scale reduction data; According to the spectral registration data set, the spatial scale reduction data and the spectral correction data, the spatial correction data is subjected to shortwave infrared fusion processing to obtain a shortwave infrared fusion data set; the shortwave infrared fusion data set is used to characterize a set of image values ​​of the shortwave infrared fusion data; According to the spectral registration data set and the spatial downscaling data, the spatial correction data is subjected to spatial band fusion processing to obtain a spatial band fusion data set; The spatial band fusion data set and the shortwave infrared fusion data set are subjected to water body feature extraction processing to obtain the fusion data set.

7. A computer device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 5 when executed by the processor.