Water eutrophication prediction method based on double experience pool TDDPG and DDPG-double 3Q learning model

By using the dual experience pool TDDPG model and DDPG-dual 3Q learning model in the prediction of water body eutrophication, combined with the Transformer and error compensation mechanism, the problem of feature retention and low efficiency of the existing model in the prediction of water body eutrophication is solved, achieving for more efficient and accurate water quality predictions.

CN118735751APending Publication Date: 2024-10-01BEIJING TECH & BUSINESS UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410866404.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-05-27
Filing Date
2024-06-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing deep reinforcement learning models are difficult to retain the long-term effective characteristics of historical data in water eutrophication prediction, resulting in low training efficiency and prediction accuracy, and cannot take into account the training efficiency and prediction accuracy of the model.

Method used

Using the TDDPG model and DDPG-dual 3Q learning model based on dual experience pools, the Transformer structure is introduced to extract multi-factor water quality data features, and combined with Attention, LSTM and the improved DDPG network, an intelligent agent is constructed to optimize the action decision-making strategy, and through the sliding window Sampling and error compensation mechanisms improve prediction accuracy and efficiency.

Benefits of technology

It improves the prediction accuracy and efficiency of multi-parameter time series data of water quality, avoids local optimality, enhances the environmental adaptability and stability of the model, and provides a more efficient water body eutrophication prediction solution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735751A_ABST
    Figure CN118735751A_ABST
Patent Text Reader

Abstract

The invention relates to a water eutrophication prediction method based on a double experience pool TDDPG and DDPG-double 3Q learning model. The water eutrophication prediction method is used for water quality monitoring. According to the method, a water body eutrophication prediction problem is converted into a Markov decision problem, a water quality multi-parameter time sequence of water body eutrophication is obtained, a TDDPG prediction model, an ADDPG prediction model and an RDPG prediction model based on double empirical pools are constructed, and future water quality data are predicted through historical data; taking the preliminary prediction results of the three prediction models and the error of the prediction results as a state set of the first 3Q learning and the second 3Q learning, and the preliminary prediction result and the error of the agent decision selection at a single time step, superposing the two results to obtain a final prediction result, and calculating the eutrophication degree of the water body. According to the method, the precision and accuracy of water quality data prediction are improved, local optimum is avoided, the training efficiency is considered, and an accurate, effective and practical scheme is provided for water eutrophication prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of water quality monitoring, and relates to artificial intelligence technology and water eutrophication detection technology, and specifically to a water eutrophication prediction method based on a dual experience pool TDDPG model and a DDPG-dual 3Q learning model. Background Art

[0002] In recent years, water pollution has become a global concern, among which eutrophication is particularly serious. Eutrophication leads to excessive nutrients such as nitrogen and phosphorus in water, destroying the balance of aquatic ecosystems, causing over-reproduction of certain species, causing algal blooms, and endangering daily life. According to data from the United Nations Environment Programme, the areas where eutrophication of rivers and lakes threatens the survival of organisms are increasing year by year. Eutrophication is difficult to control, so it is crucial to foresee and take effective measures in a timely manner. Eutrophication of water bodies is the result of the combined action of multiple factors, including nitrogen and phosphorus nutrients, chlorophyll, COD (chemical oxygen demand), temperature, etc. Human activities are one of the main reasons, causing a large amount of nutrients to flow into water bodies, stimulating algae reproduction, and causing water pollution. At the same time, algae have strong reproductive capacity, forming a vicious cycle, exacerbating the destruction of ecological balance. Seasonal changes also affect water quality indicators, resulting in different degrees of eutrophication at different times. Therefore, long-term monitoring and prediction of water quality indicators are crucial to the governance of water ecological environment. Prediction of multi-factor water quality data is a necessary measure to prevent eutrophication. Water eutrophication prediction models face challenges. Due to their complexity and nonlinear characteristics, traditional models have limited processing capabilities and are difficult to capture associations and retain long-term characteristic information. Therefore, it is of great significance to build more efficient and accurate prediction models.

[0003] At present, the prediction models of water eutrophication are divided into two categories: mechanism-driven models and data-driven models.

[0004] Mechanism-driven water eutrophication modeling: Based on the physiological knowledge of algal growth and the physical and chemical laws of water environment systems, the changes in algal biomass are simulated. From simple single nutrient load models to complex ecological dynamics models, these models can better understand the internal and external factors affecting the algal proliferation process. However, this method requires detailed physical or chemical analysis, a large number of parameters and initial condition calculations during the prediction process, and different environments require different formula derivations, resulting in complex modeling and poor generalization.

[0005] Data-driven water eutrophication modeling: using a large amount of historical data to monitor the relationship between internal and external environmental factors to predict water eutrophication. This method does not require prior knowledge and can explore the inherent laws hidden in the system, so it is widely used. It is mainly divided into two categories: mathematical statistics models and artificial intelligence models. Mathematical statistics models process historical data and use correlation analysis, regression analysis and other methods to explore the effects of influencing factors on state variables and discover their development laws. With the advancement of computer technology, artificial intelligence models play an important role in the prediction of water eutrophication. Since water eutrophication is a highly nonlinear and complex ecological reaction process, artificial intelligence models use intelligent algorithms to process the influence of multiple factors and provide effective solutions. These models use the improvement of computer hardware and software systems to greatly improve the computing speed and accuracy, providing an effective means for predicting and solving nonlinear problems.

[0006] At present, there are the following main problems in water eutrophication prediction based on deep reinforcement learning:

[0007] (1) Deep reinforcement learning combines the structure of deep learning and the idea of ​​reinforcement learning, but its focus is more on reinforcement learning. The problem it solves is still a decision-making problem, so the first step is to transform the water eutrophication time series prediction problem into an MDP (Markov decision process) problem. Due to the large amount of multi-factor water quality data, the model cannot retain data features for a long time when making predictions. The experience pool structure of the DDPG (Deep Deterministic Policy Gradient) model can store historical data features, but the Actor network of the traditional DDPG model has low efficiency in extracting multi-factor water quality data features, resulting in reduced training efficiency of the DDPG model when predicting multi-factor water quality data.

[0008] (2) When using deep reinforcement learning models to solve the problem of water eutrophication prediction, it is usually necessary to consider both the model training efficiency and the prediction accuracy. Existing deep reinforcement learning models can only design MDPs for specific environments to solve water eutrophication prediction problems, but they cannot take into account both model training efficiency and prediction accuracy. Therefore, they are less practical when solving actual water eutrophication prediction problems. Summary of the invention

[0009] In response to the above-mentioned problems existing in the prediction of water eutrophication using deep reinforcement learning technology, the present invention provides a water eutrophication prediction method based on a dual experience pool TDDPG model and a DDPG-dual 3Q learning model, which solves the problem that the existing deep reinforcement learning model cannot retain the long-term effective characteristics of historical data, and further improves the training efficiency and prediction accuracy of the prediction model, thereby improving the practicability of the prediction model.

[0010] The present invention provides a water eutrophication prediction method based on a dual experience pool TDDPG model and a DDPG-dual 3Q learning model, comprising the following steps:

[0011] Step 1: Obtain water quality monitoring data of the target water area, use Markov decision process to represent the water quality monitoring time series data, and convert the water eutrophication time series prediction problem into a Markov decision problem;

[0012] The historical water quality multi-parameter time series data are obtained from the water quality monitoring data of the target water area, and the prediction problem of water eutrophication is converted into a Markov decision problem. The state s in the Markov decision process t Corresponding to a set of water quality parameters at time t, the action corresponds to the predicted operation, and the agent responds to the state s t After performing an action, transfer to the next state s t+1 ; Evaluate the eutrophication degree of water bodies by predicting water quality parameters in the future;

[0013] Step 2: Use the TDDPG prediction model based on dual experience pools to predict the historical water quality multi-parameter time series, and output the water quality multi-parameter time series in the future; the TDDPG prediction model based on dual experience pools is constructed in the following way:

[0014] Step 21: Improve the DDPG network, set up an expert experience pool, and form a dual experience pool with the random experience pool; during training, the Actor online network stores the predicted quadruple (current state, action, reward, next moment state) in the random experience pool, and at the same time, the Critic network generates an approximate estimated action at the next moment when updating the target Q value function, and stores the quadruple corresponding to the approximate estimated action in the expert experience pool; during the training process, randomly extract samples from the dual experience pool for training;

[0015] Step 22: Set the Actor online network and the Actor target network in the DDPG network to use an independent Transformer structure to extract state features from the input water quality multi-parameter time series, and then input them into the Actor network for action decision;

[0016] Step 23: Mark the agent in the TDDPG prediction model based on dual experience pools as the first agent; maximize the total reward value obtained by the first agent after interacting with the environment by optimizing the decision-making strategy of the action, and the larger the total reward value, the more accurate the agent's prediction; assume that the TDDPG prediction model based on dual experience pools outputs the first preliminary prediction result of the multi-parameter time series of water quality in the future;

[0017] Step 3: Construct the ADDPG prediction model and the RDPG prediction model, input the historical water quality multi-parameter time series, and predict the water quality multi-parameter time series in the future;

[0018] The ADDPG prediction model uses the Attention network to extract features from the historical water quality multi-parameter time series, and then uses the DDPG network improved in step 21 to make action decisions; the agent in the ADDPG prediction model is marked as the second agent, and the action decision strategy of the second agent is optimized; the second preliminary prediction result of the water quality multi-parameter time series in the future time is output through the ADDPG prediction model;

[0019] The RDPG prediction model uses the LSTM network to extract features from the historical water quality multi-parameter time series, and then uses the improved DDPG network in step 21 to make action decisions; the agent in the RDPG prediction model is marked as the third agent, and the action decision strategy of the third agent is optimized; the third preliminary prediction result of the water quality multi-parameter time series in the future time is output through the RDPG prediction model;

[0020] Step 4: Construct the DDPG-dual 3Q learning model to make the final prediction of the multi-parameter time series of water quality in the future;

[0021] In the DDPG-dual 3Q learning model, the first, second and third preliminary prediction results are input into the first learning as the state model set, and the agent in the DDPG-dual 3Q learning model is set as B, and the agent B decides the preliminary prediction result and the corresponding prediction model selected in a single time step; the errors of the first, second and third preliminary prediction results are input into the second learning as the state model, and the agent B decides the errors and the corresponding prediction model selected in a single time step; in a single time step, the agent B compensates the error of the decision to the preliminary prediction result of the decision, and obtains the final prediction result of the water quality multi-parameter data in this time step;

[0022] Step 5: The input historical water quality multi-parameter time series is sampled through a sliding window, and the dual experience pool TDDPG model, ADDPG prediction model and RDPG prediction model are input to obtain preliminary prediction results. The DDPG-dual 3Q learning model then decides and outputs the final predicted water quality multi-parameter time series, and the degree of eutrophication of the water body is determined based on the final predicted water quality multi-parameter time series.

[0023] Compared with the prior art, the advantages and positive effects of the present invention are:

[0024] (1) The method of the present invention uses the TDDPG model, ADDPG model and RDPG model based on dual experience pools to predict water quality parameter time series data, which improves the prediction accuracy and avoids local optimality; the method of the present invention uses Attention, LSTM and Transformer networks for feature extraction, combined with the improved DDPG network for preliminary prediction, and constructs a DDPG-dual 3Q learning model, which realizes the parameter training and error calculation of agent B, and improves the accuracy and prediction efficiency of the model in predicting water quality multi-parameter time series data. The method of the present invention innovatively combines deep learning and reinforcement learning, provides a new solution to complex prediction problems, and has important theoretical and application significance.

[0025] (2) The method of the present invention constructs a TDDPG model based on dual experience pools for predicting multi-factor water quality time series data. By introducing the Transformer structure, the parallel computing and self-association mechanism of the structure improve the model's efficiency in identifying and extracting multi-factor water quality data features. The Actor network makes decisions on the state feature set encoded by the Transformer, which enhances the accuracy of action execution. The Actor online network and the Actor target network use two independent Transformer structures to extract the state feature set, which avoids the prediction model from falling into the local optimum and improves the soft update performance of the Actor target network. Through the dual experience pool structure of the random experience pool and the expert experience pool, the temporal correlation between samples is eliminated, and the training efficiency and decision quality are improved. During the training process, samples are randomly extracted from the dual experience pools, which avoids the intelligent agent from falling into the local optimum, helps to find the global optimal solution, and improves the accuracy of multi-factor water quality time series data prediction.

[0026] (3) The existing deep reinforcement learning model can only design MDP for a specific environment to solve the problem of water eutrophication prediction, but it cannot take into account both the model training efficiency and prediction accuracy, and has low practicality when solving the actual water eutrophication prediction problem. The method of the present invention combines reinforcement learning with the MDP framework, and provides a TDDPG model based on dual experience pools. It first extracts state features through Transformer and then inputs them into the Actor network decision, processes continuous action space, and uses dual experience pools to achieve soft updates, accelerate the learning process, improve the performance and stability of the prediction model, reduce the correlation between samples, and provide a practical solution to the prediction problem. The method of the present invention inputs multi-factor water quality data into the DDPG-3Q learning prediction model, realizes the preliminary prediction of agent A and the learning feedback of agent B, and uses the error value to predict again, which further improves the prediction accuracy and provides an accurate and effective solution for water eutrophication prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1It is a flow chart of the water eutrophication prediction method based on the combination of dual experience pool TDDPG and DDPG-dual 3Q learning model of the present invention;

[0028] Figure 2 is a schematic diagram of the Transformer model structure of an embodiment of the present invention;

[0029] Figure 3 is an Actor network update flow chart of an embodiment of the present invention;

[0030] Figure 4 is a schematic diagram of the dual experience pool structure of an embodiment of the present invention;

[0031] Figure 5 is a schematic diagram of modeling a time series MDP according to an embodiment of the present invention;

[0032] Figure 6 It is a structural diagram of the dual experience pool TDDPG model of the present invention;

[0033] Figure 7 It is the structure diagram of the ADDPG prediction model of the present invention;

[0034] Figure 8 It is a structural diagram of the RDPG prediction model of the present invention;

[0035] Fig. 9 It is a structural diagram of the dual experience pool TDDPG prediction model of the present invention;

[0036] Fig.10 It is a state set structure diagram of DDPG-dual 3Q learning of the present invention;

[0037] Fig.11 is the DDPG-3Q learning prediction flow chart of the present invention;

[0038] Fig.12 is a schematic diagram of an error state set of the present invention;

[0039] Fig.13 It is a structural diagram of the DDPG-dual 3Q learning model of the present invention;

[0040] Fig.14 This is a comparison diagram of Encoder-Decoder convergence time with different numbers of layers in an embodiment of the present invention;

[0041] Fig.15 It is a prediction result diagram of the embodiment of the present invention using DDPG, TDDPG, and dual experience pool TDDPG;

[0042] Fig.16 is a curve diagram of prediction results of each model in an embodiment of the present invention;

[0043] Fig.17 It is a curve chart of the prediction results of each model from time 100 to time 300 of the embodiment of the present invention. DETAILED DESCRIPTION

[0044] The technical solution of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

[0045] like Figure 1 As shown, the water eutrophication prediction method based on the dual experience pool TDDPG model and DDPG-dual 3Q learning model of the embodiment of the present invention proposes a dual experience pool deep deterministic policy gradient (DDPG) prediction model based on Transformer, which can retain the long-term effective characteristics of the data and avoid falling into the local optimal search trap. At the same time, the characteristics of Transformer parallel computing are used to improve the training efficiency of the deep deterministic policy gradient model; in order to further improve the practicality and accuracy of the prediction model, the method of the present invention proposes a dual 3Q learning prediction model based on deep deterministic policy gradient, combining the advantages of deep deterministic policy gradient model and dual 3Q learning, and using the attention mechanism, recurrent neural network and Tranformer network as the Actor network in the deep deterministic policy gradient model respectively, forming the state set of three prediction models, and then putting them into the dual 3Q learning model after improving the greed factor parameters for learning, so that it can not only preserve the long-term effective characteristics of historical data but also have high environmental adaptability, while further improving the prediction accuracy of the model, but also taking into account the training efficiency. The implementation steps of the embodiment of the present invention are specifically described below, including steps one to five.

[0046] Step 1: Construct a TDDPG time series prediction model to predict water quality time series data.

[0047] Monitor and obtain water quality data of the target water area, input the monitored time series data into the TDDPG time series prediction model, and output the predicted water quality time series data. The TDDPG time series prediction model is implemented by the Encoder-Decoder model based on the Transformer structure combined with the DDPG algorithm.

[0048] The water quality time series data of the target water area is monitored and obtained, and processed into a multi-dimensional water quality parameter time series data to be input into the subsequent prediction model for processing. The water quality parameters of the embodiment of the present invention include 12 indicators such as potassium permanganate index CODMn, chemical oxygen demand COD, five-day biochemical oxygen demand BOD5, total phosphorus TP, ammonia nitrogen NH3-N, chromaticity, conductivity, total dissolved solids TDS, turbidity SD, nitrate nitrogen NO3-N, Chl-a and fluoride.

[0049] In the TDDPG time series prediction model constructed in the method of the present invention, the Transformer structure is used to extract state characteristics of the multi-dimensional water quality parameter data at each moment. The Encoder in the Transformer structure is responsible for mapping the input water quality data into a hidden layer vector, and then the Decoder maps the hidden layer vector into water quality state characteristic data. The structure of the Transformer model is as follows: Figure 2 As shown in the figure, by building an encoder and a decoder with 6 layers each, a total of 12 layers of Encoder-Decoder, it is possible to process the input in parallel and calculate long-term sequences at the same time.

[0050] When the Transformer model receives a data sequence such as X1, it first undergoes Positional-Encoding to form a new input I(Q, K, V), where Q, K, and V represent query, key value, and value, respectively. At the same time, a residual connection (Residual error, Re) is generated, and the input I is passed to the Self-Attention mechanism for processing, and then normalized after adding the residual. The result enters the Feed Forward layer, continues to generate residuals, and then continues to add and normalize. In this way, as an encoder, it is encoded by six encoders and used as I(Q) in the subsequent decoder. The data sequence X1 input to the decoder is first converted into input I(K, V) through Positional-Encoding, and combined with I(Q) generated in the encoder to form a new encoding vector I′(Qv, K′, V′). FeedForward calculation is continued, and then normalized after addition to the residual. This is used as a decoder. After six decodings, a linear transformation is performed. Finally, the current probability distribution of each indicator value is output through softmax, that is, the single-step time feature extraction value corresponding to each indicator factor at the current moment. At the same time, the value is stored and retained for subsequent parameter updates and the call of the following state set.

[0051] The DDPG algorithm solves two continuity problems in Q-learning, the first is the continuity of the state, and the second is the continuity of the output. DDPG is a strategy-determining algorithm. The task principle is to optimize the target strategy θ of the agent so that the total reward value obtained after the agent interacts with the environment is maximized. The DDPG model includes four neural network modules to approximate the strategy update and Q-value function in reinforcement learning, which are divided into Actor online network, Actor target network, Critic online network and Critic target network. The Critic online network obtains the current action based on the interaction between the Actor online network and the environment, and obtains the Q-value function of the current state-action. The Critic target network approximates the next action based on the Actor target network, and estimates the Q' value function of the next state-action. The output of the actor can be a multi-dimensional action vector. Before training begins, DDPG uses a random strategy to pre-explore the environment and save it to the experience pool to increase the stability of the early training and reduce the impact of random restarts on reinforcement learning.

[0052] Since historical water quality monitoring data has the characteristics of multiple factors and huge data volume, compared with traditional CNN and RNN networks, the Transformer structure has good parallel computing capabilities and can process data efficiently. At the same time, the Transformer network can make the input sequence and the target sequence better self-associated according to its own Encoder-Decoder structure, and can also adjust the feature extraction ability by changing the number of Encoder-Decoders, which has good controllability. In addition, the subsequent Feed-Forward structure also enhances the expression ability of the model. In the Actor network module of the DDPG network of the present invention, the input water quality time series data set is first Encoder-Decoder encoded by the Transformer structure, and the original data set is standardized into a new state feature set after residual normalization calculation, so that the characteristic representation of the water quality data is more obvious, and then input into the Actor network for action execution to obtain the predicted water quality sequence in the future time.

[0053] like Figure 3As shown, the feature extraction of the Actor online training network and the Actor target network of the TDDPG time series prediction model of the present invention each uses an independent Transformer structure. The use of two unrelated Transformer structures can increase the early exploration process, avoid falling into the local optimum, avoid disrupting the soft update of the Actor target network, and improve the model time series prediction performance. In the embodiment of the present invention, the water quality parameter time series is input into the TDDPG time series prediction model, and the water quality state feature time series is extracted and input into the DDPG network through the encoding processing of the Transformer multi-layer encoder and multi-layer decoder. The Actor online network uses the water quality parameters at time t to predict the water quality parameters at time t+1, and calculates the reward function. The Actor target network uses the Transformer structure to extract the water quality state characteristics at time t+1, and approximately estimates the prediction action at the next moment. The parameters of the Actor target network are soft-updated by the Actor online network.

[0054] The TDDPG time series prediction model used in the present invention can effectively process multi-factor, large-scale water quality monitoring data, wherein the parallel computing capability and self-association mechanism of the Transformer are used to enable the model to efficiently extract features and adjust the feature extraction capability according to task requirements. The Actor network encodes the state set through the Transformer structure, thereby improving the obviousness of the state feature representation and enhancing the accuracy of action execution. Two unrelated Transformer structures are used as the online and target networks of the Actor network to prevent the Agent from falling into a local optimum and disrupting the soft update performance of the Actor target network.

[0055] Step 2: Design a dual experience pool storage structure for the DDPG model.

[0056] The traditional DDPG model has only one experience pool, which stores samples through model training and performs sampling training after reaching a certain number. Since time series data has a strong correlation before and after, selecting samples from the same experience pool will affect the decision-making of the reinforcement learning agent, making it impossible for the agent to make the optimal decision, affecting the efficiency of model training. Therefore, the method of the present invention solves this problem by introducing dual experience pools.

[0057] In the DDPG model, the water eutrophication prediction problem is transformed into an MDP problem. The agent receives the state feature set s extracted at time t. t Execute action a t , and get the state s at the next moment t+1 , and get the reward function r at time t t , this four-tuple (s t , a t, r t ,s t+1 ) is stored as a set of data in DDPG's own random experience pool. At the same time, the Critic network approximately estimates the optimal action a' at the next moment when updating the target Q value function. t , so a new quaternion (s r , a′ t , r t ,s t+1 ), and store the quadruple as a new data group into the expert experience pool. The structure of the dual experience pool is as follows: Figure 4 As shown in Figure 2, the random experience pool stores the four-tuple data of the Actor online network training process, and the expert experience pool stores the optimal action a′ estimated approximately when the Critic network updates the target Q value function. t During the training process, samples will be randomly drawn from the random experience pool and the expert experience pool according to a certain probability. After the Agent has interacted with the environment a lot in the early stage and conducted sufficient exploration, the experience pool has stored enough training samples. The model starts to randomly draw samples from the experience pool according to a certain probability. This not only ensures the random extraction of samples, but also cancels the association between samples before and after the time series data, and prevents the Agent from falling into a local optimal cycle and being unable to find the global optimal decision; it also improves the parameter training effect of the model, and has greatly improved the training efficiency.

[0058] The present invention introduces a dual experience pool to solve the problem caused by sample correlation in the traditional DDPG model. The random experience pool stores the four-tuple data of the agent's interaction with the environment, while the expert experience pool stores the target Q-value function data obtained by the Critic's approximate estimation. This design eliminates the temporal correlation between samples and improves training efficiency and decision-making quality. During the training process, samples are randomly drawn from the dual experience pools according to a certain probability, so that the intelligent agent can better avoid local optimal solutions and find the global optimal solution. The present invention improves the Transformer and DDPG networks by introducing a dual experience pool structure to improve the training efficiency and prediction accuracy of the model.

[0059] Step 3: Convert the water eutrophication time series prediction problem into a Markov decision problem and perform MDP design on the water eutrophication time series.

[0060] To solve the prediction problem using reinforcement learning and MDP framework, we must first conduct MDP modeling and build an environment based on the state, action, reward mechanism and state transition rules of reinforcement learning to achieve the purpose of time series prediction. In reinforcement learning, the interaction between the agent and the environment is modeled by MDP, such as Figure 5As shown in the figure, after the agent gets the state of the environment, it will take an action and return the action to the environment; after the environment gets the action of the agent, it will enter the next state and pass the next state to the agent. In reinforcement learning, the agent and the environment interact in this way, and this interaction process can be represented by MDP, so MDP is the basic framework of reinforcement learning.

[0061] The embodiment of the present invention defines the Markov decision process of the water eutrophication time series as a five-tuple, expressed as: M = (S, A, R, P, γ), as follows:

[0062] (1) State space S: The basis for the interaction between the agent and the environment, which can be a discrete data set or a continuous data set, including all possible water quality monitoring states; t Corresponding to the multi-parameter vector of water quality at time t, when different prediction models are used for prediction later, the multi-parameter vector of water quality will be feature extracted and then action prediction will be performed. For example, when using the TDDPG model for prediction, the Transformer structure is used to extract standardized state features from the water quality parameter data;

[0063] (2) Action space A: The actions performed by the agent based on the state. Usually, in different environments, there are different action selection ranges, including all possible predicted actions or strategies. When the agent performs an action, it represents a prediction.

[0064] (3) Reward function R: At a certain state s t An action is performed and the next state is transferred to s t+1 , you will get a corresponding reward R t+1 ; Rewards are used for better learning of the agent and can be set according to the gap between the predicted value and the actual value, providing the agent with immediate rewards after performing an action;

[0065] (4) State transition rule P: that is, the state transition probability matrix, in a certain state s t When an action is performed, it will transfer to the next state s with a certain probability. t+1 ;

[0066] (5) Long-term reward factor γ: used to balance the importance of immediate rewards and future rewards.

[0067] The agent interacts according to the mapping relationship from state to action of the strategy θ to optimize the expected value of the cumulative reward. The task goal of the TDDPG model of the method of the present invention is to set an agent's strategy θ, and the purpose of the target strategy is to maximize the total reward value obtained after the agent interacts with the environment. The total reward value can be obtained by combining the immediate reward and the future reward.

[0068] The present invention uses a Markov time series prediction model constructed by a dual experience pool TDDPG model, sets the action space as a continuous action for prediction, and uses the experience pool to store interaction information. First, the multi-factor water quality data is converted into a standardized vector through the Transformer model, and features are extracted from it. When extracting state features from the multi-parameter water quality data at the current time t, each indicator parameter is encoded by the Transformer model and then combined together to form a standardized state feature s t , and enter the Actor network.

[0069] Secondly, the DDPG network obtains the target Q value function at time t for strategy α, and the calculation method is as follows:

[0070] a t =μ θ (s t ) (1)

[0071] a′ t =μ′ θ (s t ) (2)

[0072] r t =|Y t -a t | (3)

[0073] Q′ θ (s t , a t )←α[r t +γQ θ (s t , a′ t )-Q′ θ (s t-1 , a t-1 )] (4)

[0074] Among them, μ θ is the strategy of the Actor online network, μ′ θ is the strategy in the Actor target network, s t is the water quality characteristic at time t, a t is the predicted action performed by the Actor online network at time t, a′ t is the virtual predicted action performed by the Actor target network at time t, Y t is the real action at time t, r t is the reward value obtained by executing the action at time t, α is the learning efficiency of the agent, γ is the decay factor, and Q θ is the strategy of the Critic online network, Q′ θis the strategy of the Critic target network, Q θ (s t , p′ t ) is the Q value function of the Critic online network at time t, Q′ θ (s t-1 , p t-1 ) is the Q value function of the Critic target network at time t-1, Q′ θ (s t , p t ) is the final Q value function of the Critic target network at time t.

[0075] like Figure 6 As shown, it is necessary to train and update the online strategy network parameters θ of the Actor μ and the target policy network parameters θ μ′ , training updates the online Q network parameters θ of Critic Q and the target policy network parameters θ Q′ .

[0076] The parameters of the Critic network are updated by minimizing the loss function. The loss function defined during the update is:

[0077]

[0078] Where N represents the number of samples.

[0079] Then, the current state, action, reward and next state obtained from the previous interaction between the Actor network and the environment are stored as samples in the random experience pool. At the same time, the four-tuple sample of the expert experience pool is given. After the Actor network takes an action, the next state is obtained, and a virtual decision is made based on the state, that is, the guessed action at the next moment, which is used to soft-update the Q value at the current moment. The guessed action and the current state, reward and next state are stored in the expert experience pool. The AC network is allowed to randomly extract samples from the two experience pools for training. This can make reinforcement learning unaffected by the correlation between samples and converge quickly in the early stage.

[0080] Figure 6The structure of the dual experience pool TDDPG model is shown, which is divided into the Environment (historical water quality monitoring data) module, the Actor network module, the Critic network module and the dual experience pool module. The Environment module obtains the historical water quality multi-parameter time series data and inputs it into the Actor network module. The Actor online network extracts the state features of the water quality multi-parameter time series data at time t and makes action decisions. The Actor target network extracts the state features of the water quality multi-parameter time series data at time t+1 and estimates the action at the next moment. The Critic online network and the Critic target network calculate the Q-value function of the action and state output by the Actor online network and the Actor target network. During training, the quadruplets corresponding to the Actor online network and the Critic target network are stored in the random experience pool and the expert experience pool, and the parameters of the Actor network and the Critic network are updated by random sampling from the dual experience pools.

[0081] Step 4: Construct a DDPG-dual 3Q learning model, and use the multi-parameter water quality sequences predicted by the TDDPG prediction model, ADDPG prediction model and RDPG prediction model based on dual experience pools as discrete state spaces. The action of agent B in the DDPG-dual 3Q learning model in a single time step is to select which prediction model and the corresponding preliminary prediction results, as well as the decision prediction error and the corresponding prediction model.

[0082] like Figure 7 As shown, the ADDPG prediction model is constructed using the Attention network + the improved dual experience pool DDPG network of the present invention, and the agent that performs the action is marked as A1. The Attention network is first used to extract features from the original water quality parameter data, such as taking the multi-factor water quality data from time (t-4) to time t as the input vector of the Attention network, and performing feature weight distribution through the multi-layer perceptron, and then obtaining the weight ratio of each component in the input vector through the Relu activation function, and then performing dot product with the input vector to obtain a new vector, thereby completing the feature extraction of the input data, and then using the obtained feature data as the "exploration information" when the agent A1 in the DDPG model interacts with the environment, and then obtaining feedback, and the agent A1 performs actions according to the obtained feedback, and then the action data is normalized to obtain the required preliminary prediction results, that is, the multi-factor water quality time series data at the future moment. Use the ADDPG prediction model to generate "ADDPG prediction model-prediction results".

[0083] like Figure 8As shown, the RDPG prediction model is constructed using LSTM and the improved dual experience pool DDPG network of the present invention, and the agent performing the action is marked as A2. Since the data features usually need to be retained for a relatively long period of time in time series prediction problems, the LSTM network is used to retain the original input multi-factor water quality data for a long time and effectively, and the LSTM network is used to extract features with the advantage of more obvious dynamic update effect to obtain the latest feature data within a single step. Similarly, the feature data is used as the "exploration information" when the agent A2 in the DDPG model interacts with the environment to complete the preliminary prediction. The rest of the algorithm training method is the same as the ADDPG prediction model. Use the RDPG prediction model to output "RDPG prediction model-prediction results".

[0084] like Fig. 9 As shown, the dual experience pool based TDDPG model constructed by the present invention is used to extract features of the historical water quality multi-parameter time series, the intelligent agent that performs the action is marked as A3, and the "dual experience pool TDDPG prediction model-prediction result" is obtained.

[0085] like Fig.10 As shown, the preliminary prediction results obtained by the ADDPG prediction model, the RDPG prediction model and the TDDPG prediction model of the dual experience pool are marked as ADDPG state model set M1, RDPG state model set M2, and TDDPG state model set M3, respectively. The three state model sets are used together to form the discrete state set of deep dual 3Q learning, providing decision direction for subsequent reinforcement learning. The above three state model sets are used as the input of a layer of 3Q learning; the agent B performs parameter training based on these preliminary prediction results (state model sets), and observes the prediction results and model selection in real time during the training process. At the same time, the error is calculated based on the preliminary prediction results, and the error data set obtained and the error model prediction state set are used to construct a new state set, namely "ADDPG error prediction model-error prediction result", "RDPG error prediction model-error prediction result", and "dual experience pool TDDPG error prediction model-error prediction result", which are marked as ADDPG error state model set M4, RDPG error state model set M5, and TDDPG error state model set M6, respectively, as the secondary input of dual 3Q learning.

[0086] Fig.10The figure shows the state set construction of dual 3Q learning based on three DDPG prediction models: ADDPG, RDPG, and dual experience pool TDDPG, including the state set of primary input and secondary input, the improved 3Q learning algorithm module, and the behavior code performance module of agent B. The parameter update of the dual 3Q learning algorithm is the result of the joint action of the primary input and the secondary input after feedback. During the training of the model, agent B observes and selects a single prediction model twice at the same time, corresponding to the prediction results of the primary input and the secondary input respectively. These two sets of prediction results and selection situations may be the same single prediction model or different models. This result comes from the parameter update of agent B at the current moment, which is determined by the maximum selection probability of a certain prediction model at the current moment.

[0087] Step 5: Make a final prediction of the multi-factor water quality time series based on the DDPG-dual 3Q learning model, and make a water eutrophication judgment based on the prediction results.

[0088] like Fig.11 As shown, the prediction process of the DDPG-dual 3Q learning model is as follows:

[0089] The multi-factor water quality data is used as the starting input vector for the agents A1, A2, and A3 to learn, and the preliminary prediction results are obtained based on the actions performed after learning each state model. The following is the representation:

[0090]

[0091] in, represents the state group corresponding to the agent Ai at time t, where It means that agent B selects the i-th state model at time t. Represents the preliminary prediction result of the i-th state model at time t.

[0092] The obtained discrete state group is used as the state input of 3Q learning, so that agent B can observe this state for learning feedback. In the early stage, agent B "explores" the environment according to the greedy factor criterion after introducing the inverse tangent function, reducing the ineffective exploration process in the early stage of training, thereby improving the efficiency of model training. After executing the single-step prediction action, the discrete state group of the next moment is obtained, and the multi-indicator mean reward of the current moment is obtained. Then, the corresponding Q table is stored according to the action-state criterion at the current moment, and the final Q table is updated.

[0093] like Fig.10 and Fig.11As shown, the DDPG-dual 3Q learning model of the present invention refers to the prediction results of three prediction models constructed based on the improved DDPG. The dual 3Q learning model is used to decide the preliminary prediction results and prediction errors, and the prediction errors are compensated to the preliminary prediction results of the decisions to obtain the final prediction results of the water quality data. The dual 3Q learning model is realized by improving the structure of the deep Q learning model. The improved structure can refer to a water eutrophication prediction method based on improved MIMO deep dual 3Q learning disclosed in publication number CN116307255A. In the dual 3Q learning model, the greedy factor parameters of the reinforcement learning agent are improved, that is, the greedy factor ε is set to tan -1 2u-0.21π, ε changes with the number of iterations u; Agent B chooses whether to select an action based on the Q table or randomly select an action according to the greed factor ε. The design of the greed factor increases the probability of randomly selecting an action; The preliminary prediction results of the three prediction models and the corresponding Q values ​​are obtained in a single time step, and the three Q values ​​are used to update the current final Q learning strategy Q * The update method is not described here, based on Q * Decision making which state model set to choose. Perform two-fold training, such as Fig.11 In, S + Corresponding to the primary or secondary input of dual 3Q learning at time t, the primary input is the predicted water quality multi-parameter sequence, such as the water quality multi-parameter sequence predicted by agent B at time t (x t-4 , x t-3 ...,x t ), x t represents the multi-parameter water quality data at time t, and the secondary input is the multi-parameter error sequence of water quality, such as the multi-parameter error sequence of water quality decided by agent B at time t (e t-4 ,e t-3 ,...,e t ), error e t =y t -x t ,y t is the real water quality multi-parameter data at time t; N t is the set time step, within which the prediction decision of a single time step is continuously made and the final strategy Q is updated * ; In the second training learning, the prediction error sequence and the corresponding prediction model are determined at each time step, and the prediction error of the decision is compensated to the preliminary prediction result of the corresponding time step to obtain the final prediction result at that time step. The error state set of the second 3Q learning model input is as follows Fig.12 shown.

[0094] The complete DDPG-dual 3Q learning model structure of the embodiment of the present invention is as follows: Fig.13As shown, the preliminary prediction results of each time step are first obtained through three prediction models, and the preliminary prediction results of the first 3Q learning model decision and the selected prediction model are stored. At the same time, the errors of the three preliminary prediction results are calculated as the second input of the DDPG-3Q learning model. Agent B observes and performs the prediction action again, decides the error prediction value, and adds the two prediction results of the same unit time step to obtain the final prediction data, which improves the prediction accuracy. Based on this, the final water eutrophication prediction results are further established. At the same time, the state models selected by the two DDPG-3Q learning at each moment are stored for subsequent observation.

[0095] The method of the present invention adopts sliding window sampling for historical water quality multi-parameter time series data, and performs recursive selection, such as a complete training from time 0 to time T. By increasing the number of training times, the agent B has better observation and decision-making ability, and the use of 3Q learning algorithm can effectively deal with the information interference between time series data, avoiding the problem that the agent B falls into the local optimum and cannot find the optimal strategy, thereby increasing the accuracy of the agent B in making decisions, and then improving the accuracy of the model prediction results. Finally, the predicted data is analyzed for water eutrophication by the comprehensive nutrient status index method (TLI).

[0096] Embodiment 1:

[0097] This experiment uses multi-factor water quality data to predict water eutrophication. In order to make the water quality data indicators have obvious changes and facilitate the prediction and observation of the model, the time area of ​​a target water area is selected from 0:00 on March 25, 2021 to 0:00 on September 5, 2021. The sampling interval is once per hour, and the time length is 3984 sets of data. Considering 12 indicators such as CODMn, COD, BOD5, TP, NH3-N, chromaticity, conductivity, TDS, SD, NO3-N, Chl-a and fluoride, the time step is 5, and time series prediction is performed, and the prediction results are compared. The experimental data are shown in Table 1 below.

[0098] Table 1 Experimental data

[0099]

[0100] The method of the present invention is performed as follows:

[0101] Step 1: Construct a TDDPG time series prediction model. When the TDDPG model with two experience pools is used to predict water eutrophication, different layers of Encoder-Decoder have different effects on the feature extraction of the original data. By increasing the number of Encoder-Decoder, the data can produce more obvious and specific data features, so that the intelligent agent can learn useful knowledge more quickly in the early exploration process, so that it can converge more quickly. Fig.14 The figure shows the total reward value of the agent after the interaction with the environment when the number of training times is 50 times, and the convergence effect of the early stage is compared. Fig.14 It can be seen that when the Encoder-Decoder is 6 layers, the early convergence is faster and the convergence effect is better.

[0102] Step 2: Design a TDDPG with a dual experience pool storage structure. Based on step 1, for different training times, we increase the number of training times to observe the different convergence times of Encoder-Decoder layers on the agent's exploration process. The effect of Encoder-Decoder layers on feature extraction on the efficiency of reinforcement learning training is shown in Table 2.

[0103] Table 2 Convergence time of early exploration of the agent caused by different layers of Encoder-Decoder

[0104]

[0105] As can be seen from Table 2, the 6-layer Encoder-Decoder Transformer structure enables the agent to converge quickly in the early exploration process, thereby improving the overall training efficiency of the model.

[0106] The method of the present invention uses the TDDPG model of dual experience pools in the field of water eutrophication prediction, sets the deep reinforcement learning environment as an intelligent agent that performs prediction actions according to the input state of water eutrophication numerical data, and continuously learns through the feedback results obtained, thereby achieving the purpose of improving prediction efficiency.

[0107] Step 3: Markov decision design. Compare the prediction results of the TDDPG model with dual experience pools of the present invention with those of the DDPG reinforcement learning model and the TDDPG reinforcement learning model, and select the 701st to 750th nodes for result display, as shown in Figure 3. Fig.15 shown.

[0108] like Fig.15As shown in the figure, in the prediction of water quality data of time series of eutrophication, compared with the prediction results of DDPG reinforcement learning model and TDDPG reinforcement learning model, the TDDPG prediction model of dual experience pool achieved better results. At the same time, the prediction results also showed that the TDDPG prediction model of dual experience pool can quickly approach the true value and converge quickly in the early stage of prediction. At the same time, in order to express this result more intuitively, the model evaluation index is calculated, and the evaluation index of each model is shown in Table 3 below.

[0109] Table 3 Evaluation indicators of each model

[0110]

[0111]

[0112] As shown in Table 3, according to the model evaluation indicators, the mean absolute error (MAE), root mean square error (RMSR) and mean absolute percentage error (MAPE) of the dual experience pool TDDPG model of the method of the present invention are lower than those of the DDPG model and the TDDPG model, indicating that the dual experience pool TDDPG model has higher prediction accuracy.

[0113] Step 4, DDPG-Dual 3Q Learning. The convergence time of agent B in the early exploration of the environment at different training times is shown in Table 4. In order to verify the prediction efficiency level of the DDPG-Dual 3Q learning prediction model, a comparative experiment was conducted in the form of control variables. The convergence time of agent B in the early exploration of the environment at different training times under different parameter settings of the DDPG-Dual 3Q learning prediction model is different.

[0114] Table 4 Agent convergence time under different training times

[0115]

[0116] Taking the 24 moments from 0:00 on July 5 to 0:00 on July 6 as an example, the selection results of the DDPG-dual 3Q learning prediction model when executing decisions are shown in Table 5 below.

[0117] Table 5 Decision results of 3Q learning model at different times (partial)

[0118]

[0119]

[0120] According to the experimental results in the table, the introduction of the greedy factor of the inverse tangent function in the Q-learning algorithm can speed up the training time of the agent, thereby improving the efficiency of model parameter updates; at the same time, the Encoder-Decoder structure with different layers will also affect the early exploration process of the agent. The experimental results show that when the greedy factor of the inverse tangent function is introduced, constructing a 6-layer Encoder-Decoder structure network can maximize the efficiency of the early interaction between the agent and the environment, thereby improving the training efficiency of the model.

[0121] When the single-layer 3Q learning prediction model makes a decision, it selects the state set model for prediction based on the Q table at the current moment, organizes the initial prediction results into error sets, and forms a discrete state error set as the secondary input. After training, the decision is made again. As can be seen from the table, at a certain moment, the two decisions made by the DDPG-dual 3Q learning prediction model may be the same prediction model or different prediction models, which depends entirely on the model prediction results at the current moment. The two prediction results are added together to obtain the final prediction result.

[0122] Step 5: Prediction based on DDPG-dual 3Q learning. Compare the prediction result curves of the single prediction model ADDPG model, RDPG model, dual experience pool TDDPG model with the deep reinforcement learning prediction model DDPG-single 3Q learning model and DDPG-dual 3Q learning model. Take Chl-a concentration as an example for prediction. The prediction results are as follows: Fig.16 The prediction results from the 100th to 300th moments are selected for detailed display. The prediction results are as follows Fig.17 shown.

[0123] like Fig.16 , where the true value represents the target curve. It can be seen from the figure that the prediction result curve of Chl-a concentration using the method of the present invention is closer to the true target curve of Chl-a concentration prediction than the prediction result curve of the ADDPG model, RDPG model, double experience pool TDDPG model, and DDPG-single 3Q learning model. The evaluation indicators of the above models are shown in Table 6. It can be seen from the evaluation indicators in Table 6 that the error between the predicted value and the true value using the method of the present invention is the smallest and the accuracy is the highest.

[0124] Table 6 Model evaluation indicators

[0125]

[0126] It should be noted that the model of the present invention is aimed at the prediction of multi-index water quality data, and the above results are only modeled and predicted based on the prediction of Chl-a concentration. Fig.16 , 17The model prediction result curve and the model evaluation index results analysis in Table 6 can draw the following conclusions:

[0127] First, comparing the three evaluation indicators of the dual experience pool TDDPG model with those of the ADDPG and RDPG models, the MAE, RMSE and MAPE values ​​of the ADDPG and RDPG models are 0.0323, 0.0394, 0.036% and 0.0306, 0.0388, 0.031%, respectively, while the MAE, RMSE and MAPE values ​​of the dual experience pool TDDPG model are 0.0267, 0.0317, 0.027%, and all the values ​​are improved. It can be seen that the TDDPG model with a dual experience pool structure in the present invention can prevent the reinforcement learning agent from falling into the local optimum during training, and can more easily find the optimal strategy, thereby improving the prediction accuracy of the model.

[0128] Second, comparing the three evaluation indicators of the DDPG-single-layer 3Q learning model with the dual experience pool TDDPG, ADDPG, and RDPG models, the MAE, RMSE, and MAPE values ​​of the DDPG-single-layer 3Q learning model are 0.0224, 0.0272, and 0.020%, respectively. It can be concluded that the reinforcement learning agent conducts learning feedback in the process of continuous interaction with the environment, can optimize the prediction situation of a single prediction model at different times, and can make the best decision at most times, thereby enhancing the accuracy of the selected model.

[0129] Third, comparing the three evaluation indicators of the DDPG-dual 3Q learning model and the DDPG-single 3Q learning model, the MAE, RMSE and MAPE values ​​of the DDPG-single 3Q learning model are 0.0184, 0.0230 and 0.016%, respectively. It can be concluded that the secondary input training of the error set predicted by the single 3Q learning can improve the selection accuracy of the model, and the model parameters are updated by predicting the error set to establish the final strategy of the model, which ensures that the optimality probability of the model strategy is maximized, thereby improving the prediction accuracy of the model.

[0130] The eutrophication prediction results of water bodies were evaluated and analyzed based on water quality data indicators. The Trophic Level Index (TLI) method was used for analysis. The corresponding TSI values ​​were calculated using indicators such as CODMn, Chl-a, TP, NH3-N, NO3-N, and SD. The weighted arithmetic mean was then used to evaluate the eutrophication prediction results of lakes. The correlation coefficients between Chl-a and other parameters of reference Chinese lakes (reservoirs) are shown in Table 7 below.

[0131] Table 7 Correlation coefficients between Chl-a and other parameters

[0132] parameter Chl-a TP TN SD CODM <![CDATA[r j ]]> 1 0.84 0.82 -0.83 0.83 <![CDATA[r j 2 ]]> 1 0.7056 0.6724 0.6889 0.4668 <![CDATA[W j ]]> 0.2663 0.1879 0.1790 0.1834 0.1834

[0133] Table r j Represents the jth parameter and the reference parameter, r j 2 represents the square of the jth parameter and the reference parameter, W j The correlation coefficient of Chl-a uses a series of continuous numbers from 0 to 100 to classify the nutrient status of lakes (reservoirs). The results are shown in Table 8 below.

[0134] Table 8 Water eutrophication classification standards

[0135] Nutritional level Poor nutrition Medium Nutrition Mildly eutrophic Moderately eutrophic Severe eutrophication TLI <30 30≤TLI≤50 50<TLI≤60 60<TLI≤70 TLI>70

[0136] According to the lake (reservoir) eutrophication evaluation method and classification technical regulations, the nutrient status index of each indicator is calculated as follows:

[0137] TLI(chl-a)=10(2.5+1.086ln (chl-a)) (7)

[0138] TLI(TP)=10(9.436+1.624 ln(TP)) (8)

[0139] TLI(TN)=10(5.453+1.694 ln(TN)) (9)

[0140] TLI(SD)=10(5.118+1.94 ln(SD)) (10)

[0141] TLI(CODMn)=10(0.109+2.661 ln(CODMn)) (11)

[0142]

[0143] In formula (12), represents the nutritional status index after the weighted average of each index, TLI(j) represents the j-th nutritional status index, m represents the number of indicators, and in the embodiment of the present invention, m is 5, corresponding to 5 nutritional status indices TLI(chl-a), TLI(TP), TLI(TN), TLI(SD) and TLI(CODMn); ​​W j is the weight of the jth nutrient status index. TN stands for total nitrogen, which can be obtained from nitrate nitrogen.

[0144] Taking the 24-hour data of the Taihu Lake waters on September 5, 2021 as an example, the TLI values ​​of each indicator are calculated by equations (7) to (11), and the weights of each indicator are finally calculated by equation (12). The value calculation determines the September 5, 2021 The value is 34. According to the eutrophication classification standard for water bodies, the water body is currently mesotrophic.

Claims

1. A water eutrophication prediction method based on dual experience pool TDDPG and DDPG-dual 3Q learning model, characterized in that: The steps include: Step 1: Obtain water quality monitoring data of the target water area, use the Markov decision process to represent the water quality monitoring time series data, and convert the prediction problem of water eutrophication into a Markov decision problem; The historical water quality multi-parameter time series data are obtained from the water quality monitoring data of the target water area, and the prediction problem of water eutrophication is converted into a Markov decision problem. The state s in the Markov decision process t Corresponding to a set of water quality parameters at time t, the action corresponds to the predicted operation, and the agent responds to the state s t After performing an action, transfer to the next state s t+1 ; Evaluate the eutrophication degree of water bodies by predicting water quality parameters in the future; Step 2: Use the dual experience pool TDDPG prediction model to predict the historical water quality multi-parameter time series and output the water quality multi-parameter time series in the future; The dual experience pool TDDPG prediction model construction method includes: Step 21: Improve the DDPG network, set up an expert experience pool, and form a dual experience pool with the random experience pool; during training, the Actor online network stores the predicted quadruple into the random experience pool, and at the same time, the Critic network generates an approximate estimated action at the next moment when updating the target Q value function, and stores the quadruple corresponding to the approximate estimated action into the expert experience pool; During the training process, samples are randomly selected from the dual experience pool for training; the four-tuple is (current state, action, reward, next moment state); Step 22: Set the Actor online network and the Actor target network in the DDPG network to use an independent Transformer structure to extract state features from the input water quality multi-parameter time series, and then input them into the Actor network for action decision; Step 23: Mark the agent in the dual experience pool TDDPG prediction model as the first agent; optimize the decision-making strategy of the action to maximize the total reward value obtained by the first agent after interacting with the environment. The larger the total reward value, the more accurate the agent's prediction; set the dual experience pool TDDPG prediction model to output the first preliminary prediction result of the multi-parameter time series of water quality in the future; Step 3: Construct the ADDPG prediction model and the RDPG prediction model, input the historical water quality multi-parameter time series, and predict the water quality multi-parameter time series in the future; The ADDPG prediction model uses the Attention network to extract features from the historical water quality multi-parameter time series, and then uses the DDPG network improved in step 21 to make action decisions; the agent in the ADDPG prediction model is marked as the second agent, and the action decision strategy of the second agent is optimized; the second preliminary prediction result of the water quality multi-parameter time series in the future time is output through the ADDPG prediction model; The RDPG prediction model uses the LSTM network to extract features from the historical water quality multi-parameter time series, and then uses the improved DDPG network in step 21 to make action decisions; the agent in the RDPG prediction model is marked as the third agent, and the action decision strategy of the third agent is optimized; the third preliminary prediction result of the water quality multi-parameter time series in the future time is output through the RDPG prediction model; Step 4: Construct the DDPG-dual 3Q learning model to make the final prediction of the multi-parameter time series of water quality in the future; In the DDPG-dual 3Q learning model, the first, second and third preliminary prediction results are input into the first 3Q learning as the state model set, and the agent in the DDPG-dual 3Q learning model is set as B, and the agent B decides the preliminary prediction result and the corresponding prediction model selected in a single time step; the errors of the first, second and third preliminary prediction results are input into the second 3Q learning as the state model, and the agent B decides the errors and the corresponding prediction model selected in a single time step; in a single time step, the agent B compensates the error of the decision to the preliminary prediction result of the decision, and obtains the final prediction result of the water quality multi-parameter data in this time step; Step 5: The input historical water quality multi-parameter time series is sampled through a sliding window, and the dual experience pool TDDPG model, ADDPG prediction model and RDPG prediction model are input to obtain preliminary prediction results. The DDPG-dual 3Q learning model then decides and outputs the final predicted water quality multi-parameter time series. The degree of eutrophication of the water body is determined based on the final predicted water quality multi-parameter time series.

2. The method according to claim 1, characterized in that In the step 4, in the constructed DDPG-dual 3Q learning model, in the first 3Q learning, agent B obtains the preliminary prediction results of the dual experience pool TDDPG prediction model, the ADDPG prediction model and the RDPG prediction model and the corresponding three Q values ​​in a single time step, and uses the three Q values ​​to update the final Q learning strategy Q * , based on Q * Make the decision which state model to choose.

3. The method according to claim 1, characterized in that In step 22, the Transformer structure used includes an encoder and a decoder each having 6 layers.