CN116343946A - Neural network-based water pollution decision method and system - Google Patents
Neural network-based water pollution decision method and system Download PDFInfo
- Publication number
- CN116343946A CN116343946A CN202310337122.9A CN202310337122A CN116343946A CN 116343946 A CN116343946 A CN 116343946A CN 202310337122 A CN202310337122 A CN 202310337122A CN 116343946 A CN116343946 A CN 116343946A
- Authority
- CN
- China
- Prior art keywords
- water quality
- water
- data
- quality prediction
- neural network
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000003911 water pollution Methods 0.000 title claims abstract description 89
- 238000000034 method Methods 0.000 title claims abstract description 60
- 238000013528 artificial neural network Methods 0.000 title claims abstract description 42
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 239
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 82
- 238000012544 monitoring process Methods 0.000 claims description 23
- 230000008569 process Effects 0.000 claims description 23
- 238000012549 training Methods 0.000 claims description 20
- 238000010276 construction Methods 0.000 claims description 11
- 238000007637 random forest analysis Methods 0.000 claims description 10
- 230000003631 expected effect Effects 0.000 claims description 5
- 238000004458 analytical method Methods 0.000 description 14
- 238000011161 development Methods 0.000 description 11
- 230000007704 transition Effects 0.000 description 10
- 230000006870 function Effects 0.000 description 9
- 230000004927 fusion Effects 0.000 description 8
- 230000008859 change Effects 0.000 description 7
- 238000013178 mathematical model Methods 0.000 description 7
- 230000002265 prevention Effects 0.000 description 7
- 230000000694 effects Effects 0.000 description 5
- 230000010354 integration Effects 0.000 description 5
- 230000004044 response Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 4
- 125000004122 cyclic group Chemical group 0.000 description 4
- 238000013461 design Methods 0.000 description 4
- 210000001503 joint Anatomy 0.000 description 4
- 238000005070 sampling Methods 0.000 description 4
- OAICVXFJPJFONN-UHFFFAOYSA-N Phosphorus Chemical compound [P] OAICVXFJPJFONN-UHFFFAOYSA-N 0.000 description 3
- 230000004913 activation Effects 0.000 description 3
- XKMRRTOUMJRJIA-UHFFFAOYSA-N ammonia nh3 Chemical compound N.N XKMRRTOUMJRJIA-UHFFFAOYSA-N 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 239000011159 matrix material Substances 0.000 description 3
- 229910052698 phosphorus Inorganic materials 0.000 description 3
- 239000011574 phosphorus Substances 0.000 description 3
- 238000004088 simulation Methods 0.000 description 3
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 238000013499 data model Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000000605 extraction Methods 0.000 description 2
- 238000003062 neural network model Methods 0.000 description 2
- 229910052760 oxygen Inorganic materials 0.000 description 2
- 239000001301 oxygen Substances 0.000 description 2
- 238000004806 packaging method and process Methods 0.000 description 2
- 238000003908 quality control method Methods 0.000 description 2
- 229910052717 sulfur Inorganic materials 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000011144 upstream manufacturing Methods 0.000 description 2
- 239000003403 water pollutant Substances 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 238000002474 experimental method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
- 238000012800 visualization Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16C—COMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
- G16C20/00—Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
- G16C20/30—Prediction of properties of chemical compounds, compositions or mixtures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
- G06N3/0442—Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N7/00—Computing arrangements based on specific mathematical models
- G06N7/01—Probabilistic graphical models, e.g. probabilistic networks
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16C—COMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
- G16C20/00—Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
- G16C20/70—Machine learning, data mining or chemometrics
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A20/00—Water conservation; Efficient water supply; Efficient water use
- Y02A20/152—Water filtration
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Software Systems (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Chemical & Material Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Crystallography & Structural Chemistry (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Molecular Biology (AREA)
- Probability & Statistics with Applications (AREA)
- Computational Linguistics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Biomedical Technology (AREA)
- Medical Informatics (AREA)
- Databases & Information Systems (AREA)
- Biophysics (AREA)
- Algebra (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to the technical field of water pollution control, in particular to a neural network-based water pollution decision method and a neural network-based water pollution decision system, wherein the method comprises the following steps: acquiring current water quality data; invoking a preset water quality prediction model, wherein the water quality prediction model is constructed based on LSTM and Markov chains; and the water quality prediction model predicts according to the current water quality data to generate an LSTM prediction result, and corrects the LSTM prediction result according to the Markov chain to output a water quality prediction trend. By adopting the scheme, the technical problem of low accuracy in water quality prediction by using a neural network algorithm in the prior art can be solved.
Description
Technical Field
The invention relates to the technical field of water pollution control, in particular to a neural network-based water pollution decision method and system.
Background
The prevention and control of water pollution are one of the important key problems of environmental protection, although the total water resources in China are rich, the water source pollution is serious, drought and waterlogging disasters are frequent, and the economic development of the areas is different, so that the problems of water resource management and water environment protection in China are increasingly outstanding.
With the rapid development and deep application of new information technologies such as global cloud computing, internet of things and mobile internet, the development of urban informatization is becoming a major innovation and new breakthrough, and the development of digital cities with main characteristics of objects and processes has become a necessary trend towards intelligent development. The water environment management is an important component of urban management, and informatization is necessarily a powerful tool for the development of water pollution control, so that the informatization construction of water pollution control is imperative.
The large data of water pollution prevention and control mainly senses the running state of each system in real time through on-line monitoring equipment such as a data acquisition instrument, a wireless network, a water quality water pressure meter and the like, timely analyzes and processes massive water environment information, makes corresponding auxiliary decision suggestions of processing results, and manages water pollution prevention and control in a finer and dynamic mode. In order to more intelligently manage the water environment, the water environment is predicted, the water quality prediction is to predict the change of the water body within a plurality of hours or days in the future by utilizing a water quality mathematical model according to index data of a water quality actual monitoring factor, and the water quality pollution event is prevented by the water quality prediction.
In the prior art, a mathematical model is established by using a neural network algorithm, and the general trend of the future change of the water quality is predicted by using the mathematical model. In order to ensure the accuracy of mathematical model prediction, historical monitoring data is used as samples to train the mathematical model, and the samples used in the training process are easily influenced by external factors, and sometimes have certain errors, so that the prediction result randomly fluctuates within a certain range, and the accuracy of prediction is reduced.
Disclosure of Invention
The invention aims to provide a neural network-based water pollution decision method, which aims to solve the technical problem of low accuracy in water quality prediction by using a neural network algorithm in the prior art.
The basic scheme provided by the invention is as follows: the water pollution decision method based on the neural network comprises the following steps:
acquiring current water quality data;
invoking a preset water quality prediction model, wherein the water quality prediction model is constructed based on LSTM and Markov chains;
and the water quality prediction model predicts according to the current water quality data to generate an LSTM prediction result, and corrects the LSTM prediction result according to the Markov chain to output a water quality prediction trend.
Further, the method also comprises the following steps: and 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.
Further, the method also comprises the following steps: and analyzing and judging the current water quality according to the water quality prediction trend and a preset water quality grade rule to generate a water quality prediction grade.
Further, both the current water quality data and the water quality prediction trend include index data of a plurality of monitoring factors.
Further, the method also comprises the following steps:
acquiring water pollution control big data, and establishing a water pollution control model based on a random forest algorithm according to the water pollution control big data; and the water pollution control model outputs water quality treatment measures according to the water quality prediction trend.
Further, the water quality treatment measures comprise one or more of pollution types, treatment measure major classes, treatment measure minor classes, technical processes, construction difficulty, construction cost, operation difficulty, operation cost and expected effect corresponding to the measures.
The first basic scheme has the beneficial effects that:
1. in the scheme, a water quality prediction model constructed based on LSTM and a Markov chain is adopted, the fluctuation range of LSTM prediction result errors is analyzed through the Markov chain, the fluctuation development trend is predicted, the LSTM prediction result is corrected through the Markov chain, so that the water quality prediction trend is finely optimized, the prediction error generated by external factors is better eliminated, the water quality prediction model combining the LSTM and the Markov chain is built, the errors caused by specific numerical values can be reduced to a certain extent, and the accuracy of the prediction result is improved.
2. By adopting the scheme, the water quality evolution trend is known through the water quality prediction trend, so that the factors causing the water quality change are analyzed in advance, and the advance decision is made on the polluted river water area in time. The water quality level change is known through the water quality prediction grade, so that the problems are found in time, and the problems are solved.
3. In the scheme, the current water quality data and the water quality prediction trend both comprise various monitoring factors, the relevance of river water pollutants is considered, multi-factor prediction is adopted, and the index data of a certain factor at the next moment is predicted jointly by utilizing the interaction of the factors, so that the accuracy of a prediction result is improved.
4. Meanwhile, the water pollution control model based on a random forest algorithm is adopted in the scheme, and water quality control measures are matched through water quality prediction trend. The random forest algorithm has the advantages of high accuracy, capability of effectively running on a large data set, difficulty in fitting and the like, and can automatically realize the recommendation of the treatment measures of the polluted water quality in different flow domains when the water quality treatment measures are matched, so that effective reference is provided for the decision of the follow-up prevention measures, and the recommendation of the water pollution treatment measures in different scenes is realized. Meanwhile, water environment treatment tasks and targets can be formed according to water quality treatment measures, and the implementation completion conditions and effects of the tasks are tracked and checked.
The second object of the present invention is to provide a water pollution decision system based on neural network.
The invention provides a basic scheme II: the neural network-based water pollution decision-making system uses the neural network-based water pollution decision-making method.
Further, the method comprises the steps of:
the data acquisition module is used for acquiring current water quality data;
the water quality prediction module is preset with a water quality prediction model; the water quality prediction model is used for generating an LSTM prediction result according to the current water quality data and generating a water quality prediction trend by correcting the LSTM prediction result according to the Markov chain;
the water quality prediction module is used for acquiring a water quality prediction trend output by the water quality prediction model according to the current water quality data.
Further, the data acquisition module is further configured to acquire historical water quality data, and further includes:
and the model generation and training module is used for establishing a water quality prediction model based on the LSTM and the Markov chain, training the water quality prediction model according to the historical water quality data and storing the trained water quality prediction model in the water quality prediction module.
Further, the method further comprises the following steps:
the water pollution control module is pre-provided with a water pollution control model;
the water pollution control module is used for obtaining water quality treatment measures output by the water pollution control model according to the water quality prediction trend.
The second basic scheme has the beneficial effects that:
1. in the scheme, the water quality prediction module is arranged, the fluctuation range of LSTM prediction result errors is analyzed through the Markov chain, the fluctuation development trend is predicted, the LSTM prediction result is corrected through the Markov chain, so that the water quality prediction trend is finely optimized, the prediction errors generated by external factors are better eliminated, the errors caused by specific numerical values are reduced to a certain extent, and the accuracy of the prediction result is improved. Meanwhile, the water quality prediction trend is obtained through the prediction of the water quality prediction module, the water quality evolution trend is known, the factors causing the water quality change are analyzed in advance, and the advance decision is made on the polluted river water area in time.
2. In the scheme, the water pollution control module is arranged to match water quality treatment measures for water quality prediction trend through a water pollution control model based on a random forest algorithm. The random forest algorithm has the advantages of high accuracy, capability of effectively running on a large data set, difficulty in overfitting and the like, and can automatically realize the recommendation of treatment measures of polluted water quality in different flow domains when water quality treatment measures are matched, so that decision-making measures suitable for treatment of different water environments are determined, water environment treatment tasks and targets are formed, and the implementation completion condition and effect of the tasks are tracked and checked.
Drawings
FIG. 1 is a flow chart of a neural network-based water pollution decision system of the present invention;
FIG. 2 is a schematic diagram of an LSTM memory cell according to the present invention;
FIG. 3 is a graph showing the comparison of predicted pH data with real pH data according to the present invention;
FIG. 4 is a graph comparing predicted ammonia nitrogen content data with real data of the water quality according to the invention;
FIG. 5 is a graph comparing predicted data of total phosphorus content of water quality with real data;
fig. 6 is an integrated structure diagram of a second embodiment of the present invention.
Detailed Description
The following is a further detailed description of the embodiments:
example 1
The water pollution decision method based on the neural network, as shown in fig. 1, comprises the following steps:
s1: and 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.
S2: acquiring current water quality data; invoking a preset water quality prediction model, wherein the water quality prediction model is constructed based on an LSTM (neural network) and a Markov chain; and the water quality prediction model predicts according to the current water quality data to generate an LSTM prediction result, and corrects the LSTM prediction result according to the Markov chain to output a water quality prediction trend.
The step S1 specifically comprises the following steps:
s101: the method comprises the steps of obtaining historical water quality data, wherein the historical water quality data comprise index data of various monitoring factors collected by various sections of the history, and the monitoring factors comprise one or more of sampling time, sections (data sampling places), positions (expressed by upstream and downstream of rivers), flow, rainfall, section catchment area population, TP (total phosphorus content of water quality), NH4-N (ammonia nitrogen content of water quality), COD (dissolved oxygen of water quality) and pH value.
S102: a water quality prediction model is established based on LSTM (neural network) and Markov chains. As shown in fig. 2, each circle in the graph is calculated point by point, namely, corresponding operation is performed on the vector; each rectangle represents a neural network layer, the internal characters of which represent the activation functions used by the respective neural network.
Each cell of the LSTM neural network has three gates, an Input gate (Input gate), a Forget gate (Forget gate), and an Output gate (Output gate).
The forgetting gate takes the output data of the last unit and the input data of the unit as input sigmoid functions, and can generate a value in the range of [0,1] for any one of the memory units at the last moment, and the forgetting degree of the last unit is controlled by the value.
The input gate cooperates with a tanh function to control how much new information is added. the tanh function generates the current candidate cell value and the input gate generates a value in the range of 0,1 for any of the current candidate cells, thereby controlling the degree to which new information is added.
The output gate controls how much the current cell state is forgotten, and after activation of the cell state, the output gate generates a value in the range of 0,1 for either term, which controls the degree to which the cell state is filtered.
An LSTM-based mathematical model is constructed according to the following formula:
f t =σ(W fx x t +W fh h t-1 +b f ) (1)
i t =σ(W ix x t +W ih h t-1 +b i ) (2)
o t =σ(W ox x t +W oh h t-1 +b o ) (3)
wherein x is t Indicating time input data, h t-1 Represents the output value of the LSTM unit at the last moment, C t-1 Representing the memory cell value at the previous time, C t A memory unit value at time t is represented; w (W) * For weighting coefficients (e.g. W xi Representing weights between corresponding input data and input gates); b * For a bias vector (e.g. b i A bias vector for the input gate). Sigma is a sigmoid function, and the value is [0,1]When the value of 0 is taken, the gate is closed, when the value of 1 is taken, the gate is opened, and the formula is shown as formula (4).
C′ t =tanh(W xc x t +W hc h t -1+b c ) (5)
C t =f t C t -1+i t C′ t (6)
Wherein C' t Representing the current candidate memory cell value, calculating the memory cell state value C at the current time t The iterative formula of (2) is shown in formula (6), and tan h is a hyperbolic tangent activation function; w (W) xc To correspond to the weight between the input data and the memory unit, W hc Is the weight between the hidden layer and the memory cell.
Is provided with n (n)>0) Dimension input x 1 ,x 2 ,...,x n ,m(m>0) Hidden layer sequence h of dimensional network 1 ,h 2 ,...,h m ,k(k>0) Dimension output sequence y 1 ,y 2 ,...,y k ,y k The output of the LSTM unit at the time t is shown in a formula (8).
yt=o t tanh(C t ) (8)
Although the LSTM cyclic neural network model applies a lot of sample training and test data to ensure accuracy during simulation, the data are affected by external factors and sometimes have certain errors, so that the prediction result randomly fluctuates within a certain range, and the prediction accuracy is reduced. The use of Markov chains (Markov chain) can better eliminate prediction errors generated by external factors, so that a combined prediction model of the neural network and the Markov chain is established, and more accurate prediction results can be obtained.
Markov chains are a series of random variables with markov properties, whereas markov chain prediction is a scientific, efficient dynamic prediction method suitable for random processes. The method mainly comprises two processes: firstly, determining a state space of a Markov chain, and secondly, determining a state transition probability and a state transition matrix through calculation.
Building a water quality prediction model based on LSTM and Markov chains according to the following formula:
in the event development and change process, the probability of transition to the state j in the next step in the process of the state i is simply referred to as the state transition probability, which is shown in the formula (9):
P ij =P{X n+1 =j|X n =i} (9)
wherein P is ij Is the state transition probability; x is X n =i indicates that the process is in state i at time n, and is referred to as {0,1,2, …) as the state space of the process, denoted as S, and S is a generic term for the state space. For a Markov chain, given past state X 1 ,X 2 ,..,X n-1 And the current state X n 。
The fluctuation range of the LSTM cyclic neural network simulation prediction result error can be analyzed through the Markov chain model, the fluctuation development trend is predicted, and the LSTM cyclic neural network prediction result is further refined and optimized through the state transition probability matrix of the error.
The markov chain has so-called "no-back effect", i.e. the state of the process time is determined, only the time is known, and the complete knowledge of the time is not required. In addition, the final prediction result of the finally constructed model is not a specific value, but a group of prediction interval values with different probabilities are generated, so that errors caused by the specific value are reduced to a certain extent, and the prediction accuracy is improved.
S103: and training the water quality prediction model according to the historical water quality data.
In this embodiment, multi-factor prediction is adopted, so that the monitoring factors include pH, TP, and NH3-N, index data of the monitoring factors in the historical water quality data are taken as samples, and a water quality prediction model established based on LSTM and markov chains is trained according to the samples.
The multi-factor prediction means that index data of a plurality of monitoring factors contained in water quality at the same time is interacted and influenced by other factors. And taking the relevance of river water pollutants into consideration, adopting multi-factor prediction, and jointly predicting index data of a certain factor at the next moment by utilizing the interaction of a plurality of factors, thereby improving the accuracy of a prediction result.
S104: and storing the trained water quality prediction model for subsequent water quality prediction.
The step S2 specifically comprises the following steps:
s201: current water quality data is obtained, wherein the current water quality data comprises index data of various monitoring factors, and in the embodiment, the monitoring factors comprise pH value, TP and NH3-N.
S202: and calling a preset water quality prediction model, and calling the water quality prediction model stored in the step S104.
S203: and taking the current water quality data as input, inputting the current water quality data into a water quality prediction model, and obtaining a water quality prediction trend output by the water quality prediction model. The water quality prediction model predicts according to the current water quality data to generate an LSTM prediction result, and corrects the LSTM prediction result according to the Markov chain to output a water quality prediction trend.
The water quality prediction trend includes index data of various monitoring factors, which in this embodiment include pH, TP, and NH3-N. The water quality prediction trend is displayed for a manager to check, and water quality control measures are set according to the water quality prediction trend, and the water quality prediction trend can be input into a third party model for further analysis and judgment.
In other embodiments, S2 further comprises: and analyzing and judging the current water quality according to the water quality prediction trend and a preset water quality grade rule to generate a water quality prediction grade. Specific: the water quality grade rule adopts the existing water quality grade standard, and the water quality grade to which the water quality prediction trend belongs is analyzed and judged according to the water quality grade rule, so that the water quality prediction grade is generated. For example, 2 months in 2019 of a certain section are 2 kinds of water, and the water quality grade of the end of 2019 is predicted by combining the monitoring factors of 3 months to 12 months in the past.
In other embodiments, S1 further comprises: and acquiring water pollution control big data, and establishing a water pollution control model based on a random forest algorithm according to the water pollution control big data. Specific: the water pollution control model is built by adopting the existing random forest algorithm, the water pollution control model is trained according to the water pollution control big data, and the trained water pollution control model is stored. The input of the water pollution control model is water quality data, and the output is water quality treatment measures corresponding to the water quality data. The water quality treatment measures comprise one or more of pollution types, treatment measure major classes, treatment measure minor classes, technical processes, construction difficulty, construction cost, operation difficulty, operation cost and expected effect corresponding to the measures.
S2 further comprises: and the water pollution control model outputs water quality treatment measures according to the water quality prediction trend. Specific: the nature of the water quality prediction trend is water quality data, the water quality prediction trend is taken as input, the input is input into a water pollution control model, and the water quality treatment measures matched and output by the water pollution control model are obtained. Corresponding water quality treatment measures are automatically recommended for water quality data matching through a water pollution control model, and the corresponding water quality treatment measures comprise pollution types, treatment measure major categories, treatment measure minor categories, technical processes, construction difficulty, construction cost, operation difficulty, operation cost, expected effects and the like. According to the treatment measures and characteristic indexes, the water environment treatment decision-making measures suitable for the river basin in the period can be manually modified and newly increased, annual target tasks are formed, and the implementation completion conditions and effects of the tasks are tracked and checked.
The neural network-based water pollution decision-making system uses the neural network-based water pollution decision-making method. The system comprises a data acquisition module, a model generation and training module and a water quality prediction module.
The data acquisition module is used for acquiring historical water quality data, the historical water quality data comprises index data of various monitoring factors acquired by various sections of the history, and the monitoring factors comprise one or more of sampling time, sections (data sampling places), positions (expressed by upstream and downstream of rivers), flow, rainfall, section catchment area population, TP (total phosphorus content of water quality), NH4-N (ammonia nitrogen content of water quality), COD (dissolved oxygen of water quality) and pH value.
The model generation and training module is used for building a water quality prediction model based on the LSTM and the Markov chain, training the water quality prediction model according to the historical water quality data, and storing the trained water quality prediction model in the water quality prediction module. Specific:
the model generation and training module is used for constructing a mathematical model based on LSTM according to formulas (1) - (4).
Calculating the state value C of the memory cell at the current moment t The iterative formulas of (a) and (b) are shown as formulas (6) and (7).
Is provided with n (n)>0) Dimension input x 1 ,x 2 ,...,x n ,m(m>0) Hidden layer sequence h of dimensional network 1 ,h 2 ,...,h m ,k(k>0) Dimension output sequence y 1 ,y 2 ,...,y k ,y k The output of the LSTM unit at the time t is shown in a formula (8).
Although the LSTM cyclic neural network model applies a lot of sample training and test data to ensure accuracy during simulation, the data are affected by external factors and sometimes have certain errors, so that the prediction result randomly fluctuates within a certain range, and the prediction accuracy is reduced. The use of Markov chains (Markov chain) can better eliminate prediction errors generated by external factors, so that a combined prediction model of the neural network and the Markov chain is established, and more accurate prediction results can be obtained.
Markov chains are a series of random variables with markov properties, whereas markov chain prediction is a scientific, efficient dynamic prediction method suitable for random processes. The method mainly comprises two processes: firstly, determining a state space of a Markov chain, and secondly, determining a state transition probability and a state transition matrix through calculation.
The model generation and training module is also used for constructing a water quality prediction model based on the LSTM and the Markov chain according to the following formula:
in the event development and change process, the probability of transition to the state j in the next step in the process of the state i is simply referred to as the state transition probability, as shown in the formula (9).
In this embodiment, multi-factor prediction is adopted, so that the monitoring factors include pH, TP, and NH3-N, and the model generation and training module is further configured to train, based on the samples, a water quality prediction model based on LSTM and markov chains using index data of the monitoring factors in the historical water quality data as samples, and store the trained water quality prediction model in the water quality prediction module.
The data acquisition module is further configured to acquire current water quality data, where the current water quality data includes index data of a plurality of monitoring factors, and in this embodiment, the monitoring factors include pH, TP, and NH3-N.
The water quality prediction module is preset with a water quality prediction model, and the water quality prediction model is used for generating an LSTM prediction result according to the current water quality data and generating a water quality prediction trend according to the LSTM prediction result corrected by the Markov chain. Specific: the water quality prediction module is used for acquiring a water quality prediction trend output by the water quality prediction model according to the current water quality data. The water quality prediction trend includes index data of various monitoring factors, which in this embodiment include pH, TP, and NH3-N.
In other embodiments, the neural network-based water pollution decision system further comprises a water pollution control module.
The data acquisition module is also used for acquiring water pollution prevention and control big data, wherein the water pollution prevention and control big data comprises water quality data and corresponding water quality treatment measures. The water quality treatment measures comprise one or more of pollution types, treatment measure major classes, treatment measure minor classes, technical processes, construction difficulty, construction cost, operation difficulty, operation cost and expected effect corresponding to the measures.
The model generation and training module is also used for building a water pollution control model based on a random forest algorithm, and the existing random forest algorithm is specifically adopted. The model generation and training module is also used for taking the big data of water pollution control as a sample, training a water pollution control model according to the sample, and storing the trained water pollution control model in the water pollution control module.
The water pollution control module is pre-provided with a water pollution control model, and is used for calling the water pollution control model to acquire water quality treatment measures output by the water pollution control model according to the water quality prediction trend.
The water quality is predicted to obtain a water quality prediction trend, real data of the water quality is collected in real time, experiments prove that the predicted result and the real value of the scheme are consistent, the predicted result is accurate, the accuracy of river water quality prediction can reach 80%, the method can be applied to river water quality factor prediction, the prediction is performed for water pollution possibly occurring in a river, and the experimental result is shown in figures 3, 4 and 5.
Example two
The present embodiment is different from the first embodiment in that:
as shown in fig. 6, the water pollution decision system based on the neural network comprises a water pollution control big data intelligent analysis and decision platform and an intelligent algorithm platform. The intelligent analysis of the big data for preventing and treating the water pollution comprises a configuration module, a plurality of application modules, a visual component and an application interface layer. The intelligent algorithm platform comprises an algorithm package and a unified algorithm interface service layer.
In the application, the used algorithm comprises a big data algorithm of the correlation between different pressure sources and water quality, a multi-source heterogeneous data knowledge feature extraction and fusion algorithm and a small-basin water pollution decision self-learning algorithm, and in the embodiment, the algorithm is constructed by using a python implementation algorithm, and a specific algorithm packaging strategy is as follows: the use of the python process running a model trained in deep learning invokes the services provided by the python process in a Java application, which may run on different servers, invoking by remote access of the process. After the algorithm is packaged, the system platform transmits the data in a preset data format, such as Word, PDF and the like, through an HTTP protocol.
In the application, the interfacing of the algorithm with the application is achieved through an application interface layer and a unified algorithm interface service layer.
The unified algorithm interface service layer comprises an algorithm parameter configuration interface, a situation configuration interface, an algorithm driving interface, an algorithm result message interface and the like. The algorithm driving interface is a core interface and comprises driving interfaces of all algorithms in the algorithm package.
Algorithm parameter configuration interface: 1. basic technical parameter configuration functions of a basic algorithm and three application algorithms are realized. 2. Publishing an interface through a web service based on an http/https protocol; 3. the method is called by a configuration module of the intelligent analysis and decision platform for preventing and controlling the water pollution.
Case configuration interface: 1. the method realizes the situation configuration parameter basic configuration function of a small-river basin water pollution decision self-learning algorithm, a pressure source and water quality relation model algorithm, and a pressure source and water quality multi-source heterogeneous data knowledge feature extraction and fusion algorithm based on the deep neural network. 2. Publishing an interface through a web service based on an http/https protocol; 3. the method is called by a configuration module of the intelligent analysis and decision platform for preventing and controlling the water pollution.
The algorithm driving interface is a core interface of an interface layer, realizes the butt joint of characteristic data and parameters between the algorithm driving interface and the algorithm, and comprises the following steps: the requirements of the interface functions are as follows: 1. the task driving of realizing three application algorithms initiates the call, which is the entry for the execution of the application system call algorithm. 2. Publishing an interface through a web service based on an http/https protocol; 3. the algorithm is called by an algorithm calling interface of the intelligent analysis and decision platform for preventing and treating water pollution.
Algorithm result message interface: 1. and after the algorithm calculation is completed, returning a calculation result message to the called application module. 2. The interface is a call port. 3. The interface calls back the water pollution prevention big data intelligent analysis and decision analysis business module of the decision platform to complete the task message transmission through the result response interface.
The application interface layer comprises a general web call interface, an algorithm call interface, a result response interface and the like.
Universal web call interface: 1. the general http/https protocol is adopted to realize the call through the web service; 2. the interface is a call interface. Such as invoking an algorithm parameter configuration interface and a scenario configuration interface.
Algorithm call interface: 1. the interface calls an algorithm driving interface of the algorithm platform and is an entry for executing an application system calling algorithm; 2. the interface is a call interface.
The result response interface: 1. after the algorithm operation task is completed, receiving a message returned by the algorithm platform, and writing the state identification into a database; 2. publishing an interface through a web service based on an http/https protocol; 3. is called by an algorithm result message interface of the algorithm platform.
The application interface layer and the unified algorithm interface service layer are built by adopting unified specifications, and the interface protocol, the interface data format, the data coding and the packaging method specifications are as follows: interface mode: interface release is carried out through web services based on http, and calling ends carry out calling and responding through http/https. Interface data format: and adopting a JSON format to conduct data interaction response. Interface coding: UTF-8 coding.
The algorithm is connected with the platform in a mode of separating the algorithm from the platform. And a monitoring process is established on the algorithm server, and the platform calls the algorithm through remote access of the process. And the information exchange between the system platform and the algorithm server is completed by adopting an HTTP hypertext transfer protocol and utilizing a GET and POST request method in HTTP.
In the application, the unified data read-write interface adopts unified non-relational data and a read-write interface of the relational data as a unified interface between an algorithm and a data resource and between an application and a data resource read-write call. The relational data is read or stored for the application platform and the algorithm platform through a relational database driver (JDBC, ODBC and the like). The non-relational data (scheme, file, etc.) are read or stored for the application platform and the algorithm platform through the file interface.
In this application, data driving is implemented in a configuration definition, 1. Parameter configuration (model base data integration): when the system is designed, the overall configuration of the model parameters is needed, so that the scheduling fusion between the application and the algorithm is achieved, the model comprises various initialization conditions (grids and the like) of the model, the model inputs data files and the like. The parameter configuration is realized through an interface layer, and the application system is in butt joint with an algorithm parameter configuration interface of a unified algorithm interface service layer through a universal web call interface. 2. Scenario configuration (custom fusion of application scenarios): when the system is designed, configuration of condition parameters is needed, and the system is predicted. The parameter configuration is realized through an interface layer, and the application system is in butt joint with a condition configuration interface of a unified algorithm interface service layer through a universal web call interface.
In the application, data standardization fusion is realized by a data model design, the data standardization is the basis of data fusion, and effective data planning (namely, the data model design) is an important method for fusing data and application/algorithm. The target result database (i.e. decision analysis data) takes analysis decisions as a guide, and realizes planning and design of the target result data (i.e. decision analysis data) database through target data modeling; the source data modeling is the basis of algorithm source data, and the fusion basis of algorithm data access, cleaning and integration is realized.
When the method is applied, the configuration module is used for carrying out parameter configuration and scene configuration through the universal web call interface, the application module is used for calling a required algorithm through the algorithm call interface for analysis, transmitting an analysis result through the result response interface and displaying the analysis result through the visualization component.
The neural network-based water pollution decision-making method uses the neural network-based water pollution decision-making system.
By adopting the scheme, the algorithm and the application are integrated through the interface, and the butt joint of the algorithm and the application is effectively realized based on the application interface layer and the unified algorithm interface service layer. The data fusion of the algorithm and the application is completed through the modeling design of the source data and the target data, the integration of each link of application calling, algorithm operation and data display is realized, and the integration and integration capacity is improved through parameter configuration, scene configuration and the like.
The foregoing is merely an embodiment of the present invention, and a specific structure and characteristics of common knowledge in the art, which are well known in the scheme, are not described herein, so that a person of ordinary skill in the art knows all the prior art in the application day or before the priority date of the present invention, and can know all the prior art in the field, and have the capability of applying the conventional experimental means before the date, so that a person of ordinary skill in the art can complete and implement the present embodiment in combination with his own capability in the light of the present application, and some typical known structures or known methods should not be an obstacle for a person of ordinary skill in the art to implement the present application. It should be noted that modifications and improvements can be made by those skilled in the art without departing from the structure of the present invention, and these should also be considered as the scope of the present invention, which does not affect the effect of the implementation of the present invention and the utility of the patent. The protection scope of the present application shall be subject to the content of the claims, and the description of the specific embodiments and the like in the specification can be used for explaining the content of the claims.
Claims (10)
1. The neural network-based water pollution decision method is characterized by comprising the following steps of:
acquiring current water quality data;
invoking a preset water quality prediction model, wherein the water quality prediction model is constructed based on LSTM and Markov chains;
and the water quality prediction model predicts according to the current water quality data to generate an LSTM prediction result, and corrects the LSTM prediction result according to the Markov chain to output a water quality prediction trend.
2. The neural network-based water pollution decision-making method of claim 1, further comprising:
and 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.
3. The neural network-based water pollution decision-making method according to claim 1 or 2, further comprising:
and analyzing and judging the current water quality according to the water quality prediction trend and a preset water quality grade rule to generate a water quality prediction grade.
4. The neural network-based water pollution decision-making method of claim 1, wherein: the current water quality data and the water quality prediction trend both comprise index data of various monitoring factors.
5. The neural network-based water pollution decision-making method of claim 1, further comprising:
acquiring water pollution control big data, and establishing a water pollution control model based on a random forest algorithm according to the water pollution control big data;
and the water pollution control model outputs water quality treatment measures according to the water quality prediction trend.
6. The neural network-based water pollution decision-making method of claim 5, wherein: the water quality treatment measures comprise one or more of pollution types, treatment measure major classes, treatment measure minor classes, technical processes, construction difficulty, construction cost, operation difficulty, operation cost and expected effect corresponding to the measures.
7. The water pollution decision-making system based on the neural network is characterized in that: use of the neural network-based water pollution decision-making method of any one of claims 1-6.
8. The neural network-based water pollution decision system of claim 7, comprising:
the data acquisition module is used for acquiring current water quality data;
the water quality prediction module is preset with a water quality prediction model; the water quality prediction model is used for generating an LSTM prediction result according to the current water quality data and generating a water quality prediction trend by correcting the LSTM prediction result according to the Markov chain;
the water quality prediction module is used for acquiring a water quality prediction trend output by the water quality prediction model according to the current water quality data.
9. The neural network-based water pollution decision system of claim 8, wherein: the data acquisition module is also used for acquiring historical water quality data, and further comprises:
and the model generation and training module is used for establishing a water quality prediction model based on the LSTM and the Markov chain, training the water quality prediction model according to the historical water quality data and storing the trained water quality prediction model in the water quality prediction module.
10. The neural network-based water pollution decision system of claim 8, further comprising:
the water pollution control module is pre-provided with a water pollution control model;
the water pollution control module is used for obtaining water quality treatment measures output by the water pollution control model according to the water quality prediction trend.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310337122.9A CN116343946B (en) | 2023-03-30 | 2023-03-30 | Neural network-based water pollution decision method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310337122.9A CN116343946B (en) | 2023-03-30 | 2023-03-30 | Neural network-based water pollution decision method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116343946A true CN116343946A (en) | 2023-06-27 |
CN116343946B CN116343946B (en) | 2024-09-24 |
Family
ID=86880396
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310337122.9A Active CN116343946B (en) | 2023-03-30 | 2023-03-30 | Neural network-based water pollution decision method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116343946B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106991493A (en) * | 2017-03-17 | 2017-07-28 | 浙江工商大学 | Sewage disposal water outlet parameter prediction method based on Grey production fuction |
CN106991437A (en) * | 2017-03-20 | 2017-07-28 | 浙江工商大学 | The method and system of sewage quality data are predicted based on random forest |
CN109159785A (en) * | 2018-07-19 | 2019-01-08 | 重庆科技学院 | A kind of automobile running working condition prediction technique based on Markov chain and neural network |
CN109242203A (en) * | 2018-09-30 | 2019-01-18 | 中冶华天南京工程技术有限公司 | A kind of water quality prediction of river and water quality impact factors assessment method |
CN110874616A (en) * | 2019-11-18 | 2020-03-10 | 苏文电能科技股份有限公司 | Transformer operation prediction method based on LSTM network and Markov chain correction error |
US20200231466A1 (en) * | 2017-10-09 | 2020-07-23 | Zijun Xia | Intelligent systems and methods for process and asset health diagnosis, anomoly detection and control in wastewater treatment plants or drinking water plants |
CN115456243A (en) * | 2022-08-10 | 2022-12-09 | 深圳大学 | Water quality prediction method and device, computer equipment and storage medium |
-
2023
- 2023-03-30 CN CN202310337122.9A patent/CN116343946B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106991493A (en) * | 2017-03-17 | 2017-07-28 | 浙江工商大学 | Sewage disposal water outlet parameter prediction method based on Grey production fuction |
CN106991437A (en) * | 2017-03-20 | 2017-07-28 | 浙江工商大学 | The method and system of sewage quality data are predicted based on random forest |
US20200231466A1 (en) * | 2017-10-09 | 2020-07-23 | Zijun Xia | Intelligent systems and methods for process and asset health diagnosis, anomoly detection and control in wastewater treatment plants or drinking water plants |
CN109159785A (en) * | 2018-07-19 | 2019-01-08 | 重庆科技学院 | A kind of automobile running working condition prediction technique based on Markov chain and neural network |
CN109242203A (en) * | 2018-09-30 | 2019-01-18 | 中冶华天南京工程技术有限公司 | A kind of water quality prediction of river and water quality impact factors assessment method |
CN110874616A (en) * | 2019-11-18 | 2020-03-10 | 苏文电能科技股份有限公司 | Transformer operation prediction method based on LSTM network and Markov chain correction error |
CN115456243A (en) * | 2022-08-10 | 2022-12-09 | 深圳大学 | Water quality prediction method and device, computer equipment and storage medium |
Non-Patent Citations (2)
Title |
---|
刘晶晶等: ""K-Similarity 降噪的LSTM 神经网络水质多因子预测模型"", 《计算机系统应用》, vol. 28, no. 2, 15 February 2019 (2019-02-15), pages 227 - 230 * |
李金泽等: ""基于神经网络与马尔可夫链预测地表水净化装置总氮降解的效果"", 《净水技术》, vol. 37, no. 12, 14 December 2018 (2018-12-14), pages 108 * |
Also Published As
Publication number | Publication date |
---|---|
CN116343946B (en) | 2024-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Li et al. | Water quality prediction based on recurrent neural network and improved evidence theory: a case study of Qiantang River, China | |
CN111400620B (en) | User trajectory position prediction method based on space-time embedded Self-orientation | |
Tong et al. | A hybrid algorithm for reliability analysis combining Kriging and subset simulation importance sampling | |
CN112419710B (en) | Traffic congestion data prediction method, traffic congestion data prediction device, computer equipment and storage medium | |
Bai et al. | Compound autoregressive network for prediction of multivariate time series | |
Lu et al. | Short-term demand forecasting for online car-hailing using ConvLSTM networks | |
CN109685246B (en) | Environment data prediction method and device, storage medium and server | |
CN113159403B (en) | Intersection pedestrian track prediction method and device | |
CN112990530B (en) | Regional population quantity prediction method, regional population quantity prediction device, electronic equipment and storage medium | |
Chang et al. | Reinforcement learning for improving the accuracy of pm2. 5 pollution forecast under the neural network framework | |
CN113435124A (en) | Water quality space-time correlation prediction method based on long-time and short-time memory and radial basis function neural network | |
Wang et al. | An quality prediction model based on CNN-BiNLSTM-attention | |
CN111461353A (en) | Model training method and system | |
Liao et al. | MFGCN: a multimodal fusion graph convolutional network for online car-hailing demand prediction | |
Li | Findkg: Dynamic knowledge graph with large language models for global finance | |
Kaushik et al. | Radial basis function network using intuitionistic fuzzy C means for software cost estimation | |
CN116343946B (en) | Neural network-based water pollution decision method and system | |
CN116451034A (en) | Analysis method and system for pressure source and water quality relation based on xgboost algorithm | |
CN116628444A (en) | Water quality early warning method based on improved meta-learning | |
CN116822722A (en) | Water level prediction method, system, device, electronic equipment and medium | |
CN113780356B (en) | Water quality prediction method and system based on integrated learning model | |
CN113344290B (en) | Method for correcting sub-season rainfall weather forecast based on U-Net network | |
Ye et al. | Application of time series method to the passenger flow prediction in the intelligent bus transportation system with big data | |
Hu et al. | A Multi-Layer Model Based on Transformer and Deep Learning for Traffic Flow Prediction | |
Sekhar et al. | Identification and analysis of nitrogen dioxide concentration for air quality prediction using seasonal autoregression integrated with moving average |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |