Water pollution decision-making method and system based on neural network
By combining the model correction of LSTM and Markov chain and the water pollution prevention model of the random forest algorithm in water quality prediction, the problem of low water quality prediction accuracy in the existing technology is solved, and higher prediction accuracy and governance measures are achieved. Recommended results.
Patent Information
- Application Number
- CN202310337122.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2043-03-30
AI Technical Summary
When using neural network algorithms to predict water quality in the existing technology, there is a problem of low accuracy. This is mainly because historical monitoring data samples are easily affected by external factors, causing the prediction results to fluctuate randomly within a certain range, reducing the accuracy of the prediction. .
A water quality prediction model based on LSTM and Markov chain is used to analyze the fluctuation range of the LSTM prediction result error through the Markov chain, and the LSTM prediction results are corrected. A water pollution prevention and control model is established based on the random forest algorithm to match water quality control measures. , improve the accuracy and applicability of prediction results.
The Markov chain is used to modify the LSTM prediction results, which reduces errors caused by external factors and improves the accuracy of water quality prediction. The random forest algorithm is used to recommend effective treatment measures for polluted water quality in different river basins, improving water quality. Decision accuracy in environmental management.
Smart Images

Figure CN116343946B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of water pollution prevention and control, and in particular to a water pollution decision-making method and system based on a neural network. Background Art
[0002] The prevention and control of water pollution is one of the major key issues in environmental protection. Although my country has abundant water resources, water sources are seriously polluted, droughts and floods are frequent, and there are differences in regional economic development, making my country's water resources management and water environment protection issues increasingly prominent.
[0003] With the rapid development and in-depth application of a new round of information technologies such as global cloud computing, the Internet of Things, and mobile Internet, the development of urban informatization is brewing major changes and new breakthroughs. The development of digital cities with digital objects and processes as the main features to smart cities has become an inevitable trend. Water environment management is an important part of urban management. Informatization will inevitably become a powerful tool for the development of water pollution prevention and control. The construction of water pollution prevention and control informatization is imperative.
[0004] Water pollution prevention and control big data mainly uses online monitoring equipment such as data acquisition instruments, wireless networks, water quality and water pressure gauges to perceive the operating status of each system in real time, analyze and process massive water environment information in a timely manner, and make corresponding processing results to assist decision-making suggestions, so as to manage water pollution prevention and control in a more refined and dynamic way. In order to manage the water environment more intelligently, water quality prediction is carried out for the water environment. Water quality prediction is based on the indicator data of the actual monitoring factors of water quality, and uses water quality mathematical models to predict the changes of water bodies in the next few hours or days, so as to prevent water pollution incidents through water quality prediction.
[0005] In the prior art, a mathematical model is established using a neural network algorithm, and the general trend of future changes in water quality is predicted through the mathematical model. In order to ensure the accuracy of the mathematical model prediction, the historical monitoring data is used as a sample to train the mathematical model. The samples used in the training process are easily affected by external factors, and sometimes there are certain errors, resulting in random fluctuations in the prediction results within a certain range, which reduces the accuracy of the prediction. Summary of the invention
[0006] One of the purposes of the present invention is to provide a water pollution decision-making method based on a neural network to solve the technical problem of low accuracy in water quality prediction using a neural network algorithm in the prior art.
[0007] The basic solution 1 provided by the present invention: a water pollution decision-making method based on a neural network, comprising the following contents:
[0008] Get current water quality data;
[0009] Call the preset water quality prediction model, which is built based on LSTM and Markov chain;
[0010] The water quality prediction model generates LSTM prediction results based on the current water quality data, and corrects the LSTM prediction results according to the Markov chain to output the water quality prediction trend.
[0011] Furthermore, the method also includes the following contents: acquiring historical water quality data, training a water quality prediction model according to the historical water quality data, and storing the trained water quality prediction model.
[0012] Furthermore, the following contents are also included: analyzing and determining the current water quality according to the water quality prediction trend and the preset water quality grade rules to generate the water quality prediction grade.
[0013] Furthermore, current water quality data and water quality forecast trends include indicator data for multiple monitoring factors.
[0014] Furthermore, the following are also included:
[0015] Obtain water pollution prevention and control big data, and establish a water pollution prevention and control model based on the random forest algorithm based on the water pollution prevention and control big data; the water pollution prevention and control model outputs water quality management measures based on the water quality prediction trend.
[0016] Furthermore, water quality control measures include one or more of the pollution type corresponding to the measures, major categories of control measures, minor categories of control measures, technical processes, construction difficulty, construction cost, operation difficulty, operation cost, and expected results.
[0017] Beneficial effects of basic solution 1:
[0018] 1. In this scheme, a water quality prediction model based on LSTM and Markov chain is adopted. The fluctuation range of the LSTM prediction result error is analyzed by Markov chain, and the development trend of the fluctuation is predicted. The LSTM prediction result is corrected by Markov chain to finely optimize the water quality prediction trend, so as to better eliminate the prediction error caused by external factors. Therefore, the establishment of a water quality prediction model combining LSTM and Markov chain can reduce the error caused by specific values to a certain extent and improve the accuracy of the prediction results.
[0019] 2. This solution can predict the water quality trend and learn about the water quality evolution trend, so as to analyze the factors causing water quality changes in advance and make early decisions on polluted river waters. Through the water quality prediction level, we can understand the changes in water quality levels, so as to find and solve problems in time.
[0020] 3. In this scheme, current water quality data and water quality forecast trends include multiple monitoring factors. Taking into account the correlation of river water pollutants, multi-factor prediction is adopted, and the interaction of multiple factors is used to jointly predict the index data of a certain factor at the next moment, thereby improving the accuracy of the prediction results.
[0021] 4. At the same time, this plan also uses a water pollution prevention and control model based on the random forest algorithm to match water quality control measures through water quality prediction trends. The random forest algorithm has the advantages of high accuracy, the ability to run effectively on large data sets, and not easy to overfit. When matching water quality control measures, it can automatically recommend control measures for polluted water quality in different river basins, provide an effective reference for subsequent prevention and control measures, and recommend water pollution control measures in different scenarios. At the same time, water environment management tasks and goals can also be formed according to water quality control measures, and the implementation and completion of tasks and their effects can be tracked and evaluated.
[0022] A second object of the present invention is to provide a water pollution decision-making system based on a neural network.
[0023] The present invention provides basic solution 2: a water pollution decision-making system based on a neural network, using the above-mentioned water pollution decision-making method based on a neural network.
[0024] Further, including:
[0025] Data acquisition module, used to obtain current water quality data;
[0026] The water quality prediction module is preset with a water quality prediction model; the water quality prediction model is used to generate LSTM prediction results based on current water quality data, and to generate water quality prediction trends based on Markov chain-corrected LSTM prediction results;
[0027] The water quality prediction module is used to obtain the water quality prediction trend output by the water quality prediction model based on the current water quality data.
[0028] Furthermore, the data acquisition module is also used to obtain historical water quality data, and also includes:
[0029] The model generation and training module is used to establish a water quality prediction model based on LSTM and Markov chain, train the water quality prediction model according to historical water quality data, and store the trained water quality prediction model in the water quality prediction module.
[0030] Furthermore, it also includes:
[0031] The water pollution prevention module is preset with a water pollution prevention model;
[0032] The water pollution prevention and control module is used to obtain water quality control measures output by the water pollution prevention and control model based on the water quality prediction trend.
[0033] Beneficial effects of basic solution 2:
[0034] 1. In this solution, the water quality prediction module is set up to analyze the fluctuation range of the LSTM prediction result error through the Markov chain, and predict the development trend of the fluctuation. The LSTM prediction result is corrected through the Markov chain to finely optimize the water quality prediction trend, so as to better eliminate the prediction error caused by external factors, and then reduce the error caused by specific values to a certain extent, and improve the accuracy of the prediction results. At the same time, this solution uses the water quality prediction module to predict the water quality prediction trend, learn the water quality evolution trend, analyze the factors that cause water quality changes in advance, and make early decisions on polluted river waters in a timely manner.
[0035] 2. In this solution, the water pollution prevention and control module is set up to match water quality management measures for water quality prediction trends through a water pollution prevention and control model based on the random forest algorithm. The random forest algorithm has the advantages of high accuracy, the ability to run effectively on large data sets, and not easy to overfit. When matching water quality management measures, it can automatically recommend management measures for polluted water quality in different river basins, thereby determining decision-making measures suitable for different water environment management, thereby forming water environment management tasks and goals, and tracking and evaluating the implementation and completion of tasks and their effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of the water pollution decision-making system based on neural network of the present invention;
[0037] Figure 2 It is a structural schematic diagram of the LSTM memory unit of the present invention;
[0038] Figure 3 This is a comparison chart of the pH value prediction data and the actual data of the present invention;
[0039] Figure 4 This is a comparison chart of the predicted data and the actual data of the ammonia nitrogen content in water quality of the present invention;
[0040] Figure 5 This is a comparison chart of the predicted data and the actual data of the total phosphorus content in water quality of the present invention;
[0041] Figure 6 This is an integrated architecture diagram of the second embodiment of the present invention. DETAILED DESCRIPTION
[0042] The following is further described in detail through specific implementation methods:
[0043] Embodiment 1
[0044] Water pollution decision-making method based on neural network, as shown in the attached Figure 1 As shown, including the following:
[0045] S1: Obtain historical water quality data, train a water quality prediction model based on the historical water quality data, and store the trained water quality prediction model.
[0046] S2: Get the current water quality data; call the preset water quality prediction model, which is built based on LSTM (neural network) and Markov chain; the water quality prediction model predicts the current water quality data to generate LSTM prediction results, and corrects the LSTM prediction results according to the Markov chain to output the water quality prediction trend.
[0047] The S1 step specifically includes the following:
[0048] S101: Obtain historical water quality data. The historical water quality data includes index data of various monitoring factors collected from various historical sections. The monitoring factors include water quality data including sampling time, section (location of data sampling), location (expressed in terms of upstream and downstream of the river), flow, rainfall, population in the section catchment area, TP (total phosphorus content in water quality), NH4-N (ammonia nitrogen content in water quality) and COD (dissolved oxygen in water quality), and one or more of pH value.
[0049] S102: Establish a water quality prediction model based on LSTM (neural network) and Markov chain. Figure 2 As shown in the figure, each circle is a point-by-point operation, that is, a corresponding operation is performed on the vector; each rectangle represents a neural network layer, and the characters inside it represent the activation function used by the corresponding neural network.
[0050] Each cell of the LSTM neural network has three gates: input gate, forget gate, and output gate.
[0051] The forget gate takes the output data of the previous unit and the input data of the current unit as input of the sigmoid function. It can generate a value in the range of [0, 1] for any item in the memory unit at the previous moment, and use this value to control the degree to which the previous unit is forgotten.
[0052] The input gate works with a tanh function to control how much new information is added. The tanh function generates the current candidate memory unit value, and the input gate generates a value in the range [0,1] for any of the current candidate units, thereby controlling the extent to which new information is added.
[0053] The output gate controls how much of the current cell state is forgotten. After the cell state is activated, the output gate will generate a value in the range of [0,1] for any of the items, and use this value to control the degree to which the cell state is filtered.
[0054] The LSTM-based mathematical model is constructed according to the following formula:
[0055] f t =σ(W fx x t +W fh h t-1 +b f ) (1)
[0056] i t =σ(W ix x t +W ih h t-1 +b i ) (2)
[0057] o t =σ(W ox x t +W oh h t-1 +b o ) (3)
[0058]
[0059] Among them, x t Indicates the input data at the moment, h t-1 Indicates the output value of the LSTM unit at the previous moment, C t-1 Indicates the memory cell value at the last moment, C t Represents the memory cell value at time t; W * is the weight coefficient (e.g. W xi represents the weight between the corresponding input data and the input gate); b * is the bias vector (e.g. b i is the bias vector of the input gate). σ is the sigmoid function, and its value is [0,1]. When it takes the value 0, it means the gate is closed, and when it takes the value 1, it means the gate is open. Its formula is as shown in formula (4).
[0060] C′ t =tanh(W xc x t +W hc h t -1+b c ) (5)
[0061] C t =f t C t -1+i t C′ t (6)
[0062]
[0063] Among them, C′ t Represents the current candidate memory cell value, and calculates the current memory cell state value C t The iterative formula is shown in formula (6), tanh is the hyperbolic tangent activation function; W xc is the weight between the corresponding input data and the memory unit, W hc is the weight between the hidden layer and the memory unit.
[0064] Suppose there is an n (n>0)-dimensional input x 1 ,x 2 ,...,x n , the hidden state sequence h of the m (m>0) dimensional network 1 ,h 2 ,...,h m ,k(k>0)-dimensional output sequence y 1 ,y 2 ,...,y k ,y k is the output of the LSTM unit at time t, and the calculation formula is shown in formula (8).
[0065] yt=o t tanh(C t ) (8)
[0066] Although the LSTM recurrent neural network model uses a lot of sample training and test data to ensure accuracy during simulation, these data are affected by external factors and sometimes have certain errors, which will cause the prediction results to fluctuate randomly within a certain range, reducing the accuracy of the prediction. The use of Markov chain can better eliminate the prediction errors caused by external factors. Therefore, the combination prediction model of neural network and Markov chain can obtain more accurate prediction results.
[0067] Markov chain is a sequence of random variables with Markov properties, and Markov chain prediction method is a scientific and effective dynamic prediction method applicable to random processes. This method is mainly divided into two processes: one is to determine the state space of the Markov chain, and the other is to determine the state transition probability and state transition matrix through calculation.
[0068] The water quality prediction model based on LSTM and Markov chain is constructed according to the following formula:
[0069] In the process of event development and change, the probability of transferring to state j in the next step in the process of state i is referred to as state transfer probability, as shown in formula (9):
[0070] P ij =P{X n+1 =j|Xn =i} (9)
[0071] Among them, P ij is the state transition probability; X n =i means that the process is in state i at time n, and {0, 1, 2, ...) is called the state space of the process, denoted by S, where S is the general name of the state space. For a Markov chain, given the past state X 1 ,X 2 ,..,X n-1 , and the current state X n .
[0072] The Markov chain model can be used to analyze the fluctuation range of the error in the LSTM recurrent neural network simulation prediction results and predict the development trend of the fluctuation. The error state transition probability matrix can be used to further refine the prediction results of the LSTM recurrent neural network.
[0073] Markov chains have the so-called "no aftereffect", that is, to determine the state of the process at a certain moment, it is only necessary to know the situation at that moment, and it is not necessary to fully understand the situation at that moment. In addition, the final prediction result of the model finally constructed is not a specific value, but a set of prediction interval values with different probabilities, thereby reducing the error caused by specific values to a certain extent and improving the prediction accuracy.
[0074] S103: Training a water quality prediction model based on historical water quality data.
[0075] In this embodiment, multi-factor prediction is adopted, so the monitoring factors include pH value, TP and NH3-N. The indicator data of the monitoring factors in the historical water quality data are used as samples, and the water quality prediction model based on LSTM and Markov chain is trained according to the samples.
[0076] Multi-factor prediction means that the index data of multiple monitoring factors in water quality at the same time are affected by the interaction and influence of other factors. Taking into account the correlation of river water pollutants, multi-factor prediction is adopted to use the interaction of multiple factors to jointly predict the index data of a factor at the next moment, thereby improving the accuracy of the prediction results.
[0077] S104: Storing the trained water quality prediction model for subsequent water quality prediction.
[0078] The S2 step specifically includes the following:
[0079] S201: Acquire current water quality data, which includes index data of multiple monitoring factors. In this embodiment, the monitoring factors include pH value, TP and NH3-N.
[0080] S202: Calling a preset water quality prediction model, calling the water quality prediction model stored in step S104.
[0081] S203: The current water quality data is used as input to the water quality prediction model to obtain the water quality prediction trend output by the water quality prediction model. That is, the water quality prediction model generates an LSTM prediction result based on the current water quality data, and corrects the LSTM prediction result based on the Markov chain to output the water quality prediction trend.
[0082] The water quality prediction trend includes the index data of multiple monitoring factors. In this embodiment, the monitoring factors include pH value, TP and NH3-N. The water quality prediction trend is displayed for management personnel to view and use as a basis to set water quality prevention and control measures. The water quality prediction trend can also be input into a third-party model for further analysis and judgment.
[0083] In other embodiments, S2 also includes: analyzing and determining the current water quality according to the water quality prediction trend and the preset water quality grade rules to generate the water quality prediction grade. Specifically: the water quality grade rule adopts the existing water quality grade standard, and analyzes and determines the water quality grade to which the water quality prediction trend belongs according to the water quality grade rule, thereby generating the water quality prediction grade. For example, a section is Class 2 water in February 2019. Combined with the monitoring factors from March to December of previous years, the water quality grade at the end of 2019 is predicted.
[0084] In other embodiments, S1 also includes: obtaining water pollution prevention and control big data, and establishing a water pollution prevention and control model based on the random forest algorithm according to the water pollution prevention and control big data. Specifically: using the existing random forest algorithm to establish a water pollution prevention and control model, training the water pollution prevention and control model according to the water pollution prevention and control big data, and storing the trained water pollution prevention and control model. The input of the water pollution prevention and control model is water quality data, and the output is water quality control measures corresponding to the water quality data. The water quality control measures include one or more of the pollution type corresponding to the measures, the major category of control measures, the minor category of control measures, the technical process, the difficulty of construction, the construction cost, the difficulty of operation, the operation cost, and the expected results.
[0085] S2 also includes: water quality control measures output by the water pollution prevention and control model based on the water quality prediction trend. Specifically: the water quality prediction trend is essentially water quality data. The water quality prediction trend is used as input and input into the water pollution prevention and control model to obtain the water quality control measures matched and output by the water pollution prevention and control model. Through the water pollution prevention and control model, the corresponding water quality control measures are automatically recommended for water quality data matching, including the pollution type, major categories of control measures, minor categories of control measures, technical processes, construction difficulty, construction cost, operation difficulty, operation cost, expected results, etc. corresponding to the measures. According to the control measures and characteristic indicators, manual modification and addition can be made, and finally the water environment control decision-making measures suitable for the basin and the period are determined, and annual goals and tasks are formed, and the implementation and completion of the tasks and the results are tracked and evaluated.
[0086] The water pollution decision-making system based on neural network uses the water pollution decision-making method based on neural network, and includes a data acquisition module, a model generation and training module, and a water quality prediction module.
[0087] The data acquisition module is used to obtain historical water quality data. The historical water quality data includes indicator data of multiple monitoring factors collected from each historical section. The monitoring factors include water quality data including sampling time, section (location of data sampling), location (expressed in terms of upstream and downstream of the river), flow, rainfall, population in the section catchment area, TP (total phosphorus content in water quality), NH4-N (ammonia nitrogen content in water quality) and COD (dissolved oxygen in water quality), and one or more of pH value.
[0088] The model generation and training module is used to establish a water quality prediction model based on LSTM and Markov chain, train the water quality prediction model according to historical water quality data, and store the trained water quality prediction model in the water quality prediction module. Specifically:
[0089] The model generation and training module is used to construct a LSTM-based mathematical model according to formulas (1)-(4).
[0090] Calculate the current memory unit state value C t The iterative formulas are shown in equations (6) and (7).
[0091] Suppose there is an n (n>0)-dimensional input x 1 ,x 2 ,...,x n , the hidden state sequence h of the m (m>0) dimensional network 1 ,h 2 ,...,h m ,k(k>0)-dimensional output sequence y 1 ,y 2 ,...,y k ,y kis the output of the LSTM unit at time t, and the calculation formula is shown in formula (8).
[0092] Although the LSTM recurrent neural network model uses a lot of sample training and test data to ensure accuracy during simulation, these data are affected by external factors and sometimes have certain errors, which will cause the prediction results to fluctuate randomly within a certain range, reducing the accuracy of the prediction. The use of Markov chain can better eliminate the prediction errors caused by external factors. Therefore, the combination prediction model of neural network and Markov chain can obtain more accurate prediction results.
[0093] Markov chain is a sequence of random variables with Markov properties, and Markov chain prediction method is a scientific and effective dynamic prediction method applicable to random processes. This method is mainly divided into two processes: one is to determine the state space of the Markov chain, and the other is to determine the state transition probability and state transition matrix through calculation.
[0094] The model generation and training module is also used to build a water quality prediction model based on LSTM and Markov chain according to the following formula:
[0095] In the process of event development and change, the probability of transferring from state i to state j in the next step is referred to as state transition probability, as shown in formula (9).
[0096] In this embodiment, multi-factor prediction is adopted, so the monitoring factors include pH value, TP and NH3-N. The model generation and training module is also used to use the indicator data of the monitoring factors in the historical water quality data as samples, train the water quality prediction model based on LSTM and Markov chain according to the samples, and store the trained water quality prediction model in the water quality prediction module.
[0097] The data acquisition module is also used to acquire current water quality data, which includes index data of multiple monitoring factors. In this embodiment, the monitoring factors include pH value, TP and NH3-N.
[0098] The water quality prediction module is preset with a water quality prediction model, which is used to generate LSTM prediction results based on current water quality data, and to generate water quality prediction trends based on the Markov chain-corrected LSTM prediction results. Specifically: the water quality prediction module is used to obtain the water quality prediction trend output by the water quality prediction model based on the current water quality data. The water quality prediction trend includes indicator data of multiple monitoring factors. In this embodiment, the monitoring factors include pH value, TP and NH3-N.
[0099] In other embodiments, the neural network-based water pollution decision-making system further includes a water pollution prevention and control module.
[0100] The data acquisition module is also used to obtain water pollution prevention and control big data, which includes water quality data and corresponding water quality control measures. Water quality control measures include one or more of the pollution type corresponding to the measures, major categories of control measures, minor categories of control measures, technical processes, construction difficulty, construction cost, operation difficulty, operation cost, and expected results.
[0101] The model generation and training module is also used to establish a water pollution prevention model based on the random forest algorithm, specifically using the existing random forest algorithm. The model generation and training module is also used to use the water pollution prevention big data as samples, train the water pollution prevention model according to the samples, and store the trained water pollution prevention model in the water pollution prevention module.
[0102] The water pollution prevention and control module is preset with a water pollution prevention and control model. The water pollution prevention and control module is used to call the water pollution prevention and control model and obtain water quality control measures output by the water pollution prevention and control model according to the water quality prediction trend.
[0103] Water quality is predicted to obtain water quality prediction trends, and real water quality data is collected in real time. Experiments have shown that the predicted results of this scheme are consistent with the actual values, and the prediction results are relatively accurate. The accuracy of river water quality prediction can reach 80%. It can be applied to the prediction of river water quality factors to predict possible water pollution in rivers. The experimental results are as follows Figure 3 , 4 , as shown in Figure 5.
[0104] Embodiment 2
[0105] The difference between this embodiment and the first embodiment is that:
[0106] As attached Figure 6 As shown in the figure, the water pollution decision-making system based on neural network includes a water pollution prevention and control big data intelligent analysis and decision-making platform, and an intelligent algorithm platform. The water pollution prevention and control big data intelligent analysis includes a configuration module, several application modules, a visualization component, and an application interface layer. The intelligent algorithm platform includes an algorithm encapsulation and a unified algorithm interface service layer.
[0107] In this application, the algorithms used include big data algorithms for the correlation between different pressure sources and water quality, multi-source heterogeneous data knowledge feature extraction and fusion algorithms, and small watershed water pollution decision-making self-learning algorithms. In this embodiment, python is used to implement algorithm construction. The specific algorithm packaging strategy is: use the python process to run the model trained in deep learning, call the service provided by the python process in the Java application, and the python application and the Java application can run on different servers and call through the remote access of the process. After the algorithm is packaged, the system platform transmits it in a pre-defined data format, such as Word, PDF, etc., through the HTTP protocol.
[0108] In this application, the connection between algorithm and application is realized through the application interface layer and the unified algorithm interface service layer.
[0109] The unified algorithm interface service layer includes algorithm parameter configuration interface, situation configuration interface, algorithm driver interface and algorithm result message interface, etc. Among them, the algorithm driver interface is the core interface, which includes the driver interface of each algorithm in the algorithm package.
[0110] Algorithm parameter configuration interface: 1. Implement the basic technical parameter configuration function of the basic algorithm and three application algorithms. 2. Publish the interface through a web service based on http / https protocol; 3. Called by the configuration module of the water pollution prevention and control big data intelligent analysis and decision-making platform.
[0111] Situation configuration interface: 1. Implement the basic configuration functions of the situation configuration parameters of the self-learning algorithm for small watershed water pollution decision-making based on deep neural network, the pressure source and water quality relationship model algorithm, and the pressure source and water quality multi-source heterogeneous data knowledge feature extraction and fusion algorithm. 2. Publish the interface through the web service based on http / https protocol; 3. Called by the configuration module of the water pollution prevention and control big data intelligent analysis and decision-making platform.
[0112] The algorithm driver interface is the core interface of the interface layer, which realizes the connection between characteristic data and parameters of the algorithm, including: the self-learning algorithm driver interface of small watershed water pollution based on deep neural network, the algorithm driver interface of the relationship model between water quality and pressure source, and the algorithm driver interface of the relationship model between water quality and pressure source. The interface function requirements are as follows: 1. Implement the task driver to initiate the call of the three application algorithms, which is the entry point for the application system to call the algorithm execution. 2. Publish the interface through the web service based on http / https protocol; 3. Called by the algorithm call interface of the water pollution prevention and control big data intelligent analysis and decision-making platform.
[0113] Algorithm result message interface: 1. After the algorithm calculation is completed, the calculation result message is returned to the called application module. 2. This interface is the calling port. 3. This interface calls back the decision analysis business module of the water pollution prevention and control big data intelligent analysis and decision-making platform to complete the transmission of task messages through the result response interface.
[0114] The application interface layer includes general web call interface, algorithm call interface and result response interface.
[0115] General web call interface: 1. Use the general http / https protocol to implement the call through the web service; 2. This interface is a call interface, such as calling the algorithm parameter configuration interface and the scenario configuration interface.
[0116] Algorithm calling interface: 1. This interface calls the algorithm driving interface of the algorithm platform and is the entry point for the application system to call the algorithm execution; 2. This interface is a calling interface.
[0117] Result response interface: 1. After the algorithm operation task is completed, receive the message returned by the algorithm platform and write the status identifier into the database; 2. Publish the interface through a web service based on the http / https protocol; 3. Called by the algorithm result message interface of the algorithm platform.
[0118] The application interface layer and the unified algorithm interface service layer are constructed using unified specifications. The interface protocol, interface data format, data encoding, and encapsulation method specifications are as follows: Interface mode: Interface publishing is performed through a web service based on http, and the calling end calls and responds through http / https. Interface data format: JSON format is used for data interaction response. Interface encoding: UTF-8 encoding.
[0119] The connection between the algorithm and the platform is separated from the algorithm. A listening process is established on the algorithm server, and the platform calls the algorithm through remote access of the process. The platform and the algorithm server use the http hypertext transfer protocol, and use the GET and POST request methods in HTTP to complete the information exchange between the system platform and the algorithm server.
[0120] In this application, a unified data read and write interface is used, and a unified read and write interface for non-relational data and relational data is used as a unified interface for read and write calls between algorithms and data resources, and between applications and data resources. Relational data is read or stored for the application platform and algorithm platform through a relational database driver (JDBC, ODBC, etc.). Non-relational data (schemas, files, etc.) is read or stored for the application platform and algorithm platform through a file interface.
[0121] In this application, data-driven is implemented by configuration definition: 1. Parameter configuration (model basic data integration): When designing the system, it is necessary to implement overall configuration of model parameters to achieve scheduling fusion between application and algorithm, including various model initialization conditions (grids, etc.), model input data files, etc. Parameter configuration is implemented through the interface layer, and the application system connects to the "algorithm parameter configuration interface" of the unified algorithm interface service layer through the "general web call interface". 2. Scenario configuration (customized fusion of application scenarios): When designing the system, it is necessary to configure the situation parameters to enable the system to start prediction. Parameter configuration is implemented through the interface layer, and the application system connects to the "situation configuration interface" of the unified algorithm interface service layer through the "general web call interface".
[0122] In this application, data model design is used to achieve data normalization and fusion. Data normalization is the basis of data fusion, and effective data planning (i.e., data model design) is an important method for the integration of data and applications / algorithms. The target result database (i.e., decision analysis data) is guided by analytical decision-making, and the target result data (i.e., decision analysis data) library planning and design are achieved through target data modeling; source data modeling is the basis of algorithm source data, and realizes the integration basis of algorithm data access, cleaning and integration.
[0123] When applied, the configuration module is used to configure parameters and scenarios through the general web call interface, and the application module is used to call the required algorithm for analysis through the algorithm call interface, transmit the analysis results through the result response interface, and display the analysis results through the visualization component.
[0124] The water pollution decision-making method based on neural network uses the water pollution decision-making system based on neural network.
[0125] This solution is used to integrate algorithms and applications through interfaces, and effectively connect algorithms and applications based on the application interface layer and the unified algorithm interface service layer. Data fusion of algorithms and applications is completed through source data modeling and target data modeling design, and the integration of application calls, algorithm operations, and data presentation is achieved. The integration capability is improved through parameter configuration, scenario configuration, etc.
[0126] The above is only an embodiment of the present invention. The common sense such as the known specific structure and characteristics in the scheme is not described in detail here. The ordinary technicians in the relevant field know all the common technical knowledge in the technical field of the invention before the application date or priority date, can obtain all the existing technologies in the field, and have the ability to apply the conventional experimental means before that date. The ordinary technicians in the relevant field can improve and implement this scheme in combination with their own abilities under the enlightenment given by this application. Some typical known structures or known methods should not become obstacles for ordinary technicians in the relevant field to implement this application. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, which will not affect the effect of the implementation of the present invention and the practicality of the patent. The protection scope required by this application shall be based on the content of its claims, and the specific implementation methods and other records in the specification can be used to interpret the content of the claims.
Claims
1. Water pollution decision-making method based on neural network, It is characterized in that Includes the following: Get current water quality data; Call the preset water quality prediction model, which is built based on LSTM and Markov chain; The water quality prediction model generates LSTM prediction results based on the current water quality data, and corrects the LSTM prediction results based on the Markov chain to output the water quality prediction trend; Water pollution decision-making method based on neural network, using water pollution decision-making system based on neural network; A water pollution decision-making system based on neural networks, including a water pollution prevention and control big data intelligent analysis and decision-making platform, and an intelligent algorithm platform; The water pollution prevention and control big data intelligent analysis and decision-making platform includes a configuration module, several application modules, a visualization component, and an application interface layer; The intelligent algorithm platform includes algorithm encapsulation and unified algorithm interface service layer; the algorithms used include big data algorithms on the correlation between different pressure sources and water quality, multi-source heterogeneous data knowledge feature extraction and fusion algorithms, and small watershed water pollution decision-making self-learning algorithms; The algorithm and application are connected through the application interface layer and the unified algorithm interface service layer; The unified algorithm interface service layer includes algorithm parameter configuration interface, situation configuration interface, algorithm driver interface and algorithm result message interface; Algorithm parameter configuration interface: realizes the basic technical parameter configuration function of the basic algorithm and three application algorithms; publishes the interface through a web service based on http / https protocol; is called by the configuration module of the water pollution prevention and control big data intelligent analysis and decision-making platform; Situation configuration interface: realizes the basic configuration functions of the situation configuration parameters of the self-learning algorithm for small watershed water pollution decision-making based on deep neural network, the pressure source and water quality relationship model algorithm, and the pressure source and water quality multi-source heterogeneous data knowledge feature extraction and fusion algorithm; through the web service publishing interface based on http / https protocol; it is called by the configuration module of the water pollution prevention and control big data intelligent analysis and decision-making platform; The algorithm driver interface is the core interface of the interface layer, which realizes the connection between characteristic data and parameters of the algorithm, including: small watershed water pollution self-learning algorithm driver interface based on deep neural network, water quality and pressure source relationship model algorithm driver interface, water quality and pressure source relationship model algorithm driver interface. The interface function requirements are as follows: realize the task drive initiation call of the three application algorithms, which is the entry point for the application system to call the algorithm execution; publish the interface through the web service based on http / https protocol; and be called by the algorithm call interface of the water pollution prevention and control big data intelligent analysis and decision-making platform; Algorithm result message interface: after the algorithm calculation is completed, the calculation result message is returned to the called application module; this interface is the calling port; this interface calls back the decision analysis business module of the water pollution prevention and control big data intelligent analysis and decision-making platform to complete the transmission of task messages through the result response interface; The application interface layer includes the general web call interface, algorithm call interface and result response interface; General web calling interface: uses the general http / https protocol to implement the calling of web services; this interface is the calling interface; such as calling the algorithm parameter configuration interface and the scenario configuration interface; Algorithm calling interface: This interface calls the algorithm driving interface of the algorithm platform and is the entry point for the application system to call the algorithm execution; this interface is a calling interface; Result response interface: After the algorithm operation task is completed, it receives the message returned by the algorithm platform and writes the status identifier into the database; it publishes the interface through a web service based on the http / https protocol; it is called by the algorithm result message interface of the algorithm platform; The application interface layer and unified algorithm interface service layer are constructed using unified specifications; The connection between the algorithm and the platform adopts the method of separating the algorithm from the platform; A listening process is established on the algorithm server, and the platform calls the algorithm through remote access of the process; the platform and the algorithm server use the http hypertext transfer protocol, and use the GET and POST request methods in HTTP to complete the information exchange between the system platform and the algorithm server; When applied, the configuration module is used to configure parameters and scenarios through the general web call interface, and the application module is used to call the required algorithm for analysis through the algorithm call interface, transmit the analysis results through the result response interface, and display the analysis results through the visualization component.
2. The water pollution decision-making method based on neural network according to claim 1, It is characterized in that Also included are the following: Acquire historical water quality data, train a water quality prediction model based on the historical water quality data, and store the trained water quality prediction model.
3. The water pollution decision-making method based on neural network according to claim 1 or 2, It is characterized in that Also included are the following: The current water quality is analyzed and determined based on the water quality prediction trend and preset water quality grade rules to generate a water quality prediction grade.
4. The water pollution decision-making method based on neural network according to claim 1, Features: Both current water quality data and water quality forecast trends include indicator data for multiple monitoring factors.
5. The water pollution decision-making method based on neural network according to claim 1, It is characterized in that Also included are the following: Obtain water pollution prevention and control big data, and establish a water pollution prevention and control model based on the random forest algorithm based on the water pollution prevention and control big data; The water pollution prevention and control model outputs water quality control measures based on water quality prediction trends.
6. The water pollution decision-making method based on neural network according to claim 5, Features: Water quality control measures include one or more of the pollution type corresponding to the measures, major categories of control measures, minor categories of control measures, technical processes, construction difficulty, construction cost, operation difficulty, operation cost, and expected results.
7. Water pollution decision-making system based on neural network, Features: A water pollution decision-making method based on a neural network as described in any one of claims 1 to 6, comprising a water pollution prevention and control big data intelligent analysis and decision-making platform, and an intelligent algorithm platform; The water pollution prevention and control big data intelligent analysis and decision-making platform includes a configuration module, several application modules, a visualization component, and an application interface layer; The intelligent algorithm platform includes algorithm encapsulation and unified algorithm interface service layer; the algorithms used include big data algorithms on the correlation between different pressure sources and water quality, multi-source heterogeneous data knowledge feature extraction and fusion algorithms, and small watershed water pollution decision-making self-learning algorithms; The algorithm and application are connected through the application interface layer and the unified algorithm interface service layer; The unified algorithm interface service layer includes algorithm parameter configuration interface, situation configuration interface, algorithm driver interface and algorithm result message interface; Algorithm parameter configuration interface: realizes the basic technical parameter configuration function of the basic algorithm and three application algorithms; publishes the interface through a web service based on http / https protocol; is called by the configuration module of the water pollution prevention and control big data intelligent analysis and decision-making platform; Situation configuration interface: realizes the basic configuration functions of the situation configuration parameters of the self-learning algorithm for small watershed water pollution decision-making based on deep neural network, the pressure source and water quality relationship model algorithm, and the pressure source and water quality multi-source heterogeneous data knowledge feature extraction and fusion algorithm; through the web service publishing interface based on http / https protocol; it is called by the configuration module of the water pollution prevention and control big data intelligent analysis and decision-making platform; The algorithm driver interface is the core interface of the interface layer, which realizes the connection between characteristic data and parameters of the algorithm, including: small watershed water pollution self-learning algorithm driver interface based on deep neural network, water quality and pressure source relationship model algorithm driver interface, water quality and pressure source relationship model algorithm driver interface. The interface function requirements are as follows: realize the task drive initiation call of the three application algorithms, which is the entry point for the application system to call the algorithm execution; publish the interface through the web service based on http / https protocol; and be called by the algorithm call interface of the water pollution prevention and control big data intelligent analysis and decision-making platform; Algorithm result message interface: after the algorithm calculation is completed, the calculation result message is returned to the called application module; this interface is the calling port; this interface calls back the decision analysis business module of the water pollution prevention and control big data intelligent analysis and decision-making platform to complete the transmission of task messages through the result response interface; The application interface layer includes the general web call interface, algorithm call interface and result response interface; General web calling interface: uses the general http / https protocol to implement the calling of web services; this interface is the calling interface; such as calling the algorithm parameter configuration interface and the scenario configuration interface; Algorithm calling interface: This interface calls the algorithm driving interface of the algorithm platform and is the entry point for the application system to call the algorithm execution; this interface is a calling interface; Result response interface: After the algorithm operation task is completed, it receives the message returned by the algorithm platform and writes the status identifier into the database; it publishes the interface through a web service based on the http / https protocol; it is called by the algorithm result message interface of the algorithm platform; The application interface layer and unified algorithm interface service layer are constructed using unified specifications; The connection between the algorithm and the platform adopts the method of separating the algorithm from the platform; A listening process is established on the algorithm server, and the platform calls the algorithm through remote access of the process; the platform and the algorithm server use the http hypertext transfer protocol, and use the GET and POST request methods in HTTP to complete the information exchange between the system platform and the algorithm server; When applied, the configuration module is used to configure parameters and scenarios through the general web call interface, and the application module is used to call the required algorithm for analysis through the algorithm call interface, transmit the analysis results through the result response interface, and display the analysis results through the visualization component.
8. The water pollution decision-making system based on neural network according to claim 7, It is characterized in that include: Data acquisition module, used to obtain current water quality data; The water quality prediction module is preset with a water quality prediction model; the water quality prediction model is used to generate LSTM prediction results based on current water quality data, and to generate water quality prediction trends based on Markov chain-corrected LSTM prediction results; The water quality prediction module is used to obtain the water quality prediction trend output by the water quality prediction model based on the current water quality data.
9. The water pollution decision-making system based on neural network according to claim 8, Features: The data acquisition module is also used to obtain historical water quality data, including: The model generation and training module is used to establish a water quality prediction model based on LSTM and Markov chain, train the water quality prediction model according to historical water quality data, and store the trained water quality prediction model in the water quality prediction module.
10. The water pollution decision-making system based on neural network according to claim 8, It is characterized in that Also includes: The water pollution prevention module is preset with a water pollution prevention model; The water pollution prevention and control module is used to obtain water quality control measures output by the water pollution prevention and control model based on the water quality prediction trend.
