CN114169638A - Water quality prediction method and device - Google Patents

Water quality prediction method and device Download PDF

Info

Publication number
CN114169638A
CN114169638A CN202111587243.6A CN202111587243A CN114169638A CN 114169638 A CN114169638 A CN 114169638A CN 202111587243 A CN202111587243 A CN 202111587243A CN 114169638 A CN114169638 A CN 114169638A
Authority
CN
China
Prior art keywords
water quality
data
prediction
attention mechanism
quality prediction
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.)
Granted
Application number
CN202111587243.6A
Other languages
Chinese (zh)
Other versions
CN114169638B (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.)
China Agricultural University
Original Assignee
China Agricultural 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 China Agricultural University filed Critical China Agricultural University
Priority to CN202111587243.6A priority Critical patent/CN114169638B/en
Publication of CN114169638A publication Critical patent/CN114169638A/en
Application granted granted Critical
Publication of CN114169638B publication Critical patent/CN114169638B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/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/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
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4007Scaling of whole images or parts thereof, e.g. expanding or contracting based on interpolation, e.g. bilinear interpolation
    • 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)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Strategic Management (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Human Resources & Organizations (AREA)
  • Tourism & Hospitality (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Educational Administration (AREA)
  • Primary Health Care (AREA)
  • Game Theory and Decision Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a water quality prediction method, a water quality prediction device, electronic equipment and a storage medium, and belongs to the technical field of aquaculture. The water quality prediction method comprises the following steps of S1: monitoring data of historical water temperature and dissolved oxygen are collected by a plurality of sensors in a culture scene and are preprocessed; step S2: fusing the data preprocessed in the step S1 to obtain a water quality time sequence; step S3: introducing an attention mechanism, and establishing a Bi-directional GRU-CNN model based on the attention mechanism; step S4: recombining the fused water quality time series in the step S2 into a prediction training sample, inputting the prediction training sample into the model established in the step S3 for training to obtain a trained water quality prediction model; step S5: and collecting real-time data to predict water quality. The invention realizes the automatic collection and prediction of the water quality dissolved oxygen and the water temperature, improves the accuracy and the efficiency of the prediction and saves a large amount of manpower and material resources.

Description

Water quality prediction method and device
Technical Field
The invention relates to the technical field of aquaculture, in particular to a water quality prediction method and a water quality prediction device.
Background
Aquaculture is an important component of agricultural production, and Chinese aquaculture yield continuously stays in the world for many years and is one of important aquatic product production and export countries in the world. Aquaculture has become an important component of agricultural production in China, and is a supporting industry for economic development in countryside in many places. In order to monitor the change of the culture water quality, people often need to regularly master the change conditions of the concentration and the temperature of the dissolved oxygen in the water body. However, the concentration of dissolved oxygen in water is often measured by physical or chemical methods in the existing methods, and temperature data is often measured in a fixed-time monitoring and fixed-point manner.
The water quality prediction method based on historical data also mostly uses single-factor historical data as training samples to perform curve fitting, and because water quality parameters have more direct and indirect influence factors and have the characteristics of high nonlinearity, time lag, multivariable coupling and the like, the single-factor prediction method cannot meet the requirement of prediction accuracy, and accurate and efficient multi-step prediction of short-term dissolved oxygen change is difficult to realize. Therefore, a new water quality prediction method and device are needed to solve the above problems.
The invention provides a water quality prediction method and a water quality prediction device of Bi-directional GRU-CNN based on an attention mechanism based on a time sequence model, which are used for predicting a time sequence of 6 steps in the future, realizing automatic acquisition and prediction of water quality dissolved oxygen and water temperature, overcoming or at least partially solving the problems in the prior art, making early discovery and early warning on culture water quality change, and making up the defects of large consumption of manpower and financial resources, high equipment cost and large time lag of a manual monitoring method, thereby improving the efficiency of aquaculture.
Disclosure of Invention
The invention aims to provide a water quality prediction method and a water quality prediction device.
A water quality prediction method is characterized by comprising the following steps:
step S1: monitoring data of historical water temperature and dissolved oxygen are collected by a plurality of sensors in a culture scene and are preprocessed;
step S2: fusing the data preprocessed in the step S1 to obtain a water quality time sequence;
step S3: introducing an attention mechanism, and establishing a Bi-directional GRU-CNN model based on the attention mechanism;
step S4: recombining the fused water quality time series in the step S2 into a prediction training sample, inputting the prediction training sample into the Bi-directional GRU-CNN model based on the attention mechanism established in the step S3 for training to obtain a trained water quality prediction model;
step S5: and collecting real-time data to predict water quality.
The step S1 specifically includes the following sub-steps:
step S11: identifying and deleting data which represent the maximum abnormal value and the non-numerical type of the monitoring abnormality in the monitoring data of the historical water temperature and the dissolved oxygen;
step S12: completing the loss value generated by monitoring and the loss value generated after deleting the abnormal value by a linear interpolation method or a cubic spline interpolation method;
step S13: the monitoring data of the historical water temperature and the dissolved oxygen processed in the steps S11 and S12 are normalized.
The normalization processing formula in step S13 is as follows:
Figure BDA0003428015940000021
wherein x isiFor the ith input data, xminIs the minimum value, x, in the input datamaxIs the maximum value in the input data, n is the total number of data, f (x)i) Is normalized data.
The specific steps of fusing the preprocessed data in step S2 are as follows:
step T1: averagely dividing data returned by N sensors of the same type at the same time into two groups, wherein each group comprises N/2 data;
step T2:the two groups of data divided by the step T1 are respectively T1iAnd T2iCalculating T1iAnd T2iThe arithmetic mean of (d) is:
Figure BDA0003428015940000022
Figure BDA0003428015940000023
step T3: calculating the standard deviation sigma1And σ2Comprises the following steps:
Figure BDA0003428015940000031
Figure BDA0003428015940000032
step T4: data fusion is accomplished using the following formula:
Figure BDA0003428015940000033
the process for establishing the Bi-directional GRU-CNN model based on the attention mechanism is as follows:
step A1: water temperature T introduced+And dissolved oxygen content D+Predictive training sample [ T ]+,D+]Attention mechanism Attention is introduced:
Figure BDA0003428015940000034
wherein Q is n × dkRepresents a query vector corresponding to each element, Q ═ Q1,q2,…,qn]TEncoding the sequence Q into an nxd by attention mechanismvThe new sequence of (a); k andv represents Key-Value relationship, K ═ K1,k2,…,km]TDenotes a Key vector corresponding to each element, V ═ V1,v2,…,vm]TRepresenting a Value vector corresponding to each element; n denotes the number of queries, m denotes the number of sample points, dkAnd dvRepresenting a dimension;
step A2: performing an Attention operation in the same sequence, and searching for the relation among different positions in the sequence X, namely Attention (X, X, X);
step A3: training historical observation data by using a GRU structure, calculating a hidden state at the current moment, and controlling the information quantity transmitted from the previous hidden state to the current hidden state by updating a door; the hidden state calculation formula at the current moment is as follows:
Figure BDA0003428015940000035
the calculation formula for the update gate is as follows:
zt=σ(W2[ht-1,T+ t])
in the formula (I), the compound is shown in the specification,
Figure BDA0003428015940000036
is a candidate state, σ is a sigmoid function, W2Denotes combining 2 matrices, T+ tIs the input of the current time, ht-1Is the hidden state at the previous moment, htIs the hidden state at the current moment;
step A4: extracting general features by using extended convolution of CNN, adding layer jump connection of residual convolution, connecting a feature diagram layer jump of a lower layer to an upper layer, adding 1 x 1 convolution operation dimensionality reduction, enabling the number of feature diagrams to be the same when two layers are added, and obtaining a Bi-directional GRU-CNN model based on an attention mechanism; wherein the spreading convolution is
Figure BDA0003428015940000041
Wherein d is an expansion coefficient, k is the size of a convolution kernel, f is the size of a filter, s is stride step length, i is the number of filters, and G is the derivative of G.
A water quality prediction device is characterized by comprising a data processing module, a prediction model building module and a training module; the data processing module is used for preprocessing and fusing data acquired by the multiple sensors; the prediction model building module builds a Bi-directional GRU-CNN model based on an attention mechanism; and the training module trains the Bi-directional GRU-CNN model based on the attention mechanism according to the prediction training sample to obtain a trained water quality prediction model.
The invention has the beneficial effects that:
the method is based on the time series model and the historical water quality parameter series, predicts the time series of 6 steps in the future, establishes the Bi-directional GRU-CNN model based on the attention mechanism, and realizes automatic acquisition and prediction of water quality dissolved oxygen and water temperature by combining the bidirectional GRU based on the attention mechanism with the CNN network model, thereby improving the accuracy and efficiency of prediction and saving a large amount of manpower and material cost.
Drawings
FIG. 1 is a flow chart of a water quality prediction method of Bi-directional GRU-CNN based on an attention mechanism provided by the invention;
fig. 2 is a schematic structural diagram of a water quality prediction device provided by the present invention.
Detailed Description
The invention provides a water quality prediction method, a water quality prediction device, electronic equipment and a storage medium, and the invention is further explained by combining the attached drawings and specific embodiments.
Fig. 1 is a schematic flow diagram of a water quality prediction method of a Bi-directional GRU-CNN based on an attention mechanism according to an embodiment of the present invention, and as shown in fig. 1, the embodiment of the present invention provides a water quality prediction method of a Bi-directional GRU-CNN based on an attention mechanism, including:
step S1: monitoring data of historical water temperature and dissolved oxygen are collected by a plurality of sensors in a culture scene and are preprocessed;
step S2: fusing the data preprocessed in the step S1 to obtain a water quality time sequence;
step S3: introducing an attention mechanism, and establishing a Bi-directional GRU-CNN model based on the attention mechanism;
step S4: recombining the fused water quality time series in the step S2 into a prediction training sample, inputting the prediction training sample into the Bi-directional GRU-CNN model based on the attention mechanism established in the step S3 for training to obtain a trained water quality prediction model;
step S5: and collecting real-time data to predict water quality.
In the embodiment of the invention, a plurality of water temperature sensors and dissolved oxygen concentration sensors are respectively distributed to acquire the historical time sequence of the water quality parameters, wherein the acquisition time interval of the sensors is 30 min. For a certain environmental factor in the breeding environment, a plurality of sensors are used for carrying out data acquisition. For the same index, data acquired by a plurality of sensors have certain difference, and even under the condition that effective data cannot be acquired due to possible sensor faults, the condition of the growth environment of the aquatic product is reflected more objectively and accurately, and the data acquired by the plurality of sensors at a certain moment need to be fused. The data collected by the sensors can be fully utilized by the multi-sensor data fusion, and the influence of data redundancy or errors and other problems on the result is effectively reduced.
In this embodiment, the collected historical water temperature monitoring data and the collected historical dissolved oxygen monitoring data are preprocessed, and the preprocessing includes, but is not limited to, deleting an abnormal value, compensating for a missing value, and normalizing the data.
And identifying and deleting data of the maximum abnormal value and the non-numerical type which represent the monitoring abnormality in the historical observation data. Wherein the maximum outliers include outliers that are markers of abnormalities and monitored outliers that are significantly not of the same order of magnitude as other data of the same type.
And (4) completing the missing values generated by monitoring and the missing values generated after deleting the abnormal values by a linear interpolation method or a cubic spline interpolation method.
And carrying out normalization processing on the processed historical observation data. Wherein, the normalization processing formula is as follows:
Figure BDA0003428015940000051
wherein x isiFor the ith input data, xminIs the minimum value, x, in the input datamaxIs the maximum value in the input data, n is the total number of data, f (x)i) Is normalized data.
For a certain environmental factor in a culture scene, a plurality of sensors are used for carrying out data acquisition on the environmental factor at the same time, and the data acquired by the sensors at a certain moment are fused.
Taking the temperature sensors as an example to perform data fusion, data transmitted back by N air temperature sensors at the same time are averagely divided into two groups, each group is N/2 data, and the two groups of data are respectively T1iAnd T2iThen the arithmetic mean of each set of data is:
Figure BDA0003428015940000061
Figure BDA0003428015940000062
standard deviation sigma1And σ2Comprises the following steps:
Figure BDA0003428015940000063
Figure BDA0003428015940000064
and finally, completing data fusion by using the following formula:
Figure BDA0003428015940000065
similarly, the water quality dissolved oxygen D is fused by the method to obtain D+
Recombining the fused water quality time sequence data into a prediction training sample, namely combining each water quality parameter in series to obtain [ T ]+,D+]The method comprises the steps of predicting a training sample, establishing a water quality prediction model of the Bi-directional GRU-CNN based on the attention mechanism, inputting the prediction training sample into the prediction model of the Bi-directional GRU-CNN based on the attention mechanism, and training to obtain the water quality prediction model.
In the establishment of a Bi-directional GRU-CNN model based on an attention mechanism, the attention mechanism is introduced, a Transformer encoder is used for extracting information, the history of a time sequence is used as input, high-performance multilevel prediction and interpretable insight are combined, time relations on different scales are learned, and an interpretable self-attention layer is used for learning long-term dependence relations so as to solve the problem of gradient explosion of the bidirectional GRU and redundancy of water quality prediction. And masked self-attention is used, so that the network cannot acquire future values during training and information leakage cannot be caused. Meanwhile, using CNN as a decoder, using the extended convolution, in this way, the decoder can learn to focus on the most useful part of the time series history values before making a prediction, each layer of hidden layers is the same size as the input sequence, and the computation amount is reduced and the receptive field is sufficiently large. The structure is more suitable for the time sequence problem, and can solve the defects of low interpretability and low generalization capability of the existing water quality prediction method in the water quality prediction on different scales.
The historical time sequence after fusion, namely the water temperature T is transmitted into the system+And dissolved oxygen content D+Predictive training sample [ T ]+,D+]Attention mechanism Attention, defined as:
Figure BDA0003428015940000071
wherein Q is n × dkQ ═ Q1,q2,…,qn]T,K=[k1,k2,…,km]T,V=[v1,v2,…,vm]TEncoding the sequence Q into an nxd by attention mechanismvThe new sequence of (1).
The Attention mechanism used in this model is self-Attention, i.e. performing the Attention operation inside the same sequence, and finding the connection between different positions inside the sequence X, i.e. Attention (X, X).
Using GRU structure to train a large amount of historical observation data, taking water temperature as an example, T+ tIs the input of the current time, ht-1Is the hidden state at the previous moment, htIs the hidden state calculated at the current time.
When computing the hidden state at the current time, it first computes a candidate state
Figure BDA0003428015940000072
And how much information of the previous hidden state can be transmitted to the current hidden state is controlled by updating the gate, so that the GRU can remember long-term information. The calculation formula for the update gate is as follows:
zt=σ(W2[ht-1,T+ t])
calculating the hidden state at the current moment as follows:
Figure BDA0003428015940000073
the GRU structure can keep important information through various gates, and ensures that the GRU structure cannot be lost in long-term propagation.
In the prediction model, not only the time-series memory ability but also the feature expression ability need to be considered. The Convolutional Neural Network (CNN) has good feature expression capability, can automatically extract general features on different levels of time series data, and has more stable prediction effect. Sparse weight, parameter sharing and equal variation expression are three major characteristics of CNN, and the characteristics obviously reduce the complexity of a model and improve the calculation efficiency, so that the one-dimensional convolution deformation of the CNN structure is used as a decoder, and the method is more suitable for the time sequence prediction problem.
Using spread convolution:
Figure BDA0003428015940000074
where d is the expansion coefficient. The calculation method of the dissolved oxygen is the same as the method.
The more the extended convolution reaches the upper layer, the larger the convolution window is, so that the hidden layer of each layer can be as large as the input sequence, the calculated amount is reduced, and the receptive field is large enough.
In order to improve the accuracy, a jump layer connection of residual convolution is added, a feature diagram jump layer of a lower layer is directly connected to an upper layer, the number of each corresponding feature diagram is inconsistent, and in order to solve the problem, 1 multiplied by 1 convolution operation dimension reduction is added, so that the number of feature diagrams is consistent when two layers are added and summed.
And finally, the obtained Bi-directional GRU-CNN water quality prediction model based on the attention mechanism is used for realizing the prediction of the water quality.
FIG. 2 is a schematic structural diagram of a water quality prediction device according to the present invention; the device comprises a data processing module, a prediction model building module and a training module. The data processing module is used for preprocessing the acquired data and fusing the data acquired by the multiple sensors; the prediction model building module builds a Bi-directional GRU-CNN model based on an attention mechanism, a circular neural network model based on a space-time attention mechanism is built by combining a bidirectional GRU based on the attention mechanism and a CNN network model, and fish shoal behavior characteristics are combined with the circular neural network model; and the training module is used for training the network model according to the sample data set to obtain a trained water quality prediction model.
In the embodiment of the invention, the time sequence of 6 steps in the future is predicted based on the time sequence model and the historical water quality parameter sequence, a Bi-directional GRU-CNN model based on an attention mechanism is established, and the automatic acquisition and prediction of water quality dissolved oxygen and water temperature are realized by combining the bidirectional GRU based on the attention mechanism with the CNN network model. The Bi-directional GRU-CNN prediction method based on the attention mechanism provided by the embodiment of the invention is suitable for water quality prediction based on various aquaculture environments.
According to the Bi-directional GRU-CNN water quality prediction method based on the attention mechanism, provided by the embodiment of the invention, the water quality prediction is realized by combining the bidirectional GRU based on the attention mechanism with the CNN network model, the water quality change can be rapidly and conveniently predicted, the accuracy and efficiency of the prediction are improved, and a large amount of manpower and material cost is saved.
The present invention is not limited to the above embodiments, and any changes or substitutions that can be easily made by those skilled in the art within the technical scope of the present invention are also within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A water quality prediction method is characterized by comprising the following steps:
step S1: monitoring data of historical water temperature and dissolved oxygen are collected by a plurality of sensors in a culture scene and are preprocessed;
step S2: fusing the data preprocessed in the step S1 to obtain a water quality time sequence;
step S3: introducing an attention mechanism, and establishing a Bi-directional GRU-CNN model based on the attention mechanism;
step S4: recombining the fused water quality time series in the step S2 into a prediction training sample, inputting the prediction training sample into the Bi-directional GRU-CNN model based on the attention mechanism established in the step S3 for training to obtain a trained water quality prediction model;
step S5: and collecting real-time data to predict water quality.
2. The water quality prediction method according to claim 1, wherein the step S1 specifically includes the following substeps:
step S11: identifying and deleting data which represent the maximum abnormal value and the non-numerical type of the monitoring abnormality in the monitoring data of the historical water temperature and the dissolved oxygen;
step S12: completing the loss value generated by monitoring and the loss value generated after deleting the abnormal value by a linear interpolation method or a cubic spline interpolation method;
step S13: the monitoring data of the historical water temperature and the dissolved oxygen processed in the steps S11 and S12 are normalized.
3. The water quality prediction method according to claim 2, wherein the normalization processing formula in step S13 is as follows:
Figure FDA0003428015930000011
wherein x isiFor the ith input data, xminIs the minimum value, x, in the input datamaxIs the maximum value in the input data, n is the total number of data, f (x)i) Is normalized data.
4. The water quality prediction method according to claim 1, wherein the specific step of fusing the preprocessed data in step S2 is as follows:
step T1: averagely dividing data returned by N sensors of the same type at the same time into two groups, wherein each group comprises N/2 data;
step T2: the two groups of data divided by the step T1 are respectively T1iAnd T2iCalculating T1iAnd T2iThe arithmetic mean of (d) is:
Figure FDA0003428015930000021
Figure FDA0003428015930000022
step T3: calculating the standard deviation sigma1And σ2Comprises the following steps:
Figure FDA0003428015930000023
Figure FDA0003428015930000024
step T4: data fusion is accomplished using the following formula:
Figure FDA0003428015930000025
5. the water quality prediction method according to claim 1, wherein the Bi-directional GRU-CNN model based on the attention mechanism is established as follows:
step A1: water temperature T introduced+And dissolved oxygen content D+Predictive training sample [ T ]+,D+]Attention mechanism Attention is introduced:
Figure FDA0003428015930000031
wherein Q is n × dkRepresents a query vector corresponding to each element, Q ═ Q1,q2,…,qn]TEncoding the sequence Q into an nxd by attention mechanismvThe new sequence of (a); k and V represent the Key-Value relationship, K ═ K1,k2,…,km]TDenotes a Key vector corresponding to each element, V ═ V1,v2,…,vm]TRepresenting a Value vector corresponding to each element; n denotes the number of queries, m denotes the number of sample points, dkAnd dvRepresenting a dimension;
step A2: performing an Attention operation in the same sequence, and searching for the relation among different positions in the sequence X, namely Attention (X, X, X);
step A3: training historical observation data by using a GRU structure, calculating a hidden state at the current moment, and controlling the information quantity transmitted from the previous hidden state to the current hidden state by updating a door; the hidden state calculation formula at the current moment is as follows:
Figure FDA0003428015930000032
the calculation formula for the update gate is as follows:
zt=σ(W2[ht-1,T+ t])
in the formula (I), the compound is shown in the specification,
Figure FDA0003428015930000033
is a candidate state, σ is a sigmoid function, W2Denotes combining 2 matrices, T+ tIs the input of the current time, ht-1Is the hidden state at the previous moment, htIs the hidden state at the current moment;
step A4: extracting general features by using extended convolution of CNN, adding layer jump connection of residual convolution, connecting a feature diagram layer jump of a lower layer to an upper layer, adding 1 x 1 convolution operation dimensionality reduction, enabling the number of feature diagrams to be the same when two layers are added, and obtaining a Bi-directional GRU-CNN model based on an attention mechanism; wherein the spreading convolution is
Figure FDA0003428015930000034
Wherein d is an expansion coefficient, k is the size of a convolution kernel, f is the size of a filter, s is stride step length, i is the number of filters, and G is the derivative of G.
6. A water quality prediction device is characterized by comprising a data processing module, a prediction model building module and a training module; the data processing module is used for preprocessing and fusing data acquired by the multiple sensors; the prediction model building module builds a Bi-directional GRU-CNN model based on an attention mechanism; and the training module trains the Bi-directional GRU-CNN model based on the attention mechanism according to the prediction training sample to obtain a trained water quality prediction model.
CN202111587243.6A 2021-12-23 2021-12-23 Water quality prediction method and device Active CN114169638B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111587243.6A CN114169638B (en) 2021-12-23 2021-12-23 Water quality prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111587243.6A CN114169638B (en) 2021-12-23 2021-12-23 Water quality prediction method and device

Publications (2)

Publication Number Publication Date
CN114169638A true CN114169638A (en) 2022-03-11
CN114169638B CN114169638B (en) 2024-09-17

Family

ID=80487994

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111587243.6A Active CN114169638B (en) 2021-12-23 2021-12-23 Water quality prediction method and device

Country Status (1)

Country Link
CN (1) CN114169638B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114662788A (en) * 2022-04-19 2022-06-24 广东海洋大学 Seawater quality three-dimensional time-space sequence multi-parameter accurate prediction method and system
CN114881303A (en) * 2022-04-21 2022-08-09 海南大学 Water quality long-term prediction method based on double-attention machine system
CN115014445A (en) * 2022-08-10 2022-09-06 中国农业大学 Smart fishery multi-dimensional panoramic perception monitoring method, system and device
CN115834310A (en) * 2023-02-15 2023-03-21 四川轻化工大学 Communication signal modulation identification method based on LGTransformer
CN116166966A (en) * 2023-04-18 2023-05-26 南京哈卢信息科技有限公司 Water quality degradation event detection method based on multi-mode data fusion
CN116307266A (en) * 2023-05-15 2023-06-23 山东建筑大学 Crop growth prediction method, device, electronic equipment and storage medium
CN117787511A (en) * 2024-02-28 2024-03-29 福州工小四物联科技有限公司 Industrial high-density aquaculture monitoring and early warning method and system thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110334845A (en) * 2019-04-30 2019-10-15 江南大学 One kind being based on GRU dissolved oxygen long-time prediction technique
CN111080464A (en) * 2019-11-27 2020-04-28 中国农业大学 Pond culture water quality key factor prediction method and device
CN112529296A (en) * 2020-12-11 2021-03-19 联通(浙江)产业互联网有限公司 Water quality prediction method, device and server
CN113361115A (en) * 2021-06-11 2021-09-07 仲恺农业工程学院 Method for predicting dissolved oxygen change of industrial aquaculture water of tilapia

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110334845A (en) * 2019-04-30 2019-10-15 江南大学 One kind being based on GRU dissolved oxygen long-time prediction technique
CN111080464A (en) * 2019-11-27 2020-04-28 中国农业大学 Pond culture water quality key factor prediction method and device
CN112529296A (en) * 2020-12-11 2021-03-19 联通(浙江)产业互联网有限公司 Water quality prediction method, device and server
CN113361115A (en) * 2021-06-11 2021-09-07 仲恺农业工程学院 Method for predicting dissolved oxygen change of industrial aquaculture water of tilapia

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114662788A (en) * 2022-04-19 2022-06-24 广东海洋大学 Seawater quality three-dimensional time-space sequence multi-parameter accurate prediction method and system
WO2023202474A1 (en) * 2022-04-19 2023-10-26 广东海洋大学 Method and system for accurately forecasting three-dimensional spatiotemporal sequence multiple parameters of seawater quality
CN114881303A (en) * 2022-04-21 2022-08-09 海南大学 Water quality long-term prediction method based on double-attention machine system
CN114881303B (en) * 2022-04-21 2024-06-04 海南大学 Water quality long-term prediction method based on double-attention mechanism
US11758887B1 (en) 2022-08-10 2023-09-19 China Agricultural University Method, system and apparatus for intelligently monitoring aquafarm with multi-dimensional panoramic perception
CN115014445B (en) * 2022-08-10 2022-11-15 中国农业大学 Smart fishery multi-dimensional panoramic perception monitoring method, system and device
CN115014445A (en) * 2022-08-10 2022-09-06 中国农业大学 Smart fishery multi-dimensional panoramic perception monitoring method, system and device
CN115834310B (en) * 2023-02-15 2023-05-09 四川轻化工大学 LGTransformer-based communication signal modulation identification method
CN115834310A (en) * 2023-02-15 2023-03-21 四川轻化工大学 Communication signal modulation identification method based on LGTransformer
CN116166966A (en) * 2023-04-18 2023-05-26 南京哈卢信息科技有限公司 Water quality degradation event detection method based on multi-mode data fusion
CN116166966B (en) * 2023-04-18 2023-07-21 南京哈卢信息科技有限公司 Water quality degradation event detection method based on multi-mode data fusion
CN116307266A (en) * 2023-05-15 2023-06-23 山东建筑大学 Crop growth prediction method, device, electronic equipment and storage medium
CN117787511A (en) * 2024-02-28 2024-03-29 福州工小四物联科技有限公司 Industrial high-density aquaculture monitoring and early warning method and system thereof
CN117787511B (en) * 2024-02-28 2024-05-10 福州工小四物联科技有限公司 Industrial high-density aquaculture monitoring and early warning method and system thereof

Also Published As

Publication number Publication date
CN114169638B (en) 2024-09-17

Similar Documents

Publication Publication Date Title
CN114169638B (en) Water quality prediction method and device
CN102183621B (en) Aquaculture dissolved oxygen concentration online forecasting method and system
CN113723010B (en) Bridge damage early warning method based on LSTM temperature-displacement correlation model
CN111460728B (en) Method and device for predicting residual life of industrial equipment, storage medium and equipment
CN114282443B (en) Residual service life prediction method based on MLP-LSTM supervised joint model
CN112881601B (en) Moisture detecting system based on cloud platform
CN116957838A (en) Crop growth environment monitoring method based on knowledge graph representation learning
CN110045771B (en) Intelligent monitoring system for water quality of fishpond
CN115561416A (en) Method and device for detecting inlet water quality of sewage treatment plant in real time
CN111693667A (en) Water quality detection system and method based on gated recursive array
CN116884523B (en) Multi-parameter prediction method for water quality of marine pasture
CN115271186B (en) Reservoir water level prediction and early warning method based on delay factor and PSO RNN Attention model
CN114399073A (en) Ocean surface temperature field prediction method based on deep learning
CN111222798A (en) Soft measurement method for key indexes of complex industrial process
CN101995891B (en) Online analysis method for moisture of solid mother material recovery system in aromatic acid production
CN108710964A (en) A kind of prediction technique of Fuzzy time sequence aquaculture water quality environmental data
CN113988210A (en) Method and device for restoring distorted data of structure monitoring sensor network and storage medium
CN115759409A (en) Water gate deformation prediction method for optimizing LSTM (least Square TM) model by multi-time mode attention mechanism
CN114417740B (en) Deep sea breeding situation sensing method
CN110119165B (en) Aquaculture pond dissolved oxygen detection device
CN110222825B (en) Cement product specific surface area prediction method and system
CN118312792A (en) Artificial intelligent detection method and system for ocean buoy data quality
CN116579873A (en) Method and system for evaluating crop disaster yield reduction condition based on high-temperature drought weather
CN116244596A (en) Industrial time sequence data anomaly detection method based on TCN and attention mechanism
CN110009132A (en) A kind of short-term electric load fining prediction technique based on LSTM deep neural network

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