A method, device, equipment and medium for sensing and predicting water quality status in a water environment

Through the deep autoencoder and event-driven fuzzy neural network model, the problem of low perception and prediction accuracy of water quality state in the water environment is solved, and efficient tracking and accurate prediction of water quality state is achieved, adapting to the non-stationarity and multi-conditioning of the water environment.

CN118886544BActive Publication Date: 2025-08-26BEIJING UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410912974.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-09
Publication Date
2025-08-26
Estimated Expiration
2044-07-09

AI Technical Summary

Technical Problem

The existing water quality state perception and prediction methods of water environment have problems with low water quality monitoring and prediction accuracy. Especially when facing the evolution process of water quality state in water environment coupled with multi-factor space-time, it is difficult to achieve effective state perception and feature extraction, and the non-stationarity and multi-conditioning of the water quality state evolution process make it difficult to predict key water quality parameters.

Method used

Feature extraction is performed using deep autoencoder, events are defined by reconstruction errors, combined with event-driven fuzzy neural network model, and learning strategies are adaptively adjusted to achieve efficient tracking and approximation of water quality state in the water environment and improving the prediction accuracy of biochemical oxygen demand.

Benefits of technology

It improves the prediction accuracy of the water quality state in the water environment, reduces the calculation complexity of the prediction model, and can more accurately model and predict the characteristics of the water quality state, adapting to the non-stationarity and multi-conditioning of the water environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118886544B_ABST
    Figure CN118886544B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, equipment and medium for perceiving and predicting the water quality status of a water environment, and relates to the field of artificial intelligence-enabled water environment pollution prevention and control. The method comprises: inputting actual data of an auxiliary variable group into a deep autoencoder to obtain reconstructed data corresponding to the actual data of the auxiliary variable group, determining a reconstruction error based on the actual data and the reconstructed data of the auxiliary variable group, determining a learning strategy based on the reconstruction error, training a fuzzy neural network model using the learning strategy, and predicting the actual data of the auxiliary variable group using the trained fuzzy neural network model to obtain predicted biochemical oxygen demand. The present application improves the prediction accuracy of biochemical oxygen demand.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence-enabled water environment pollution prevention and control, and in particular to a method, device, equipment and medium for perceiving and predicting the water quality status of a water environment. Background Art

[0002] The perception and prediction of water quality are of widespread concern worldwide. Within aquatic environments such as rivers and lakes, the evolution of water quality is a complex dynamic system, involving the interaction of chemical, physical, and biological reactions, and embodied in human behavior and decision-making. Water is characterized by nonstationarity, strong nonlinearity, strong coupling, multi-conditional nature, and event-driven nature. Therefore, achieving intelligent perception and prediction of water quality is a challenging problem and an effective approach to improving the intelligent management of water quality.

[0003] Currently, the most widely used method for sensing and predicting water quality status in water environments is to establish a soft sensing model based on artificial neural networks, and to apply statistical analysis, regression analysis, and other methods. This method demonstrates significant advantages in terms of cost-effectiveness, reliability, and portability. As China continues to promote smart environmental protection, artificial intelligence technology has become a key tool for energy conservation, emission reduction, and quality assurance in the field of water quality sensing and prediction. However, this method suffers from low water quality monitoring and prediction accuracy. Summary of the Invention

[0004] The purpose of this application is to provide a method, device, equipment and medium for perceiving and predicting the water quality status of a water environment, which can improve the perception of the mapping relationship between water environment state variables and water quality variables, namely biochemical oxygen demand and auxiliary variables, while improving the prediction accuracy of biochemical oxygen demand.

[0005] To achieve the above objectives, this application provides the following solutions:

[0006] In a first aspect, the present application provides a method for sensing and predicting water quality in a water environment, comprising:

[0007] Acquire actual data of an auxiliary variable group corresponding to water quality state parameters of a water environment monitoring station; the auxiliary variable group includes a plurality of auxiliary variables; the auxiliary variables are water environment state variables associated with biochemical oxygen demand;

[0008] Inputting the actual data of the auxiliary variable group into a trained deep autoencoder to obtain reconstructed data corresponding to the actual data of the auxiliary variable group;

[0009] determining a reconstruction error based on the actual data and the reconstructed data of the auxiliary variable group;

[0010] determining a learning strategy according to the reconstruction error;

[0011] The learning strategy is used to train the fuzzy neural network model according to the sample data set to obtain a trained fuzzy neural network model; the sample data set includes a plurality of sample original data of the auxiliary variable group and the sample biochemical oxygen demand corresponding to each of the sample original data;

[0012] The actual data of the auxiliary variable group is input into the trained fuzzy neural network model to obtain the predicted biochemical oxygen demand corresponding to the actual data of the auxiliary variable group.

[0013] In a second aspect, the present application provides a water environment water quality state perception and prediction device, comprising:

[0014] A data acquisition module is used to obtain actual data of an auxiliary variable group corresponding to water quality state parameters of a water environment monitoring station; the auxiliary variable group includes a plurality of auxiliary variables; the auxiliary variables are water environment state variables associated with biochemical oxygen demand;

[0015] A reconstruction module is used to: input the actual data of the auxiliary variable group into a trained deep autoencoder to obtain reconstructed data corresponding to the actual data of the auxiliary variable group;

[0016] A reconstruction error determination module is used to determine a reconstruction error based on actual data and reconstructed data of the auxiliary variable group;

[0017] A learning strategy determination module, configured to: determine a learning strategy according to the reconstruction error;

[0018] A training module is used to train the fuzzy neural network model based on a sample data set using the learning strategy to obtain a trained fuzzy neural network model; the sample data set includes a plurality of sample original data of the auxiliary variable group and the sample biochemical oxygen demand corresponding to each of the sample original data;

[0019] The prediction module is used to input the actual data of the auxiliary variable group into the trained fuzzy neural network model to obtain the predicted biochemical oxygen demand corresponding to the actual data of the auxiliary variable group.

[0020] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the above-mentioned method for perceiving and predicting the water quality status of a water environment.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned method for perceiving and predicting the water quality status of a water environment is implemented.

[0022] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0023] The present application provides a method, apparatus, equipment and medium for perceiving and predicting the water quality status of a water environment. The method inputs the actual data of an auxiliary variable group into a deep autoencoder to obtain reconstructed data corresponding to the actual data of the auxiliary variable group, determines a reconstruction error based on the actual data and the reconstructed data of the auxiliary variable group, determines a learning strategy based on the reconstruction error, and trains a fuzzy neural network model using the learning strategy. The non-stationarity and multi-condition nature of the water quality status of the water environment are perceived in advance through the reconstruction error, and the learning strategy is adaptively adjusted based on the reconstruction error. The trained fuzzy neural network model obtained by training with the learning strategy can achieve efficient tracking and approximation of the non-stationary water quality status, and the trained fuzzy neural network model has higher prediction accuracy for the water quality status of the water environment (biochemical oxygen demand). BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0025] Figure 1 This is an application environment diagram of a method for perceiving and predicting water quality in a water environment in one embodiment of the present application;

[0026] Figure 2 A flow chart of a method for sensing and predicting water quality in a water environment according to an embodiment of the present application;

[0027] Figure 3 A schematic diagram of the fuzzy neural network model structure provided in one embodiment of the present application;

[0028] Figure 4 A schematic diagram of the ranking of correlation indexes between relevant variables and biochemical oxygen demand provided in one embodiment of the present application;

[0029] Figure 5 A schematic diagram of the distribution of events triggered during the training process of a deep autoencoder provided in one embodiment of the present application;

[0030] Figure 6 A schematic diagram showing the verification results and errors of a verification data set using a fuzzy neural network model provided in one embodiment of the present application; Figure 6 (a) is a schematic diagram of the verification results of the fuzzy neural network model on the verification data set; Figure 6 (b) is a schematic diagram of the error of the fuzzy neural network model on the validation data set;

[0031] Figure 7 A schematic diagram of the prediction results and errors of a test data set using a fuzzy neural network model provided in one embodiment of the present application; Figure 7 (a) is a schematic diagram of the verification results of the fuzzy neural network model on the test data set; Figure 7 (b) is a schematic diagram of the error of the fuzzy neural network model for the test data set;

[0032] Figure 8 A schematic diagram of the functional modules of a water environment water quality status perception and prediction device provided in one embodiment of the present application.

[0033] Figure 9 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0035] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0036] The water quality state perception and prediction method of the water environment provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 via the network. The data storage system can store data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers. The terminal 102 can send the actual data of the auxiliary variable group to the server 104. After the server 104 receives the actual data of the auxiliary variable group, the server 104 inputs the actual data of the auxiliary variable group into a deep autoencoder to obtain reconstructed data corresponding to the actual data of the auxiliary variable group, determines a reconstruction error based on the actual data and the reconstructed data of the auxiliary variable group, determines a learning strategy based on the reconstruction error, uses the learning strategy to train the fuzzy neural network model, and uses the trained fuzzy neural network model to predict the actual data of the auxiliary variable group to obtain predicted biochemical oxygen demand. The server 104 can feedback the obtained predicted biochemical oxygen demand to the terminal 102. In addition, in some embodiments, the method for perceiving and predicting the water quality status of the water environment can also be implemented independently by the server 104 or the terminal 102. For example, the terminal 102 can directly perceive and predict the water quality status of the water environment based on the actual data of the auxiliary variable group, or the server 104 can obtain the actual data of the auxiliary variable group from the data storage system and perceive and predict the water quality status of the water environment based on the actual data of the auxiliary variable group.

[0037] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, and tablet computers. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or a cloud server.

[0038] In an exemplary embodiment, Figure 2 As shown, a method for sensing and predicting the water quality status of a water environment is provided. The method is executed by a computer device, specifically a computer device such as a terminal or a server, or a terminal and a server. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in FIG. 1 is taken as an example to illustrate the process, including the following steps 201 to 206. In which:

[0039] Step 201: Acquire actual data of an auxiliary variable group corresponding to water quality state parameters of a water environment monitoring station; the auxiliary variable group includes several auxiliary variables; the auxiliary variables are water environment state variables associated with biochemical oxygen demand (BOD).

[0040] Step 202: Input the actual data of the auxiliary variable group into a trained deep autoencoder to obtain reconstructed data corresponding to the actual data of the auxiliary variable group.

[0041] Step 203: Determine a reconstruction error based on the actual data and the reconstructed data of the auxiliary variable group.

[0042] Step 204: Determine a learning strategy according to the reconstruction error.

[0043] Step 205: Using the learning strategy, a fuzzy neural network model (FNN) is trained based on a sample data set to obtain a trained fuzzy neural network model; the sample data set includes a plurality of sample original data of the auxiliary variable group and the sample biochemical oxygen demand corresponding to each of the sample original data.

[0044] Step 206: Input the actual data of the auxiliary variable group into the trained fuzzy neural network model to obtain the predicted biochemical oxygen demand corresponding to the actual data of the auxiliary variable group.

[0045] Implement the above-mentioned steps 201 to 206, input the actual data of the auxiliary variable group into the deep autoencoder, obtain the reconstructed data corresponding to the actual data of the auxiliary variable group, determine the reconstruction error according to the actual data and the reconstructed data of the auxiliary variable group, determine the learning strategy according to the reconstruction error, use the learning strategy to train the fuzzy neural network model, perceive the non-stationary and multi-condition nature of the water quality state of the water environment in advance through the reconstruction error, and adaptively adjust the learning strategy according to the reconstruction error, so that the trained fuzzy neural network model obtained by the learning strategy can achieve efficient tracking and approximation of the non-stationary water quality state, thereby improving the prediction accuracy of the trained fuzzy neural network model for the water quality state of the water environment (biochemical oxygen demand). In addition, the existing water environment water quality state perception and prediction have the following defects: (1) Most of the existing artificial neural network soft measurement models adopt shallow structures. When faced with the water environment water quality state evolution process with multi-factor spatiotemporal coupling, they are unable to complete the task of effective state perception and feature extraction of specific water quality parameters and their related variables; (2) The water environment water quality state evolution process contains human behavior and decision-making. The prediction of key water quality parameters requires a lot of expert experience and knowledge to characterize, and a single feature learning method is difficult to achieve supervised learning of the mapping relationship between water environment state variables and water quality variables; (3) The non-stationary and multi-conditional nature of the water environment water quality state evolution process leads to the complexity of the dynamic characteristics of key water quality parameters, increasing the possibility of the prediction model breaking through the boundaries of economy and stability, thereby affecting the overall performance of water environment water quality state perception and prediction, and further increasing the difficulty of intelligent management and regulation of water environment. Therefore, this application proposes a deep autoencoder that can perceive the non-stationary and multi-conditional nature of water quality parameters in advance due to the complex water environment state evolution process. Events are defined based on the change characteristics of the reconstruction error in the feature extraction process of the raw data by the deep autoencoder, and the non-stationary and multi-condition characteristics of the water quality state of the water environment are characterized by the event jump characteristics. In response to the problem of low accuracy in water quality monitoring and prediction due to the non-stationary and event-driven characteristics of the water environment state evolution process, this application proposes an event-driven fuzzy neural network model as a water quality prediction model. Compared with existing water quality prediction models, the event-driven fuzzy neural network model can adaptively adjust the learning strategy according to the characteristics of the event, thereby achieving more accurate modeling and prediction of the water quality state characteristics of the water environment.

[0046] The original data were obtained from the water environment monitoring station, biochemical oxygen demand was selected as the parameter to characterize the water quality state, and the water environment state variables associated with biochemical oxygen demand were selected as auxiliary variables, and then the corresponding relationship between the auxiliary variables and BOD was determined.

[0047] In another exemplary embodiment of the present application, before the above step 201, the method may further include the following steps 301 to 304. Among them:

[0048] Step 301: Acquire a water environment state variable set of a target water environment monitoring station; the water environment state variable set includes a plurality of water environment state variables.

[0049] Step 302: For each of the water environment state variables, calculate the mutual information value corresponding to the water environment state variable according to the water environment state variable and biochemical oxygen demand.

[0050] Step 303: Sort the mutual information values ​​corresponding to all water environment state variables from large to small.

[0051] Step 304: Determine the water environment state variables corresponding to the mutual information values ​​that are ranked first by a set number as auxiliary variables; all auxiliary variables constitute an auxiliary variable group.

[0052] The evolution process of water quality in the water environment is a complex dynamic system, which involves the interaction of chemical, physical and biological reactions, and contains human behavior and decision-making. It has the characteristics of strong nonlinearity, strong coupling and multi-operating conditions. Therefore, the data directly obtained from the monitoring station needs to be processed and analyzed, and auxiliary variables related to water quality are selected based on this. Traditional linear regression methods are difficult to effectively mine and measure the correlation index between water quality and related variables. Therefore, this application introduces the mutual information analysis method to measure the correlation index between water quality and related variables. Mutual information can represent the amount of information shared between two variables and is an effective measure of the degree of correlation between variables. Given two discrete random variables X and Y, if their marginal probability distribution and joint probability distribution are P(x), P(y) and P(x,y) respectively, then the mutual information I(X,Y) between the two variables can be calculated as follows:

[0053]

[0054] Here, X and Y represent the water environment state variable and biochemical oxygen demand, respectively. When X and Y are completely unrelated, the mutual information is 0. Conversely, the greater the correlation between the two variables, the greater the mutual information, meaning that the two variables contain more common information. Since the random variables X and Y are discrete, their marginal probability distributions P(x), P(y), and the joint probability distribution P(x, y) are calculated based on actual statistics.

[0055] Water quality and related data are collected from water environment monitoring stations. The mutual information value between each water environment state variable and BOD is calculated using formula (1), and the variable with the largest mutual information value with BOD is selected as the auxiliary variable.

[0056] The set number can be 10. This application uses the mutual information measurement method to give the correlation index ranking of related variables and BOD (such as Figure 4 shown), according to Figure 4, the top 10 water environment status variables with the highest correlation index were selected as auxiliary variables.

[0057] In another exemplary embodiment of the present application, in order to characterize the non-stationarity and multi-condition nature of the water quality state of the water environment, the present application proposes a deep autoencoder (DeepAutoEncoder) to perform feature extraction on the water quality state data of the water environment, define events according to the reconstruction error characteristics of the deep autoencoder, and use events to reflect and characterize the non-stationarity and multi-condition nature of the water quality state of the water environment.

[0058] A deep autoencoder is an unsupervised learning method commonly used for feature extraction, data dimensionality reduction, and generative modeling. A deep autoencoder typically consists of two parts: an encoder and a decoder. The encoder compresses the input data into latent representations using the function h = g(x), and the decoder reconstructs the latent representations back into the input data using the function r = f(h). The entire autoencoder can be represented by r = f(g(x)). During feature extraction, gradient backpropagation is primarily used to bring the reconstruction r and the input x closer together. The reconstruction error can be expressed as:

[0059] J(t)=||x(t)-f(g(x(t)))|| (2);

[0060] g(x)=Γ(x,ω0,ω) (3);

[0061] f(x)=Γ -1 (x,ω0,ω) (4);

[0062] Where x(t) is the original input data, which is a vector of auxiliary variables for biochemical oxygen demand; Γ(·) is the nonlinear mapping function of the encoding neural network; ω0 and ω are the initial and optimal connection weights of the encoding neural network, respectively; and J(t) represents the reconstruction error. During feature extraction from the raw data by the deep autoencoder, the gradient backpropagation algorithm is used to minimize the reconstruction error shown in Equation (2), thereby obtaining the optimal encoding parameters.

[0063] After obtaining the trained deep autoencoder, the actual data of the auxiliary variable group is input into the trained deep autoencoder to obtain the reconstructed data corresponding to the actual data of the auxiliary variable group. The reconstruction error is obtained according to the actual data and reconstructed data of the auxiliary variable group and formula (2). After obtaining the reconstruction error, the above step 204 is replaced by the following steps 401 to 403:

[0064] Step 401: Determine a first variable and a second variable according to a reconstruction error; the first variable and the second variable are used to reflect a downward trend of the reconstruction error.

[0065] Step 402: Determine a reconstruction error change event corresponding to the reconstruction error based on the first variable and the second variable; the reconstruction error change event is used to characterize the water quality state and the multi-condition characteristics of the data.

[0066] Step 403: Determine a learning strategy according to a reconstruction error change event corresponding to the reconstruction error.

[0067] Define two first variables and second variables that can reflect the downward trend of the reconstruction error. The calculation formulas of the first variable and the second variable are as follows:

[0068] ε λ (t) = J(t) - J(t - λ) (5);

[0069] ξ λ (t) = ε λ (t)-ε λ (t-λ) (6);

[0070] Among them, ε λ (t) represents the first variable; ξ λ (t) represents the second variable; λ is the lag parameter.

[0071] Before step 402, the process also includes: defining an event that can characterize the water quality state and the multi-condition characteristics of the data, that is, defining a reconstruction error change event, based on the reconstruction error change trend and characteristics and in combination with formulas (5) and (6).

[0072] E1=<ε λ (t)<0,ξ λ (t)>0> (7);

[0073] E2=<ε λ (t)<0,ξ λ (t)<> (8);

[0074] E3=<ε λ (t)>0,ξ λ (t)>0> (9);

[0075] E4=<ε λ (t),ξ λ (t)>fluctuates (10);

[0076] E0=<ε λ (t),ξ λ (t)>Others (11);

[0077] Among them, the reconstruction error change events include E1, E2, E3, E4 and E0; E1, E2, E3, E4 and E0 represent five events respectively, <ε λ (t),ξ λ (t)> indicates the state based on the reconstruction error; E1 indicates that the reconstruction error is getting smaller and smaller, and the downward trend is becoming more and more obvious; event E2 indicates that the reconstruction error is getting smaller and smaller, and the downward trend is becoming slower and slower; event E3 indicates that the reconstruction error is getting larger and the upward trend is becoming more and more obvious; event E4 indicates that the reconstruction error and its downward trend change irregularly, and event E0 indicates that the reconstruction error and its downward trend have other situations.

[0078] Define events based on the reconstruction error characteristics of the deep autoencoder, Figure 5 It is a distribution diagram of events triggered by the deep autoencoder during training.

[0079] Next, we construct an event-triggered fuzzy neural network (ET-FNN) model, a trained fuzzy neural network model, to learn and characterize the nonlinear relationship between auxiliary variables and BOD. This ET-FNN model adaptively adjusts its learning strategy based on the characteristics of events, enabling better modeling and approximation of water quality characteristics. We then use the trained ET-FNN model as a predictive model to predict and analyze water quality over different time periods. The performance of the proposed predictive model is evaluated using three different evaluation metrics.

[0080] The structure of the fuzzy neural network model is as follows Figure 3 As shown, the fuzzy neural network model includes an input layer, a membership function layer, a rule layer, and an output layer. The output error of the fuzzy neural network model is mathematically described as:

[0081]

[0082]

[0083]

[0084] Among them, C(t) is also called the objective function of FNN, y(t) and They represent the actual output and expected output of FNN respectively. The actual output of FNN is the predicted biochemical oxygen demand corresponding to the original data of the auxiliary variable group samples, and the expected output is the sample biochemical oxygen demand corresponding to the original data of the auxiliary variable group samples. R is the number of neurons in the membership function layer and the rule layer of the fuzzy neural network model, and n is the number of neurons in the input layer of the fuzzy neural network model. ris the output of the rth neuron in the regular layer; w=[w1,w2,…,w R ] is the connection weight between the rule layer and the output layer, s j =[s 1j ,s 2j ,…,s nj ] is the center vector of the jth neuron in the membership function layer, v j =[v 1j ,v 2j ,…,v nj ] is the width of the jth neuron in the membership function layer, x=[x1,x2,…,x n ] is the input of the fuzzy neural network model. The learning process of the fuzzy neural network model is to train the centers and widths of the neurons in the membership function layer and the connection weights between the rule layer and the output layer, which are recorded as the parameter set θ = [w, s, v].

[0085] A learning strategy that matches the characteristics of different reconstruction error change events is designed. That is, when a specific reconstruction error change event is triggered, the algorithm starts the corresponding learning strategy. The specific parameters of the learning algorithm are as follows:

[0086]

[0087]

[0088] θ(t+1)=θ(t), Otherwise (17);

[0089] Among them, 0<η2<η1<1 represents the learning rate under different learning strategies; Occurs represents occurrence, for example, ifE1Occurs represents if event E1 occurs. From formulas (15)-(17), it can be seen that the learning rate gradually decreases as the reconstruction error decreases. When the reconstruction error increases or fluctuates, the learning rate is 0; formula (15) is the parameter learning algorithm if event E1 occurs, formula (16) is the parameter learning algorithm if event E2 occurs, and formula (17) is the parameter learning algorithm when events other than events E1 and E2 occur. In this application, formula (17) is the parameter learning algorithm when events E3, E4, and E0 occur.

[0090] Based on the sample data set, the learning and training process shown above is repeated until the parameter optimization solution process converges. Through the above process, the learning strategy of the reconstruction error change event corresponding to the reconstruction error can be determined. The fuzzy neural network model is trained using the learning strategy to obtain a trained fuzzy neural network model. The trained fuzzy neural network model is an event-driven fuzzy neural network.

[0091] First, a deep autoencoder was trained. Through trial and error, the optimal structure of the deep autoencoder was determined to be 10-8-5-3 (i.e., the number of input, encoder, decoder, and output layers). The hyperparameters used during the learning process were set to: n = 10, λ = 2, R = 6, η1 = 0.8, and η1 = 0.4. The dataset used in the experiment was taken from a water quality monitoring station in Gubeikou, Beijing, and consisted of 1600 training data sets, 320 validation data sets, and 160 test data sets.

[0092] After the step of obtaining the trained fuzzy neural network model, the water environment water quality state perception and prediction method further includes: evaluating the trained fuzzy neural network model.

[0093] The trained fuzzy neural network model is used to test data from different time periods or future time periods to predict the water quality status of the water environment. In order to evaluate the prediction performance, the following performance indicators are defined:

[0094]

[0095]

[0096] Where N is the number of samples; y(t) is the biochemical oxygen demand of the sample corresponding to the original data of the auxiliary variable group sample; is the predicted biochemical oxygen demand corresponding to the original data of the auxiliary variable group samples.

[0097] Figure 6 is the verification result and error of the fuzzy neural network model on the verification data set; Figure 7 is the prediction result and error of the fuzzy neural network model for the test data set. In order to fully demonstrate the advantages of the fuzzy neural network model for water environment water quality state prediction model, the independent repeated experiment was carried out 20 times and compared with other methods. The average value of the comparison results is shown in Table 1. Figure 6 and Figure 7 It can be seen that the trained fuzzy neural network model achieved the best results in both prediction accuracy and running time. At the same time, the trained fuzzy neural network model updated 827 times during the BOD prediction process, which is 48.31% lower than other methods, that is, the computational complexity was reduced by 48.31%.

[0098] Table 1 Comparison of the trained fuzzy neural network model with other methods

[0099]

[0100]

[0101] This application first obtains raw data from a water environment monitoring station and determines the correspondence between water environment state variables and water quality variables; secondly, a deep autoencoder is proposed to extract features of the water environment state, and events are defined based on the reconstruction error characteristics of the deep autoencoder; finally, an event-driven fuzzy neural network model is proposed to learn and approximate the non-stationary, nonlinear mapping relationship between water environment state characteristics and water quality variables, thereby realizing the perception and prediction of water quality variables at future moments. This application uses an event-driven approach to accurately track and approximate the non-stationarity of the water environment state, and uses a fuzzy neural network model as a supervised learning model, thereby improving the perception and prediction accuracy of the mapping relationship between water environment state variables and water quality variables, and reducing the computational complexity of the prediction model.

[0102] The present application also provides an application scenario, which applies the above-mentioned water environment water quality status perception and prediction method. Specifically: the water environment water quality status perception and prediction method provided in this embodiment can be applied in a water environment monitoring scenario. The water environment monitoring scenario includes a water outlet link, a water environment water quality status prediction link and an alarm link; the actual data of the auxiliary variable group enters the water environment water quality status prediction link from the water outlet link, obtains the corresponding predicted biochemical oxygen demand, and enters the downstream alarm link. The water environment water quality status perception and prediction method provided in this embodiment belongs to the water environment water quality status prediction link. Specifically, in the water environment water quality state prediction link process for the actual data of the auxiliary variable group, the actual data of the auxiliary variable group can be input into the deep autoencoder to obtain the reconstructed data corresponding to the actual data of the auxiliary variable group, and the reconstruction error is determined according to the actual data and the reconstructed data of the auxiliary variable group. The learning strategy is determined according to the reconstruction error, and the fuzzy neural network model is trained using the learning strategy. The non-stationary and multi-condition nature of the water environment water quality state is perceived in advance through the reconstruction error, and the learning strategy is adaptively adjusted according to the reconstruction error, so that the trained fuzzy neural network model obtained by the learning strategy can achieve efficient tracking and approximation of the non-stationary water quality state.

[0103] Based on the same inventive concept, the embodiments of the present application also provide a water environment water quality state sensing and prediction device for implementing the aforementioned water environment water quality state sensing and prediction method. The implementation solution provided by this device is similar to the implementation solution described in the aforementioned method. Therefore, the specific limitations of one or more water environment water quality state sensing and prediction device embodiments provided below can be found in the above-mentioned limitations of the water environment water quality state sensing and prediction method, and will not be repeated here.

[0104] In an exemplary embodiment, Figure 8 As shown, a water environment water quality state perception and prediction device is provided, including:

[0105] The data acquisition module T1 is used to obtain actual data of an auxiliary variable group corresponding to water quality state parameters of a water environment monitoring station; the auxiliary variable group includes several auxiliary variables; the auxiliary variables are water environment state variables associated with biochemical oxygen demand;

[0106] Reconstruction module T2, used to: input the actual data of the auxiliary variable group into the trained deep autoencoder to obtain reconstructed data corresponding to the actual data of the auxiliary variable group;

[0107] The reconstruction error determination module T3 is used to determine the reconstruction error based on the actual data and the reconstructed data of the auxiliary variable group;

[0108] A learning strategy determination module T4 is used to: determine a learning strategy according to the reconstruction error;

[0109] The training module T5 is used to train the fuzzy neural network model based on the sample data set using the learning strategy to obtain a trained fuzzy neural network model; the sample data set includes a plurality of sample original data of the auxiliary variable group and the sample biochemical oxygen demand corresponding to each of the sample original data;

[0110] The prediction module T6 is used to input the actual data of the auxiliary variable group into the trained fuzzy neural network model to obtain the predicted biochemical oxygen demand corresponding to the actual data of the auxiliary variable group.

[0111] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 9 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store water environment water quality status perception and prediction data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for perceiving and predicting the water quality status of a water environment is realized.

[0112] Those skilled in the art will understand that Figure 9The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0113] In an exemplary embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0114] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0115] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0116] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0117] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may include, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic units, data processing logic units based on quantum computing, and the like.

[0118] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0119] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for sensing and predicting water quality in a water environment, characterized in that: The water environment water quality state perception and prediction method includes: Acquire actual data of an auxiliary variable group corresponding to water quality state parameters of a water environment monitoring station; the auxiliary variable group includes a plurality of auxiliary variables; the auxiliary variables are water environment state variables associated with biochemical oxygen demand; Inputting the actual data of the auxiliary variable group into a trained deep autoencoder to obtain reconstructed data corresponding to the actual data of the auxiliary variable group; determining a reconstruction error based on the actual data and the reconstructed data of the auxiliary variable group; Determining a learning strategy based on the reconstruction error specifically includes: Determining a first variable and a second variable according to the reconstruction error; the first variable and the second variable are used to reflect a downward trend of the reconstruction error; Determining a reconstruction error change event corresponding to the reconstruction error according to the first variable and the second variable; the reconstruction error change event is used to characterize the water quality state and the multi-operating condition characteristics of the data; determining a learning strategy according to a reconstruction error change event corresponding to the reconstruction error; Before the step of determining a reconstruction error change event corresponding to the reconstruction error according to the first variable and the second variable, the method further includes: Define reconstruction error change events; reconstruction error change events include E1, E2, E3, E4 and E0; E1 indicates that the reconstruction error is getting smaller and smaller, and the downward trend is becoming more and more obvious; event E2 indicates that the reconstruction error is getting smaller and smaller, and the downward trend is becoming more and more slow; event E3 indicates that the reconstruction error is getting larger and the upward trend is becoming more and more obvious; event E4 indicates that the reconstruction error and its downward trend change irregularly, and event E0 indicates that the reconstruction error and its downward trend have other situations; E1=<ε λ (t)<0,ξ λ (t)>0>; E2=<ε λ (t)<0,ξ λ (t)<0>; E3=<ε λ (t)>0,ξ λ (t)>0>; E4=<ε λ (t),ξ λ (t)>fluctuates; E0=<ε λ (t),ξ λ (t)>Others; Among them, ε λ (t) represents the first variable; ξ λ (t) represents the second variable; The calculation formula of the first variable is as follows: ε λ (t)=J(t)-J(t-λ); The calculation formula of the second variable is as follows: x λ (t)=e λ (t)-e λ (t-λ); Where J(t) represents the reconstruction error and λ is the lag parameter; The learning strategy is used to train a fuzzy neural network model based on a sample data set to obtain a trained fuzzy neural network model; the sample data set includes a plurality of sample original data of an auxiliary variable group and the sample biochemical oxygen demand corresponding to each of the sample original data; the fuzzy neural network model includes an input layer, a membership function layer, a rule layer, and an output layer. The output error of the fuzzy neural network model is mathematically described as: Among them, C(t) is the objective function of FNN, y(t) and They represent the actual output and expected output of FNN respectively. The actual output of FNN is the predicted biochemical oxygen demand corresponding to the original data of the auxiliary variable group samples, and the expected output is the sample biochemical oxygen demand corresponding to the original data of the auxiliary variable group samples. R is the number of neurons in the membership function layer and the rule layer of the fuzzy neural network model, and n is the number of neurons in the input layer of the fuzzy neural network model. r is the output of the rth neuron in the regular layer; w=[w1,w2,…,w R ] is the connection weight between the rule layer and the output layer, s j =[s 1j ,s 2j ,…,s nj ] is the center vector of the jth neuron in the membership function layer, v j =[v 1j ,v 2j ,…,v nj ] is the width of the jth neuron in the membership function layer, x=[x1,x2,…,x n ] is the input of the fuzzy neural network model. The learning process of the fuzzy neural network model is to train the centers and widths of the neurons in the membership function layer and the connection weights between the rule layer and the output layer, which are recorded as the parameter set θ = [w, s, v]; A learning strategy that matches the characteristics of different reconstruction error change events is designed. That is, the learning strategy that the algorithm starts when a specific reconstruction error change event is triggered. The specific parameters of the learning algorithm are as follows: θ(t+1)=θ(t),Otherwise; Among them, 0<η2<η1<1 represents the learning rate under different learning strategies; Occurs means occurrence, and ifE1Occurs means if event E1 occurs; The actual data of the auxiliary variable group is input into the trained fuzzy neural network model to obtain the predicted biochemical oxygen demand corresponding to the actual data of the auxiliary variable group.

2. The method for sensing and predicting water quality in a water environment according to claim 1, characterized in that: Before the step of obtaining actual data of the auxiliary variable group corresponding to the water quality state parameters of the water environment monitoring station, the water environment water quality state perception and prediction method further includes: Obtaining a water environment state variable set of a target water environment monitoring station; the water environment state variable set includes a plurality of water environment state variables; For each of the water environment state variables, a mutual information value corresponding to the water environment state variable is calculated based on the water environment state variable and biochemical oxygen demand; Sort the mutual information values ​​corresponding to all water environment state variables from large to small; The water environment state variables corresponding to the mutual information values ​​that are ranked in the front set number are determined as auxiliary variables; and all auxiliary variables constitute an auxiliary variable group.

3. The method for sensing and predicting water quality of a water environment according to claim 2, characterized in that: The set number is 10.

4. The method for sensing and predicting water quality in a water environment according to claim 1, characterized in that: After obtaining the trained fuzzy neural network model, the water environment water quality state perception and prediction method further includes: Evaluate the trained fuzzy neural network model.

5. A water environment water quality state perception and prediction device, characterized in that: The water environment water quality state perception and prediction device includes: A data acquisition module is used to obtain actual data of an auxiliary variable group corresponding to water quality state parameters of a water environment monitoring station; the auxiliary variable group includes a plurality of auxiliary variables; the auxiliary variables are water environment state variables associated with biochemical oxygen demand; A reconstruction module is used to: input the actual data of the auxiliary variable group into a trained deep autoencoder to obtain reconstructed data corresponding to the actual data of the auxiliary variable group; A reconstruction error determination module is used to determine a reconstruction error based on actual data and reconstructed data of the auxiliary variable group; A learning strategy determination module is used to determine a learning strategy based on the reconstruction error, specifically including: Determining a first variable and a second variable according to the reconstruction error; the first variable and the second variable are used to reflect a downward trend of the reconstruction error; Determining a reconstruction error change event corresponding to the reconstruction error according to the first variable and the second variable; the reconstruction error change event is used to characterize the water quality state and the multi-operating condition characteristics of the data; determining a learning strategy according to a reconstruction error change event corresponding to the reconstruction error; Before the step of determining a reconstruction error change event corresponding to the reconstruction error according to the first variable and the second variable, the method further includes: Define reconstruction error change events; reconstruction error change events include E1, E2, E3, E4 and E0; E1 indicates that the reconstruction error is getting smaller and smaller, and the downward trend is becoming more and more obvious; event E2 indicates that the reconstruction error is getting smaller and smaller, and the downward trend is becoming more and more slow; event E3 indicates that the reconstruction error is getting larger and the upward trend is becoming more and more obvious; event E4 indicates that the reconstruction error and its downward trend change irregularly, and event E0 indicates that the reconstruction error and its downward trend have other situations; E1=<ε λ (t)<0,ξ λ (t)>0>; E2=<ε λ (t)<0,ξ λ (t)<0>; E3=<ε λ (t)>0,ξ λ (t)>0>; E4=<ε λ (t),ξ λ (t)>fluctuates; E0=<ε λ (t),ξ λ (t)>Others; Among them, ε λ (t) represents the first variable; ξ λ (t) represents the second variable; The calculation formula of the first variable is as follows: ε λ (t)=J(t)-J(t-λ); The calculation formula of the second variable is as follows: x λ (t)=e λ (t)-e λ (t-λ); Where J(t) represents the reconstruction error and λ is the lag parameter; The training module is used to train the fuzzy neural network model according to the sample data set using the learning strategy to obtain a trained fuzzy neural network model; the sample data set includes a plurality of sample original data of the auxiliary variable group and the sample biochemical oxygen demand corresponding to each of the sample original data; the fuzzy neural network model includes an input layer, a membership function layer, a rule layer and an output layer, and the output error of the fuzzy neural network model is mathematically described as: Among them, C(t) is the objective function of FNN, y(t) and They represent the actual output and expected output of FNN respectively. The actual output of FNN is the predicted biochemical oxygen demand corresponding to the original data of the auxiliary variable group samples, and the expected output is the sample biochemical oxygen demand corresponding to the original data of the auxiliary variable group samples. R is the number of neurons in the membership function layer and the rule layer of the fuzzy neural network model, and n is the number of neurons in the input layer of the fuzzy neural network model. r is the output of the rth neuron in the regular layer; w=[w1,w2,…,w R ] is the connection weight between the rule layer and the output layer, s j =[s 1j ,s 2j ,…,s nj ] is the center vector of the jth neuron in the membership function layer, v j =[v 1j ,v 2j ,…,v nj ] is the width of the jth neuron in the membership function layer, x=[x1,x2,…,x n ] is the input of the fuzzy neural network model. The learning process of the fuzzy neural network model is to train the centers and widths of the neurons in the membership function layer and the connection weights between the rule layer and the output layer, which are recorded as the parameter set θ = [w, s, v]; A learning strategy that matches the characteristics of different reconstruction error change events is designed. That is, the learning strategy that the algorithm starts when a specific reconstruction error change event is triggered. The specific parameters of the learning algorithm are as follows: θ(t+1)=θ(t),Otherwise; Among them, 0<η2<η1<1 represents the learning rate under different learning strategies; Occurs means occurrence, and ifE1Occurs means if event E1 occurs; The prediction module is used to input the actual data of the auxiliary variable group into the trained fuzzy neural network model to obtain the predicted biochemical oxygen demand corresponding to the actual data of the auxiliary variable group.

6. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method for perceiving and predicting the water quality status of a water environment according to any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for perceiving and predicting the water quality status of a water environment according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Cement free calcium soft measurement system for semi-supervised learning by taking quality target as guide

    CN113593657A

  • Sewage biochemical oxygen demand monitoring method based on distributed feature extraction neural network

    CN118095883A