CN111693667A - Water quality detection system and method based on gated recursive array - Google Patents

Water quality detection system and method based on gated recursive array Download PDF

Info

Publication number
CN111693667A
CN111693667A CN202010373194.5A CN202010373194A CN111693667A CN 111693667 A CN111693667 A CN 111693667A CN 202010373194 A CN202010373194 A CN 202010373194A CN 111693667 A CN111693667 A CN 111693667A
Authority
CN
China
Prior art keywords
water quality
data
content
value
recursive array
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010373194.5A
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.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
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 Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN202010373194.5A priority Critical patent/CN111693667A/en
Publication of CN111693667A publication Critical patent/CN111693667A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N33/00Investigating or analysing materials by specific methods not covered by groups G01N1/00 - G01N31/00
    • G01N33/18Water
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/27Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
    • 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

Abstract

The invention provides a detection method based on gated recursive array water quality detection, which comprises the following steps: s1, obtaining water quality parameters including PH value, conductivity, turbidity, dissolved oxygen, water temperature, chlorophyll A content, blue-green algae content, ammonia nitrogen content, total phosphorus content, copper content, lead content and tin content; acquiring environmental indexes including atmospheric pressure, atmospheric humidity, atmospheric temperature and wind speed; s2, normalizing the acquired water quality parameter values and environmental indexes and selecting characteristics to obtain preprocessed data; s3, selecting a neural network based on a gated recursive array as a prediction model, and setting a loss function and an optimization iteration method; s4, inputting the preprocessed data into a prediction model to perform model training to obtain a prediction result; and S5, comparing the prediction result with the set five-level water quality classification to obtain a classification result. The invention can more effectively utilize the water quality attribute to carry out prediction classification.

Description

Water quality detection system and method based on gated recursive array
Technical Field
The invention relates to the technical field of water quality safety, in particular to a water quality detection system and method based on a gated recursive array.
Background
With the continuous development of the industrial and scientific and technological level in China, industrial sewage, domestic sewage and other wastes enter drinking water sources such as lakes, reservoirs, rivers, seas, lakes and seas, so that the pollution is more serious than the self-purification capacity of a water body, the physical, chemical, biological and other characteristics of the water body are changed, the utilization value of water is influenced, the human health and the ecological environment are even harmed, and the gradual deterioration and the irreparable situation are finally reached. Therefore, the development of a real-time online, effective and rapid water quality monitoring system has important significance for environmental management and treatment of polluted water sources.
In recent years, the country pays more and more attention to environmental protection, and more related researchers put forward new technologies and new methods. These techniques include electrochemical analysis, chromatographic separation, biosensor and spectroscopic analysis. The data of various indexes are acquired by the methods, and the traditional water quality classification methods such as a single factor evaluation method, an index evaluation method and the like are time-consuming and labor-consuming, and the efficiency is extremely low. Researchers also put forward methods such as logistic regression and neural network to establish models so as to obtain water quality data and predict water quality categories. However, the methods have some disadvantages, such as the lack of correlation of model establishment, and the adopted model does not have a time sequence function capable of considering water quality data, so that the accuracy of water quality prediction work is reduced, and results cannot be obtained timely and effectively.
Therefore, in order to develop an effective and rapid water quality monitoring system and improve the accuracy of model prediction, we need to pay attention to more environmental attributes and introduce the time-series characteristics thereof.
Disclosure of Invention
Aiming at the problems that the correlation of model establishment is deficient and the adopted model does not have the time sequence function of considering water quality data, the invention provides a water quality detection system and method based on a gated recursive array, which can more effectively utilize the water quality attribute to carry out prediction classification.
In order to achieve the above purpose, the present invention provides the following technical solutions:
a detection method based on gated recursive array water quality detection comprises the following steps:
s1, obtaining water quality parameters including PH value, conductivity, turbidity, dissolved oxygen, water temperature, chlorophyll A content, blue-green algae content, ammonia nitrogen content, total phosphorus content, copper content, lead content and tin content; acquiring environmental indexes including atmospheric pressure, atmospheric humidity, atmospheric temperature and wind speed;
s2, normalizing the acquired water quality parameter values and environmental indexes and selecting characteristics to obtain preprocessed data;
s3, selecting a neural network based on a gated recursive array as a prediction model, and setting a loss function and an optimization iteration method;
s4, inputting the preprocessed data into a prediction model to perform model training to obtain a prediction result;
and S5, comparing the prediction result with the set five-level water quality classification to obtain a classification result.
And the water quality grade prediction containing the time sequence attribute is obtained, and the prediction accuracy is higher. This is because the gated recursive array has the characteristic of memory, so that the characteristics of the sequentiality such as temperature, chemical reaction and the like in the water quality monitoring are fully considered. And compared with other neural networks, the recursive array is gated by fewer gating units, so that the parameters are fewer and the complexity is low.
Preferably, the set five-level water quality classification specifically includes:
acquiring water quality parameter values in continuous time, and simultaneously acquiring environmental indexes and inputting the environmental indexes into a computer for recording; at present, the national surface water environment quality standard is divided into five types of I, II, III, IV and V according to the surface water area environment function and the protection target, and 16 types of water quality monitoring data collected at the time t are set as follows:
Xt=(x1,x2,......,x16)
x is abovetIs a water quality characteristic array at the time t, xnIs the nth data index, and the water quality classification result at the time t is as follows:
Yt=y y∈(I,II,III,IV,V)。
preferably, the step S2 specifically includes:
normalizing the collected data, and subjecting the X totNormalized to [0, 1 ] data]To obtain:
Xt=(x1,x2,......,x16)xn∈[0,1]
selecting k characteristic attributes with the maximum correlation with the predicted water quality classification result through a characteristic elimination and cross validation algorithm to obtain:
Xt=(x1,x2,......,xk)xk∈[0,1]。
the method mainly adopts a recursive feature elimination and cross validation algorithm, and the algorithm has the main idea that a model is repeatedly constructed, then the best feature is selected and determined according to the coefficient proportion of the feature, the selected feature is put into a set, and then the rest features are repeatedly constructed until all the features are traversed. The data needs to be normalized before the model is built, because without normalization, the result of the model built based on the data is not stable enough.
Preferably, the step S3 specifically includes: a neural network is designed based on a gating recursive array, and the gating recursive array has two gates: the updating gate is used for controlling the degree of the state information at the previous moment brought into the current state in the current state, and the larger the value of the updating gate is, the more the state information at the previous moment is brought; how much information is written to the current candidate set before reset gate controls the previous state
Figure BDA0002478914540000031
The smaller the reset gate, the less information of the previous state is written; the process of processing data, i.e. the forward propagation process of the gated recursive array, is:
u=σ(Wu[c<t-1>,Xt]+bu)
in the above formulauTo update the value of the gate, σ is the activation function, WuTo update the weight of the door, c<t-1>Is the state value at the previous moment, buTo update the door weight value;
r=σ(Wr[c<t-1>,Xt]+br)
in the above formularTo reset the gate value, σ is the activation function, WrTo reset the weight of the gate, c<t-1>Is the state value at the previous moment, brA reset gate bias value;
Figure BDA0002478914540000032
Figure BDA0002478914540000033
in the above formula
Figure BDA0002478914540000034
Is a candidate state value at the current moment, tanh is an activation function, WcIs a weight value, bcIs the current operation bias value;
Figure BDA0002478914540000035
in the above formula c<t>Is the current state value;
the function of the sigma activation function is to compress the state value between (0, 1), and is a sigmoid activation function, and the formula is as follows:
Figure BDA0002478914540000036
k is a parameter of the incoming activation function.
Preferably, the loss function to be optimized in step S3 is:
J(θ)=E[Loss(f(Xt;θ),Y)]
theta is an internal parameter of the neural network, and J (theta) is a loss function.
Preferably, the loss function adopts SGD optimization algorithm or Adam optimization algorithm,
the SGD optimization algorithm specifically includes:
input learning rate ξkInitial parameter θ, gradient
Figure BDA0002478914540000041
When the stopping condition is satisfied, collecting a sample containing m samples { X ] from the training sett (1),Xt (2),...,Xt (m)Small lot of where data x(i)Corresponding to object y(i)
Calculating a gradient estimate:
Figure BDA0002478914540000042
updating parameters:
Figure BDA0002478914540000043
the Adam optimization algorithm specifically comprises:
input global learning rate ξk(default 0.001), exponential decay Rate of moment estimation, ρ1、ρ2Within the interval [0, 1) (default 0.9 and 0.999), small constants for numerical stability (default 10)-7),
Inputting an initial parameter theta, initializing a first-order moment and a second-order moment variable s as 0, r as 0, initializing a time step t as 0, and collecting m samples { x in a training set when a stop condition is not met(1),x(2),...,x(m)Where the data x(i)Corresponding to object y(i)
Calculating a gradient estimate:
Figure BDA0002478914540000044
t←t+1
updating biased first moment estimates: s ← ρ1s+(1-p1)g
Updating the biased second moment estimation: r ← ρ2r+(1-ρ2)ge g。
During the training period of the neural network, the method can be practically equivalent to the process of reducing the loss function, the initial stage of the development of the neural network algorithm is generally to select a gradient descent algorithm, output data is obtained through batch input data, the difference between the output data and a target function is calculated to obtain the loss function value, and the method for reducing the loss function value is to change parameters in the network. The final objective is to have the input correspond to the output and the calculated loss function value reach the lowest point, equivalent to an output close to the ideal value. The optimization algorithm is optimized in the aspects of loss function convergence speed, gradient descent speed and self-adaptive descent. So that the loss function approaches the global optimum as much as possible.
A water quality detection system based on a gated recursive array is suitable for the detection method based on the gated recursive array, and comprises
The data acquisition module is used for acquiring the water quality parameter value and the environmental index and transmitting the water quality parameter value and the environmental index to the database module;
the database module is used for storing the water quality parameter values and the data of the environmental indexes;
the data processing module calls the data of the water quality parameter values and the environmental indexes in the database, carries out pretreatment to obtain pretreatment data, and transmits the pretreatment data to the gated recursive array model;
the gated recursive array model is provided with a pre-established training model, receives the preprocessed data input by the data processing module, and inputs the preprocessed data into the training model for training to obtain a predicted result;
and the computer water quality monitoring platform is provided with a five-level water quality classification early warning threshold value, receives a predicted result, obtains a classification result according to the predicted result and carries out early warning.
Preferably, the system is further provided with an alarm module, and the computer water quality monitoring platform is electrically connected with the alarm module. When the water quality grade belongs to an abnormal range, the alarm module is controlled to give an alarm
Preferably, the data acquisition module comprises a broad spectrum water quality analysis unit, a temperature sensor, a humidity sensor, a pressure gauge and an anemometer, the broad spectrum water quality analysis unit acquires a water quality parameter value through a broad spectrum water quality analysis technology, and the temperature sensor, the humidity sensor, the pressure gauge and the anemometer acquire an environmental index.
Preferably, the water quality parameter values comprise PH value, conductivity, turbidity, dissolved oxygen, water temperature, chlorophyll A content, blue-green algae content, ammonia nitrogen content, total phosphorus content, copper content, lead content and tin content; the environmental indexes comprise atmospheric pressure, atmospheric humidity, atmospheric temperature and wind speed.
The invention has the following beneficial effects: the deep neural network based on the gated recursive array is used as a prediction model, the gated recursive array has a memory function, and influences of attribute time sequence changes are brought into factors influencing results during training, such as water temperature, atmospheric pressure, chemical reactions generated by substances in water and the like, so that the gated recursive array has certain time-delay influence factors. A model with higher characteristic correlation and more accurate prediction is obtained through training, and the method has important significance for timely and accurately predicting the water quality grade and making an emergency response; obtaining the water quality grade prediction containing the time sequence attribute, wherein the prediction accuracy is higher; the recursive array is gated with fewer gating cells, and therefore with fewer parameters and less complexity, than other neural networks.
Drawings
FIG. 1 is a system configuration diagram of the present embodiment;
FIG. 2 is a block diagram of the input-output framework of the gated recursive array in the present embodiment;
FIG. 3 is a diagram of the internal framework of the gated recursive array in the present embodiment;
wherein: s01, a data acquisition module S02, a database module S03, a data processing module S04, a gated recursive array model S05, a computer water quality monitoring platform S06 and an alarm module.
Detailed Description
Example (b):
the embodiment provides a detection method based on gated recursive array water quality detection, which comprises the following steps:
s1, obtaining water quality parameters including PH value, conductivity, turbidity, dissolved oxygen, water temperature, chlorophyll A content, blue-green algae content, ammonia nitrogen content, total phosphorus content, copper content, lead content and tin content; acquiring environmental indexes including atmospheric pressure, atmospheric humidity, atmospheric temperature and wind speed;
the setting of the five-level water quality classification specifically comprises the following steps:
acquiring water quality parameter values in continuous time, and simultaneously acquiring environmental indexes and inputting the environmental indexes into a computer for recording; at present, the national surface water environment quality standard is divided into five types of I, II, III, IV and V according to the surface water area environment function and the protection target, and 16 types of water quality monitoring data collected at the time t are set as follows:
Xt=(x1,x2,......,x16)
x is abovetIs a water quality characteristic array at the time t, xnIs the nth data index, and the water quality classification result at the time t is as follows:
Yt=y y∈(I,II,III,IV,V)。
s2, normalizing the acquired water quality parameter values and environmental indexes and selecting characteristics to obtain preprocessed data; step S2 specifically includes:
normalizing the collected data to obtain XtNormalized to [0, 1 ] data]To obtain:
Xt=(x1,x2,......,x16)xn∈[0,1]
selecting k characteristic attributes with the maximum correlation with the predicted water quality classification result through a characteristic elimination and cross validation algorithm to obtain:
Xt=(x1,x2,......,xk)xk∈[0,1]。
the method mainly adopts a recursive feature elimination and cross validation algorithm, and the algorithm has the main idea that a model is repeatedly constructed, then the best feature is selected and determined according to the coefficient proportion of the feature, the selected feature is put into a set, and then the rest features are repeatedly constructed until all the features are traversed. The data needs to be normalized before the model is built, because without normalization, the result of the model built based on the data is not stable enough.
S3, selecting a neural network based on a gated recursive array as a prediction model, and setting a loss function and an optimization iteration method;
referring to fig. 2, the input and output of the gated recursive array includes input data, a state value of a previous time, a state value of a current time, and output data.
Referring to fig. 3, the internal framework of the gated recursive array includes an input/output module, a current state value module, and a previous state value module, where the operation module 1 is a multiplication operation, the operation module 2 is a difference operation with 1, the operation module 3 is an addition operation, the activation function 1 is a sigma activation function, and the activation function 2 is a tanh activation function.
Step S3 specifically includes: a neural network is designed based on a gating recursive array, and the gating recursive array has two gates: the updating gate is used for controlling the degree of the state information at the previous moment brought into the current state in the current state, and the larger the value of the updating gate is, the more the state information at the previous moment is brought; how much information is written to the current candidate set before reset gate controls the previous state
Figure BDA0002478914540000072
The smaller the reset gate, the less information of the previous state is written; the process of processing data, i.e. the forward propagation process of the gated recursive array, is:
u=σ(Wu[c<t-1>,Xt]+bu)
in the above formulauTo update the value of the gate, σ is the activation function, WuTo update the weight of the door, c<t-1>Is the state value at the previous moment, buTo update the door weight value;
r=σ(Wr[c<t-1>,Xt]+br)
in the above formularTo reset the gate value, σ is the activation function, WrTo reset the weight of the gate, c<t-1>Is the state value at the previous moment, brA reset gate bias value;
Figure BDA0002478914540000071
Figure BDA0002478914540000081
in the above formula
Figure BDA0002478914540000082
Is a candidate state value at the current moment, tanh is an activation function, WcIs a weight value, bcIs the current operation bias value;
Figure BDA0002478914540000083
in the above formula c<t>Is the current state value;
the function of the sigma activation function is to compress the state value between (0, 1), and is a sigmoid activation function, and the formula is as follows:
Figure BDA0002478914540000084
k is a parameter of the incoming activation function.
The loss function to be optimized in step S3 is:
J(θ)=E[Loss(f(Xt;θ),Y)]
theta is an internal parameter of the neural network, and J (theta) is a loss function.
The loss function adopts an SGD optimization algorithm or an Adam optimization algorithm,
the SGD optimization algorithm specifically includes:
input learning rate ξkInitial parameter θ, gradient
Figure BDA0002478914540000085
When the stopping condition is satisfied, collecting a sample containing m samples { X ] from the training sett (1),Xt (2),...,Xt (m)Small lot of where data x(i)Corresponding to object y(i)
Calculating a gradient estimate:
Figure BDA0002478914540000086
updating parameters:
Figure BDA0002478914540000087
the Adam optimization algorithm specifically comprises:
input global learning rate ξk(default 0.001), exponential decay Rate of moment estimation, ρ1、ρ2Within the interval [0, 1) (default 0.9 and 0.999), small constants for numerical stability (default 10)-7),
Inputting an initial parameter theta, initializing a first-order moment and a second-order moment variable s as 0, r as 0, initializing a time step t as 0, and collecting m samples { x in a training set when a stop condition is not met(1),x(2),...,x(m)Where the data x(i)Corresponding to object y(i)
Calculating a gradient estimate:
Figure BDA0002478914540000091
t←t+1
updating biased first moment estimates: s ← ρ1s+(1-p1)g
Updating the biased second moment estimation: r ← ρ2r+(1-ρ2)ge g。
S4, inputting the preprocessed data into a prediction model to perform model training to obtain a prediction result;
and S5, comparing the prediction result with the set five-level water quality classification to obtain a classification result.
And the water quality grade prediction containing the time sequence attribute is obtained, and the prediction accuracy is higher. This is because the gated recursive array has the characteristic of memory, so that the characteristics of the sequentiality such as temperature, chemical reaction and the like in the water quality monitoring are fully considered. And compared with other neural networks, the recursive array is gated by fewer gating units, so that the parameters are fewer and the complexity is low.
During the training period of the neural network, the method can be practically equivalent to the process of reducing the loss function, the initial stage of the development of the neural network algorithm is generally to select a gradient descent algorithm, output data is obtained through batch input data, the difference between the output data and a target function is calculated to obtain the loss function value, and the method for reducing the loss function value is to change parameters in the network. The final objective is to have the input correspond to the output and the calculated loss function value reach the lowest point, equivalent to an output close to the ideal value. The optimization algorithm is optimized in the aspects of loss function convergence speed, gradient descent speed and self-adaptive descent. So that the loss function approaches the global optimum as much as possible.
The embodiment further provides a system for detecting water quality based on gated recursive array, which is suitable for the above method for detecting water quality based on gated recursive array, and with reference to fig. 1, the method includes the steps of
The data acquisition module is used for acquiring the water quality parameter value and the environmental index and transmitting the water quality parameter value and the environmental index to the database module;
the database module is used for storing the water quality parameter values and the data of the environmental indexes;
the data processing module calls the data of the water quality parameter values and the environmental indexes in the database, carries out pretreatment to obtain pretreatment data, and transmits the pretreatment data to the gated recursive array model;
the gated recursive array model is provided with a pre-established training model, receives the preprocessed data input by the data processing module, and inputs the preprocessed data into the training model for training to obtain a predicted result;
and the computer water quality monitoring platform is provided with a five-level water quality classification early warning threshold value, receives a predicted result, obtains a classification result according to the predicted result and carries out early warning.
The system is also provided with an alarm module, and the computer water quality monitoring platform is electrically connected with the alarm module. When the water quality grade belongs to an abnormal range, the alarm module is controlled to give an alarm
The data acquisition module comprises a broad spectrum water quality analysis unit, a temperature sensor, a humidity sensor, a pressure gauge and an anemometer, wherein the broad spectrum water quality analysis unit acquires a water quality parameter value through a broad spectrum water quality analysis technology, and the temperature sensor, the humidity sensor, the pressure gauge and the anemometer acquire an environment index.
The water quality parameters comprise PH value, conductivity, turbidity, dissolved oxygen, water temperature, chlorophyll A content, blue-green algae content, ammonia nitrogen content, total phosphorus content, copper content, lead content and tin content; the environmental indicators include atmospheric pressure, atmospheric humidity, atmospheric temperature, and wind speed.
The invention has the following advantages: the deep neural network based on the gated recursive array is used as a prediction model, the gated recursive array has a memory function, and influences of attribute time sequence changes are brought into factors influencing results during training, such as water temperature, atmospheric pressure, chemical reactions generated by substances in water and the like, so that the gated recursive array has certain time-delay influence factors. A model with higher characteristic correlation and more accurate prediction is obtained through training, and the method has important significance for timely and accurately predicting the water quality grade and making an emergency response; obtaining the water quality grade prediction containing the time sequence attribute, wherein the prediction accuracy is higher; the recursive array is gated with fewer gating cells, and therefore with fewer parameters and less complexity, than other neural networks.

Claims (10)

1. A detection method based on gated recursive array water quality detection is characterized by comprising the following steps:
s1, obtaining water quality parameters including PH value, conductivity, turbidity, dissolved oxygen, water temperature, chlorophyll A content, blue-green algae content, ammonia nitrogen content, total phosphorus content, copper content, lead content and tin content; acquiring environmental indexes including atmospheric pressure, atmospheric humidity, atmospheric temperature and wind speed;
s2, normalizing the acquired water quality parameter values and environmental indexes and selecting characteristics to obtain preprocessed data;
s3, selecting a neural network based on a gated recursive array as a prediction model, and setting a loss function and an optimization iteration method;
s4, inputting the preprocessed data into a prediction model to perform model training to obtain a prediction result;
and S5, comparing the prediction result with the set five-level classification to obtain a classification result.
2. The gated recursive array-based water quality detection method according to claim 1, wherein the set five-level classification specifically comprises:
acquiring water quality parameter values in continuous time, and simultaneously acquiring environmental indexes and inputting the environmental indexes into a computer for recording; at present, the national surface water environment quality standard is divided into five types of I, II, III, IV and V according to the surface water area environment function and the protection target, and 16 types of water quality monitoring data collected at the time t are set as follows:
Xt=(x1,x2,......,x16)
x is abovetIs a water quality characteristic array at the time t, xnIs the nth data index, and the water quality classification result at the time t is as follows:
Yt=y y∈(I,II,III,IV,V)。
3. the method as claimed in claim 2, wherein the step S2 specifically comprises:
normalizing the collected data, and subjecting the X totNormalized to [0, 1 ] data]To obtain:
Xt=(x1,x2,......,x16) xn∈[0,1]
selecting k characteristic attributes with the maximum correlation with the predicted water quality classification result through a characteristic elimination and cross validation algorithm to obtain:
Xt=(x1,x2,.....,xk) xk∈[0,1]。
4. the method as claimed in claim 1, wherein the step S3 specifically comprises: a neural network is designed based on a gating recursive array, and the gating recursive array has two gates: the updating gate is used for controlling the degree of the state information at the previous moment brought into the current state in the current state, and the larger the value of the updating gate is, the more the state information at the previous moment is brought; how much information is written to the current candidate set before reset gate controls the previous state
Figure FDA0002478914530000026
The smaller the reset gate, the less information of the previous state is written; the process of processing data, i.e. the forward propagation process of the gated recursive array, is:
u=σ(Wu[c<t-1>,Xt]+bu)
in the above formulauTo update the value of the gate, σ is the activation function, WuTo update the weight of the door, c<t-1>Is the state value at the previous moment, buTo update the door weight value;
r=σ(Wr[c<t-1>,Xt]+br)
in the above formularTo reset the gate value, σ is the activation function, WrTo reset the weight of the gate, c<t-1>Is the state value at the previous moment, brA reset gate bias value;
Figure FDA0002478914530000021
Figure FDA0002478914530000022
in the above formula
Figure FDA0002478914530000023
Is a candidate state value at the current moment, tanh is an activation function, WcIs a weight value, bcIs the current operation bias value;
Figure FDA0002478914530000024
in the above formula c<t>Is the current state value;
the function of the sigma activation function is to compress the state value between (0, 1), and is a sigmoid activation function, and the formula is as follows:
Figure FDA0002478914530000025
k is a parameter of the incoming activation function.
5. The method as claimed in claim 4, wherein the loss function to be trained and optimized in step S3 is:
J(θ)=E[Loss(f(Xt;θ),Y)]
theta is an internal parameter of the neural network, and J (theta) is a loss function.
6. The method as claimed in claim 4, wherein the loss function adopts SGD optimization algorithm or Adam optimization algorithm,
the SGD optimization algorithm specifically includes:
input learning rate ξkInitial parameter θ, gradient
Figure FDA0002478914530000031
When the stop condition is satisfied, the slave trainingThe training set collects samples containing m samples { Xt (1),Xt (2),...,Xt (m)Small lot of where data x(i)Corresponding to object y(i)
Calculating a gradient estimate:
Figure FDA0002478914530000032
updating parameters:
Figure FDA0002478914530000033
the Adam optimization algorithm specifically comprises:
input global learning rate ξk(default 0.001), exponential decay Rate of moment estimation, ρ1、ρ2Within the interval [0, 1) (default 0.9 and 0.999), small constants for numerical stability (default 10)-7),
Inputting an initial parameter theta, initializing a first-order moment and a second-order moment variable s as 0, r as 0, initializing a time step t as 0, and collecting m samples { x in a training set when a stop condition is not met(1),x(2),...,x(m)Where the data x(i)Corresponding to object y(i)
Calculating a gradient estimate:
Figure FDA0002478914530000034
t←t+1
updating biased first moment estimates: s ← ρ1s+(1-p1)g
Updating the biased second moment estimation: r ← ρ2r+(1-ρ2)ge g。
7. A water quality detection system based on a gated recursive array, which is suitable for the detection method based on the gated recursive array water quality detection in claims 1 to 7, and is characterized by comprising
The data acquisition module is used for acquiring the water quality parameter value and the environmental index and transmitting the water quality parameter value and the environmental index to the database module;
the database module is used for storing the water quality parameter values and the data of the environmental indexes;
the data processing module calls the data of the water quality parameter values and the environmental indexes in the database, carries out pretreatment to obtain pretreatment data, and transmits the pretreatment data to the gated recursive array model;
the gated recursive array model is provided with a pre-established training model, receives the preprocessed data input by the data processing module, and inputs the preprocessed data into the training model for training to obtain a predicted result;
and the computer water quality monitoring platform is provided with a five-level classification early warning threshold value, receives the predicted result, obtains the classification result according to the predicted result and carries out early warning.
8. The gated recursive array based water quality detection system according to claim 7, wherein the system is further provided with an alarm module, and the computer water quality monitoring platform is electrically connected with the alarm module.
9. The gated recursive array based water quality detection system according to claim 7, wherein the data acquisition module comprises a broad spectrum water quality analysis unit, a temperature sensor, a humidity sensor, a pressure gauge and an anemometer, the broad spectrum water quality analysis unit obtains a water quality parameter value through a broad spectrum water quality analysis technology, and the temperature sensor, the humidity sensor, the pressure gauge and the anemometer obtain an environmental index.
10. The gated recursive array based water quality detection system according to claim 9, wherein the water quality parameter values include PH, conductivity, turbidity, dissolved oxygen, water temperature, chlorophyll a content, blue-green algae content, ammonia nitrogen content, total phosphorus content, copper content, lead content, tin content; the environmental indexes comprise atmospheric pressure, atmospheric humidity, atmospheric temperature and wind speed.
CN202010373194.5A 2020-05-06 2020-05-06 Water quality detection system and method based on gated recursive array Pending CN111693667A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010373194.5A CN111693667A (en) 2020-05-06 2020-05-06 Water quality detection system and method based on gated recursive array

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010373194.5A CN111693667A (en) 2020-05-06 2020-05-06 Water quality detection system and method based on gated recursive array

Publications (1)

Publication Number Publication Date
CN111693667A true CN111693667A (en) 2020-09-22

Family

ID=72476968

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010373194.5A Pending CN111693667A (en) 2020-05-06 2020-05-06 Water quality detection system and method based on gated recursive array

Country Status (1)

Country Link
CN (1) CN111693667A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906738A (en) * 2021-01-15 2021-06-04 宁波可为数据技术有限公司 Water quality detection and treatment method
CN113033917A (en) * 2021-04-19 2021-06-25 重庆工商大学 Sewage treatment plant prediction planning operation management method based on peripheral data
CN113205219A (en) * 2021-05-12 2021-08-03 大连大学 Agricultural water quality prediction method based on gradient descent optimization logistic regression algorithm
CN113408744A (en) * 2021-07-08 2021-09-17 山东浪潮科学研究院有限公司 Multi-sensor multi-environment monitoring method based on AIot and TinyML technology

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103728431A (en) * 2014-01-09 2014-04-16 重庆科技学院 Industrial sewage COD (chemical oxygen demand) online soft measurement method based on ELM (extreme learning machine)
US20170140263A1 (en) * 2015-11-12 2017-05-18 Google Inc. Convolutional gated recurrent neural networks
CN108665100A (en) * 2018-05-09 2018-10-16 中国农业大学 A kind of water quality prediction technique, system and device
CN110619418A (en) * 2019-07-26 2019-12-27 重庆大学 Multi-feature water quality prediction method based on mixed model combination algorithm
CN110852498A (en) * 2019-10-31 2020-02-28 西安交通大学 Method for predicting data center energy consumption efficiency PUE based on GRU neural network
CN111080464A (en) * 2019-11-27 2020-04-28 中国农业大学 Pond culture water quality key factor prediction method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103728431A (en) * 2014-01-09 2014-04-16 重庆科技学院 Industrial sewage COD (chemical oxygen demand) online soft measurement method based on ELM (extreme learning machine)
US20170140263A1 (en) * 2015-11-12 2017-05-18 Google Inc. Convolutional gated recurrent neural networks
CN108351982A (en) * 2015-11-12 2018-07-31 谷歌有限责任公司 Convolution gates recurrent neural network
CN108665100A (en) * 2018-05-09 2018-10-16 中国农业大学 A kind of water quality prediction technique, system and device
CN110619418A (en) * 2019-07-26 2019-12-27 重庆大学 Multi-feature water quality prediction method based on mixed model combination algorithm
CN110852498A (en) * 2019-10-31 2020-02-28 西安交通大学 Method for predicting data center energy consumption efficiency PUE based on GRU neural network
CN111080464A (en) * 2019-11-27 2020-04-28 中国农业大学 Pond culture water quality key factor prediction method and device

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
JICHANG TU等: "Water Quality Prediction Model Based on CNN-GRU hybrid network", 《IEEE XPLORE》 *
刘松等: "基于门控递归单元神经网络的高速公路行程时间预测", 《应用数学和力学》 *
张朝阳等: "《深入浅出 工业机器学习算法详解与实战》", 31 January 2020, 机械工业出版社 *
徐玉妃等: "滇池草海水质等级预测模型研究", 《水生态学杂志》 *
袁爱红: "图像内容的语义描述与理解", 《中国优秀博硕士学位论文全文数据库(博士)信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112906738A (en) * 2021-01-15 2021-06-04 宁波可为数据技术有限公司 Water quality detection and treatment method
CN112906738B (en) * 2021-01-15 2023-01-31 宁波可为数据技术有限公司 Water quality detection and treatment method
CN113033917A (en) * 2021-04-19 2021-06-25 重庆工商大学 Sewage treatment plant prediction planning operation management method based on peripheral data
CN113033917B (en) * 2021-04-19 2022-04-12 重庆工商大学 Sewage treatment plant prediction planning operation management method based on peripheral data
CN113205219A (en) * 2021-05-12 2021-08-03 大连大学 Agricultural water quality prediction method based on gradient descent optimization logistic regression algorithm
CN113408744A (en) * 2021-07-08 2021-09-17 山东浪潮科学研究院有限公司 Multi-sensor multi-environment monitoring method based on AIot and TinyML technology

Similar Documents

Publication Publication Date Title
CN111693667A (en) Water quality detection system and method based on gated recursive array
CN111291937A (en) Method for predicting quality of treated sewage based on combination of support vector classification and GRU neural network
CN108898215B (en) Intelligent sludge bulking identification method based on two-type fuzzy neural network
CN108710974B (en) Water ammonia nitrogen prediction method and device based on deep belief network
CN109492265B (en) Wastewater effluent index prediction method based on dynamic nonlinear PLS soft measurement method
CN114169638A (en) Water quality prediction method and device
CN111210128B (en) Wetland early warning method based on artificial intelligence and random self-adaptive threshold
CN114037163A (en) Sewage treatment effluent quality early warning method based on dynamic weight PSO (particle swarm optimization) optimization BP (Back propagation) neural network
CN115561416A (en) Method and device for detecting inlet water quality of sewage treatment plant in real time
CN111125907B (en) Sewage treatment ammonia nitrogen soft measurement method based on hybrid intelligent model
CN116884523B (en) Multi-parameter prediction method for water quality of marine pasture
CN104914227A (en) Multi-gaussian kernel self-optimization relevance vector machine based wastewater quality soft-measurement method
CN112819087A (en) Effluent BOD sensor abnormity detection method based on modular neural network
CN110542748B (en) Knowledge-based robust effluent ammonia nitrogen soft measurement method
CN110197704B (en) Self-organizing BP neural network water output total phosphorus prediction method based on limited Boltzmann machine
CN114871000B (en) Flotation dosing self-adaptive regulation and control method
CN110009132A (en) A kind of short-term electric load fining prediction technique based on LSTM deep neural network
CN114726751A (en) Intelligent early warning method, system, equipment and storage medium for resource quality monitoring
Ling et al. A soft sensor based on influent mode discrimination neural network for a wastewater treatment process
CN112365093A (en) GRU deep learning-based multi-feature factor red tide prediction model
Sundararaj et al. Artificial neural network applications in electrochemistry-A review
CN113838542B (en) Intelligent prediction method and system for chemical oxygen demand
CN115541837A (en) Effluent total nitrogen intelligent detection method based on dynamic fuzzy neural network
CN114417740B (en) Deep sea breeding situation sensing method
CN114781166B (en) Sewage treatment process soft measurement method based on weighted probability slow characteristic model

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200922

RJ01 Rejection of invention patent application after publication