A reservoir turbidity prediction method based on SVM-LSTM model

By preprocessing and extracting features of water quality, hydrodynamics and wind field data based on the SVM-LSTM model, and combining the fusion prediction of SVM and LSTM models, the problem of inaccurate prediction results in reservoir turbidity prediction was solved, and high-precision and fast turbidity prediction was achieved.

CN117313040BActive Publication Date: 2025-09-26TONGJI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311217107.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-20
Publication Date
2025-09-26
Estimated Expiration
2043-09-20

AI Technical Summary

Technical Problem

Existing technologies in turbidity prediction have problems such as low prediction accuracy and difficulty in evaluating multiple indicators. Especially in reservoir turbidity prediction, traditional data processing methods are difficult to solve the problem of multiple factors and complex nonlinear relationships between variables.

Method used

A method based on the SVM-LSTM model is adopted. By preprocessing and extracting features from the automatic monitoring data of water quality, hydrodynamics and wind field, combining the fusion prediction of SVM and LSTM models, and optimizing the model parameters using genetic algorithm and particle swarm algorithm, an SVM-LSTM fusion prediction model is constructed. The model is fused using the boosting method to achieve nonlinear relationship analysis and rapid prediction of turbidity.

Benefits of technology

The accuracy and speed of turbidity prediction are improved, and turbidity data for a longer period of time can be accurately predicted. This solves the problem of inaccurate prediction results in traditional methods and enables efficient analysis and prediction of reservoir turbidity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117313040B_ABST
    Figure CN117313040B_ABST
Patent Text Reader

Abstract

The present invention relates to a reservoir turbidity prediction method based on an SVM-LSTM model, comprising the following steps: acquiring automatic monitoring data of a reservoir; performing data preprocessing; performing feature extraction on the processed data to obtain water quality characteristics and hydrodynamic index characteristics, and constructing wind field characteristics; using an SVM model to obtain a first turbidity prediction result and a square loss according to the water quality characteristics, the hydrodynamic index characteristics, and the wind field characteristics, and using an LSTM model to obtain a second turbidity prediction result according to the water quality characteristics, the hydrodynamic index characteristics, and the square loss; and obtaining a turbidity prediction result of the SVM-LSTM fusion prediction model through weighted averaging. Compared with the prior art, the present invention has the advantages of improving data prediction accuracy, realizing analysis of the nonlinear relationship between water quality, hydrodynamics, wind field, and turbidity, improving data stability, realizing rapid prediction, and being able to accurately predict turbidity data for a long period of time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water quality data prediction, and in particular to a reservoir turbidity prediction method based on an SVM-LSTM model. Background Art

[0002] Water resources are not only an irreplaceable, fundamental natural resource but also a public and economic resource. To assess and improve water quality, a series of water quality standards and parameters are necessary. Turbidity is a key physical characteristic for measuring water quality, especially for drinking water source reservoirs. Excessive turbidity can lead to reduced water transmittance and increased siltation. Understanding reservoir turbidity variations is crucial for ensuring reservoir effluent quality and drinking water safety. Therefore, analyzing and predicting turbidity is crucial.

[0003] Parametric statistics and deterministic models have been the traditional methods for modeling turbidity, and much research has been conducted on turbidity prediction models. However, due to the large number of factors affecting turbidity and the complex nonlinear relationships between variables, traditional data processing methods are no longer sufficient to solve the problem.

[0004] Therefore, it is necessary to propose a method for predicting turbidity that can solve the problem of multiple influencing factors and nonlinear relationships between variables. Summary of the Invention

[0005] The purpose of the present invention is to provide a reservoir turbidity prediction method based on the SVM-LSTM model in order to overcome the defects of the above-mentioned prior art in terms of low prediction accuracy and difficulty in evaluating multiple indicators.

[0006] The purpose of the present invention can be achieved by the following technical solutions:

[0007] A reservoir turbidity prediction method based on an SVM-LSTM model comprises the following steps:

[0008] Step 1: Obtain automatic monitoring data of the reservoir including water quality, hydrodynamics and wind field;

[0009] Step 2: Preprocess the automatic monitoring data to obtain processed data;

[0010] Step 3: Extract features from the processed data to obtain water quality features and hydrodynamic index features, and construct wind field features;

[0011] Step 4: Input the water quality characteristics, hydrodynamic index characteristics, and wind field characteristics into the pre-trained SVM-LSTM fusion prediction model. The SVM-LSTM fusion prediction model includes an SVM model and an LSTM model. The SVM model obtains the first turbidity prediction result and the square loss based on the water quality characteristics, hydrodynamic index characteristics, and wind field characteristics. The LSTM model obtains the second turbidity prediction result based on the water quality characteristics, hydrodynamic index characteristics, and the square loss.

[0012] Step 5: Take the weighted average of the first turbidity prediction result and the second turbidity prediction result to obtain the turbidity prediction result of the SVM-LSTM fusion prediction model.

[0013] Furthermore, the specific steps of the training process of the pre-trained SVM-LSTM fusion prediction model in step 4 are:

[0014] Step 401: Input water quality, hydrodynamic index characteristics and wind field characteristics into the SVM model to obtain prediction results and square loss;

[0015] Step 402: The squared loss of the SVM model and the water quality and hydrodynamic characteristics are input into the LSTM model to obtain a prediction result;

[0016] Step 403: The SVM model and the LSTM model are used as base training models, and model fusion is performed according to the boosting model fusion method to obtain an SVM-LSTM fusion prediction model.

[0017] Furthermore, the SVM model in step 401 is an optimized SVM model, and the optimization method is specifically as follows:

[0018] Step 4011: Input feature T m Convert to integer T m ';

[0019] Step 4012: Use a genetic algorithm to optimize the parameter penalty coefficient and kernel parameter of the SVM algorithm. The specific method is as follows:

[0020] Construct the initial population of the genetic algorithm and set the crossover probability P c , mutation probability P n , population size n gc , stop the iteration condition δ, use binary coding to generate n b Individuals, the calculation expression is:

[0021]

[0022] L=C*J

[0023] Where o is the decimal form of any one-digit penalty coefficient, y is the encoding result with eight-bit data length, d is the domain threshold of o, q is the turbidity data influencing variable determined by the turbidity data characteristics, L is the total encoding length, C is the kernel parameter number, and J is the feature dimension;

[0024] The target fitness function is the SVM classification result accuracy, and the calculation expression is:

[0025]

[0026] Where f(y) is the individual fitness, n is the input feature length, pre i For the prediction result, if pre N =T N 'then1 means that when the prediction result is the same as the input feature, it is recorded as 1;

[0027] Use genetic algorithm for iterative optimization, and when f(y)≤δ, the iteration condition is reached and the parameter penalty coefficient and kernel parameter results are output;

[0028] Step 4013: Then, the result of rounding the input features and the optimized parameter penalty coefficient and kernel parameter are input into the SVM model to obtain the optimized SVM model.

[0029] Furthermore, the LSTM model in step 402 is an optimized LSTM model, and the optimization method is specifically as follows:

[0030] Step 4021: Input feature T i Converted to logarithmic return LT i ;

[0031] Step 4022: Use the particle swarm optimization algorithm to optimize the time step, learning rate, and number of hidden layer nodes of the LSTM algorithm. The specific method is as follows:

[0032] Construct a particle swarm algorithm, construct a dimension space D with time step, learning rate and number of hidden layer nodes, and randomly generate multiple particles, whose positions and velocities are expressed as s z and v z Indicates that the fitness function is the Nash efficiency coefficient NSE of the LSTM model prediction results, and the calculation expression is:

[0033]

[0034] Where x obs,z is the actual value, x model,z is the predicted value, is the mean of the actual value, np is the amount of data;

[0035] According to the global optimal Y of all particles zand the local optimal Y of individual particle a za Update the speed and position of each particle. The calculation expression is:

[0036] v za (t+1)=ωv za (t)+c1r1(Y za (t)-s za (t))+c2r2(Y z (t)-s za (t))

[0037] s za (t+1)=s za (t)+v za (t+1)

[0038] Where t is the number of iterations, ω is the inertia weight, c1 and c2 are learning factors, r1 and r2 are random perturbation factors, and v za is the velocity of particle a, s za is the position of particle a;

[0039] Use the particle swarm algorithm to iterate until the termination condition is reached, and output the time step, learning rate and number of hidden layer nodes at this time;

[0040] Step 4023: Input the logarithmic return rate, time step, learning rate and number of hidden layer nodes into the LSTM model to obtain the prediction result.

[0041] Furthermore, step 403 uses the SVM model and the LSTM model as base training models, performs model fusion according to the boosting model fusion method, and obtains an SVM-LSTM fusion prediction model. The specific steps are as follows:

[0042] Input feature T to train the base training model mi and get the prediction result PRE mi , calculate the squared loss SE mi , the calculation expression is:

[0043]

[0044] Calculate the weight ω of the base training model mi , the calculation expression is:

[0045]

[0046] Where, is the average of the squared losses;

[0047] SE mi Add the input data of mi+1 rounds to obtain the prediction results and weights of each base training model, and then obtain the prediction results of the fusion model after weighted average.

[0048] Furthermore, step 3 performs water quality and hydrodynamic index feature selection on the processed data, including the following steps:

[0049] Randomly sample all water quality and hydrodynamic characteristic data in the processed data to create a decision tree; calculate the regression prediction accuracy of data outside the sample bag For out-of-bag data feature X i Apply random perturbations and calculate the regression prediction accuracy after the i-th feature perturbation Calculate X i Importance of P i , the calculation expression is:

[0050]

[0051] Where, P i is the importance of the i-th feature, K is the number of training samples, and k is the current training sample number;

[0052] P i Sort in descending order to get the feature importance ranking Q i ; Then build the fuzzy system and establish the rule base; the sorted features Q i Input the fuzzy system to obtain the final fuzzy system score of each feature, and select features as subsequent model input based on the fuzzy system score.

[0053] Furthermore, the method used in step 3 to construct the wind field characteristics is the cumulative wind value algorithm, which is specifically as follows:

[0054] The wind field data of the accumulated period are recorded in reverse order to obtain the wind field data set. The wind direction influence intensity is calculated based on the wind field data set. The calculation expression is:

[0055]

[0056] In the formula, WDS r is the wind direction influence intensity, WD r is the wind direction, b is the wind direction deflection angle, and m is the wind direction influence factor;

[0057] Calculate the time weight at time r. The calculation expression is:

[0058] TS r =e α*(r-c)

[0059] Where, TS r is the time weight, c is the lag time (h), and α is the time weight factor;

[0060] Calculate the cumulative wind value after removing the lag time. The calculation expression is:

[0061]

[0062] Where WDI is the cumulative wind value, WS r is the wind speed and h is the accumulation period.

[0063] Furthermore, the method of preprocessing the data in step 2 includes the following steps:

[0064] Sort the data; deduplicate the data; fill in the data; clean the data; and standardize the data.

[0065] Furthermore, data cleaning includes the following steps:

[0066] The acquired data is classified and sorted according to the data type, and then the abnormal data features are mined, and then the data is cleaned and the abnormal data is reconstructed.

[0067] In a second aspect of the present invention, a reservoir turbidity prediction device based on an SVM-LSTM model includes a memory, a processor, and a program stored in the memory. When the processor executes the program, it implements any of the above reservoir turbidity prediction methods based on the SVM-LSTM model.

[0068] Compared with the prior art, the present invention has the following beneficial effects:

[0069] 1) The present invention preprocesses the automatic detection data of water quality, hydrodynamics and wind field, and performs feature extraction to improve data prediction accuracy. By fusing the SVM model and the LSTM model, the nonlinear relationship between water quality, hydrodynamics and wind field and turbidity is analyzed, the data stability is improved, and rapid prediction is achieved. At the same time, turbidity data can be accurately predicted for a long time.

[0070] 2) The present invention fuses the SVM and LSTM models through the boosting method, and constructs an SVM-LSTM prediction model with different weight combinations, which effectively integrates the advantages of the two models and further improves the calculation speed and prediction accuracy of the prediction model.

[0071] 3) The present invention proposes a cumulative wind value algorithm, which can more effectively construct features of wind field data. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 Flow chart of the method of the present invention.

[0073] Figure 2 This is the flow chart of the SVM-LSTM fusion prediction model of the present invention.

[0074] Figure 3 This is a table chart comparing the prediction accuracy of the SVM-LSTM fusion prediction model of the present invention, a single model, and different fusion methods.

[0075] Figure 4 This is a comparison chart of the predicted turbidity after 1 hour and the actual turbidity after 1 hour in the embodiment.

[0076] Figure 5 This is a list of long-term prediction accuracy of the SVM-LSTM fusion prediction model in the embodiment.

[0077] Figure 6 This is a comparison chart of the predicted turbidity after 24 hours and the actual turbidity after 24 hours in the embodiment. DETAILED DESCRIPTION

[0078] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0079] Example 1

[0080] like Figure 1 As shown, this embodiment provides a reservoir turbidity prediction method based on the SVM-LSTM model, comprising the following steps:

[0081] Step 1: Obtain automatic monitoring data of the reservoir including water quality, hydrodynamics and wind field;

[0082] Step 2: Preprocess the automatic monitoring data to obtain processed data;

[0083] Step 3: Extract features from the processed data to obtain water quality features and hydrodynamic index features, and construct wind field features;

[0084] Step 4: Input the water quality characteristics, hydrodynamic index characteristics, and wind field characteristics into the pre-trained SVM-LSTM fusion prediction model. The SVM-LSTM fusion prediction model includes an SVM model and an LSTM model. The SVM model obtains the first turbidity prediction result and the square loss based on the water quality characteristics, hydrodynamic index characteristics, and wind field characteristics. The LSTM model obtains the second turbidity prediction result based on the water quality characteristics, hydrodynamic index characteristics, and the square loss.

[0085] Step 5: Take the weighted average of the first turbidity prediction result and the second turbidity prediction result to obtain the turbidity prediction result of the SVM-LSTM fusion prediction model.

[0086] The specific method is as follows:

[0087] Step 1: Obtain automatic monitoring data of the reservoir including water quality, hydrodynamics and wind field;

[0088] Step 2: Preprocess the automatic monitoring data to obtain processed data. The specific process of preprocessing the data is as follows:

[0089] Step 201: Sort in ascending order based on time and remove duplicate data;

[0090] Step 202: Perform preliminary imputation using linear regression method;

[0091] Step 203: Clean the data, classify and organize the acquired data according to data type; mine abnormal data features; use STL time series decomposition and density clustering methods to clean the data, and reconstruct the abnormal data using the sum of the trend component and the period component after time series decomposition;

[0092] Step 204: Standardize the data and transform it into a distribution with a mean of 0 and a standard deviation of 1:

[0093]

[0094] Where, X i is the data before processing, X i ′ is the processed data, μ is the mean value of the indicator, and σ is the standard deviation of the indicator.

[0095] Step 3: Select water quality and hydrodynamic index features and construct wind field characteristics for the processed data;

[0096] The specific process of selecting water quality and hydrodynamic index features for the processed data is as follows:

[0097] All water quality and hydrodynamic characteristic data of the original dataset are randomly sampled using the Boostrap framework, and K training samples are finally obtained, each with N features.

[0098] Create decision tree Y k ;

[0099] Calculate the regression prediction accuracy of out-of-bag data for this training sample

[0100] Then the feature X of the out-of-bag data i (i=1,2,…,N) applies random perturbations and calculates the regression prediction accuracy after perturbation

[0101] Calculate X i Importance P of (i=1,2,…,N) i , the calculation expression is:

[0102]

[0103] Where, P i is the importance of the i-th feature, K is the number of training samples;

[0104] P i Sort in descending order to get the feature importance ranking Q i ; Then build the fuzzy system and establish the rule base; the sorted features Q i Input the fuzzy system to obtain the final fuzzy system score of each feature, and select features as subsequent model input based on the fuzzy system score.

[0105] The wind field characteristics are constructed using the cumulative wind value algorithm. The cumulative wind value algorithm is specifically as follows:

[0106] The wind field data of the accumulated period are recorded in reverse order to obtain the wind field data set. The wind direction influence intensity is calculated based on the wind field data set. The calculation expression is:

[0107]

[0108] In the formula, WDS r is the wind direction influence intensity, WD r is the wind direction, b is the wind direction deflection angle, and m is the wind direction influence factor;

[0109] Calculate the time weight at time j:

[0110] TS r =e α*(r-c)

[0111] Where, TS i is the time weight, c is the lag time (h), and α is the time weight factor;

[0112] Calculate the cumulative wind value after removing the lag time. The calculation expression is:

[0113]

[0114] Where WDI is the cumulative wind value, WS r is the wind speed and h is the accumulation period.

[0115] Step 4: Input the water quality characteristics, hydrodynamic index characteristics, and wind field characteristics into the pre-trained SVM-LSTM fusion prediction model. The SVM-LSTM fusion prediction model includes an SVM model and an LSTM model. The SVM model obtains the first turbidity prediction result and the square loss based on the water quality characteristics, hydrodynamic index characteristics, and wind field characteristics. The LSTM model obtains the second turbidity prediction result based on the water quality characteristics, hydrodynamic index characteristics, and the square loss.

[0116] Depend on Figure 2 As shown in Figure 2, the specific steps of the training process of the pre-trained SVM-LSTM fusion prediction model are:

[0117] Step 401: Input water quality, hydrodynamic index characteristics and wind field characteristics into the SVM model to obtain a first turbidity prediction result and square loss;

[0118] Step 402: inputting the squared loss of the SVM model and the water quality and hydrodynamic characteristics into the LSTM model to obtain a second turbidity prediction result;

[0119] Step 403: The SVM model and the LSTM model are used as base training models, and model fusion is performed according to the boosting model fusion method to obtain an SVM-LSTM fusion prediction model.

[0120] Step 5: Take the weighted average of the first turbidity prediction result and the second turbidity prediction result to obtain the turbidity prediction result of the SVM-LSTM fusion prediction model.

[0121] Example 2

[0122] Based on Example 1, the fusion method of the SVM model, LSTM model and boosting model is optimized.

[0123] Preferably, the SVM model in step 401 is an optimized SVM model, and the optimization method is specifically as follows:

[0124] The input feature T i (i=1,2,…,n) is converted to integer [T i ];

[0125] Use genetic algorithm to optimize the parameter penalty coefficient and kernel parameter of SVM algorithm:

[0126] Construct the initial population of the genetic algorithm and set the crossover probability P c , mutation probability P n , population size n gc , stop the iteration condition δ, use binary coding to generate n b Individuals, the calculation expression is:

[0127]

[0128] L=C*J

[0129] Among them, o is the decimal form of any one-digit penalty coefficient, y is the 8-bit encoding result, d is the domain threshold of o, q is the turbidity data influencing variable determined by the turbidity data characteristics, L is the total encoding length, C is the kernel parameter number, and J is the feature dimension.

[0130] The target fitness function is the SVM classification result accuracy, and the calculation expression is:

[0131]

[0132] Where f(y) is the individual fitness, n is the input feature length, pre N For the prediction results.

[0133] Use genetic algorithm for iterative optimization. When f(y)≤δ, the iteration condition is reached and the parameter penalty coefficient and kernel parameter results are output.

[0134] The input features and optimized parameters are input into the SVM model to obtain the prediction results.

[0135] Preferably, the LSTM model in step 402 is an optimized LSTM model, and the optimization method is specifically as follows:

[0136] Transform the input features into T i is the logarithmic rate of return LT i :

[0137] LT i =ln(T i+1 )-ln(T i )

[0138] Use particle swarm optimization to optimize the time step, learning rate, and number of hidden layer nodes of the LSTM algorithm:

[0139] Construct a particle swarm algorithm, construct a dimension space D with time step, learning rate and number of hidden layer nodes, randomly generate NP particles, and use x to represent their position and speed. z and v z (i=1,2,…,N). The fitness function is the Nash efficiency coefficient NSE of the LSTM model prediction result:

[0140]

[0141] Where x obs,z is the actual value, x model,z is the predicted value, is the mean of the actual value, and np is the amount of data.

[0142] According to the global optimal Y of all particles z and the local optimal Y of individual particle a za Update the speed and position of each particle:

[0143] v za (t+1)=ωv za (t)+c1r1(Y za (t)-sza (t))+c2r2(Y z (t)-s za (t))

[0144] s za (t+1)=s za (t)+v za (t+1)

[0145] Where t is the number of iterations, ω is the inertia weight, c1 and c2 are learning factors, r1 and r2 are random perturbation factors, and v za is the particle speed, s za is the particle position.

[0146] Use the particle swarm algorithm to iterate until the termination condition is reached, and output the time step, learning rate, and number of hidden layer nodes at this time.

[0147] The logarithmic return rate and the optimized time step, learning rate, and number of hidden layer nodes are input into the LSTM model to obtain the prediction results.

[0148] Preferably, step 403 uses the SVM model and the LSTM model as base training models, performs model fusion according to the boosting model fusion method, and obtains the SVM-LSTM fusion prediction model, and the specific steps are as follows:

[0149] Input feature T to train the base training model mi (mi = 1, 2, ..., JN), JN is the total number of base training models, and get the prediction result PRE mi , calculate the squared loss SE mi , the calculation expression is:

[0150]

[0151] Calculate the weight ω of the base training model mi , the calculation expression is:

[0152]

[0153] Where, is the average of the squared losses;

[0154] SE mi Add the input data of mi+1 rounds to obtain the prediction results and weights of each base training model, and then obtain the prediction results of the fusion model after weighted average.

[0155] like Figure 3 As shown in the table, the prediction accuracy comparison between a single model and four different fusion methods is shown in the table. The four model fusions are:

[0156] (1) (SVM, LSTM): The SVM model and the LSTM neural network are fused and predicted using the average fusion method;

[0157] (2) (SVM+LSTM): The SVM model and the LSTM neural network are integrated for prediction using the Stacking method;

[0158] (3) (SVM×LSTM): The SVM model and the LSTM neural network are integrated and predicted using the Boosting method. This scheme uses the SVM model first and then the LSTM neural network.

[0159] (4) (LSTM×SVM): The SVM model and the LSTM neural network are integrated and predicted using the Boosting method. This solution is to first use the LSTM neural network and then the SVM model.

[0160] It can be seen that the (SVM×LSTM) fusion model has a significant improvement in prediction accuracy in the short term of 1 hour compared with single models and other fusion methods, and Figure 4 It can be seen that this fusion model has a good effect in predicting turbidity mutations. Figure 5 、 6 As shown in the figure, this fusion model solves the non-stationarity of the data by using the SVM model for fusion, and has a good fitting effect and high prediction accuracy in the long-term prediction of 24 hours.

[0161] A second aspect of the present invention provides a reservoir turbidity prediction device based on an SVM-LSTM model, comprising a memory, a processor, and a program stored in the memory. When the processor executes the program, the reservoir turbidity prediction method based on the SVM-LSTM model provided by the present invention is implemented. The program code used to implement the method of the present invention can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0162] The above describes in detail the preferred embodiments of the present invention. It should be understood that those skilled in the art can make numerous modifications and variations based on the concepts of the present invention without inventive effort. Therefore, any technical solutions that can be derived by those skilled in the art through logical analysis, reasoning, or limited experimentation based on the concepts of the present invention and the prior art should be within the scope of protection defined by the claims.

Claims

1. A reservoir turbidity prediction method based on SVM-LSTM model, characterized in that: The following steps are involved: Step 1: Obtain automatic monitoring data of the reservoir including water quality, hydrodynamics and wind field; Step 2: pre-process the automatic monitoring data to obtain processed data; Step 3: Extract features from the processed data to obtain water quality features and hydrodynamic index features, and construct wind field features; Step 4: Input the water quality characteristics, hydrodynamic index characteristics, and wind field characteristics into a pre-trained SVM-LSTM fusion prediction model, wherein the SVM-LSTM fusion prediction model includes an SVM model and an LSTM model. The SVM model obtains a first turbidity prediction result and a square loss based on the water quality characteristics, hydrodynamic index characteristics, and wind field characteristics. The LSTM model obtains a second turbidity prediction result based on the water quality characteristics, hydrodynamic index characteristics, and the square loss. Step 5: Take the weighted average of the first turbidity prediction result and the second turbidity prediction result to obtain the turbidity prediction result of the SVM-LSTM fusion prediction model; The specific steps of the training process of the pre-trained SVM-LSTM fusion prediction model in step 4 are: Step 401: Input water quality, hydrodynamic index characteristics and wind field characteristics into the SVM model to obtain prediction results and square loss; Step 402: The squared loss of the SVM model and the water quality and hydrodynamic characteristics are input into the LSTM model to obtain a prediction result; Step 403: Using the SVM model and the LSTM model as base training models, perform model fusion according to the boosting model fusion method to obtain an SVM-LSTM fusion prediction model; The step 403 uses the SVM model and the LSTM model as base training models, performs model fusion according to the boosting model fusion method, and obtains the SVM-LSTM fusion prediction model. The specific steps are as follows: Input feature T training base training model , and get the prediction results , calculate the squared loss , the calculation expression is: Calculate the weight of the base training model , the calculation expression is: Where, is the average of the squared losses; Will Add the input data of mi+1 rounds to obtain the prediction results and weights of each base training model, and then obtain the prediction results of the fusion model after weighted average.

2. The reservoir turbidity prediction method based on the SVM-LSTM model according to claim 1 is characterized in that: The SVM model in step 401 is an optimized SVM model, and the optimization method is specifically as follows: Step 4011: Input features Convert to integer ; Step 4012: Use a genetic algorithm to optimize the penalty coefficient and kernel parameters of the SVM algorithm. The specific method is as follows: Construct the initial population of the genetic algorithm and set the crossover probability , mutation probability , population size , stop iteration condition , generated using binary encoding Individuals, the calculation expression is: Where o is the decimal form of any one-digit penalty coefficient, y is the encoding result with eight-bit data length, d is the domain threshold of o, q is the turbidity data influencing variable determined by the turbidity data characteristics, L is the total encoding length, C is the kernel parameter number, and J is the feature dimension; The target fitness function is the SVM classification result accuracy, and the calculation expression is: Where, is the individual fitness, n is the input feature length, To predict the results, Indicates that when the prediction result is the same as the input feature, it is recorded as 1; Using genetic algorithm for iterative optimization, When the iteration stop condition is reached, the parameter penalty coefficient and kernel parameter results are output; Step 4013: Then, the result of rounding the input features and the optimized parameter penalty coefficient and kernel parameter are input into the SVM model to obtain the optimized SVM model.

3. The reservoir turbidity prediction method based on the SVM-LSTM model according to claim 1, characterized in that: The LSTM model in step 402 is an optimized LSTM model, and the optimization method is specifically as follows: Step 4021: Input features Converted to logarithmic return ; Step 4022: Use the particle swarm optimization algorithm to optimize the time step, learning rate, and number of hidden layer nodes of the LSTM algorithm. The specific method is as follows: Construct a particle swarm algorithm, construct a dimension space D with time step, learning rate and number of hidden layer nodes, and randomly generate multiple particles, whose positions and velocities are expressed as and Indicates that the fitness function is the Nash efficiency coefficient NSE of the LSTM model prediction results, and the calculation expression is: Where, is the actual value, is the predicted value, is the mean of the actual values, is the amount of data; According to the global optimal and individual particles Local optimum Update the speed and position of each particle. The calculation expression is: Where, is the number of iterations, is the inertia weight, and is the learning factor, and is the random perturbation factor, For particles speed, For particles location; Use the particle swarm algorithm to iterate until the termination condition is reached, and output the time step, learning rate and number of hidden layer nodes at this time; Step 4023: Input the logarithmic return rate, time step, learning rate and number of hidden layer nodes into the LSTM model to obtain the prediction result.

4. The reservoir turbidity prediction method based on the SVM-LSTM model according to claim 1, characterized in that: Step 3 performs water quality and hydrodynamic index feature selection on the processed data, including the following steps: Randomly sample all water quality and hydrodynamic characteristic data in the processed data to create a decision tree; calculate the regression prediction accuracy of data outside the sample bag ; For out-of-bag data features Apply random perturbations and calculate the Regression prediction accuracy after feature perturbation ;calculate Importance , the calculation expression is: Where, For the The importance of features, is the number of training samples, k is the current training sample number; right Sort in descending order to get the feature importance ranking ; Then build the fuzzy system and establish the rule base; the sorted features Input the fuzzy system to obtain the final fuzzy system score of each feature, and select features as subsequent model input based on the fuzzy system score.

5. The reservoir turbidity prediction method based on the SVM-LSTM model according to claim 1, characterized in that: The method used in step 3 to construct the wind field characteristics is the cumulative wind value algorithm, which is specifically: The wind field data of the accumulated period are recorded in reverse order to obtain the wind field data set. The wind direction influence intensity is calculated based on the wind field data set. The calculation expression is: Where, is the wind direction influence intensity, For wind direction, b is the wind direction deflection angle, m is the wind direction influencing factor; calculate r The time weight of a moment is calculated as follows: Where, is the time weight, c is the lag time, is the time weight factor; Calculate the cumulative wind value after removing the lag time. The calculation expression is: Where, is the cumulative wind value, is the wind speed and h is the accumulation period.

6. The reservoir turbidity prediction method based on the SVM-LSTM model according to claim 1, characterized in that: The method for preprocessing data in step 2 comprises the following steps: Sort the data; deduplicate the data; fill in the data; clean the data; and standardize the data.

7. The reservoir turbidity prediction method based on the SVM-LSTM model according to claim 6, characterized in that: The data cleaning comprises the following steps: The acquired data is classified and sorted according to the data type, and then the abnormal data features are mined, and then the data is cleaned and the abnormal data is reconstructed.

8. A reservoir turbidity prediction device based on an SVM-LSTM model, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, it implements a reservoir turbidity prediction method based on the SVM-LSTM model as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Near-shore water quality data reanalysis method based on data assimilation

    CN115630538A

  • Data processing method and apparatus, electronic device, and storage medium

    US20210295100A1