Skip to main content
Log in

Water quality prediction of artificial intelligence model: a case of Huaihe River Basin, China

  • Research Article
  • Published:
Environmental Science and Pollution Research Aims and scope Submit manuscript

Abstract

Accurate prediction of water quality contributes to the intelligent management of water resources. Water quality indices have time series characteristics and nonlinearity, but the existing models only focus on the forward time series when long short-term memory (LSTM) is introduced and do not consider the parallel computation on the model. Owing to this, a new neural network called LSTM-multihead attention (LMA) was constructed to predict water quality, using long short-term memory to process time series data and multihead attention for parallel computing and extracting feature information. Additionally, water quality indices have the issues of multiple data types and complex data correlations, as well as missing data and abnormal data problems in water quality data. In order to solve these problems, this study proposes a water quality prediction model called GRA-LMA-based linear interpolation, gray relational analysis and LMA. Two experiments are carried out to verify the predictive performance of the GRA-LMA with the water quality data of the Huaihe River Basin as a case study sample. The first experiment focuses on data processing, including the processing of missing data and abnormal data of water quality data, and the correlation analysis of water quality indices. Linear interpolation is adapted to process the missing data, while a combination of boxplot and histogram is adopted to analyze and eliminate the abnormal data, which is then repaired the abnormal data with linear interpolation. The gray relational analysis is adopted to calculate the correlation between different water quality indices, and water quality indices with high correlation are retained to determine the input variables of the water quality prediction model. The data processing results demonstrate that repairs can be made using linear interpolation without altering the pattern of data change and the model by using the gray relational analysis to reduce the quantity of data it needs as input. In the second experiment, the predictive capacity of GRA-LMA and existing models such as backpropagation neural network (BP), recurrent neural network (RNN), long short-term memory (LSTM), and gate recurrent unit (GRU) was evaluated and compared using different numerical and graphical performance evaluation metrics. Comparative experimental results show that the mean square error of pH, dissolved oxygen, chemical oxygen demand, ammonia nitrogen, electrical conductivity, turbidity, total phosphorus, and total nitrogen of GRA-LMA is reduced to 0.05890, 0.40196, 0.32454, 0.04368, 14.71003, 8.13252, 0.01558, and 0.14345. The results indicate that GRA-LMA has superior adaptability for predicting various water quality indices and can significantly lower the induced prediction error.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18
Fig. 19
Fig. 20

Similar content being viewed by others

Data availability

The datasets used and/or analyzed during the current study are available from the corresponding author on reasonable request.

References

Download references

Acknowledgements

The authors thank the reviewers and the editor for their constructive comments.

Funding

This research was funded by the National Natural Science Foundation of China (51874010) and the Natural Science Research Project of the Anhui Provincial Department of Education University (KJ2018A0087).

Author information

Authors and Affiliations

Authors

Contributions

JC and HL designed the study; MF, YC, and KZ conducted the research; YC and KZ analyzed the data; JC and HL wrote the manuscript. All authors reviewed the manuscript.

Corresponding author

Correspondence to Haiyang Li.

Ethics declarations

Ethics approval and consent to participate

Not applicable.

Consent for publication

All authors agree to publish.

Competing interests

The authors declare no competing interests.

Additional information

Responsible Editor: Marcus Schulz

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

ESM 1

(DOCX 6913 kb)

ESM 2

(DOCX 1586 kb)

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chen, J., Li, H., Felix, M. et al. Water quality prediction of artificial intelligence model: a case of Huaihe River Basin, China. Environ Sci Pollut Res 31, 14610–14640 (2024). https://doi.org/10.1007/s11356-024-32061-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11356-024-32061-2

Keywords

Navigation