A river water quality prediction method based on comprehensive water quality identification index and ARIMA-LSTM model
Patent Information
- Application Number
- CN202611018680.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-09
- Publication Date
- 2026-10-20
AI Technical Summary
[0005]本发明目的是提供一种基于综合水质标识指数与ARIMA-LSTM模型的河流水质预测方法,以克服现有水质预测方法的局限性
[0046]1. 本发明以总磷(TP)、总氮(TN)、氨氮(NH3-N)、高锰酸盐指数(CODMn)为指标,计算综合水质标识指数,基于综合水质标识指数计算结果,构建ARIMA-LSTM组合水质预测模型,对水质进行预测,相较于传统的水质预测方法(对各项水质指标分别进行预测),可有效降低水质预测模型构建的复杂性。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of environmental monitoring technology, specifically to a method for predicting river water quality. Background Technology
[0002] Water quality assessment is a crucial aspect of water environment management and pollution prevention. The main methods for river water quality assessment include single-factor water quality assessment methods, pollution index methods, and comprehensive water quality indicator index methods. The comprehensive water quality indicator index method can provide both qualitative and quantitative assessments of water quality, and its simple calculation process has led to its widespread application in water quality assessments for various water bodies.
[0003] Currently, most water quality assessment methods are based on historical monitoring data, evaluating past and current water quality conditions, but lack the ability to predict future water quality trends. In water resource management and pollution prevention decision-making, it is necessary to formulate prevention and control strategies and establish early warning mechanisms based on future water quality evolution trends. Relying solely on current water quality assessment results makes it difficult to accurately predict future water quality trends, thus hindering the implementation of targeted preventative measures in water environment management. Therefore, it is necessary to construct water quality prediction models to forecast water quality trends over a future period.
[0004] Traditional water quality prediction methods often rely on modeling various water quality indicators separately based on water quality monitoring data. However, the differences in numerical range and variability among these parameters increase modeling complexity and accumulate prediction errors, affecting the stability and accuracy of water quality prediction results. Summary of the Invention
[0005] The purpose of this invention is to provide a river water quality prediction method based on the Integrated Water Quality Identifier Index (IQI) and the ARIMA-LSTM model, overcoming the limitations of existing water quality prediction methods. This invention uses the IQI method to evaluate water quality and constructs an ARIMA-LSTM combined prediction model to accurately predict river water quality over a future period. By predicting water quality change trends, it provides decision-making references and technical support for river water resource management and water environment protection.
[0006] The technical solution adopted in this invention is as follows:
[0007] A method for predicting river water quality based on a comprehensive water quality indicator index and an ARIMA-LSTM model, comprising the following steps:
[0008] 1) Collect water quality data for the study area;
[0009] 2) The comprehensive water quality labeling index (P) method is used to calculate the comprehensive water quality labeling index of water quality indicators. i );
[0010] 3) Construct an ARIMA-LSTM prediction model to analyze the comprehensive water quality indicator (P) from step 2). i To make predictions;
[0011] 4) Evaluate the model prediction error in step 3).
[0012] As a further limitation of the present invention, in step 1), total phosphorus (TP), total nitrogen (TN), ammonia nitrogen (NH3-N), and permanganate index (COD) of the study area are collected. Mn ) Monitoring data for 4 water quality indicators.
[0013] As a further limitation of the present invention, in step 2), total phosphorus (TP), total nitrogen (TN), ammonia nitrogen (NH3-N), and permanganate index (COD) are calculated. Mn The comprehensive water quality labeling index is based on the following indicators:
[0014] The Comprehensive Water Quality Label Index (CQI) includes information such as the comprehensive water quality category, the quantitative degree of pollution, and the overall water quality compliance status. It consists of integer digits and three or four significant decimal places, and its structure is P. i = X1.X2X3X4, where X1 represents the integer part of the comprehensive water quality index; X2 represents the position of the comprehensive water quality within the X1 water quality change range, rounded to one significant figure; X3 represents the number of water quality indicators among the indicators participating in the comprehensive water quality evaluation that are worse than the target of the water environment functional zone; X4 represents the comparison result between the comprehensive water quality category and the water environment functional zone category.
[0015] X 1. X2 is calculated using formula (1).
[0016] (1)
[0017] In the formula: m is the number of indicators participating in the comprehensive water quality evaluation; P1, P2, ..., P m These are the single-factor water quality labeling indices corresponding to the 1st, 2nd, ..., mth evaluation indicators, respectively. .
[0018] X3 represents the number of water quality indicators among those evaluated that are worse than the water environment functional zone category. It is determined by comparing monitoring data with the functional zone category. X3=0 indicates that all water quality indicators among those evaluated meet the water environment functional zone target; X3=1 indicates that one indicator among those evaluated fails to meet the functional zone target; X3=2 indicates that two indicators among those evaluated fail to meet the functional zone target, and so on.
[0019] X4 is calculated using formula (2).
[0020] (2)
[0021] In the formula: For the integer digits of the comprehensive water quality labeling index, This refers to the category of water environment functional zones.
[0022] As a further limitation of the present invention, step 3) specifically includes the following steps:
[0023] 3.1) Constructing an ARIMA model for P i Predicting sequences;
[0024] 3.2) Construct an LSTM model to predict the residuals of the ARIMA model;
[0025] 3.3) Add the outputs of the ARIMA and LSTM models together to obtain the predicted value of the ARIMA-LSTM combined model.
[0026] As a further limitation of the present invention, step 3.1) specifically includes the following steps:
[0027] 3.1.1) Data stationarity test: The water quality data is tested for stationarity using the Augmented Dickey-Fuller Test (ADF). Non-stationary sequences are differencing until the sequence becomes stationary. The difference order is d.
[0028] 3.1.2) Model Order Determination: The range of values for p and q in ARIMA(p,d,q) is initially determined using the autocorrelation function (ACF) and partial autocorrelation function (PACF). Then, by combining the Bayesian Information Criterion (BIC) and iterating through the combinations of p and q parameters, the p and q values corresponding to the minimum BIC values are taken as the optimal model parameters for ARIMA(p,d,q).
[0029] 3.1.3) Model Validation: The constructed ARIMA model undergoes a white noise test, specifically checking whether the model residual sequence is a white noise sequence. If the model residuals are white noise, the model passes the test. White noise testing methods include residual normality testing and the Ljung-Box (LB) test. The residual normality test determines the normality of the data by plotting a quantile plot (QQ plot). If the expected value points in the plot roughly fall on a straight line, the model is considered to have passed the residual test. The LB test calculates Q... p The autocorrelation statistic is used to test the autocorrelation of the residual series within the h-th lag range. The formula is:
[0030] (3)
[0031] In the formula: Q p Q is a statistic; n is the number of samples in the residual sequence; h is the lag order of the residual sequence; if Q p < If the model residuals are considered to be a white noise sequence, then the model passes the test; if Q p > If the model residuals are not white noise, the model test is considered to have failed.
[0032] As a further limitation of the present invention, step 3.2) specifically includes the following steps:
[0033] 3.2.1) ARIMA model residual calculation: based on P i The ARIMA prediction results for the sequence are used to calculate the ARIMA model residuals using the following formula:
[0034] (4)
[0035] In the formula: The measured value of the dependent variable at time t; The ARIMA output value at time t; Let t be the ARIMA residual at time t.
[0036] 3.2.2) LSTM Model Parameter Calibration: The main parameters of the LSTM model include the number of neurons in the hidden layer (Units), the amount of data processed per batch (BatchSize), and the total number of iterations (Epochs). Units determine the model's ability to express the features of time-series data. Too few Units will prevent the model from fully learning the changing features of time-series data, while too many Units will lead to excessive model complexity and increase training time. BatchSize represents the number of samples used for each parameter update. Decreasing the BatchSize can improve the model's ability to learn time-series data, but it will reduce learning efficiency. Increasing the BatchSize can improve the model's training efficiency, but it will reduce the model's learning ability. Epochs represent the number of times all training samples are fully trained in the model. As the number of training iterations increases, the model learns the features of time-series data more fully, but excessively large Epochs can lead to overfitting. Therefore, during parameter calibration, the model is trained multiple times by combining different Units, BatchSize, and Epochs parameters, and the prediction error of the model on the validation set is evaluated using MAE and NSE as evaluation metrics. The parameter combination with the smallest error is selected as the optimal model parameters.
[0037] As a further limitation of the present invention, step 3.3) specifically includes the following steps: fitting the ARIMA model residuals using an LSTM model, and outputting the model's predicted value for the residual sequence, as shown in the formula:
[0038] (5)
[0039] In the formula: The ARIMA output value at time t; Let t be the predicted value of the residual by the LSTM model at time t; This represents the output value of the ARIMA-LSTM combined model at time t.
[0040] As a further limitation of the present invention, step 4) specifically includes the following steps:
[0041] The Nash-Sutcliffe Efficiency Coefficient (NSE) and Mean Absolute Error (MAE) are selected as error evaluation indicators to assess the model's prediction results. NSE evaluates the model's goodness of fit, with a value ranging from negative infinity to 1; the closer to 1, the better the fit. MAE evaluates the average absolute error between predicted and actual values; the smaller the value, the better the model's prediction performance. The formulas for calculating NSE and MAE are:
[0042] (6)
[0043] (7)
[0044] In the formula: The measured value at time t; This is the average value of the measured value sequence; This is the predicted value at time t.
[0045] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0046] 1. This invention uses total phosphorus (TP), total nitrogen (TN), ammonia nitrogen (NH3-N), and permanganate index (COD) as the main components. Mn Using the comprehensive water quality indicator as the index, a comprehensive water quality labeling index is calculated. Based on the calculation results of the comprehensive water quality labeling index, an ARIMA-LSTM combined water quality prediction model is constructed to predict water quality. Compared with traditional water quality prediction methods (which predict each water quality indicator separately), this method can effectively reduce the complexity of water quality prediction model construction.
[0047] 2. The ARIMA-LSTM combined model constructed in this invention combines the analytical capabilities of the ARIMA model for linear changes in water quality data over time series with the advantages of the LSTM model for processing nonlinear changes in water quality data, enabling high-precision prediction of the comprehensive water quality index time series. Attached Figure Description
[0048] Figure 1 This is a flowchart of the method of the present invention;
[0049] Figure 2 The result is the calculation result of the comprehensive water quality labeling index;
[0050] Figure 3 Section P of Jiangdu West Gate i Sequence training set ACF and PACF graphs;
[0051] Figure 4 Heatmap of BIC values for the ARIMA model;
[0052] Figure 5 A residual QQ plot for the ARIMA model;
[0053] Figure 6 For P i Test set prediction results of the time series ARIMA-LSTM combined model. Detailed Implementation
[0054] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0055] like Figure 1 The method for predicting river water quality based on the integrated water quality index and the ARIMA-LSTM model is shown below. The specific steps are as follows:
[0056] 1) Collect water quality monitoring data for the study area.
[0057] This invention selects the Jiangdu West Sluice section (32°24'38" N, 119°33'38" E) of the Xintongyang Canal in Yangzhou City as the study area. This section is located at the source of the first phase of the eastern route project. The water quality at this section not only reflects the water quality of the upstream inflow but also has a significant impact on the water quality during subsequent water transfer, thus holding an important position in the regional water quality monitoring system. Total phosphorus (TP), total nitrogen (TN), ammonia nitrogen (NH3-N), and permanganate index (COD) were collected at a 4-hour step from 00:00 on January 1, 2023 to 20:00 on December 31, 2025 in the study area. Mn ) Monitoring data for 4 water quality indicators.
[0058] 2) The comprehensive water quality labeling index method is used to calculate the comprehensive water quality labeling index of water quality indicators.
[0059] Comprehensive Water Quality Labelling Index (P) i It consists of an integer part and three or four significant digits after the decimal point, and its structure is P. i = X1.X2X3X4,
[0060] In the formula, X1 represents the integer part of the comprehensive water quality index;
[0061] X2 represents the position of the overall water quality within the X1 water quality variation range, rounded to one significant figure.
[0062] X3 represents the number of water quality indicators that are worse than the targets of the water environment functional zones among the indicators participating in the comprehensive water quality assessment.
[0063] X4 represents the comparison results between the comprehensive water quality category and the water environment functional zone category;
[0064] X 1. X2 is obtained by formula (1):
[0065] (1)
[0066] In the formula: m is the number of indicators participating in the comprehensive water quality evaluation; P1, P2, ..., P m These are the single-factor water quality labeling indices corresponding to the 1st, 2nd, ..., mth evaluation indicators, respectively. ;
[0067] X4 is calculated using formula (2).
[0068] (2)
[0069] In the formula: Classification of water environment functional zones;
[0070] Based on the water quality monitoring results in step 1), the comprehensive water quality index method was used to calculate the total phosphorus (TP), total nitrogen (TN), ammonia nitrogen (NH3-N), and permanganate index (COD). Mn The comprehensive water quality labeling index (P) is an indicator of water quality. i () Figure 2 ).
[0071] 3) Construct an ARIMA-LSTM prediction model to analyze the comprehensive water quality indicator (P) from step 2). i To make predictions.
[0072] 3.1) Constructing an ARIMA model for P i Predicting sequences.
[0073] 3.1.1) Data stationarity test: Based on the 4-hour step comprehensive water quality indicator (P) data of the Jiangdu West Sluice section from 00:00 on January 1, 2023 to 20:00 on December 31, 2025. i Time series Figure 2 The first 80% of the sequence (January 1, 2023, 00:00 to May 26, 2025, 16:00, data points: 5261) was selected as the model training set, and the last 20% of the sequence (May 26, 2025, 20:00 to December 31, 2025, 20:00, data points: 1315) was selected as the model test set. The ADF method was used to evaluate the comprehensive water quality indicator index (P) of this monitoring section. i The stationarity of the time series training data (January 1, 2023, 00:00 to May 26, 2025, 16:00) is tested. If the series is stationary, the model order is directly determined; if the series is non-stationary, the series is differencing and the ADF method is used again for testing until the series is stationary. The difference order is denoted as d. The comprehensive water quality labeling index (P...) i The ADF test results of the time series training set are shown in Table 1.
[0074] Table 1 Jiangdu West Gate Section P i ADF test results of sequence training set
[0075] <![CDATA[P i Sequence 0 -7.1 0.0031 -2.8623
[0076] Note: When p < α (usually taken as 0.05), the null hypothesis is rejected.
[0077] As shown in Table 1, P i The p-value of the training set data is 0.0031, which is less than 0.05, and the t-statistic is -7.1, which is less than the critical value -2.8623. Therefore, the sequence is considered to be a stationary sequence, and d=0 is denoted as d=0.
[0078] 3.1.2) Model Order Determination: The range of values for p and q in ARIMA(p,d,q) is initially determined using the autocorrelation function (ACF) and partial autocorrelation function (PACF). Combining the Bayesian Information Criterion (BIC) to iterate through the combinations of p and q parameters, the p and q values corresponding to the minimum BIC values are taken as the optimal model parameters for ARIMA(p,d,q). This is based on the parameters of the Jiangdu West Gate section P... i Sequence training set ACF, PACF graphs ( Figure 3 It can be seen that P iThe ACF values of the training set sequences exhibit a tailing phenomenon after the 6th order. Figure 3 (a) After the 6th order, the PACF value exhibits a tailing phenomenon. Figure 3 (b) Initially, the p-values and q-values of the ARIMA model were selected as 1–6. Based on the BIC criterion, the p and q values within the range of 1–6 were iterated to generate a BIC heatmap. Figure 4 The p and q orders corresponding to the minimum BIC value are the optimal orders of the ARIMA model. For example... Figure 4 As shown, the BIC values are smallest at AR(5) and MA(6), i.e., p=5 and q=6. Therefore, the optimal ARIMA model is determined to be ARIMA(5,0,6).
[0079] 3.1.3) Model Validation: Perform a white noise test on the constructed ARIMA model, that is, test whether the model residual sequence is a white noise sequence. If the model residual is a white noise sequence, the model validation is passed.
[0080] The specific procedure is as follows: Perform a white noise test on the constructed ARIMA model, i.e., check whether the model residual sequence is a white noise sequence. If the model residuals are white noise, the model passes the test. White noise testing methods include residual normality test and Ljung-Box (LB) test. The residual normality test determines the normality of the data by plotting a quantile plot (QQ plot). If the expected value points in the plot roughly fall on a straight line, the model is considered to have passed the residual test. The LB test calculates Q... p The autocorrelation statistic is used to test the autocorrelation of the residual series within the h-th lag range. The formula is:
[0081] (3)
[0082] In the formula: Q p Q is a statistic; n is the number of samples in the residual sequence; h is the lag order of the residual sequence; if Q p < If the model residuals are considered to be a white noise sequence, then the model passes the test; if Q p > If the model residuals are not white noise, the model test is considered to have failed.
[0083] For example, the residual QQ plot of the ARIMA model ( Figure 5 As shown in the figure, the model residual data points are distributed around a straight line, indicating that the ARIMA model residual sequence passes the residual normality test.
[0084] For P i The residual sequences of the time series ARIMA model were subjected to the LB test, and the results are shown in Table 2.
[0085] Table 2. LB test results for the ARIMA (5,0,6) model
[0086] 1 0.0851 2.9639 3.8415 2 0.1124 4.3715 5.9915 3 0.0683 7.1150 7.8147 4 0.1190 7.3395 9.4877 5 0.1589 7.9515 11.0705
[0087] As shown in Table 2, under the condition of significance level α=0.05, the p-values obtained by the LB test of the model residual sequence are all greater than 0.05, and the Q statistic is all less than the critical value, indicating that the residual is a white noise sequence and the model passes the LB test.
[0088] 3.2) Construct an LSTM model to predict the residuals of the ARIMA model.
[0089] 3.2.1) ARIMA model residual calculation: based on P i Calculate the ARIMA model residuals from the sequence ARIMA prediction results.
[0090] ARIMA model residual calculation: based on P i The ARIMA prediction results for the sequence are used to calculate the ARIMA model residuals using the following formula:
[0091] (4)
[0092] In the formula: The measured value of the dependent variable at time t; The ARIMA output value at time t; Let ARIMA residual be at time t;
[0093] 3.2.2) LSTM Model Parameter Calibration: To ensure the rationality of model parameter (Units, BatchSize, Epochs) calibration and avoid overfitting during training, the water quality sequence was divided into training, validation, and test sets. The training set was used for model training; the validation set was used for comparing model performance with different combinations of model parameters (Units, BatchSize, Epochs), selecting optimal parameters, and identifying overfitting; the test set was used for verifying model prediction performance. Based on the P data of the Jiangdu West Sluice section during the research period (January 1, 2023, 00:00 to December 31, 2025, 20:00),... iThe residual calculation results of the time series ARIMA model were used. The first 70% of the sequence (January 1, 2023, 00:00 to February 6, 2025, 00:00, data points: 4603) was selected as the model training set, the first 70% to 80% of the sequence (February 6, 2025, 04:00 to May 26, 2025, 16:00, data points: 658) was selected as the model validation set, and the last 20% of the sequence (May 26, 2025, 20:00 to December 31, 2025, 20:00, data points: 1315) was selected as the model test set. The model was trained multiple times with different combinations of Units, BatchSize, and Epochs parameters. The results show that when Units=32, BatchSize=32, and Epochs=150, the model has the smallest prediction error on the validation set. Therefore, this parameter combination is the optimal model parameter.
[0094] 3.3) Add the outputs of the ARIMA and LSTM models to obtain the predicted value of the ARIMA-LSTM combined model. Figure 6 ).
[0095] The calculation formula is:
[0096] (5)
[0097] In the formula: The ARIMA output value at time t; Let t be the predicted value of the residual by the LSTM model at time t; The output value of the ARIMA-LSTM combined model at time t;
[0098] 4) Evaluate the model prediction error in step 3).
[0099] The Nash-Sutcliffe Efficiency Coefficient (NSE) and Mean Absolute Error (MAE) are selected as error evaluation indicators to evaluate the model's prediction results. The formulas for calculating NSE and MAE are as follows:
[0100] (6)
[0101] (7)
[0102] In the formula: The measured value at time t; This is the average value of the measured value sequence; This is the predicted value at time t.
[0103] Using NSE and MAE to analyze Pi The errors in the time series ARIMA-LSTM prediction results were evaluated. NSE was used to evaluate the model's fit, with values ranging from negative infinity to 1; the closer to 1, the better the fit. MAE was used to evaluate the average absolute error between the predicted and actual values; the smaller the value, the better the model's prediction performance. The NSE and MAE results are shown in Table 3. The NSE and MAE values were 0.9350 and 0.0788, respectively. Both indicators indicate that the constructed P... i The time series ARIMA-LSTM combined model can be used to analyze the P section of Jiangdu West Gate. i It enables highly accurate prediction of time-varying processes.
[0104] Table 3 P i Test set prediction error of the time series ARIMA-LSTM combined model
[0105] (May 26, 2025, 20:00 - December 31, 2025, 20:00)
[0106] Calculation results 0.9350 0.0788
[0107] This invention is not limited to the above embodiments. Based on the technical solutions disclosed in this invention, those skilled in the art can make some substitutions and modifications to some of the technical features without creative effort, and all such substitutions and modifications are within the protection scope of this invention.
Claims
1. A method for predicting river water quality based on a comprehensive water quality indicator index and an ARIMA-LSTM model, characterized in that, Includes the following steps: 1) Collect water quality data for the study area; 2) The comprehensive water quality labeling index P is calculated using the comprehensive water quality labeling index method. i ; Comprehensive Water Quality Labelling Index (P) i It consists of an integer part and three or four significant digits after the decimal point, and its structure is P. i =X1.X2X3X4, In the formula, X1 represents the integer part of the comprehensive water quality index; X2 represents the position of the overall water quality within the X1 water quality variation range, rounded to one significant figure. X3 represents the number of water quality indicators that are worse than the targets of the water environment functional zones among the indicators participating in the comprehensive water quality assessment. X4 represents the comparison results between the comprehensive water quality category and the water environment functional zone category; X 1. X2 is obtained by formula (1): (1) In the formula: m is the number of indicators participating in the comprehensive water quality evaluation; P1, P2, ..., P m These are the single-factor water quality labeling indices corresponding to the 1st, 2nd, ..., mth evaluation indicators, respectively. ; X4 is calculated using formula (2).
2. (2) In the formula: Classification of water environment functional zones; 3) Construct an ARIMA-LSTM prediction model to predict the comprehensive water quality indicator Pi from step 2); including: 3.1) Construct an ARIMA model to predict the Pi sequence; 3.2) Construct an LSTM model to predict the residuals of the ARIMA model; ARIMA model residual calculation: based on P i The ARIMA prediction results for the sequence are used to calculate the ARIMA model residuals using the following formula: (4) In the formula: The measured value of the dependent variable at time t; The ARIMA output value at time t; Let ARIMA residual be at time t; 3.3) Add the outputs of the ARIMA and LSTM models to obtain the predicted value of the ARIMA-LSTM combined model; the formula is: (5) In the formula: The ARIMA output value at time t; Let t be the predicted value of the residual by the LSTM model at time t; The output value of the ARIMA-LSTM combined model at time t; 4) Evaluate the model prediction error in step 3): The Nash-Sutcliffe Efficiency Coefficient (NSE) and Mean Absolute Error (MAE) are selected as error evaluation indicators to evaluate the model's prediction results. The formulas for calculating NSE and MAE are as follows: (6) (7) In the formula: The measured value at time t; This is the average value of the measured value sequence; This is the predicted value at time t.
3. The river water quality prediction method based on the integrated water quality indicator index and the ARIMA-LSTM model according to claim 1, characterized in that, Step 3.1) involves constructing the ARIMA model to predict the Pi sequence, which includes the following sub-steps: 3.1.1) Data stationarity test: The water quality data is tested for stationarity using the unit root test. Non-stationary series are differencing until the series is stationary. The difference order is d. 3.1.2) Model order determination: The range of values for p and q in ARIMA(p,d,q) is initially determined by the autocorrelation function and the partial autocorrelation function; combined with the Bayesian information criterion to traverse the combination of p and q parameters, the p and q values corresponding to the minimum BIC value are taken as the optimal model parameters of ARIMA(p,d,q); 3.1.3) Model Validation: The constructed ARIMA model undergoes a white noise test, i.e., it is tested to see if the model residual sequence is a white noise sequence. If the model residuals are a white noise sequence, the model passes the test. White noise testing methods include residual normality test and Ljung-Box (LB) test. The residual normality test determines the normality of the data by plotting a quantile plot (QQ plot). If the expected value points in the plot roughly fall on a straight line, the model is considered to have passed the residual test. The LB test calculates Q... p The autocorrelation statistic is used to test the autocorrelation of the residual series within the h-th lag range. The formula is: (3) In the formula: Q p Q is a statistic; n is the number of samples in the residual sequence; h is the lag order of the residual sequence; if Q p < If the model residuals are considered to be a white noise sequence, then the model passes the test; if Q p > If the model residuals are not white noise, the model test is considered to have failed.
4. The river water quality prediction method based on the integrated water quality indicator index and the ARIMA-LSTM model according to claim 1, characterized in that, In step 1), the collected water quality data for the study area includes monitoring data for four water quality indicators: total phosphorus, total nitrogen, ammonia nitrogen, and permanganate index.
5. The river water quality prediction method based on the integrated water quality indicator index and the ARIMA-LSTM model according to claim 1, characterized in that, Step 2) specifically includes: using the comprehensive water quality labeling index method to calculate the comprehensive water quality labeling index Pi, which uses total phosphorus, total nitrogen, ammonia nitrogen, and permanganate index as indicators.
6. The river water quality prediction method based on the integrated water quality indicator index and the ARIMA-LSTM model according to claim 1, characterized in that, Step 3) specifically includes: the water quality prediction model is a combined prediction model that combines the ARIMA time series model with the LSTM neural network model.
