CN112215422A - Long-time memory network water quality dynamic early warning method based on seasonal decomposition - Google Patents

Long-time memory network water quality dynamic early warning method based on seasonal decomposition Download PDF

Info

Publication number
CN112215422A
CN112215422A CN202011092465.6A CN202011092465A CN112215422A CN 112215422 A CN112215422 A CN 112215422A CN 202011092465 A CN202011092465 A CN 202011092465A CN 112215422 A CN112215422 A CN 112215422A
Authority
CN
China
Prior art keywords
time
data
water quality
value
early warning
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.)
Withdrawn
Application number
CN202011092465.6A
Other languages
Chinese (zh)
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.)
Beijing University of Technology
Original Assignee
Beijing University of Technology
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 Beijing University of Technology filed Critical Beijing University of Technology
Priority to CN202011092465.6A priority Critical patent/CN112215422A/en
Publication of CN112215422A publication Critical patent/CN112215422A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • 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/044Recurrent networks, e.g. Hopfield networks
    • 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/045Combinations of networks
    • 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/048Activation functions
    • 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/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0639Performance analysis of employees; Performance analysis of enterprise or organisation operations
    • G06Q10/06393Score-carding, benchmarking or key performance indicator [KPI] analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Strategic Management (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Economics (AREA)
  • Evolutionary Computation (AREA)
  • Development Economics (AREA)
  • Tourism & Hospitality (AREA)
  • Educational Administration (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a long-time and short-time memory network water quality dynamic early warning method based on seasonal decomposition, which comprises the steps of screening out an index playing a decisive role in water quality early warning through a Pearson correlation coefficient and water quality mechanism characteristics, analyzing the seasonality of time sequence data, carrying out Savitzky-Golay smooth filtering processing on the time sequence data after the seasonality is removed, then carrying out normalization processing, converting the time sequence data into supervised data through a sliding window method, inputting a multi-element long-time and short-time memory network model based on a coder-decoder, calculating a dynamic early warning threshold value through multi-element Gaussian distribution on the data, and comparing a predicted value with the early warning threshold value to achieve the effect of water quality dynamic early warning.

Description

Long-time memory network water quality dynamic early warning method based on seasonal decomposition
Technical Field
The invention relates to a dynamic early warning method facing water quality indexes, in particular to a water quality index prediction method based on a seasonal decomposition long-time memory network.
Background
The water quality index can be used as a specific measurement scale for judging the water pollution degree. And acquiring water quality index data in real time through an automatic surface water quality monitoring station. The acquired data dynamically change along with time, and time series analysis and prediction are carried out on historical data of the acquired data, so that the change trend of water quality can be known, and support is provided for management and decision of water resources. In the water quality prediction work, due to the complex water body environment, the water body environment of each river is different, a mechanism model is applied to fit the model by needing some detailed parameters of each river, and the model is only suitable for the condition of a specific area or specific indexes; in the water quality early warning work, most of the traditional early warning methods are provided with fixed early warning threshold values, and the threshold values are set too high, so that the sensitivity of an early warning system is low, and the emergency disposal of an emergency pollution event is influenced; the threshold value is set too low, so that the early warning system can frequently give an alarm, and unnecessary workload is increased. The accurate prediction of water quality and the dynamic setting of early warning threshold values are the technical basis for realizing water quality early warning.
In recent years, with the development of the technology of the internet of things, various monitoring data can be effectively and timely transmitted and analyzed, meanwhile, the data acquisition has high frequency, and the scale of the data volume is enough to meet the application of a neural network method. The time sequence is a sequence formed by arranging numerical values of the same statistical index according to the occurrence time sequence, adjacent moments have certain rules to influence each other, and the traditional neural network is difficult to capture the key information with long span, so that the prediction precision is reduced. The long-time memory network model endows the neural network with the capability of acquiring information with larger time interval but very important, and effectively mines long-time related factors in the time sequence. Most long-term and short-term memory network models adopt a single index for prediction, cannot utilize correlation information among multi-element indexes, and can better extract correlation information before the indexes by utilizing a multi-element long-term and short-term memory network, so that the prediction precision is greatly improved.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides a long-time memory network water quality dynamic early warning method based on seasonal decomposition. The method comprises the following steps: a water quality time series pretreatment scheme based on seasonal decomposition; multi-step prediction of water quality indexes is realized based on a multivariate long-time memory network; and calculating an early warning threshold value based on a Gaussian distribution model. The purpose of the invention is realized by the following technical scheme.
A long-time memory network water quality dynamic early warning method based on seasonal decomposition comprises the following steps:
1) acquiring time sequence data consisting of water quality indexes and meteorological index data in a past period of time, performing space-time alignment on the data, and completing missing data;
2) analyzing the seasonality of the time series data and eliminating the seasonality on the basis of 1);
3) on the basis of 2), carrying out SG (Savitzky-Golay) filtering smoothing noise reduction and normalization processing on the data, and converting the data into supervised data by using a sliding window method;
4) on the basis of 3), inputting the characteristic sequence data into a multivariate long-short time memory neural network model of a coder-decoder, outputting a multistep predicted value of the water quality index, and then carrying out reverse normalization and anti-seasonal processing on the predicted value to obtain a predicted value of the future water quality index;
5) and 4) on the basis of the step 4), calculating an early warning threshold value of the water quality index for a period of time by using a multivariate Gaussian distribution model, and performing early warning after comparing the early warning threshold value with a predicted value.
Drawings
FIG. 1 is a schematic flow chart of a long-term and short-term memory network water quality dynamic early warning method based on seasonal decomposition;
FIG. 2 is a schematic diagram of a temporal sequence culling seasonality;
FIG. 3 is a diagram of a multi-element long-term memory network.
Detailed Description
Features and exemplary embodiments of various aspects of the present invention will be described in detail below. The following description encompasses numerous specific details in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a clearer understanding of the present invention by illustrating examples of the present invention. The present invention is in no way limited to any specific configuration and algorithm set forth below, but rather covers any modification, substitution, and improvement of relevant elements, components, and algorithms without departing from the spirit of the invention.
The following will describe specific steps of a long-term and short-term memory network water quality dynamic early warning method based on seasonal decomposition according to an embodiment of the present invention with reference to fig. 1 as follows:
the first step is to obtain time sequence data formed by water quality indexes and meteorological index data in a past period, align the data in space and time and fill up missing data.
Because the monitoring frequency of the automatic water quality monitoring system is usually once every four hours, the monitoring frequency of the meteorological station is usually once every one hour, the data are uniformly adjusted to be data with 4 hours and equal intervals, and a plurality of factors which have great influence on the early warning index are obtained through analysis of the Pearson correlation coefficient and the mechanism characteristic. And (4) cascading the water quality data and the meteorological data according to time and geographic information, and filling by using a linear interpolation method. The specific method comprises the following steps:
suppose a time series a (x)0,y0) And b (x)1,y1) The method has a null value, and establishes a linear relation between the two points a and b as follows:
(y-y0)/(x-x0)=(y1-y0)/(x1-x0)
wherein, x is the moment of the missing value, y is the missing data to be filled:
y=y0+(x-x0)(y1-y0)/(x1-x0)。
and secondly, analyzing the seasonality of the time sequence data and eliminating the seasonality.
Seasonality is a period that repeats periodically over time, and the periodic structure in a time series may or may not be seasonal. Seasonal if it repeats at the same frequency all the time, and non-seasonal otherwise, called periodic. In general, periodicity is simple and easily predictable, and identifying and removing seasonal components from a time series can make the relationship between input and output variables clearer, focusing more on learning complex structures. The specific method comprises the following steps:
1) and decomposing the trend term, adopting a method of centralizing moving average,
Figure BDA0002722596400000031
when f is an odd number using the above calculation method,
Figure BDA0002722596400000032
when f is an even number, the above calculation method is employed, wherein TtFor trend terms, f is the time series frequency, l is the time series length, and the result is a time series of length l, which is null when T exceeds the definition field of the subscript, e.g., T1I.e., t ═ 1;
2) seasonal periodic terms are decomposed.
At time t, YtAs observed values of the original time series, TtIs the trend value at that time, StFor the seasonal periodic term at the moment, the trend term is subtracted from the original time sequence:
St=Yt-Tt
averaging the values at the same frequency in each period to obtain a seasonal term:
Figure BDA0002722596400000033
n ═ l rounding f, i.e., max (n, nf ≦ 1), centralizes the figure to obtain a centralized seasonal term figure, which can be expressed as:
figure=figure-mean(figure)
finally obtaining a season term with the length of f;
3) computing residual terms et
et=Yt-Tt-St
And thirdly, carrying out SG (Savitzky-Golay) filtering smoothing noise reduction and normalization processing on the data, and converting the data into supervised data by using a sliding window method.
The core idea of the SG filtering method (Savitzky-GolayFilter) is to perform weighted filtering on the data in the window, but its weighted weight is obtained by performing least square fitting on a given high-order polynomial. Its advantage lies in, when filtering smoothly, can keep the change information of signal more effectively, SG filtering principle is as follows:
and filtering a total of 2n +1 observed values before and after the current moment, and fitting the observed values by using a k-1 order polynomial. For the observed value at the current time, fitting is performed by using the following formula:
xt=a0+a1*t+a2*t2++ak-1*tk-1
similarly, the predicted values for the preceding and following times (e.g., t-1, t +1, t-2, t +2, etc.) can be calculated by the above formula, so that a total of 2n +1 formulas are obtained, as follows:
Figure BDA0002722596400000041
to make the entire matrix have a solution, 2n +1 must be satisfied>k, the parameter a can be determined by the least square method0,a1,a2,…ak-1The formula is as follows:
X(2n+1)×1=T(2n+1)×k+Ak×1+E(2n+1)×1
the subscripts of the individual parameters indicate their respective dimensions, e.g. Ak×1A can be obtained by the least square method using a parameter indicating k rows and 1 columnk×1The solution of (a) is:
A=(Ttrans·T)-1·Ttrans·X。
the superscript trans denotes transpose, then the filtered value P of the model is:
P=T·A=T·(Ttrans·T)-1·Ttrans·X。
finally, a relation matrix between the filtering value and the observed value can be obtained:
B=T·(Ttrans·T)-1·Ttrans
the observed values are converted into filtered values through the matrix B, and the filtered data is subjected to the following sliding window processing so as to facilitate model input.
1) And normalizing the data processed in the last step. The specific formula is as follows:
Figure BDA0002722596400000051
wherein x is*Representing the normalized target value, x representing the data to be normalized, xminRepresents the minimum value, x, in the datamaxRepresenting the maximum value in the data.
2) The width of the sliding window is set as the sum of the input timing length and the predicted timing length, and the input value and the predicted value are intercepted by using the sliding window.
3) And separating the input value and the predicted value of the data intercepted by the sliding window, and converting the input value and the predicted value into supervised data.
And fourthly, constructing a multi-element long-time memory neural network model of the coder-decoder.
The invention uses a special multivariate long-time memory network model (LSTM) to analyze the relevant indexes of the water environment, and after the data is processed in the previous step, an input sequence is set
Figure BDA0002722596400000052
An encoder and a decoder are constructed through LSTM, input time sequence data with any length are processed through the encoder, characteristics are extracted from the input time sequence data, and then the decoder is used for predicting future time sequence data. An LSTM Cell has a long memory (Cell) and three gates (inputs, outputs, and a,Output and forget gates) to modify the memory through three gates, which can be described by the following equations:
ft=σ(Wf[ht-1,xt]+bf)
it=σ(Wi[ht-1,xt]+bi)
Figure BDA0002722596400000053
Figure BDA0002722596400000054
ot=σ(Wo[ht-1,xt]+bo)
ht=ot⊙tanh(ct)
multiplying [ ] by [ - ], Wi,Wf,WoAnd WcThe matrix represents parameters of input gate, forgetting gate, output gate and candidate long-term memory state, xtFor hidden layer input, htAs hidden layer output, ctFor long-term memory states, σ (-) and Tanh (-) are Sigmoid functions and Tanh functions.
The LSTM model is mainly composed of an encoder for encoding an input sequence and a decoder for decoding the encoded input sequence. A memory unit c using an LSTM as encoder to input any length of input sequence one by one for encodingtIs the memory of the entire input sequence, i.e., the feature information extracted from the input sequence. The decoder is constructed from another LSTM model, the purpose of which is to predict the value h from the decoder's output informationt,htMemory cell c output from encodertAn initial state vector is obtained, but when the decoder generates predictions for each time step, the state vector will be updated iteratively.
Thus, the hidden state at decoder time t +1 is calculated by:
ht+1=f1(ht,ct)。
after receiving sufficient training, the LSTM can extract complex time series information features. Based on these valid features, the last fully-connected layer can decode it to a predicted value of reasonable accuracy.
Figure BDA0002722596400000061
In the above formula, h is the hidden state (hidden states) extracted by the LSTM, the variable w is the weight of the fully-connected layer,
Figure BDA0002722596400000062
is a predicted value.
And generating a predicted value by using the model for the water quality test set, carrying out inverse normalization on the predicted value, comparing the predicted value with a real value which is not subjected to filtering by using RMSE (normalized difference analysis), adjusting the size of a hidden layer of a long-time memory network model in the water quality prediction model, testing the adjusted water quality prediction model, and finally obtaining a parameter model with the best effect.
And fifthly, calculating an early warning threshold value by a Gaussian distribution model.
And (3) counting the normal range of the time sequence index value in a period of time by using a Gaussian distribution model, setting the period of time as a hyper-parameter, wherein the length of the period of time is the change period of the dynamic early warning value, namely, different early warning values exist in different time spans. The specific method comprises the following steps:
fitting p (x) by setting μ and Σ
Figure BDA0002722596400000063
Figure BDA0002722596400000071
Giving a new sample, calculate p (x)
Figure BDA0002722596400000072
If p (x) is less than epsilon, the mark is an abnormal value, epsilon is set as a hyper-parameter according to the water quality mechanism characteristic analysis, and the value is continuously adjusted and optimized to enable the model early warning to be more reasonable.
The invention provides a long-time and short-time memory network water quality dynamic early warning method based on seasonal decomposition. It should be understood that the above detailed description of the technical solution of the present invention with the help of preferred embodiments is illustrative and not restrictive. After reading the description of the present invention, a person skilled in the art may modify the technical solutions described in the embodiments or make equivalent substitutions for some technical features, however, these modifications or substitutions do not make the essence of the corresponding technical solutions depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (6)

1. A long-time memory network water quality dynamic early warning method based on seasonal decomposition is characterized by comprising the following steps:
1) acquiring time sequence data consisting of water quality indexes and meteorological index data in a past period of time, performing space-time alignment on the data, and completing missing data;
2) analyzing the seasonality of the time sequence data and eliminating the seasonality;
3) SG (Savitzky-Golay) filtering smoothing noise reduction and normalization processing are carried out on the data, and the data are converted into supervised data by a sliding window method;
4) inputting the characteristic sequence data into a multi-element long-and-short time memory neural network model of a coder-decoder, outputting a multi-step predicted value of the water quality index, and then performing reverse normalization and anti-seasonal processing on the predicted value to obtain a predicted value of the water quality index in the future;
5) and calculating the early warning threshold value of the water quality index for a period of time by using a multivariate Gaussian distribution model, and performing early warning after comparing the early warning threshold value with the predicted value.
2. The long-and-short term memory network water quality dynamic early warning method based on seasonal decomposition as claimed in claim 1, wherein the step 1 is specifically as follows:
the monitoring frequency of the automatic water quality monitoring system is once every four hours, the monitoring frequency of the meteorological station is once every hour, and the data are uniformly adjusted to be data at equal intervals of 4 hours; the water quality data and the meteorological data are concatenated according to time and geographic information, and a linear interpolation method is used for filling, and the specific method comprises the following steps:
suppose a time series a (x)0,y0) And b (x)1,y1) The method has a null value, and establishes a linear relation between the two points a and b as follows:
(y-y0)/(x-x0)=(y1-y0)/(x1-x0)
wherein, x is the moment of the missing value, y is the missing data to be filled:
y=y0+(x-x0)(y1-y0)/(x1-x0)。
3. the long-and-short term memory network water quality dynamic early warning method based on seasonal decomposition as claimed in claim 1, wherein the step 2 specifically comprises:
1) decomposing trend terms by using a method of centering moving averages
Figure RE-FDA0002778427750000011
When f is an odd number, by using the above calculation method,
Figure RE-FDA0002778427750000021
when f is an even number, the above calculation method is employed, wherein TtAs a trend term, f is the time series frequency, l is the timeThe length of the sequence, resulting in a time sequence of length l, is null when T exceeds the definition field of the subscript, e.g., T1When t is 1;
2) decomposing seasonal periodic items
At time t, YtAs observed values of the original time series, TtIs the trend value at that time, StFor the seasonal periodic term at the moment, the trend term is subtracted from the original time sequence:
St=Yt-Tt
averaging the values at the same frequency in each period to obtain a seasonal term:
Figure RE-FDA0002778427750000022
n ═ l rounding f, i.e., max (n, nf ≦ 1), centralizes the figure to obtain a centralized seasonal term figure, which can be expressed as:
figure=figure-mean(figure)
finally obtaining a season term with the length of f;
3) computing residual terms et
et=Yt-Tt-St
4. The long-and-short term memory network water quality dynamic early warning method based on seasonal decomposition as claimed in claim 1, wherein the step 3 specifically comprises:
the SG filtering principle is as follows:
filtering a total of 2n +1 observed values before and after the current time, fitting the observed values by using a k-1 order polynomial, a0,a1,a2,…,ak-1As a parameter, for the observed value at the current time, fitting is performed by adopting the following formula:
xt=a0+a1*t+a2*t2+...+ak-1*tk-1
similarly, the predicted values before and after time t (e.g., time t-1, time t +1, time t-2, and time t + 2) can be calculated by the above formula, thus obtaining 2n +1 formulas in total;
Figure RE-FDA0002778427750000031
to make the entire matrix have a solution, 2n +1 must be satisfied>k, the parameter a can be determined by the least square method0,a1,a2,…,ak-1The formula is as follows:
X(2n+1)×1=T(2n+1)×k+Ak×1+E(2n+1)×1
the subscripts of the individual parameters indicate their respective dimensions, e.g. Ak×1A can be obtained by the least square method using a parameter indicating k rows and 1 columnk×1The solution of (a) is:
A=(Ttrans·T)-1·Ttrans·X
the superscript trans denotes transpose, then the filtered value P of the model is:
P=T·A=T·(Ttrans·T)-1·Ttrans·X
finally, a relation matrix between the filtering value and the observed value can be obtained:
B=T·(Ttrans·T)-1·Ttrans
the observed values are converted to filtered values by the matrix B,
the filtered data is subjected to the following sliding window processing, so that the model is input,
1) normalizing the data processed in the previous step, wherein a specific formula is as follows:
Figure RE-FDA0002778427750000041
wherein x is*Representing the normalized target value, x representing the data to be normalized, xminRepresents the minimum value, x, in the datamaxRepresents the maximum value of the data that is,
2) the width of the sliding window is set as the sum of the input time sequence length and the predicted time sequence length, the input value and the predicted value are intercepted by the sliding window, the data intercepted by the sliding window are separated into the input value and the predicted value, and the input value and the predicted value are converted into the supervised data.
5. The long-and-short term memory network water quality dynamic early warning method based on seasonal decomposition as claimed in claim 1, wherein the step 4 specifically comprises:
analyzing water environment related indexes by adopting a special multivariate long-and-short-term memory network model (LSTM), and setting an input sequence after data is processed in the previous step
Figure RE-FDA0002778427750000042
Constructing an encoder and a decoder through an LSTM, processing input time sequence data with any length through the encoder, extracting characteristics from the input time sequence data, and predicting future time sequence data by using the decoder; an LSTM Cell has a long memory (Cell) and three gates (input, output and forget gate), and the memory is modified by the three gates, which can be described by the following equations:
ft=σ(Wf[ht-1,xt]+bf)
it=σ(Wi[ht-1,xt]+bi)
Figure RE-FDA0002778427750000043
Figure RE-FDA0002778427750000044
ot=σ(Wo[ht-1,xt]+bo)
ht=ot⊙tanh(ct)
multiplying [ ] by [ - ], Wi,Wf,WoAnd WcThe matrix represents parameters of input gate, forgetting gate, output gate and candidate long-term memory state, xtFor hidden layer input, htAs hidden layer output, ctFor long-term memory states, σ (-) and Tanh (-) are Sigmoid functions and Tanh functions.
The LSTM model consists of an encoder and a decoder, wherein the encoder is used for encoding an input sequence, and the decoder is used for decoding the encoded input sequence; a memory unit c using an LSTM as encoder to input any length of input sequence one by one for encodingtIs the memory of the whole input sequence, namely the characteristic information extracted from the input sequence; the decoder is constructed from another LSTM model, the purpose of which is to predict the value h from the decoder's output informationt,htMemory cell c output from encodertAn initial state vector is obtained, but when the decoder generates predictions for each time step, the state vector will be iteratively updated; thus, the hidden state at decoder time t +1 is calculated by:
ht+1=f1(ht,ct)
after receiving sufficient training, the LSTM can extract complex time series information characteristics; based on these effective features, the last fully-connected layer can decode it into a predicted value of reasonable accuracy, which is as follows:
Figure RE-FDA0002778427750000051
in the above formula, h is the hidden states (hidden states) extracted by the LSTM, the variable w is the weight of the fully-connected layer,
Figure RE-FDA0002778427750000052
is a predicted value.
And generating a predicted value by using the model for the water quality test set, carrying out inverse normalization on the predicted value, comparing the predicted value with a real value which is not subjected to filtering by using RMSE (normalized difference analysis), adjusting the size of a hidden layer of a long-time memory network model in the water quality prediction model, testing the adjusted water quality prediction model, and finally obtaining a parameter model with the best effect.
6. The long-and-short term memory network water quality dynamic early warning method based on seasonal decomposition as claimed in claim 1, wherein the step 5 specifically comprises:
the method comprises the following steps of using a Gaussian distribution model to count a normal range of time sequence index values in a period of time, setting the period of time as a hyper-parameter, wherein the length of the period of time is a change period of a dynamic early warning value, namely different early warning values exist in different time spans, and the specific method comprises the following steps:
p (x) is fitted by setting the parameters μ and Σ, as follows:
Figure RE-FDA0002778427750000061
Figure RE-FDA0002778427750000062
given a new sample, calculate p (x) as follows:
Figure RE-FDA0002778427750000063
if p (x) is less than epsilon, marking the model as an abnormal value, setting epsilon as a hyper-parameter according to the water quality mechanism characteristic analysis, and continuously adjusting and optimizing the value to enable the model early warning to be more reasonable.
CN202011092465.6A 2020-10-13 2020-10-13 Long-time memory network water quality dynamic early warning method based on seasonal decomposition Withdrawn CN112215422A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011092465.6A CN112215422A (en) 2020-10-13 2020-10-13 Long-time memory network water quality dynamic early warning method based on seasonal decomposition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011092465.6A CN112215422A (en) 2020-10-13 2020-10-13 Long-time memory network water quality dynamic early warning method based on seasonal decomposition

Publications (1)

Publication Number Publication Date
CN112215422A true CN112215422A (en) 2021-01-12

Family

ID=74053917

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011092465.6A Withdrawn CN112215422A (en) 2020-10-13 2020-10-13 Long-time memory network water quality dynamic early warning method based on seasonal decomposition

Country Status (1)

Country Link
CN (1) CN112215422A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112651665A (en) * 2021-01-14 2021-04-13 浙江鸿程计算机系统有限公司 Surface water quality index prediction method and device based on graph neural network
CN113139643A (en) * 2021-03-09 2021-07-20 卓望数码技术(深圳)有限公司 Network card flow model construction method, flow prediction method, equipment and storage medium
CN113421016A (en) * 2021-07-09 2021-09-21 浙江大学 Resource allocation method, device, equipment and medium based on people number prediction
CN113705809A (en) * 2021-09-07 2021-11-26 北京航空航天大学 Data prediction model training method, industrial index prediction method and device
CN113760880A (en) * 2021-09-07 2021-12-07 天津大学 Pretreatment method of water quality automatic monitoring data
CN114037551A (en) * 2021-11-15 2022-02-11 中国水产科学研究院渔业机械仪器研究所 Pond culture pH value missing data interpolation method
CN114299389A (en) * 2021-12-27 2022-04-08 中国地质大学(武汉) Savitzky-Golay filtering denoising parallel method fusing space-time information
CN114386658A (en) * 2021-12-03 2022-04-22 天健创新(北京)监测仪表股份有限公司 Lake and reservoir water quality monitoring and early warning method and device, storage medium and electronic equipment
CN117192063A (en) * 2023-11-06 2023-12-08 山东大学 Water quality prediction method and system based on coupled Kalman filtering data assimilation

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110852515A (en) * 2019-11-15 2020-02-28 北京工业大学 Water quality index prediction method based on mixed long-time and short-time memory neural network
CN111160651A (en) * 2019-12-31 2020-05-15 福州大学 STL-LSTM-based subway passenger flow prediction method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110852515A (en) * 2019-11-15 2020-02-28 北京工业大学 Water quality index prediction method based on mixed long-time and short-time memory neural network
CN111160651A (en) * 2019-12-31 2020-05-15 福州大学 STL-LSTM-based subway passenger flow prediction method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112651665A (en) * 2021-01-14 2021-04-13 浙江鸿程计算机系统有限公司 Surface water quality index prediction method and device based on graph neural network
CN113139643A (en) * 2021-03-09 2021-07-20 卓望数码技术(深圳)有限公司 Network card flow model construction method, flow prediction method, equipment and storage medium
CN113421016A (en) * 2021-07-09 2021-09-21 浙江大学 Resource allocation method, device, equipment and medium based on people number prediction
CN113705809A (en) * 2021-09-07 2021-11-26 北京航空航天大学 Data prediction model training method, industrial index prediction method and device
CN113760880A (en) * 2021-09-07 2021-12-07 天津大学 Pretreatment method of water quality automatic monitoring data
CN113705809B (en) * 2021-09-07 2024-03-19 北京航空航天大学 Data prediction model training method, industrial index prediction method and device
CN114037551A (en) * 2021-11-15 2022-02-11 中国水产科学研究院渔业机械仪器研究所 Pond culture pH value missing data interpolation method
CN114386658A (en) * 2021-12-03 2022-04-22 天健创新(北京)监测仪表股份有限公司 Lake and reservoir water quality monitoring and early warning method and device, storage medium and electronic equipment
CN114299389A (en) * 2021-12-27 2022-04-08 中国地质大学(武汉) Savitzky-Golay filtering denoising parallel method fusing space-time information
CN114299389B (en) * 2021-12-27 2024-05-14 中国地质大学(武汉) Savitzky-Golay filtering noise reduction parallel method integrating space-time information
CN117192063A (en) * 2023-11-06 2023-12-08 山东大学 Water quality prediction method and system based on coupled Kalman filtering data assimilation
CN117192063B (en) * 2023-11-06 2024-03-15 山东大学 Water quality prediction method and system based on coupled Kalman filtering data assimilation

Similar Documents

Publication Publication Date Title
CN112215422A (en) Long-time memory network water quality dynamic early warning method based on seasonal decomposition
CN110852515B (en) Water quality index prediction method based on mixed long-time and short-time memory neural network
CN109583565B (en) Flood prediction method based on attention model long-time and short-time memory network
CN113554466B (en) Short-term electricity consumption prediction model construction method, prediction method and device
CN112488415A (en) Power load prediction method based on empirical mode decomposition and long-and-short-term memory network
CN110736968B (en) Radar abnormal state diagnosis method based on deep learning
CN111815806B (en) Method for preprocessing flight parameter data based on wild value elimination and feature extraction
CN109886496B (en) Agricultural yield prediction method based on meteorological information
Dong et al. An integrated deep neural network approach for large-scale water quality time series prediction
CN114385614A (en) Water quality early warning method based on Informmer model
CN114492922A (en) Medium-and-long-term power generation capacity prediction method
CN114358435A (en) Pollution source-water quality prediction model weight influence calculation method of two-stage space-time attention mechanism
CN115759461A (en) Internet of things-oriented multivariate time sequence prediction method and system
CN113435124A (en) Water quality space-time correlation prediction method based on long-time and short-time memory and radial basis function neural network
CN115456245A (en) Prediction method for dissolved oxygen in tidal river network area
CN114118565A (en) Daily runoff forecasting method based on bidirectional long-and-short-term memory coupling model
CN115687322A (en) Water quality time series missing data completion method based on encoder-decoder and autoregressive generated countermeasure network
Zhang et al. Research on water quality prediction method based on AE-LSTM
CN115796351A (en) Rainfall shorthand prediction method and device based on variational modal decomposition and microwave attenuation
CN117894389A (en) SSA-optimized VMD and LSTM-based prediction method for concentration data of dissolved gas in transformer oil
CN112215495B (en) Pollution source contribution calculation method based on long-time and short-time memory neural network
CN111754033B (en) Non-stationary time sequence data prediction method based on cyclic neural network
CN115689014A (en) Water quality index prediction method based on bidirectional long-and-short-term memory neural network and time attention mechanism
CN115062764B (en) Intelligent illuminance adjustment and environmental parameter Internet of things big data system
Dong et al. A novel data-driven approach for tropical cyclone tracks prediction based on Granger causality and GRU

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20210112

WW01 Invention patent application withdrawn after publication