CN116754499B - Multi-topology node hyperspectral water quality parameter joint inversion method and related equipment - Google Patents

Multi-topology node hyperspectral water quality parameter joint inversion method and related equipment Download PDF

Info

Publication number
CN116754499B
CN116754499B CN202311065321.5A CN202311065321A CN116754499B CN 116754499 B CN116754499 B CN 116754499B CN 202311065321 A CN202311065321 A CN 202311065321A CN 116754499 B CN116754499 B CN 116754499B
Authority
CN
China
Prior art keywords
space
water quality
time
tensor
quality parameter
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.)
Active
Application number
CN202311065321.5A
Other languages
Chinese (zh)
Other versions
CN116754499A (en
Inventor
张立福
王宏庆
黄瑶
张彩霞
蓝梓月
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Zhongkeshi Optical Information Technology Co ltd
Original Assignee
Tianjin Zhongkeshi Optical Information Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Tianjin Zhongkeshi Optical Information Technology Co ltd filed Critical Tianjin Zhongkeshi Optical Information Technology Co ltd
Priority to CN202311065321.5A priority Critical patent/CN116754499B/en
Publication of CN116754499A publication Critical patent/CN116754499A/en
Application granted granted Critical
Publication of CN116754499B publication Critical patent/CN116754499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/17Systems in which incident light is modified in accordance with the properties of the material investigated
    • G01N21/25Colour; Spectral properties, i.e. comparison of effect of material on the light at two or more different wavelengths or wavelength bands
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M10/00Hydrodynamic testing; Arrangements in or on ship-testing tanks or water tunnels
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A20/00Water conservation; Efficient water supply; Efficient water use
    • Y02A20/152Water filtration

Abstract

The invention discloses a multi-topology node hyperspectral water quality parameter joint inversion method and related equipment, wherein the method comprises the following steps: collecting monitoring data of a plurality of water quality monitoring stations, and combining the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor; constructing a space adjacency matrix based on the space relation between water quality monitoring stations; the three-dimensional characteristic tensor and the space adjacency matrix are aggregated and then input into a trained space-time residual error network, so that a hyperspectral-water quality parameter space-time characteristic tensor is obtained; inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain space-time characteristic representation; and (3) inputting the space-time characteristic representation into a trained prediction network to obtain the water quality parameter predicted value of each water quality monitoring station. The invention fully considers the space-time association among a plurality of monitoring stations and can more accurately reflect the space-time motion rule of the water body and the topological relation of the water quality parameters. The rapid, large-scale and real-time monitoring of the water quality parameters is realized.

Description

Multi-topology node hyperspectral water quality parameter joint inversion method and related equipment
Technical Field
The invention relates to the technical field of water quality monitoring, in particular to a multi-topology node hyperspectral water quality parameter joint inversion method and related equipment.
Background
The water quality monitoring and evaluation has important significance in protecting water resources, preventing water pollution and guaranteeing human health. Conventional water quality monitoring methods typically rely on in-situ sampling and laboratory analysis, which, although with some accuracy, are time consuming and laborious and do not meet the needs of extensive and real-time monitoring. With the development of remote sensing technology, the inversion of water quality parameters by utilizing hyperspectral remote sensing data gradually becomes an effective water quality monitoring means, and the wide-range, rapid and real-time monitoring of the water body can be realized. However, the existing water quality parameter inversion method mainly focuses on the relationship between the water quality parameters and hyperspectrum of a single water quality monitoring site, and ignores the space-time correlation existing between sites. This means that these methods are limited in revealing the space-time motion law of the water body and the topology relation of the corresponding water quality parameters, so that larger errors occur in the inversion result. In addition, due to the dynamic property and complexity of the water body, the relationship among the water quality parameters can also have the characteristics of nonlinearity, multiscale, long-distance dependence and the like, and the characteristics also make the conventional method difficult to meet the requirements of practical application.
Disclosure of Invention
Aiming at the problems in the prior art, the invention provides a multi-topology node hyperspectral water quality parameter joint inversion method and related equipment, which are used for solving the problems.
The invention provides a multi-topology node hyperspectral water quality parameter joint inversion method, which comprises the following steps:
collecting monitoring data of a plurality of water quality monitoring stations, combining the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor, wherein the monitoring data comprises: hyperspectral remote sensing data and water quality parameter data;
constructing and storing a space adjacency matrix based on the space relation between any two water quality monitoring stations;
the three-dimensional characteristic tensor and the space adjacency matrix are aggregated and then input into a trained space-time residual error network, and the space-time residual error network is used for outputting a hyperspectral-water quality parameter space-time characteristic tensor;
inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain space-time characteristic representation output by the space-time self-attention mechanism network;
and inputting the space-time characteristic representation into a trained prediction network to obtain the water quality parameter predicted value of each monitoring site output by the prediction network.
According to the multi-topology node hyperspectral water quality parameter joint inversion method provided by the invention, the step of combining the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor comprises the following steps:
for the monitoring data of each water quality monitoring station, respectively forming a first matrix corresponding to the water quality parameter data and a second matrix corresponding to the hyperspectral remote sensing data according to the water quality parameter data vector and the hyperspectral remote sensing data vector of each time step;
stacking the first matrix and the second matrix along a time dimension to respectively obtain a first three-dimensional tensor corresponding to the water quality parameter and a second three-dimensional tensor corresponding to the hyperspectral remote sensing data;
and combining the first three-dimensional tensor and the second three-dimensional tensor to generate the three-dimensional characteristic tensor.
According to the multi-topology node hyperspectral water quality parameter joint inversion method provided by the invention, the step of constructing and storing a space adjacency matrix based on the space relation between any two water quality monitoring sites comprises the following steps:
calculating the distance between any two water quality monitoring stations;
judging the distance according to a preset space weight threshold;
If the distance is smaller than or equal to the spatial weight threshold, filling a value which indicates that space is connected between the two water quality monitoring stations in the corresponding position in the spatial adjacent matrix, and if the distance is larger than the spatial weight threshold, filling a value which indicates that space is not connected between the two water quality monitoring stations in the corresponding position in the spatial adjacent matrix, so as to construct the spatial adjacent matrix;
and carrying out normalization processing on each element in the space adjacent matrix by a line normalization method to obtain and store the normalized space adjacent matrix.
According to the multi-topology node hyperspectral water quality parameter joint inversion method provided by the invention, the space-time residual error network comprises a first convolution layer and a second convolution layer, correspondingly, the three-dimensional characteristic tensor and the space adjacency matrix are aggregated and then input into a trained space-time residual error network, and the step of outputting the hyperspectral-water quality parameter space-time characteristic tensor through the space-time residual error network comprises the following steps:
performing aggregation operation on the three-dimensional feature tensor and the space adjacency matrix to generate an input tensor;
Inputting the input tensor into the first convolution layer to obtain a time sequence characteristic and a space characteristic;
and inputting the time sequence feature and the space feature into the second convolution layer to obtain the hyperspectral-water quality parameter space-time feature tensor with each space-time grid point integrating the time sequence feature and the space feature, wherein the space-time grid points are different space grids under each time step.
According to the multi-topology node hyperspectral water quality parameter joint inversion method provided by the invention, the space-time self-attention mechanism network comprises the following components: the first full-connection layer and the output layer, correspondingly, the step of inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain the space-time characteristic representation output by the space-time self-attention mechanism network comprises the following steps:
inputting the hyperspectral-water quality parameter space-time characteristic tensor into the first full-connected layer, and converting the tensor into scalar scores;
inputting the scalar scores into the output layer to obtain the attention weight of each space-time grid point;
and carrying out weighted summation calculation on the attention weight of each space-time grid point and the corresponding hyperspectral-water quality parameter space-time characteristic tensor to obtain weighted characteristic representations of different time steps, namely the space-time characteristic representations.
According to the multi-topology node hyperspectral water quality parameter joint inversion method provided by the invention, the prediction network comprises the following steps: a second full connection layer; correspondingly, the step of inputting the space-time characteristic representation to a trained prediction network to obtain the water quality parameter predicted value of each water quality monitoring site output by the prediction network comprises the following steps:
and inputting the space-time characteristic representation into the second full-connection layer to obtain the water quality parameter predicted value of each water quality monitoring station.
The invention provides a multi-topology node hyperspectral water quality parameter joint inversion method, which further comprises the following steps: before the monitor data are combined in the form of a three-dimensional tensor, the acquired monitor data are normalized, and correspondingly,
and carrying out inverse normalization treatment on the water quality parameter predicted value to transform the water quality parameter predicted value into the original water quality parameter dimensionalized water quality parameter predicted value.
The invention also provides a multi-topology node hyperspectral water quality parameter joint inversion device, which comprises:
the monitoring data merging module is used for collecting monitoring data of a plurality of water quality monitoring stations, merging the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor, and the monitoring data comprises: hyperspectral remote sensing data and water quality parameter data;
The space adjacent matrix construction module is used for constructing and storing a space adjacent matrix based on the space relation between any two water quality monitoring stations;
the first output module is used for aggregating the three-dimensional characteristic tensor and the space adjacency matrix and inputting the aggregated three-dimensional characteristic tensor and the space adjacency matrix into a trained space-time residual error network, and outputting a hyperspectral-water quality parameter space-time characteristic tensor through the space-time residual error network;
the second output module is used for inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain space-time characteristic representation output by the space-time self-attention mechanism network;
and the water quality parameter value prediction module is used for inputting the space-time characteristic representation into a trained prediction network to obtain the water quality parameter predicted value of each water quality monitoring site output by the prediction network.
The invention also provides electronic equipment, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the multi-topology node hyperspectral water quality parameter joint inversion method according to any one of the above when executing the program.
The invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a multi-topology node hyperspectral water quality parameter joint inversion method as described in any one of the above.
The multi-topology node hyperspectral water quality parameter joint inversion method and the related equipment provided by the invention fully consider the space-time correlation among a plurality of water quality monitoring stations, and can reflect the space-time motion rule of the water body and the corresponding water quality parameter topological relation more accurately. Meanwhile, the method utilizes the deep learning technology to enable the neural network model to better capture the spatial relationship between monitoring stations and the dynamic change of the water quality parameters on the time sequence, thereby realizing the rapid, large-scale and real-time monitoring of the water quality parameters. Therefore, the invention provides a new solution for the fields of environmental monitoring, remote sensing technology and water quality evaluation, is helpful for promoting the development of water quality monitoring technology and improving the accuracy and efficiency of water quality monitoring and evaluation.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a multi-topology node hyperspectral water quality parameter joint inversion method according to an embodiment of the present invention;
FIG. 2 is a diagram showing a selection distribution diagram of a water quality monitoring station in a municipal water area according to an embodiment of the invention;
FIG. 3 is a logical storage structure diagram of a space adjacent matrix computer corresponding to each water quality monitoring station provided by the embodiment of the invention;
FIG. 4 is a block diagram of a space-time residual network according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of a multi-topology node hyperspectral water quality parameter joint inversion device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Reference numerals:
21: a monitoring data merging module; 22: a space adjacency matrix construction module; 23: a first output module; 24: a second output module; 25: and a water quality parameter value prediction module.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be clearly and completely described in the following description with reference to specific embodiments of the present invention and the accompanying drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the prior art, water quality monitoring mainly depends on periodic sampling and laboratory analysis, and the method has certain limitations, such as low monitoring frequency, limited range, long time consumption and the like. Meanwhile, the traditional remote sensing inversion method often ignores space-time correlation information among a plurality of water quality monitoring sites, so that the accuracy of an inversion result is influenced. In addition, due to the selection of sampling points and possible errors in laboratory analysis, the traditional method has certain defects in the aspects of accuracy and instantaneity of water quality monitoring. With the development of remote sensing technology, hyperspectral remote sensing data has been widely applied to inversion of water quality parameters. The hyperspectral remote sensing technology can acquire the spectral information of the water body surface in a large range, and has the advantages of real-time performance and large-range monitoring. However, conventional remote sensing inversion methods present challenges in inverting water quality parameters. Firstly, the remote sensing inversion method often ignores space-time correlation information among a plurality of water quality monitoring sites, so that the accuracy of an inversion result is affected. The space-time correlation information among a plurality of water quality monitoring sites has great significance for water quality parameter inversion, because the distribution of pollutants in a water body on space-time has certain regularity, and the regularity is difficult to fully mine in the traditional remote sensing inversion method. In addition, because the water quality parameter inversion is influenced by factors such as remote sensing data quality, impulse noise and the like, the omission of space-time correlation information among multiple stations can cause larger errors of inversion results. Finally, the traditional remote sensing inversion method often ignores the difference among all water quality monitoring sites when inverting the water quality parameters, builds a unified model, and ignores the individual difference and relevance of different sites to influence the accuracy of inversion results.
The deep learning technology has remarkable results in the fields of image recognition, natural language processing and the like, and provides a new thought for water quality parameter inversion. The deep learning technology is introduced into the field of water quality parameter inversion, so that the accuracy of inversion results can be improved. However, for the problem of multi-topology node water quality parameter inversion, proper network structure and algorithm still need to be designed. Conventional Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) have certain limitations in processing spatio-temporal data, such as difficulty in capturing long-distance spatio-temporal relationships, which are critical to reflecting the water body spatio-temporal motion law and the corresponding water quality parameter topological relationships. To overcome these limitations, researchers have begun to attempt to introduce new network structures such as Graphic Neural Networks (GNNs) to better capture the spatiotemporal associations between multiple water quality monitoring sites. In addition, the introduction of the attention mechanism also helps the model to adaptively learn the association between different sites, thereby improving the accuracy of the inversion result. On the other hand, in order to better describe the nonlinear relationship between water quality parameters and multi-scale characteristics, researchers have also tried to employ techniques such as multi-scale convolution and residual connection. These methods improve the accuracy and robustness of the water quality parameter inversion to some extent, but there are still challenges in dealing with multi-topology node problems, such as: how to effectively integrate information of a plurality of sites and how to select proper neighborhood relations. Aiming at the challenges, the invention provides a multi-topology node hyperspectral water quality parameter joint inversion method and related equipment.
The following describes a method and related equipment provided by the invention in detail through specific embodiments and application scenarios thereof with reference to the accompanying drawings.
Example 1
Referring to fig. 1, the method for joint inversion of the hyperspectral water quality parameters of the topological node provided by the embodiment includes:
step S1: collecting monitoring data of a plurality of water quality monitoring stations, combining the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor, wherein the monitoring data comprises: hyperspectral remote sensing data and water quality parameter data;
in this embodiment, the water quality monitoring station is selected before the monitoring data is collected. For example, ten water quality monitoring sites are selected for the water conditions in the river bank area of the Wuhan city in Hubei province and the water areas of the Yangtze river and the Han river in Jiang Han area, and the water quality monitoring sites are subjected to manual screening and geographic information dimension reduction treatment so as to ensure that the distribution range of the water quality monitoring sites covers the whole monitoring area and accurately reflect the water quality conditions of various water bodies. The specific screening process conditions are as follows:
in the aspect of manual screening, when a water quality monitoring site is selected, firstly, according to the water body type, water flow condition, human activities and other factors of a monitoring area Representative water quality monitoring sites were selected by comprehensive analysis. In this embodiment, the selected water quality monitoring sites include main and branch streams of Yangtze river, main and branch streams of Han river and partial rivers in city, and 10 water quality monitoring sites are selected as shown in FIG. 2. For each selected water quality monitoring station, its geographical coordinates are recordedDeep water->Water flow speed->And water type, wherein>Indicate->And a water quality monitoring station.
In the aspect of dimension reduction processing of geographic information, a Geographic Information System (GIS) is utilized to carry out geographic coordinate on specific positions of all water quality monitoring sitesConversion to three-dimensional coordinates in the actual water area +.>. Specifically, the coordinate conversion is performed using formula (1):
wherein, the liquid crystal display device comprises a liquid crystal display device,representing the earth radius. At the same time, use the depth of water->Water flow speed->And correcting and optimizing the coordinate information by the parameters so as to ensure that the position of the water quality monitoring station is accurate. These processing and analysis results provide an important basis and guarantee for subsequent data acquisition and preprocessing.
The data acquisition of the water quality monitoring station mainly comprises the acquisition of hyperspectral remote sensing data and water quality parameter data, and the specific data acquisition conditions are as follows:
For the collection of water surface hyperspectral data, real-time measurement was performed using a mesoscopic spectral float spectrometer system HS-1000WFL 3. The system consists of a Hyscan micro intelligent spectrometer, a fixed buoy and a water quality data cloud service platform. The wavelength range of the spectrometer is 400nm to 1000nm, and 303 wave bands are total. The weight of the solar energy battery pack is 20kg, and the solar energy power supply and the rechargeable battery pack are used for supplying power. Every 30 minutes, the system can automatically collect a group (10 spectrums) of spectrum data and convert the collected values of each wave band into corresponding electromagnetic wave reflectivity values. Table 1 shows the descriptive statistics of each band of the hyperspectral remote sensing data of the effective sample collected in this example.
Table 1 descriptive statistics for each band of hyperspectral remote sensing data acquisition samples
For the collection of water quality parameter data, the following processes are adopted: first, a water sample was collected at each water quality monitoring site and filled into 500mL bottles. In the sample filling process, oxidation-reduction reaction in the bottle needs to be avoided, and the collected water sample is put into a low-temperature environment for preservation as soon as possible. Next, the total phosphorus, total nitrogen and COD content were determined in the laboratory using DR6000 spectrophotometry, respectively. DR6000 is a UV-VIS band spectrophotometer with a wavelength range of 190-1100nm and a bandwidth of 2 nm. Specifically:
Determination of total phosphorus: to the water sample, 5mL of potassium hydrogen phosphate was added and digested at 150℃for 30 minutes. The measurement accuracy is 0.01mg/L.
Determination of total nitrogen: to the water sample was added 2mL of potassium nitrate and digested at 105 ℃ for 30 minutes. The measurement accuracy was 0.1mg/L.
Determination of COD: using potassium phenoxide solution as reagent, 2mL was added and digested at 150℃for 2 hours. The measurement accuracy was 0.1mg/L.
In addition, the present example also used a TSS portable turbidimeter to measure turbidity values ranging from 0.001-400g/L with a measurement accuracy of 0.1mg/L. And finally, measuring indexes such as ammonia nitrogen, permanganate index, chemical oxygen demand and the like in the water sample by using an HQ40d multiparameter water quality analyzer. The measuring precision of the instrument is 0.1mg/L, and the instrument can continuously work for 30 minutes in 1 meter deep water.
And after the measurement data of each index are obtained, real-time recording is carried out to obtain the specific values of each index of each water quality monitoring station. Table 2 shows the descriptive statistics of the effective sample water quality parameters measured at each water quality monitoring station in this example.
Table 2 water quality parameter acquisition sample descriptive statistics
For the collected monitoring data, firstly, outlier processing and normalization operation are needed. The outlier processing adopts a statistical method, and outliers are removed by calculating the mean value and standard deviation of data and utilizing the principle of 3 times of standard deviation. Specifically, let the original data be The average value is->Standard deviation of->The outlier-removed dataset is as shown in equation (2):
for data normalization operation, a Min-Max normalization method is adoptedThe method scales the data to within a specified range for subsequent model training and analysis. Specifically, let the original data beThe new data obtained after Min-Max normalization is +.>The normalization process is as shown in formula (3):
wherein the method comprises the steps ofAnd->Respectively, the minimum and maximum values of the original data.
In the case of dividing the preprocessed monitoring data, the present embodiment adopts the proportions of 70%, 15% and 15% to divide the monitoring data into a training set, a verification set and a test set. The method comprises the following specific steps:
first, the preprocessed data is arranged in time order.
Then, the total data amount is calculatedNAnd calculating the data quantity of the training set, the verification set and the test set according to the set proportion. Namely: the data volume of the training set isThe data volume of the validation set is +.>The data volume of the test set is
According to the calculated data amount, data is intercepted from the beginning as a training set, then the data is intercepted as a verification set, and finally the data is intercepted as a test set. In this process, it is necessary to ensure that the data is continuous in time to fully consider the characteristics of the time series.
For the preprocessed and segmented monitoring data, the present embodiment chooses to store it in a database for subsequent model training and analysis. The method comprises the following specific steps:
a suitable database system is selected, in this embodiment the PostgreSQL database is selected, and corresponding databases and data table structures are created as required.
And respectively inserting the segmented training set, verification set and test set into corresponding data tables. To facilitate subsequent queries and retrieval, and to set appropriate indexes for the data table.
For each sample data feature and label portion, they are stored separately in different data tables for subsequent model training, respectively, reading.
Through the steps, the embodiment can ensure the accuracy and the integrity of data and provide powerful support for the construction of a subsequent water quality monitoring model.
In this embodiment, step S1 specifically includes:
step S11: for the monitoring data of each water quality monitoring station, respectively forming a first matrix corresponding to the water quality parameter data and a second matrix corresponding to the hyperspectral remote sensing data according to the water quality parameter data vector and the hyperspectral remote sensing data vector of each time step;
Step S12: stacking the first matrix and the second matrix along the time dimension to respectively obtain a first three-dimensional tensor corresponding to the water quality parameter and a second three-dimensional tensor corresponding to the hyperspectral remote sensing data;
step S13: and combining the first three-dimensional tensor and the second three-dimensional tensor to generate a three-dimensional characteristic tensor.
Specifically, the two types of data, namely the pretreated water quality parameter data and the corresponding hyperspectral remote sensing data, are respectively organized into a three-dimensional tensor form, and the dimensions of the two types of data respectively correspond to the time stepWater quality monitoring site->And characteristic dimension of water quality parameter data or hyperspectral remote sensing data +.>
First, the present embodiment monitors each water quality monitoring siteAt each time step +.>The water quality parameter data vector and the hyperspectral remote sensing data vector are respectively organized into a first matrix corresponding to the water quality parameter data and a second matrix corresponding to the hyperspectral remote sensing data, and the first matrix and the second matrix are marked as ++>And a second matrix->. The two matrixes are stacked along the time dimension to form a first three-dimensional tensor corresponding to the water quality parameter data and a second three-dimensional tensor corresponding to the hyperspectral remote sensing data, which are respectively expressed as a first three-dimensional tensor->And a second three-dimensional tensor->
Then, the present embodiment will first three-dimensional tensor And a second three-dimensional tensor->Combining to form a three-dimensional feature tensor containing all input data>Wherein->Is a new feature dimension, and comprises all features of water quality parameter data and hyperspectral remote sensing data. This three-dimensional feature tensor->Will be used as input to the spatio-temporal residual network.
Step S2: constructing and storing a space adjacency matrix based on the space relation between any two water quality monitoring stations;
FIG. 3 is a logical storage structure diagram of a space adjacency matrix computer corresponding to 10 water quality monitoring sites selected in this embodiment, for expressing the topological relationship among multiple sites. In this embodiment, step S2 specifically includes:
step S21: calculating the distance between any two water quality monitoring stations;
in this step, the actual geographical distance between any two water quality monitoring sites is calculated for them. The distance calculation adopts the Euclidean distance measurement method. For two sitesAnd->The longitude and latitude are respectively +.>And->Then the Euclidean distance between them +.>As shown in formula (4):
step S22: judging the distance according to a preset space weight threshold;
in the step, a proper space weight threshold value is determined according to the geographical features and water flow conditions of the actual water body . The spatial weight threshold set in this embodiment is +.>Kilometers. The determination of the space weight threshold value can be comprehensively analyzed according to factors such as the size and the shape of the actual water body, human activities and the like.
Step S23: if the distance is smaller than or equal to the space weight threshold value, filling a value which indicates that space is connected between the two water quality monitoring stations in the corresponding position in the space adjacent matrix, and if the distance is larger than the space weight threshold value, filling a value which indicates that space is not connected between the two water quality monitoring stations in the corresponding position in the space adjacent matrix, so as to construct the space adjacent matrix;
in this step, a spatial adjacency matrix is constructed based on the calculated distance and spatial weight threshold. For each pair of water quality monitoring sites +.>And->If the distance between them is>Less than or equal to threshold->The corresponding position in the spatial adjacency matrix +.>A positive number is filled in to indicate that there is a spatial relationship between them. The positive number is set to be distance +.>As shown in formula (5):
if the distance is greater than the thresholdThen 0 is filled in to indicate that there is no spatial relationship between them.
Step S24: and carrying out normalization processing on each element in the space adjacent matrix by a line normalization method to obtain and store the normalized space adjacent matrix.
In this step, in order to eliminate the influence of the numerical value on the space adjacent matrix, the matrix needs to be normalized. The sum of the elements of each row is normalized to 1 using a row normalization method. As shown in the formula (6), for the spatial adjacent matrixElement->The following processing is carried out:
thus, the normalized spatial adjacency matrixElement value +.>The relative connection strength between the various sites will be reflected. The constructed space adjacency matrix +.>Stored in a file system for subsequent spatio-temporal residual network construction and analysis. Table 3 shows the water quality monitoring stations of the present embodimentIs a spatial adjacency matrix of (c).
TABLE 3 spatial adjacency matrix for each Water quality monitoring site
Step S3: the three-dimensional characteristic tensor and the space adjacency matrix are aggregated and then input into a trained space-time residual error network, and the space-time characteristic tensor of hyperspectral-water quality parameters is output through the space-time residual error network;
in this embodiment, the space-time residual network includes a first convolution layer and a second convolution layer, and correspondingly, step S3 specifically includes:
step S31: performing aggregation operation on the three-dimensional feature tensor and the space adjacent matrix to generate an input tensor;
in this step, the spatial adjacent matrix Applied to this input tensor to introduce spatial correlation information between water quality monitoring sites in the model calculation. Specifically, the convolutional layer of the network will be described for each input tensor channel (i.e., eachDimensional features) apply a spatial adjacency matrix. This is accomplished by performing a matrix multiplication operation on the spatial adjacency matrix with each channel in the manner shown in equation (7):
wherein, the liquid crystal display device comprises a liquid crystal display device,representing input tensors after application of spatial adjacency matrix, representing time step +.>,/>And->Representing the dimensions of the water quality monitoring site and the adjacent site, respectively,/->Representing the feature dimensions after merging.
Through such operations, the present embodiment introduces not only the water quality parameter data and hyperspectral remote sensing data of each water quality monitoring site, but also the spatial relationship between the water quality monitoring sites, which is realized by the spatial adjacency matrix, at the time of network input. The method improves the understanding and application capability of the space association information when the model processes water quality monitoring sites at different positions in geographic distribution.
Step S32: inputting the input tensor into a first convolution layer to obtain a time sequence characteristic and a space characteristic;
step S33: and inputting the time sequence features and the space features into a second convolution layer to obtain a hyperspectral-water quality parameter space-time feature tensor with each space-time grid point of the comprehensive time sequence features and the space features, wherein the space-time grid points are different space grids under each time step.
Specifically, in this embodiment, the spatio-temporal residual network is first constructed according to the block structure diagram of the spatio-temporal residual network shown in fig. 4 by using the deep learning framework PyTorch. Specifically, we define a network class that includes initialization functions (to set up convolutional layers, residual connections, etc. in the network) and forward propagation functions (to define the flow path of data in the network). Meanwhile, according to actual requirements and equipment performance, the embodiment adjusts space-time residual error network parameters, such as the size of convolution kernel, the number of convolution layers, the number of space-time residual error blocks and the like, and specifically see table 4:
TABLE 4 structural configuration of spatio-temporal residual error network
The space-time residual blocks consist of a 3x3 convolution layer, a batch normalization layer, a ReLU activation function layer, residual connection operation and the like, and the specific structural parameter setting of each space-time residual block is shown in Table 5:
TABLE 5 structural configuration and parameters of spatio-temporal residual blocks
/>
Table 4 presents in detail the structural configuration of the spatio-temporal residual network in this embodiment. In this configuration, the "input size" means the size before the data is input to the network element, and the "output size" means the size after the data has passed through the network element. For example, "convolutional layer 1 (conv 1)" accepts 32 x 12 x 64 x 64-sized input and produces 64 x 12 x 64 x 64-sized output, i.e., the number of characteristic channels is increased, enabling the present embodiment to capture more timing and spatial characteristic information.
In the input size 32 x 12 x 64 x 64 of the present embodiment, where "32" represents the input tensor after the spatial adjacency matrix processing; "12" represents that the data in this embodiment includes 12 time steps, corresponding to the monitoring data for 12 time periods of the history; the last "64 x 64" represents the monitored area divided into 64 x 64 spatial grids.
In the final convolutional layer 2 (conv 2), the present embodiment maps 64 x 12 x 64 x 64 size input to 1 x 12 x 64 x 64 size output. Where "1" represents a representation of features that integrates timing and space, which representation unifies multi-source information in space and timing. The "12" dimension still embodies a time step, meaning that the network has the ability to process and yield the timing characteristics of the past 12 time periods. While the "64 x 64" dimension represents a spatial grid to characterize the distribution of spatial features.
Thus, the embodiment successfully constructs a space-time residual error network. In the operation process of the network, the water quality parameter data after pretreatment in the step S1, the corresponding hyperspectral remote sensing data and the space adjacency matrix obtained in the step S2 are aggregated and flow through a space-time residual network, and finally a new hyperspectral-water quality parameter space-time characteristic tensor with each space-time lattice point of 1 x 12 x 64 x 64 is generated.
Step S4: inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain space-time characteristic representation output by the space-time self-attention mechanism network;
in this embodiment, the spatio-temporal self-attention mechanism network includes: the first full connection layer and the output layer, correspondingly, step S4 specifically includes:
step S41: inputting the hyperspectral-water quality parameter space-time characteristic tensor into a first full-connection layer, and converting the tensor into scalar scores;
step S42: inputting scalar scores into an output layer to obtain the attention weight of each space-time grid point;
in particular, the present embodiment employs a spatio-temporal self-attention mechanism network consisting of a fully connected layer (FC) and an output layer (Softmax layer) for calculating the attention weight of each spatio-temporal lattice point.
First, the fully connected layer converts the hyperspectral-water quality parameter space-time characteristic tensor obtained in step S3 into a scalar score. The Softmax layer then normalizes these scores to yield a probability distribution representing the degree of attention of the model to the different spatial grids at each time step. The calculation formula of the attention weight is shown in formula (8):
wherein, the liquid crystal display device comprises a liquid crystal display device,indicate- >Time step, th->Line and->Grid pointsAttention weight, weight->Indicate->Time step, th->Line and->Spatiotemporal characteristics of column lattice points.
Step S43: and carrying out weighted summation calculation on the attention weight of each space-time grid point and the corresponding hyperspectral-water quality parameter space-time characteristic tensor to obtain weighted characteristic representations of different time steps, namely the space-time characteristic representations.
After deriving the attention weight of each spatio-temporal grid point, the present embodiment will weight and sum the hyperspectral-water quality parameter spatio-temporal feature tensors derived in step S3. Specifically, the present embodiment multiplies the attention weight of each spatio-temporal lattice point by its corresponding spatio-temporal feature and sums the results to obtain a comprehensive weighted feature representation, i.e., an instantaneous null feature representation. The spatiotemporal features represent information comprising the entire spatial grid at different time steps, and the degree of attention of the information is different and is determined by the attention weight of the model automatic learning. The formula of the weighted summation is shown in formula (9):
wherein, the liquid crystal display device comprises a liquid crystal display device,indicate->Weighted feature representation of the individual time steps, +.>Indicate->Time step, th->Line and->Attention weight of column lattice, +. >Representing the corresponding spatio-temporal features.
Therefore, in this step, the present embodiment introduces a spatio-temporal self-attention mechanism, which aims to efficiently learn and extract the importance of different spatial grids at each time step, and capture the highly sensitive sites, so as to dynamically adjust the attention points of the model.
Step S5: and (3) inputting the space-time characteristic representation into a trained prediction network to obtain the water quality parameter predicted value of each water quality monitoring site output by the prediction network.
In this embodiment, the prediction network includes: a second full connection layer; correspondingly, the step S5 specifically includes:
and inputting the space-time characteristic representation into a second full-connection layer to obtain the water quality parameter predicted value of each water quality monitoring station.
Specifically, the first obtained in step S4Weighted sum of the time steps, spatio-temporal characteristic representation +.>To predict the predicted value of the water quality parameter of each water quality monitoring station. Firstly, a predictive network is constructed, which includes a fully-connected layer (FC layer) for representing the spatio-temporal characteristics +.>And the water quality parameter vector is mapped to each water quality monitoring site. The spatio-temporal feature representation is input to a trained prediction network,and calculating the predicted value of the water quality parameter of each water quality monitoring station. The predicted value can be calculated by the formula (10):
Wherein, the liquid crystal display device comprises a liquid crystal display device,indicate->No. I of the individual monitoring station in the desired prediction>Predicted values of the water quality parameters for the time steps,indicate->The weighted sum of the time steps represents the spatio-temporal characteristics, FC represents the fully connected layer.
The multi-topology node hyperspectral water quality parameter joint inversion method provided by the embodiment further comprises the following steps: before the monitor data are combined in the form of a three-dimensional tensor, the collected monitor data are normalized, and correspondingly,
and carrying out inverse normalization treatment on the predicted value of the water quality parameter so as to transform the predicted value of the water quality parameter into the dimensionalized predicted value of the original water quality parameter.
Specifically, since the water quality parameter data is normalized in the data preprocessing stage of step S1, after the predicted value of the water quality parameter is obtained, it is necessary to perform inverse normalization processing on the predicted value of the water quality parameter in order to convert the predicted result back into the original water quality parameter-dimensioned data. The inverse normalization process is calculated by equation (11):
wherein, the liquid crystal display device comprises a liquid crystal display device,indicate->The monitoring sites are at the +.>Inverse normalized water quality parameter predicted value of individual time steps,/->Indicate->The first part of the monitoring site>Normalized water quality parameter predictions for each time step, And->Respectively represent +.>Maximum and minimum values of water quality parameter raw data of each monitoring station. />
Through the steps, the water quality parameter predicted values of all water quality monitoring sites are obtained in the embodiment. These predictions can be used to evaluate water quality conditions, formulate corresponding water quality protection measures, and guide the rational utilization of relevant water resources.
According to the training set, the verification set and the test set, which are obtained by dividing the preprocessed monitoring data according to the preset proportion in the step S1, the inversion precision (difference between the predicted value and the actual value) of each water quality parameter of the final water body is evaluated by using a mean square error (Mean Squared Error, MSE), a root mean square error (Root Mean Squared Error, RMSE), an average absolute error (Mean Absolute Error, MAE), an average absolute percentage error (Mean Absolute Percentage Error, MAPE) and a decision coefficient (Coefficient of Determination, R2), wherein the smaller the value represents the higher the precision for each evaluation index of MSE, RMSE, MAE and MAPE, and the closer the value is to 1 represents the higher the precision for the R2 evaluation index.
MSE is an index for measuring the difference between a predicted value and a true value, and is calculated by an average value of the sum of squares of the difference between the predicted value and the true value, and a calculation formula is shown in a formula (12):
Wherein, the liquid crystal display device comprises a liquid crystal display device,is true value +.>For predictive value +.>Is the number of samples.
RMSE is the square root of the mean square error, which has a scaling effect on the magnitude of the error, thus more intuitively reflecting the degree of deviation between the predicted value and the true value, and the calculation formula is shown in equation (13):
wherein, the liquid crystal display device comprises a liquid crystal display device,is true value +.>For predictive value +.>Is the number of samples.
MAE is an index for measuring the difference between a predicted value and a true value, and is calculated by an average value of the sum of absolute values of the difference between the predicted value and the true value, wherein a calculation formula is shown in a formula (14):
wherein, the liquid crystal display device comprises a liquid crystal display device,is true value +.>For predictive value +.>Is the number of samples.
MAPE is an index for measuring the relative error between a predicted value and a true value, and is calculated by dividing the sum of absolute values of the relative error between the predicted value and the true value by the average value of the true value, and the calculation formula is shown in a formula (15):
wherein, the liquid crystal display device comprises a liquid crystal display device,is true value +.>For predictive value +.>Is the number of samples. />
The prediction model fitting data is used for describing the degree of the prediction model fitting data, the value range is 0 to 1, and the closer to 1, the better the prediction effect of the model is. The calculation method is that the covariance between the predicted value and the true value is divided by the square of the product of the predicted value and the standard deviation of the true value, and the calculation formula is shown as formula (16):
Wherein the method comprises the steps ofIs true value +.>For predictive value +.>Is the mean of the true values, +.>Is the number of samples.
Table 6 shows the accuracy of the prediction of the final water quality parameter data (temperature, pH, conductivity, dissolved oxygen, turbidity, permanganate index, chemical oxygen demand, ammonia nitrogen, total phosphorus) obtained by the method provided in this example on the test set.
Table 6 prediction accuracy of the present example using multi-topology node hyperspectral water quality parameter joint inversion method
In contrast, the present embodiment constructs a multi-layer perceptron (MLP) model for each water quality monitoring site to perform a comparative experiment as a local model without considering the space-time correlation. The input of each model is the selected hyperspectral remote sensing characteristic, and the output is the corresponding predicted value of the water quality parameter. The present embodiment sets the MLP model to have the following hierarchical structure, as shown in table 7:
TABLE 7 embodiment MLP model structural parameters
And training the local MLP model of each site by utilizing the preprocessed hyperspectral remote sensing data and the water quality parameter data. And a random gradient descent (SGD) algorithm is adopted for parameter optimization in the training process. Meanwhile, super parameters such as learning rate, batch size and iteration number are adjusted, so that the prediction accuracy of the model is improved. The specific parameters are set as follows: 0.001, batch size: 32. iteration number: 500.
In each iteration, for each batch, the inversion precision of each water quality parameter of the final water body is evaluated according to formulas (12) - (16) by using a Mean Square Error (MSE), a Root Mean Square Error (RMSE), a Mean Absolute Error (MAE), a Mean Absolute Percentage Error (MAPE) and a decision coefficient (R2), and the prediction precision of the local MLP model constructed by each water quality monitoring site is shown in table 8.
TABLE 8 prediction accuracy using only the local MLP models built individually
By comparing the evaluation indexes in tables 6 and 8, it is obvious that the prediction accuracy (table 6) obtained based on the multi-topology node hyperspectral water quality parameter joint inversion method provided by the invention is superior to the prediction accuracy (table 8) obtained by using only the constructed water quality parameter inversion model (local MLP model) as a whole. In particular, the R2 values are all in the range of 0.65-0.8, which indicates that the method based on the space-time residual error attention network has better capability in explaining the change of the water quality parameters. In addition, from the evaluation indexes such as MSE, RMSE, MAE and MAPE, the multi-topological node hyperspectral water quality parameter joint inversion method based on the space-time residual error attention network also shows better error quantity and error proportion. This means that the method provided by the invention can more accurately predict the water quality parameters and reduce the prediction error.
In summary, compared with a method using only a local MLP model, the multi-topological node hyperspectral water quality parameter joint inversion method provided by the embodiment benefits from the fact that a space-time residual error network is introduced into a self-attention mechanism network, fully considers space-time correlation among a plurality of water quality monitoring stations, and can reflect the space-time motion rule of a water body and the corresponding water quality parameter topological relation more accurately. Meanwhile, the method utilizes the deep learning technology to enable the neural network model to better capture the spatial relationship between monitoring stations and the dynamic change of the water quality parameters on the time sequence, thereby realizing the rapid, large-scale and real-time monitoring of the water quality parameters. Therefore, the invention provides a new solution for the fields of environmental monitoring, remote sensing technology and water quality evaluation, is helpful for promoting the development of water quality monitoring technology and improving the accuracy and efficiency of water quality monitoring and evaluation.
Example two
Based on the same inventive concept as the above method, referring to fig. 5, this embodiment provides a topology node hyperspectral water quality parameter joint inversion device, which includes:
the monitoring data merging module 21 is configured to collect monitoring data of a plurality of water quality monitoring sites, merge the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor, where the monitoring data includes: hyperspectral remote sensing data and water quality parameter data;
The monitoring data merging module 21 is further configured to:
for the monitoring data of each water quality monitoring station, respectively forming a first matrix corresponding to the water quality parameter data and a second matrix corresponding to the hyperspectral remote sensing data according to the water quality parameter data vector and the hyperspectral remote sensing data vector of each time step;
stacking the first matrix and the second matrix along the time dimension to respectively obtain a first three-dimensional tensor corresponding to the water quality parameter and a second three-dimensional tensor corresponding to the hyperspectral remote sensing data;
and combining the first three-dimensional tensor and the second three-dimensional tensor to generate a three-dimensional characteristic tensor.
A space adjacency matrix construction module 22 for constructing and storing a space adjacency matrix based on the space relation between any two water quality monitoring sites;
the spatial adjacency matrix construction module 22 is further configured to:
calculating the distance between any two water quality monitoring stations;
judging the distance according to a preset space weight threshold;
if the distance is smaller than or equal to the space weight threshold value, filling a value which indicates that space is connected between the two water quality monitoring stations in the corresponding position in the space adjacent matrix, and if the distance is larger than the space weight threshold value, filling a value which indicates that space is not connected between the two water quality monitoring stations in the corresponding position in the space adjacent matrix, so as to construct the space adjacent matrix;
And carrying out normalization processing on each element in the space adjacent matrix by a line normalization method to obtain and store the normalized space adjacent matrix.
The first output module 23 is configured to aggregate the three-dimensional feature tensor and the spatial adjacency matrix, input the aggregated three-dimensional feature tensor and the spatial adjacency matrix into a trained space-time residual error network, and output a hyperspectral-water quality parameter space-time feature tensor through the space-time residual error network;
the spatio-temporal residual network comprises a first convolution layer and a second convolution layer, and correspondingly the first output module 23 is further configured to:
performing aggregation operation on the three-dimensional feature tensor and the space adjacent matrix to generate an input tensor;
inputting the input tensor into a first convolution layer to obtain a time sequence characteristic and a space characteristic;
and inputting the time sequence features and the space features into a second convolution layer to obtain a hyperspectral-water quality parameter space-time feature tensor with each space-time grid point of the comprehensive time sequence features and the space features, wherein the space-time grid points are different space grids under each time step.
A second output module 24, configured to input the hyperspectral-water quality parameter spatiotemporal feature tensor into the trained spatiotemporal self-attention mechanism network, to obtain a spatiotemporal feature representation output by the spatiotemporal self-attention mechanism network;
The spatio-temporal self-attention mechanism network comprises a first fully connected layer and an output layer, and correspondingly the second output module 24 is further adapted to:
inputting the hyperspectral-water quality parameter space-time characteristic tensor into a first full-connection layer, and converting the tensor into scalar scores;
inputting scalar scores into an output layer to obtain the attention weight of each space-time grid point;
and carrying out weighted summation calculation on the attention weight of each space-time grid point and the corresponding hyperspectral-water quality parameter space-time characteristic tensor to obtain weighted characteristic representations of different time steps, namely the space-time characteristic representations.
The water quality parameter value prediction module 25 is configured to input the space-time characteristic representation to a trained prediction network, and obtain a water quality parameter predicted value of each water quality monitoring site output by the prediction network.
The prediction network comprises a second fully connected layer, and correspondingly, the water quality parameter value prediction module 25 is further configured to:
and inputting the space-time characteristic representation into a second full-connection layer to obtain the water quality parameter predicted value of each water quality monitoring station.
The implementation process of the functions and actions of each module in the above device is specifically detailed in the implementation process of the corresponding steps in the above method, so relevant parts only need to be referred to in the description of the method embodiments, and are not repeated here.
Example III
Referring to fig. 6, the present embodiment provides an electronic apparatus including: processor 310, communication interface (Communications Interface) 320, memory 330 and communication bus 340, wherein processor 310, communication interface 320, memory 330 accomplish communication with each other through communication bus 340. The processor 310 may invoke logic instructions in the memory 330, and the processor 310 performs the multi-topology node hyperspectral water quality parameter joint inversion method according to the method embodiment described above, which includes:
collecting monitoring data of a plurality of water quality monitoring stations, combining the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor, wherein the monitoring data comprises: hyperspectral remote sensing data and water quality parameter data;
constructing and storing a space adjacency matrix based on the space relation between any two water quality monitoring stations;
the three-dimensional characteristic tensor and the space adjacency matrix are aggregated and then input into a trained space-time residual error network, and the space-time characteristic tensor of hyperspectral-water quality parameters is output through the space-time residual error network;
inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain space-time characteristic representation output by the space-time self-attention mechanism network;
And (3) inputting the space-time characteristic representation into a trained prediction network to obtain the water quality parameter predicted value of each monitoring site output by the prediction network.
Further, the logic instructions in the memory 330 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions to cause a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Example IV
The present embodiment provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the multi-topology node hyperspectral water quality parameter joint inversion method described in the foregoing method embodiment, and the method includes:
Collecting monitoring data of a plurality of water quality monitoring stations, combining the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor, wherein the monitoring data comprises: hyperspectral remote sensing data and water quality parameter data;
constructing and storing a space adjacency matrix based on the space relation between any two water quality monitoring stations;
the three-dimensional characteristic tensor and the space adjacency matrix are aggregated and then input into a trained space-time residual error network, and the space-time characteristic tensor of hyperspectral-water quality parameters is output through the space-time residual error network;
inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain space-time characteristic representation output by the space-time self-attention mechanism network;
and (3) inputting the space-time characteristic representation into a trained prediction network to obtain the water quality parameter predicted value of each monitoring site output by the prediction network.
The foregoing is merely exemplary of the present invention and is not intended to limit the present invention. While the invention has been described in detail in the foregoing general description and with reference to specific embodiments thereof, it will be apparent to one skilled in the art that modifications and improvements can be made thereto. Accordingly, such modifications or improvements may be made without departing from the spirit of the invention and are intended to be within the scope of the invention as claimed.

Claims (5)

1. The multi-topology node hyperspectral water quality parameter joint inversion method is characterized by comprising the following steps of:
collecting monitoring data of a plurality of water quality monitoring stations, combining the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor, wherein the monitoring data comprises: hyperspectral remote sensing data and water quality parameter data;
constructing and storing a space adjacency matrix based on the space relation between any two water quality monitoring stations;
the three-dimensional characteristic tensor and the space adjacency matrix are aggregated and then input into a trained space-time residual error network, and the space-time residual error network is used for outputting a hyperspectral-water quality parameter space-time characteristic tensor;
inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain space-time characteristic representation output by the space-time self-attention mechanism network;
inputting the space-time characteristic representation into a trained prediction network to obtain a water quality parameter predicted value of each water quality monitoring station output by the prediction network;
the step of combining the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor comprises the following steps:
For the monitoring data of each water quality monitoring station, respectively forming a first matrix corresponding to the water quality parameter data and a second matrix corresponding to the hyperspectral remote sensing data according to the water quality parameter data vector and the hyperspectral remote sensing data vector of each time step;
stacking the first matrix and the second matrix along a time dimension to respectively obtain a first three-dimensional tensor corresponding to the water quality parameter and a second three-dimensional tensor corresponding to the hyperspectral remote sensing data;
combining the first three-dimensional tensor and the second three-dimensional tensor to generate the three-dimensional characteristic tensor;
the step of constructing and storing a space adjacency matrix based on the space relation between any two water quality monitoring sites comprises the following steps:
calculating the distance between any two water quality monitoring stations;
judging the distance according to a preset space weight threshold;
if the distance is smaller than or equal to the spatial weight threshold, filling a value which indicates that space is connected between the two water quality monitoring stations in the corresponding position in the spatial adjacent matrix, and if the distance is larger than the spatial weight threshold, filling a value which indicates that space is not connected between the two water quality monitoring stations in the corresponding position in the spatial adjacent matrix, so as to construct the spatial adjacent matrix;
Normalizing each element in the space adjacent matrix by a line normalization method to obtain and store the normalized space adjacent matrix;
the step of aggregating the three-dimensional feature tensor and the space adjacency matrix and then inputting the aggregated three-dimensional feature tensor and the space adjacency matrix into a trained space-time residual network, and outputting a hyperspectral-water quality parameter space-time feature tensor through the space-time residual network comprises the following steps:
performing aggregation operation on the three-dimensional feature tensor and the space adjacency matrix to generate an input tensor;
inputting the input tensor into the first convolution layer to obtain a time sequence characteristic and a space characteristic;
inputting the time sequence feature and the space feature into the second convolution layer to obtain the hyperspectral-water quality parameter space-time feature tensor with each space-time grid point integrating the time sequence feature and the space feature, wherein the space-time grid points are different space grid meshes under each time step;
wherein the spatio-temporal self-attention mechanism network comprises: the first full-connection layer and the output layer, correspondingly, the step of inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain the space-time characteristic representation output by the space-time self-attention mechanism network comprises the following steps:
Inputting the hyperspectral-water quality parameter space-time characteristic tensor into the first full-connected layer, and converting the tensor into scalar scores;
inputting the scalar scores into the output layer to obtain the attention weight of each space-time grid point;
carrying out weighted summation calculation on the attention weight of each space-time grid point and the corresponding hyperspectral-water quality parameter space-time characteristic tensor to obtain weighted characteristic representations of different time steps, namely the space-time characteristic representations;
wherein the predictive network comprises: and the second full-connection layer correspondingly inputs the space-time characteristic representation to a trained prediction network to obtain the water quality parameter predicted value of each water quality monitoring site output by the prediction network, and the method comprises the following steps of:
and inputting the space-time characteristic representation into the second full-connection layer to obtain the water quality parameter predicted value of each water quality monitoring station.
2. The multi-topology node hyperspectral water quality parameter joint inversion method of claim 1, further comprising: before the monitor data are combined in the form of a three-dimensional tensor, the acquired monitor data are normalized, and correspondingly,
and carrying out inverse normalization treatment on the water quality parameter predicted value to transform the water quality parameter predicted value into the original water quality parameter dimensionalized water quality parameter predicted value.
3. The utility model provides a many topological nodes hyperspectral quality of water parameter joint inversion device which characterized in that includes:
the monitoring data merging module is used for collecting monitoring data of a plurality of water quality monitoring stations, merging the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor, and the monitoring data comprises: hyperspectral remote sensing data and water quality parameter data;
the space adjacent matrix construction module is used for constructing and storing a space adjacent matrix based on the space relation between any two water quality monitoring stations;
the first output module is used for aggregating the three-dimensional characteristic tensor and the space adjacency matrix and inputting the aggregated three-dimensional characteristic tensor and the space adjacency matrix into a trained space-time residual error network, and outputting a hyperspectral-water quality parameter space-time characteristic tensor through the space-time residual error network;
the second output module is used for inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain space-time characteristic representation output by the space-time self-attention mechanism network;
the water quality parameter value prediction module is used for inputting the space-time characteristic representation into a trained prediction network to obtain a water quality parameter predicted value of each water quality monitoring station output by the prediction network;
The step of combining the monitoring data in a three-dimensional tensor form to obtain a three-dimensional characteristic tensor comprises the following steps:
for the monitoring data of each water quality monitoring station, respectively forming a first matrix corresponding to the water quality parameter data and a second matrix corresponding to the hyperspectral remote sensing data according to the water quality parameter data vector and the hyperspectral remote sensing data vector of each time step;
stacking the first matrix and the second matrix along a time dimension to respectively obtain a first three-dimensional tensor corresponding to the water quality parameter and a second three-dimensional tensor corresponding to the hyperspectral remote sensing data;
combining the first three-dimensional tensor and the second three-dimensional tensor to generate the three-dimensional characteristic tensor;
the step of constructing and storing a space adjacency matrix based on the space relation between any two water quality monitoring sites comprises the following steps:
calculating the distance between any two water quality monitoring stations;
judging the distance according to a preset space weight threshold;
if the distance is smaller than or equal to the spatial weight threshold, filling a value which indicates that space is connected between the two water quality monitoring stations in the corresponding position in the spatial adjacent matrix, and if the distance is larger than the spatial weight threshold, filling a value which indicates that space is not connected between the two water quality monitoring stations in the corresponding position in the spatial adjacent matrix, so as to construct the spatial adjacent matrix;
Normalizing each element in the space adjacent matrix by a line normalization method to obtain and store the normalized space adjacent matrix;
the step of aggregating the three-dimensional feature tensor and the space adjacency matrix and then inputting the aggregated three-dimensional feature tensor and the space adjacency matrix into a trained space-time residual network, and outputting a hyperspectral-water quality parameter space-time feature tensor through the space-time residual network comprises the following steps:
performing aggregation operation on the three-dimensional feature tensor and the space adjacency matrix to generate an input tensor;
inputting the input tensor into the first convolution layer to obtain a time sequence characteristic and a space characteristic;
inputting the time sequence feature and the space feature into the second convolution layer to obtain the hyperspectral-water quality parameter space-time feature tensor with each space-time grid point integrating the time sequence feature and the space feature, wherein the space-time grid points are different space grid meshes under each time step;
wherein the spatio-temporal self-attention mechanism network comprises: the first full-connection layer and the output layer, correspondingly, the step of inputting the hyperspectral-water quality parameter space-time characteristic tensor into a trained space-time self-attention mechanism network to obtain the space-time characteristic representation output by the space-time self-attention mechanism network comprises the following steps:
Inputting the hyperspectral-water quality parameter space-time characteristic tensor into the first full-connected layer, and converting the tensor into scalar scores;
inputting the scalar scores into the output layer to obtain the attention weight of each space-time grid point;
carrying out weighted summation calculation on the attention weight of each space-time grid point and the corresponding hyperspectral-water quality parameter space-time characteristic tensor to obtain weighted characteristic representations of different time steps, namely the space-time characteristic representations;
wherein the predictive network comprises: and the second full-connection layer correspondingly inputs the space-time characteristic representation to a trained prediction network to obtain the water quality parameter predicted value of each water quality monitoring site output by the prediction network, and the method comprises the following steps of:
and inputting the space-time characteristic representation into the second full-connection layer to obtain the water quality parameter predicted value of each water quality monitoring station.
4. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the multi-topology node hyperspectral water quality parameter joint inversion method of any one of claims 1-2 when the program is executed.
5. A non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the multi-topology node hyperspectral water quality parameter joint inversion method of any of claims 1-2.
CN202311065321.5A 2023-08-23 2023-08-23 Multi-topology node hyperspectral water quality parameter joint inversion method and related equipment Active CN116754499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311065321.5A CN116754499B (en) 2023-08-23 2023-08-23 Multi-topology node hyperspectral water quality parameter joint inversion method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311065321.5A CN116754499B (en) 2023-08-23 2023-08-23 Multi-topology node hyperspectral water quality parameter joint inversion method and related equipment

Publications (2)

Publication Number Publication Date
CN116754499A CN116754499A (en) 2023-09-15
CN116754499B true CN116754499B (en) 2023-10-31

Family

ID=87957687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311065321.5A Active CN116754499B (en) 2023-08-23 2023-08-23 Multi-topology node hyperspectral water quality parameter joint inversion method and related equipment

Country Status (1)

Country Link
CN (1) CN116754499B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110689179A (en) * 2019-09-18 2020-01-14 北京工商大学 Water bloom prediction method based on space-time sequence mixed model
CN112733937A (en) * 2021-01-11 2021-04-30 西安电子科技大学 Credible graph data node classification method, system, computer equipment and application
CN113095586A (en) * 2021-04-23 2021-07-09 华风气象传媒集团有限责任公司 Short-term multi-meteorological-element forecasting method based on deep neural network
CN115240072A (en) * 2022-08-04 2022-10-25 南京审计大学 Hyperspectral multi-class change detection method based on multidirectional multi-scale spectrum-space residual convolution neural network
CN115730456A (en) * 2022-11-29 2023-03-03 中国科学技术大学 Motor vehicle multielement tail gas prediction method and system based on double attention fusion network
CN116384754A (en) * 2023-06-02 2023-07-04 北京建工环境修复股份有限公司 Deep learning-based environmental pollution risk assessment method in chemical industry park
CN116433642A (en) * 2023-04-18 2023-07-14 电子科技大学长三角研究院(衢州) Cerebral apoplexy behavior detection method based on BEFAST judgment principle

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110689179A (en) * 2019-09-18 2020-01-14 北京工商大学 Water bloom prediction method based on space-time sequence mixed model
CN112733937A (en) * 2021-01-11 2021-04-30 西安电子科技大学 Credible graph data node classification method, system, computer equipment and application
CN113095586A (en) * 2021-04-23 2021-07-09 华风气象传媒集团有限责任公司 Short-term multi-meteorological-element forecasting method based on deep neural network
CN115240072A (en) * 2022-08-04 2022-10-25 南京审计大学 Hyperspectral multi-class change detection method based on multidirectional multi-scale spectrum-space residual convolution neural network
CN115730456A (en) * 2022-11-29 2023-03-03 中国科学技术大学 Motor vehicle multielement tail gas prediction method and system based on double attention fusion network
CN116433642A (en) * 2023-04-18 2023-07-14 电子科技大学长三角研究院(衢州) Cerebral apoplexy behavior detection method based on BEFAST judgment principle
CN116384754A (en) * 2023-06-02 2023-07-04 北京建工环境修复股份有限公司 Deep learning-based environmental pollution risk assessment method in chemical industry park

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
基于长短期记忆神经网络的河流水质预测研究;张贻婷 等;《环境科学与技术》;第第44卷卷(第第8期期);第163-169页 *
巢湖南淝河口黑水团区流速和溶解氧与Fe~(2+)、S~(2-)浓度的空间关联性;王玉琳;汪靓;华祖林;丁士明;;湖泊科学(第04期);第22-29页 *
改进的基于区域卷积神经网络的微操作系统目标检测方法;彭刚;杨诗琪;黄心汉;苏豪;;模式识别与人工智能(第02期);第44-51页 *

Also Published As

Publication number Publication date
CN116754499A (en) 2023-09-15

Similar Documents

Publication Publication Date Title
Sun et al. Time-series graph network for sea surface temperature prediction
CN111860982A (en) Wind power plant short-term wind power prediction method based on VMD-FCM-GRU
CN109886464B (en) Low-information-loss short-term wind speed prediction method based on optimized singular value decomposition generated feature set
Jamei et al. Designing a Multi-Stage Expert System for daily ocean wave energy forecasting: A multivariate data decomposition-based approach
CN114239422B (en) Method for improving marine chlorophyll a concentration prediction accuracy based on machine learning
Campos et al. Nonlinear wave ensemble averaging in the Gulf of Mexico using neural networks
Huang et al. Evolving long short-term memory neural network for wind speed forecasting
Dong et al. Ensemble wind speed forecasting system based on optimal model adaptive selection strategy: Case study in China
Li et al. Decomposition-ANN methods for long-term discharge prediction based on Fisher’s ordered clustering with MESA
Fu et al. Multi-step-ahead significant wave height prediction using a hybrid model based on an innovative two-layer decomposition framework and LSTM
Karbasi et al. Developing a novel hybrid Auto Encoder Decoder Bidirectional Gated Recurrent Unit model enhanced with empirical wavelet transform and Boruta-Catboost to forecast significant wave height
Zhu et al. Short-term wind speed prediction based on FEEMD-PE-SSA-BP
CN114266416A (en) Photovoltaic power generation power short-term prediction method and device based on similar days and storage medium
Hao et al. A prediction model of significant wave height in the south china sea based on attention mechanism
Attar et al. Comprehensive review of solar radiation modeling based on artificial intelligence and optimization techniques: future concerns and considerations
Abbas et al. Revolutionizing low-carbon marine transportation: Prediction of wave energy via adaptive neuro-fuzzy inference framework in East China Sea
CN116754499B (en) Multi-topology node hyperspectral water quality parameter joint inversion method and related equipment
CN116306322B (en) Water total phosphorus concentration inversion method and device based on hyperspectral data
Zhu et al. Wind Speed Short-Term Prediction Based on Empirical Wavelet Transform, Recurrent Neural Network and Error Correction
Wang et al. Spatiotemporal Self-Attention-Based LSTNet for Multivariate Time Series Prediction
Wang et al. An Ensemble Model for Water Temperature Prediction in Intensive Aquaculture
Ouyang et al. Significant Wave Height Forecasting Based on EMD-TimesNet Networks
Ahmad et al. Tuning data preprocessing techniques for improved wind speed prediction
Cao et al. Probabilistic runoff forecasting considering stepwise decomposition framework and external factor integration structure
Xu et al. An ensemble model for monthly runoff prediction using least squares support vector machine based on variational modal decomposition with dung beetle optimization algorithm and error correction strategy

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
GR01 Patent grant
GR01 Patent grant