CN116385819A - Water quality evaluation method, device and equipment based on neural network model - Google Patents
Water quality evaluation method, device and equipment based on neural network model Download PDFInfo
- Publication number
- CN116385819A CN116385819A CN202310166154.7A CN202310166154A CN116385819A CN 116385819 A CN116385819 A CN 116385819A CN 202310166154 A CN202310166154 A CN 202310166154A CN 116385819 A CN116385819 A CN 116385819A
- Authority
- CN
- China
- Prior art keywords
- water quality
- water
- region
- data
- quality evaluation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 title claims abstract description 330
- 238000013441 quality evaluation Methods 0.000 title claims abstract description 99
- 238000003062 neural network model Methods 0.000 title claims abstract description 65
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000012549 training Methods 0.000 claims abstract description 56
- 238000005070 sampling Methods 0.000 claims abstract description 47
- 238000001228 spectrum Methods 0.000 claims abstract description 30
- 238000011156 evaluation Methods 0.000 claims description 58
- 210000000746 body region Anatomy 0.000 claims description 48
- 239000011159 matrix material Substances 0.000 claims description 35
- 230000001419 dependent effect Effects 0.000 claims description 17
- 238000002310 reflectometry Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012360 testing method Methods 0.000 claims description 7
- 238000004422 calculation algorithm Methods 0.000 claims description 6
- 238000012937 correction Methods 0.000 claims description 6
- 230000011218 segmentation Effects 0.000 claims description 5
- 238000007781 pre-processing Methods 0.000 claims description 4
- 238000001303 quality assessment method Methods 0.000 claims description 4
- 238000002790 cross-validation Methods 0.000 claims description 3
- 230000005855 radiation Effects 0.000 claims description 3
- 238000007405 data analysis Methods 0.000 abstract description 2
- 238000012545 processing Methods 0.000 description 9
- IJGRMHOSHXDMSA-UHFFFAOYSA-N Atomic nitrogen Chemical compound N#N IJGRMHOSHXDMSA-UHFFFAOYSA-N 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 230000008569 process Effects 0.000 description 6
- OAICVXFJPJFONN-UHFFFAOYSA-N Phosphorus Chemical compound [P] OAICVXFJPJFONN-UHFFFAOYSA-N 0.000 description 4
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 description 4
- 229930002875 chlorophyll Natural products 0.000 description 4
- 235000019804 chlorophyll Nutrition 0.000 description 4
- ATNHDLDRLWWWCB-AENOIHSZSA-M chlorophyll a Chemical compound C1([C@@H](C(=O)OC)C(=O)C2=C3C)=C2N2C3=CC(C(CC)=C3C)=[N+]4C3=CC3=C(C=C)C(C)=C5N3[Mg-2]42[N+]2=C1[C@@H](CCC(=O)OC\C=C(/C)CCC[C@H](C)CCC[C@H](C)CCCC(C)C)[C@H](C)C2=C5 ATNHDLDRLWWWCB-AENOIHSZSA-M 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 229910052757 nitrogen Inorganic materials 0.000 description 4
- 229910052760 oxygen Inorganic materials 0.000 description 4
- 239000001301 oxygen Substances 0.000 description 4
- 229910052698 phosphorus Inorganic materials 0.000 description 4
- 239000011574 phosphorus Substances 0.000 description 4
- 239000000126 substance Substances 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000011157 data evaluation Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 238000013135 deep learning Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000003595 spectral effect Effects 0.000 description 1
- 239000002352 surface water Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/77—Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
- G06V10/774—Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/764—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A20/00—Water conservation; Efficient water supply; Efficient water use
- Y02A20/152—Water filtration
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Artificial Intelligence (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Multimedia (AREA)
- Image Processing (AREA)
Abstract
The invention relates to the field of remote sensing data analysis, in particular to a water quality evaluation method based on a neural network model, which comprises the following steps: acquiring a multispectral image of a sample area; removing non-water areas in the multispectral image, acquiring a water image of a sample area, dividing the sample area into a plurality of sample areas according to the number of the preset sample areas, and acquiring water quality data and spectrum data corresponding to each sample area in the water image of the sample area; combining water quality data and spectrum data corresponding to the same sampling area to obtain a plurality of data sets corresponding to the sampling areas; inputting the data sets corresponding to the sampling areas into a neural network model for training to obtain a water quality prediction model; responding to the prediction instruction, acquiring a multispectral image of the region to be detected, inputting the multispectral image of the region to be detected into a water quality prediction model, acquiring a water quality data prediction result, inputting the water quality prediction result into a preset water quality evaluation model, and acquiring a water quality evaluation result.
Description
Technical Field
The invention relates to the field of remote sensing data analysis, in particular to a water quality evaluation method, device and equipment based on a neural network model and a storage medium.
Background
The traditional water quality evaluation method generally evaluates the water quality condition of a water area with a certain area by the concentration value of a single sampling point, and has certain unilateral property. The water quality heterogeneity is high in the area with strong water mobility, the concentration of a single sampling point cannot represent the water quality condition of a certain area, and the water quality in the area is difficult to accurately measure.
Disclosure of Invention
Based on the above, the invention aims to provide a water quality evaluation method, a device, equipment and a storage medium based on a neural network model, which are used for realizing accurate measurement of water quality data by acquiring water quality data and spectrum data in multispectral images and constructing a water quality prediction model by adopting a deep learning method.
In a first aspect, an embodiment of the present application provides a water quality evaluation method based on a neural network model, including the following steps:
acquiring a multispectral image of a sample area, wherein the multispectral image comprises a water body area to be a non-water body area;
removing non-water areas in the multispectral image, acquiring a water image of the sample area, dividing the sample area into a plurality of sampling areas according to the number of preset sampling areas, and acquiring water quality data and spectrum data corresponding to each sampling area in the water image of the sample area;
combining the water quality data and the spectrum data corresponding to the same sampling area to obtain a plurality of data sets corresponding to the sampling areas;
taking the water quality data as a dependent variable and the spectrum data as an independent variable, constructing a neural network model, inputting data sets corresponding to the plurality of sampling areas into the neural network model for training, and obtaining a water quality prediction model;
responding to a prediction instruction, acquiring a multispectral image of a region to be detected, wherein the multispectral image of the region to be detected comprises a water body region and a non-water body region, inputting the multispectral image of the region to be detected into the water quality prediction model, acquiring a water quality data prediction result of the water body region of the region to be detected, inputting the water quality prediction result of the water body region of the region to be detected into a preset water quality evaluation model, and acquiring a water quality evaluation result of the water body region of the region to be detected.
In a second aspect, an embodiment of the present application provides a water quality evaluation device based on a neural network model, including:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a multispectral image of a sample area, and the multispectral image comprises a water body area to be a non-water body area;
the second acquisition module is used for eliminating non-water areas in the multispectral image, acquiring a water image of the sample area, dividing the sample area into a plurality of sample areas according to the number of preset sample areas, and acquiring water quality data and spectrum data corresponding to each sample area in the water image of the sample area;
the data combination module is used for combining the water quality data and the spectrum data corresponding to the same sampling area to obtain a plurality of data sets corresponding to the sampling areas;
the model training module is used for constructing a neural network model by taking the water quality data as a dependent variable and the spectrum data as an independent variable, inputting the data sets corresponding to the sampling areas into the neural network model for training, and obtaining a water quality prediction model;
the water quality evaluation module is used for responding to the prediction instruction, acquiring a multispectral image of the region to be detected, wherein the multispectral image of the region to be detected comprises a water body region and a non-water body region, inputting the multispectral image of the region to be detected into the water quality prediction model, acquiring a water quality data prediction result of the water body region of the region to be detected, inputting the water quality prediction result of the water body region of the region to be detected into a preset water quality evaluation model, and acquiring a water quality evaluation result of the water body region of the region to be detected.
In a third aspect, embodiments of the present application provide a computer device, including: a processor, a memory, and a computer program stored on the memory and executable on the processor; the computer program when executed by the processor implements the steps of the neural network model-based water quality assessment method as described in the first aspect.
In a fourth aspect, embodiments of the present application provide a storage medium storing a computer program, where the computer program is executed by a processor to implement the steps of the neural network model-based water quality evaluation method according to the first aspect.
In the embodiment of the application, a water quality evaluation method, a device, equipment and a storage medium based on a neural network model are provided, a water quality prediction model is constructed by acquiring water quality data and spectrum data in multispectral images and adopting a deep learning method, so that accurate measurement of the water quality data is realized, the water quality evaluation model is efficient and quick, and the water quality data is accurately evaluated through a preset water quality evaluation model.
For a better understanding and implementation, the present invention is described in detail below with reference to the drawings.
Drawings
Fig. 1 is a schematic flow chart of a water quality evaluation method based on a neural network model according to a first embodiment of the present application;
FIG. 2 is a schematic flow chart of a water quality evaluation method based on a neural network model according to a second embodiment of the present application;
FIG. 3 is a schematic flow chart of S2 in a water quality evaluation method based on a neural network model according to a first embodiment of the present application;
fig. 4 is a schematic flow chart of S4 in the water quality evaluation method based on the neural network model according to the first embodiment of the present application;
fig. 5 is a schematic flow chart of S402 in a water quality evaluation method based on a neural network model according to a first embodiment of the present application;
FIG. 6 is a schematic flow chart of a water quality evaluation method based on a neural network model according to a third embodiment of the present application;
FIG. 7 is a schematic structural diagram of a water quality evaluation device based on a neural network model according to a fourth embodiment of the present application;
fig. 8 is a schematic structural diagram of a computer device according to a fifth embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first message may also be referred to as a second message, and similarly, a second message may also be referred to as a first message, without departing from the scope of the present application. The word "if"/"if" as used herein may be interpreted as "at … …" or "at … …" or "in response to a determination", depending on the context.
Referring to fig. 1, fig. 1 is a flow chart of a neural network model-based water quality evaluation method according to a first embodiment of the present application, where the method includes the following steps:
s1: a multispectral image of the sample region is acquired.
The execution subject of the water quality evaluation method based on the neural network model is an evaluation device (hereinafter referred to as an evaluation device) of the water quality evaluation method based on the neural network model, and in an alternative embodiment, the evaluation device may be a computer device, a server, or a server cluster formed by combining multiple computer devices.
The evaluation device may acquire a multispectral image of the sample region through the unmanned aerial vehicle, or may acquire the multispectral image through downloading from a database, where the multispectral image includes a water region to be a non-water region.
Referring to fig. 2, fig. 2 is a flow chart of a neural network model-based water quality evaluation method according to a second embodiment of the present application, including step S6, where step S6 is performed before step S2, and specifically includes the following steps:
s6: preprocessing the multispectral image to obtain a preprocessed multispectral image, wherein the preprocessing step comprises radiation correction, geometric correction and geometric registration.
In this embodiment, the evaluation device performs radiation correction, geometric correction and geometric registration processing on the multispectral image, and obtains the processed multispectral image, which is used for correcting the multispectral image of the sample area acquired by the unmanned aerial vehicle, so as to improve the accuracy of measuring the spectrum data of the multispectral image.
S2: removing non-water areas in the multispectral image, acquiring a water image of the sample area, dividing the sample area into a plurality of sampling areas according to the preset number of the sampling areas, and acquiring water quality data and spectrum data corresponding to each sampling area in the water image of the sample area.
In order to reduce the complexity of the operation and improve the efficiency of spectrum data acquisition, in this embodiment, the evaluation device eliminates a non-water area in the multispectral image and acquires a water image of the sample area.
Dividing the sample area into a plurality of sample areas according to the preset number of the sample areas, and acquiring water quality data and spectrum data corresponding to each sample area in a water body image of the sample area, wherein the water quality data comprises chemical oxygen demand data, total nitrogen data, total phosphorus data and chlorophyll data; the spectral data includes a blue Duan Fanshe reflectance, a green band reflectance, a red band reflectance, and a near infrared band reflectance.
In an alternative embodiment, the number of sampling regions may be planned according to the sample region area.
Referring to fig. 3, fig. 3 is a schematic flow chart of step S2 in the neural network model-based water quality evaluation method according to the first embodiment of the present application, including steps S201 to S202, specifically including the following steps:
s201: acquiring the near infrared band reflectivity and the middle infrared band reflectivity corresponding to each pixel in the multispectral image, and acquiring the normalized moisture index corresponding to each pixel in the multispectral image according to the near infrared band reflectivity, the middle infrared band reflectivity and a preset normalized moisture index calculation algorithm.
The normalized water index calculation algorithm is as follows:
wherein NDWI is the normalized moisture index, p (NIR) is the near infrared band reflectivity, and p (MIR) is the mid infrared band reflectivity;
in this embodiment, the evaluation device obtains the near infrared band reflectivity and the middle infrared band reflectivity corresponding to each pixel in the multispectral image, and obtains the normalized moisture index corresponding to each pixel in the multispectral image according to the near infrared band reflectivity, the middle infrared band reflectivity and a preset normalized moisture index calculation algorithm.
S202: and removing a non-water body region in the multispectral image according to the normalized water index corresponding to each pixel in the multispectral image and a preset water body segmentation threshold value, and obtaining a water body image of the sample region.
The water body image is a multispectral image including a water body region, in this embodiment, the evaluation device compares normalized water indexes corresponding to each pixel in the multispectral image with the water body segmentation threshold, sets the pixel as a water body pixel when the normalized water index corresponding to the pixel is greater than the water body segmentation threshold, sets the pixel as a land pixel when the normalized water index corresponding to the pixel is less than or equal to the water body segmentation threshold, eliminates the land pixel in the multispectral image, and acquires the water body image corresponding to the water body region of the multispectral image as the water body image of the sample region.
S3: and combining the water quality data and the spectrum data corresponding to the same sampling area to obtain a plurality of data sets corresponding to the sampling areas.
In this embodiment, the evaluation device combines the water quality data and the spectrum data corresponding to the same sampling area, and obtains a plurality of data sets corresponding to the sampling areas.
S4: and taking the water quality data as a dependent variable and the spectrum data as an independent variable, constructing a neural network model, inputting the data sets corresponding to the plurality of sampling areas into the neural network model for training, and obtaining a water quality prediction model.
The neural network model is a SVM (Support Vector Machine) classifier, and is a generalized linear classifier (generalized linear classifier) for binary classification of data in a supervised learning (supervised learning) mode.
In this embodiment, the water quality data is used as a dependent variable, a dependent variable matrix is constructed, the spectrum data is used as an independent variable, and the independent variable matrix is constructed by performing standardized processing on the dependent variable matrix and the independent variable matrix according to the data sets corresponding to the plurality of sampling areas, so as to obtain the standardized dependent variable matrix and the independent variable matrix; training the neural network model according to the data sets corresponding to the sampling areas to obtain a water quality prediction model.
Referring to fig. 4, fig. 4 is a schematic flow chart of step S4 in the neural network model-based water quality evaluation method according to the first embodiment of the present application, including steps S401 to S402, specifically including the following steps:
s401: and extracting a data set corresponding to one sampling area from the data sets corresponding to the plurality of sampling areas as a test data set according to the preset training iteration times by adopting a leave-one method cross-validation method, and acquiring a plurality of training data sets with the same number as the training iteration times by using the rest of the data sets as the training data sets.
The leave-one-out cross-validation is a method for training and testing a classifier, in this embodiment, an evaluation device extracts, from data sets corresponding to the plurality of sampling areas, a data set corresponding to one sampling area as a test data set, and the rest as a training data set, to obtain a plurality of training data sets with the same number as the training iteration number, where the training data sets include one test data set and a plurality of training data sets.
S402: and inputting the training data sets with the same number as the training iteration times into a neural network model to be trained for training, and obtaining a water quality prediction model.
In this embodiment, the evaluation device inputs the training data sets with the same number as the training iteration number into the neural network model to be trained to perform training, and obtains the water quality prediction model.
Referring to fig. 5, fig. 5 is a schematic flow chart of step S402 in the neural network model-based water quality evaluation method according to the first embodiment of the present application, including step S4021, specifically as follows:
s4021: and training the neural network model to be trained by adopting a partial least square method according to the training iteration times and a plurality of training data sets with the same number as the training iteration times, and obtaining the water quality prediction model.
In order to avoid the influence of multiple correlations on the water quality prediction model, in this embodiment, the evaluation device adopts a partial least square method, and trains the neural network model to be trained according to the training iteration number and a plurality of training data sets with the same number as the training iteration number, specifically as follows:
and the evaluation equipment respectively extracts components of the independent variable matrix and the dependent variable matrix of the standardization according to a plurality of training data sets in the training data set, acquires principal component parameters corresponding to the independent variable matrix and the dependent variable matrix of the standardization, establishes a regression equation between the principal component parameters and the independent variable matrix and the dependent variable matrix of the standardization according to the principal component parameters corresponding to the independent variable matrix and the dependent variable matrix of the standardization, acquires a residual error matrix corresponding to the independent variable matrix of the standardization and a residual error matrix corresponding to the dependent variable matrix of the standardization, replaces the residual error matrix with the corresponding matrix, repeatedly extracts components, cross-checks the acquired principal component parameters, acquires a target principal component parameter, and constructs a regression equation between the target principal component parameter and the independent variable matrix and the dependent variable matrix which are replaced currently as the regression equation of the neural network model.
According to the test data set in the training data set, acquiring accuracy evaluation indexes of the neural network model, wherein the accuracy evaluation indexes comprise Root Mean Square Error (RMSE) and Mean Absolute Error (MAE); and verifying the water quality prediction model according to the precision evaluation index and a preset precision evaluation threshold value to obtain a target neural network model serving as the water quality prediction model.
Referring to fig. 6, fig. 6 is a flow chart of a water quality evaluation method based on a neural network model according to a third embodiment of the present application, and further includes step S7: the water quality evaluation model is constructed, and the step S7 includes steps S701 to S703 before the step S5, specifically as follows:
s701: and constructing an evaluation set associated with the water quality data according to a water quality standard value corresponding to the preset water quality data.
Based on the chemical oxygen demand data, the total nitrogen data, the total phosphorus data and the chlorophyll data included in the water quality data, in this embodiment, the evaluation device constructs a evaluation factor set associated with the water quality data, wherein the evaluation factor set includes a plurality of corresponding water quality evaluation factors, specifically, the chemical oxygen demand evaluation factor, the total nitrogen evaluation factor, the total phosphorus evaluation factor and the chlorophyll evaluation factor.
And classifying according to water quality standard values corresponding to chemical oxygen demand data, total nitrogen data, total phosphorus data and chlorophyll data in a surface water environment quality standard, and constructing an evaluation set associated with the water quality data, wherein the evaluation set comprises evaluation subsets corresponding to the water quality evaluation factors, and the evaluation subsets comprise water quality standard values corresponding to a plurality of grades.
S702: and constructing a fuzzy weight set and a fuzzy evaluation matrix which are associated with the water quality data according to the evaluation set which is associated with the water quality data.
The fuzzy weight set comprises weight parameters corresponding to a plurality of water quality evaluation factors.
In this embodiment, the evaluation device constructs a fuzzy weight set and a fuzzy evaluation matrix associated with the water quality data according to the evaluation set associated with the water quality data, where the fuzzy weight set includes weight parameters corresponding to a plurality of water quality evaluation factors, and the fuzzy evaluation matrix includes membership degrees corresponding to a plurality of water quality evaluation factors. The method comprises the following steps:
the evaluation device determines the membership degree of each grade of each water quality evaluation factor and the corresponding evaluation subset according to the evaluation set associated with the water quality data through calculation of the membership function corresponding to each water quality evaluation factor, so as to construct the fuzzy evaluation matrix, and the fuzzy evaluation matrix is specifically as follows:
wherein R is the fuzzy evaluation matrix, R ij Membership of the ith water quality assessment factor to the jth rank of the corresponding assessment subset.
And (3) giving a corresponding weight parameter to each water quality evaluation factor to finally form a fuzzy weight set, wherein the weight set is represented by the following formula:
Wherein A is the fuzzy weight set, n is the total number of the water quality evaluation factors, a i The weight parameter corresponding to the ith water quality evaluation factor is obtained, wherein,
wherein, c i The measured concentration of the water quality data corresponding to the ith water quality evaluation factor is obtained,the water quality average value corresponding to the ith water quality evaluation factor is the result of carrying out average treatment on the water quality standard values corresponding to the plurality of grades, k is the grade of the water quality evaluation factor, S ij The water quality standard value of the j-th grade corresponding to the i-th water quality evaluation factor is obtained.
Multiplying the constructed fuzzy weight set and a fuzzy evaluation matrix to construct an objective function of the water quality evaluation model, wherein the objective function is as follows:
record B (B) 1 ,b 2 ,b i ,…,b n ) Obtain the maximum value b max =max(b i ) As water quality data evaluation parameters.
S703: multiplying the constructed fuzzy weight set and the fuzzy evaluation matrix to construct a water quality evaluation model to be adjusted, and adjusting the water quality evaluation model to be adjusted by adopting a weighted average method to obtain an adjusted water quality evaluation model as the water quality evaluation model.
In this embodiment, the evaluation device multiplies the fuzzy weight set and the fuzzy evaluation matrix to construct a water quality evaluation model to be adjusted, and in order to reduce negative effects caused by information loss, the evaluation device adopts a weighted average method to adjust the water quality evaluation model to be adjusted, and obtains an adjusted water quality evaluation model as the water quality evaluation model.
S5: the method comprises the steps of obtaining a multispectral image of a region to be detected, wherein the multispectral image of the region to be detected comprises a water body region and a non-water body region, inputting the multispectral image of the region to be detected into a water quality prediction model, obtaining a water quality prediction result of the water body region of the region to be detected, inputting the water quality prediction result of the water body region of the region to be detected into a preset water quality evaluation model, and obtaining a water quality evaluation result of the water body region of the region to be detected.
The prediction instruction is sent by a user and received by the evaluation equipment.
In this embodiment, the evaluation device obtains the prediction instruction sent by the user, and responds to the prediction instruction, obtains a multispectral image of the region to be measured, inputs the multispectral image of the region to be measured into the water quality prediction model, and obtains a water quality data prediction result of a water body region of the region to be measured, where the water quality data prediction result is water quality prediction data corresponding to each pixel in the water body region in the multispectral image of the region to be measured.
Inputting a water quality prediction result of the water body region of the region to be measured into a preset water quality evaluation model, acquiring water quality data evaluation parameters corresponding to each pixel in the water body region of the region to be measured, and acquiring a water quality evaluation result of the water body region of the region to be measured according to the water quality data evaluation parameters and a preset evaluation threshold.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a water quality evaluation device based on a neural network model according to a fourth embodiment of the present application, where the device may implement all or a part of the water quality evaluation device based on the neural network model through software, hardware or a combination of the two, and the device 7 includes:
a first acquisition module 71 for acquiring a multispectral image of a sample region, wherein the multispectral image includes a water region to be a non-water region;
the second obtaining module 72 eliminates non-water areas in the multispectral image, obtains a water image of the sample area, divides the sample area into a plurality of sample areas according to the preset number of the sample areas, and obtains water quality data and spectrum data corresponding to each sample area in the water image of the sample area;
the data combination module 73 is used for combining the water quality data and the spectrum data corresponding to the same sampling area to obtain a plurality of data sets corresponding to the sampling areas;
the model training module 74 uses the water quality data as a dependent variable and the spectrum data as an independent variable to construct a neural network model, and inputs the data sets corresponding to the plurality of sampling areas into the neural network model for training to obtain a water quality prediction model;
the water quality evaluation module 75 is used for responding to the prediction instruction, acquiring a multispectral image of the region to be detected, wherein the multispectral image of the region to be detected comprises a water body region and a non-water body region, inputting the multispectral image of the region to be detected into the water quality prediction model, acquiring a water quality data prediction result of the water body region of the region to be detected, inputting the water quality prediction result of the water body region of the region to be detected into a preset water quality evaluation model, and acquiring a water quality evaluation result of the water body region of the region to be detected.
In the embodiment of the application, a multispectral image of a sample area is acquired through a first acquisition module, wherein the multispectral image comprises a water body area to be a non-water body area; removing non-water areas in the multispectral image through a second acquisition module, acquiring a water image of the sample area, dividing the sample area into a plurality of sample areas according to the number of preset sample areas, and acquiring water quality data and spectrum data corresponding to each sample area in the water image of the sample area; combining the water quality data and the spectrum data corresponding to the same sampling area through a data combination module to obtain a plurality of data sets corresponding to the sampling areas; the model training module is used for taking the water quality data as a dependent variable and the spectrum data as an independent variable, constructing a neural network model, inputting data sets corresponding to the plurality of sampling areas into the neural network model for training, and obtaining a water quality prediction model; the method comprises the steps of responding to a prediction instruction through a water quality evaluation module, acquiring a multispectral image of a region to be detected, wherein the multispectral image of the region to be detected comprises a water body region and a non-water body region, inputting the multispectral image of the region to be detected into a water quality prediction model, acquiring a water quality data prediction result of the water body region of the region to be detected, inputting the water quality prediction result of the water body region of the region to be detected into a preset water quality evaluation model, and acquiring a water quality evaluation result of the water body region of the region to be detected.
Referring to fig. 8, fig. 8 is a schematic structural diagram of a computer device according to a fifth embodiment of the present application, where the computer device 7 includes: a processor 81, a memory 82, and a computer program 83 stored on the memory 82 and executable on the processor 81; the computer device may store a plurality of instructions adapted to be loaded by the processor 81 and to execute the steps of the method according to the embodiment shown in fig. 1 to 6, and the specific execution process may be referred to in the specific description of the embodiment shown in fig. 1 to 6, which is not repeated here.
Wherein processor 81 may include one or more processing cores. The processor 81 performs various functions of the neural network model-based water quality assessment device 7 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 82, and invoking data in the memory 82, using various interfaces and various parts within the wired server, alternatively the processor 81 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field-programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programble Logic Array, PLA). The processor 81 may integrate one or a combination of several of a central processor 81 (Central Processing Unit, CPU), an image processor 81 (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the touch display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the processor 81 and may be implemented by a single chip.
The Memory 82 may include a random access Memory 82 (Random Access Memory, RAM) or a Read-Only Memory 82 (Read-Only Memory). Optionally, the memory 82 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). The memory 82 may be used to store instructions, programs, code sets, or instruction sets. The memory 82 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the various method embodiments described above, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 82 may also optionally be at least one memory device located remotely from the aforementioned processor 81.
The embodiment of the present application further provides a storage medium, where the storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executed by the processor, and the specific execution process may refer to the specific description of the embodiment shown in fig. 1 to 6, and details are not repeated herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc.
The present invention is not limited to the above-described embodiments, but, if various modifications or variations of the present invention are not departing from the spirit and scope of the present invention, the present invention is intended to include such modifications and variations as fall within the scope of the claims and the equivalents thereof.
Claims (9)
1. The water quality evaluation method based on the neural network model is characterized by comprising the following steps of:
acquiring a multispectral image of a sample area, wherein the multispectral image comprises a water body area to be a non-water body area;
removing non-water areas in the multispectral image, acquiring a water image of the sample area, dividing the sample area into a plurality of sampling areas according to the number of preset sampling areas, and acquiring water quality data and spectrum data corresponding to each sampling area in the water image of the sample area;
combining the water quality data and the spectrum data corresponding to the same sampling area to obtain a plurality of data sets corresponding to the sampling areas;
taking the water quality data as a dependent variable and the spectrum data as an independent variable, constructing a neural network model, inputting data sets corresponding to the plurality of sampling areas into the neural network model for training, and obtaining a water quality prediction model;
the method comprises the steps of obtaining a multispectral image of a region to be detected, wherein the multispectral image of the region to be detected comprises a water body region and a non-water body region, inputting the multispectral image of the region to be detected into a water quality prediction model, obtaining a water quality prediction result of the water body region of the region to be detected, inputting the water quality prediction result of the water body region of the region to be detected into a preset water quality evaluation model, and obtaining a water quality evaluation result of the water body region of the region to be detected.
2. The neural network model-based water quality evaluation method according to claim 1, wherein the step of inputting the data sets corresponding to the plurality of sampling areas into the neural network model for training to obtain a water quality prediction model comprises the steps of:
a leave-one method cross-validation method is adopted, a data set corresponding to one sampling area is extracted from the data sets corresponding to the plurality of sampling areas to serve as a test data set according to preset training iteration times, the rest of the data sets serve as training data sets, and a plurality of training data sets with the same number as the training iteration times are obtained, wherein the training data sets comprise one test data set and a plurality of training data sets;
and inputting the training data sets with the same number as the training iteration times into a neural network model to be trained for training, and obtaining the water quality prediction model.
3. The neural network model-based water quality evaluation method according to claim 2, wherein the step of inputting the training data sets with the same number as the training iteration number into a neural network model to be trained to perform training, and obtaining the water quality prediction model comprises the steps of:
and training the neural network model to be trained by adopting a partial least square method according to the training iteration times and a plurality of training data sets with the same number as the training iteration times, and obtaining the water quality prediction model.
4. The water quality evaluation method based on the neural network model according to claim 1, wherein the step of inputting the water quality prediction result of the water body region of the region to be measured to a preset water quality evaluation model to obtain the water quality evaluation result of the water body region of the region to be measured, comprises the steps of:
constructing an evaluation set associated with the water quality data according to a water quality standard value corresponding to the preset water quality data, wherein the evaluation set comprises an evaluation subset corresponding to each water quality evaluation factor, and the evaluation subset comprises a plurality of water quality standard values corresponding to a plurality of grades;
according to the evaluation set associated with the water quality data, a fuzzy weight set and a fuzzy evaluation matrix associated with the water quality data are constructed, wherein the fuzzy weight set comprises weight parameters corresponding to a plurality of water quality evaluation factors, and the weight parameters are specifically as follows:
Wherein A is the fuzzy weight set, n is the total number of the water quality evaluation factors, a i The weight parameter corresponding to the ith water quality evaluation factor is set;
wherein,,
wherein, c i For the water quality data corresponding to the ith water quality evaluation factorThe concentration was measured and the concentration was measured,the water quality average value corresponding to the ith water quality evaluation factor is the result of carrying out average treatment on the water quality standard values corresponding to the plurality of grades, k is the grade of the water quality evaluation factor, S ij A water quality standard value of the j-th grade corresponding to the i-th water quality evaluation factor;
the fuzzy evaluation matrix comprises a plurality of standard values corresponding to a plurality of grades corresponding to a plurality of water quality evaluation factors, and specifically comprises the following steps:
wherein R is the fuzzy evaluation matrix, R ij Membership of the ith water quality assessment factor to the jth level of the corresponding assessment subset;
multiplying the constructed fuzzy weight set and the fuzzy evaluation matrix to construct a water quality evaluation model to be adjusted, and adjusting the water quality evaluation model to be adjusted by adopting a weighted average method to obtain an adjusted water quality evaluation model as the water quality evaluation model.
5. The neural network model-based water quality evaluation method according to claim 1, wherein the removing the non-water body region from the multispectral image, and before acquiring the water body image of the sample region, comprises the steps of:
preprocessing the multispectral image to obtain a preprocessed multispectral image, wherein the preprocessing step comprises radiation correction, geometric correction and geometric registration.
6. The neural network model-based water quality evaluation method according to claim 1, wherein the removing the non-water body region in the multispectral image to obtain the water body image of the sample region comprises the steps of:
acquiring near infrared band reflectivity and mid infrared band reflectivity corresponding to each pixel in the multispectral image, and acquiring a normalized moisture index corresponding to each pixel in the multispectral image according to the near infrared band reflectivity, the mid infrared band reflectivity and a preset normalized moisture index calculation algorithm, wherein the normalized moisture index calculation algorithm is as follows:
wherein NDWI is the normalized moisture index, p (NIR) is the near infrared band reflectivity, and p (MIR) is the mid infrared band reflectivity;
and removing a non-water body region in the multispectral image according to the normalized water index corresponding to each pixel in the multispectral image and a preset water body segmentation threshold value, and obtaining a water body image of the sample region.
7. A water quality evaluation device based on a neural network model is characterized by comprising:
the device comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a multispectral image of a sample area, and the multispectral image comprises a water body area to be a non-water body area;
the second acquisition module is used for eliminating non-water areas in the multispectral image, acquiring a water image of the sample area, dividing the sample area into a plurality of sample areas according to the number of preset sample areas, and acquiring water quality data and spectrum data corresponding to each sample area in the water image of the sample area;
the data combination module is used for combining the water quality data and the spectrum data corresponding to the same sampling area to obtain a plurality of data sets corresponding to the sampling areas;
the model training module is used for constructing a neural network model by taking the water quality data as a dependent variable and the spectrum data as an independent variable, inputting the data sets corresponding to the sampling areas into the neural network model for training, and obtaining a water quality prediction model;
the water quality evaluation module is used for responding to the prediction instruction, acquiring a multispectral image of the region to be detected, wherein the multispectral image of the region to be detected comprises a water body region and a non-water body region, inputting the multispectral image of the region to be detected into the water quality prediction model, acquiring a water quality data prediction result of the water body region of the region to be detected, inputting the water quality prediction result of the water body region of the region to be detected into a preset water quality evaluation model, and acquiring a water quality evaluation result of the water body region of the region to be detected.
8. A computer device, comprising: a processor, a memory, and a computer program stored on the memory and executable on the processor; the computer program, when executed by the processor, implements the steps of the neural network model-based water quality evaluation method as set forth in any one of claims 1 to 5.
9. A storage medium, characterized by: the storage medium stores a computer program which, when executed by a processor, implements the steps of the neural network model-based water quality evaluation method according to any one of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310166154.7A CN116385819A (en) | 2023-02-23 | 2023-02-23 | Water quality evaluation method, device and equipment based on neural network model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310166154.7A CN116385819A (en) | 2023-02-23 | 2023-02-23 | Water quality evaluation method, device and equipment based on neural network model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116385819A true CN116385819A (en) | 2023-07-04 |
Family
ID=86966388
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310166154.7A Pending CN116385819A (en) | 2023-02-23 | 2023-02-23 | Water quality evaluation method, device and equipment based on neural network model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116385819A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117422195A (en) * | 2023-10-08 | 2024-01-19 | 曙光云计算集团有限公司 | Water quality evaluation method, device, computer equipment and storage medium |
CN117808173A (en) * | 2024-02-29 | 2024-04-02 | 四川省水利科学研究院 | Paddy field fertility detection method, related product and planting method based on related product |
-
2023
- 2023-02-23 CN CN202310166154.7A patent/CN116385819A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN117422195A (en) * | 2023-10-08 | 2024-01-19 | 曙光云计算集团有限公司 | Water quality evaluation method, device, computer equipment and storage medium |
CN117808173A (en) * | 2024-02-29 | 2024-04-02 | 四川省水利科学研究院 | Paddy field fertility detection method, related product and planting method based on related product |
CN117808173B (en) * | 2024-02-29 | 2024-04-30 | 四川省水利科学研究院 | Paddy field fertility detection method, related product and planting method based on related product |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107730474B (en) | Image processing method, processing device and processing equipment | |
Halme et al. | Utility of hyperspectral compared to multispectral remote sensing data in estimating forest biomass and structure variables in Finnish boreal forest | |
CN116385819A (en) | Water quality evaluation method, device and equipment based on neural network model | |
CA3125790A1 (en) | Shadow and cloud masking for remote sensing images in agriculture applications using multilayer perceptron | |
CN111553240B (en) | Corn disease condition grading method and system and computer equipment | |
CN109740631B (en) | OBIA-SVM-CNN remote sensing image classification method based on object | |
CN105103166A (en) | Systems and methods for texture assessment of a coating formulation | |
CN111161362A (en) | Tea tree growth state spectral image identification method | |
CN107895136B (en) | Coal mine area identification method and system | |
CN114219847B (en) | Method and system for determining crop planting area based on phenological characteristics and storage medium | |
CN114202691B (en) | Rice identification method, device and equipment based on remote sensing image | |
CN115439654B (en) | Method and system for finely dividing weakly supervised farmland plots under dynamic constraint | |
CN100456319C (en) | High spectrum image repeated selection weighing classification method | |
CN112560967A (en) | Multi-source remote sensing image classification method, storage medium and computing device | |
CN115494007A (en) | Random forest based high-precision rapid detection method and device for soil organic matters | |
CN107680081B (en) | Hyperspectral image unmixing method based on convolutional neural network | |
CN114091554A (en) | Training set processing method and device | |
CN115372282A (en) | Farmland soil water content monitoring method based on hyperspectral image of unmanned aerial vehicle | |
CN111354463B (en) | Human health measurement method, device, computer equipment and storage medium | |
CN110555843A (en) | High-precision non-reference fusion remote sensing image quality analysis method and system | |
CN113256733B (en) | Camera spectral sensitivity reconstruction method based on confidence voting convolutional neural network | |
CN116242788A (en) | Method and device for predicting phosphate concentration of water body based on multispectral image | |
CN116310913B (en) | Natural resource investigation monitoring method and device based on unmanned aerial vehicle measurement technology | |
Singh et al. | Smart agriculture framework for automated detection of leaf blast disease in paddy crop using colour slicing and GLCM features based random forest approach | |
CN106845512A (en) | Beasts shape recognition method and system based on fractal parameter |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |