CN116050475A - Training method and device for key pollutant concentration prediction model and computer equipment - Google Patents
Training method and device for key pollutant concentration prediction model and computer equipment Download PDFInfo
- Publication number
- CN116050475A CN116050475A CN202211731100.2A CN202211731100A CN116050475A CN 116050475 A CN116050475 A CN 116050475A CN 202211731100 A CN202211731100 A CN 202211731100A CN 116050475 A CN116050475 A CN 116050475A
- Authority
- CN
- China
- Prior art keywords
- data
- key
- sample
- initial training
- layer
- 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.)
- Pending
Links
- 238000012549 training Methods 0.000 title claims abstract description 341
- 239000003344 environmental pollutant Substances 0.000 title claims abstract description 163
- 238000000034 method Methods 0.000 title claims abstract description 163
- 231100000719 pollutant Toxicity 0.000 title claims abstract description 163
- 238000000605 extraction Methods 0.000 claims abstract description 98
- 230000008569 process Effects 0.000 claims abstract description 93
- 239000000356 contaminant Substances 0.000 claims abstract description 61
- 238000013528 artificial neural network Methods 0.000 claims abstract description 48
- 238000004590 computer program Methods 0.000 claims abstract description 22
- 238000003860 storage Methods 0.000 claims abstract description 13
- 230000002159 abnormal effect Effects 0.000 claims description 116
- 238000004140 cleaning Methods 0.000 claims description 36
- 230000008439 repair process Effects 0.000 claims description 36
- 238000004364 calculation method Methods 0.000 claims description 27
- 230000015654 memory Effects 0.000 claims description 27
- 238000012360 testing method Methods 0.000 claims description 25
- 238000013507 mapping Methods 0.000 claims description 24
- 238000005520 cutting process Methods 0.000 claims description 23
- 238000013450 outlier detection Methods 0.000 claims description 13
- 238000006243 chemical reaction Methods 0.000 claims description 7
- 239000010865 sewage Substances 0.000 abstract description 24
- 238000011282 treatment Methods 0.000 description 19
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 17
- QVGXLLKOCUKJST-UHFFFAOYSA-N atomic oxygen Chemical compound [O] QVGXLLKOCUKJST-UHFFFAOYSA-N 0.000 description 12
- 239000001301 oxygen Substances 0.000 description 12
- 229910052760 oxygen Inorganic materials 0.000 description 12
- 238000010586 diagram Methods 0.000 description 9
- 239000000126 substance Substances 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 238000010606 normalization Methods 0.000 description 7
- 238000001514 detection method Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 210000002569 neuron Anatomy 0.000 description 5
- XKMRRTOUMJRJIA-UHFFFAOYSA-N ammonia nh3 Chemical compound N.N XKMRRTOUMJRJIA-UHFFFAOYSA-N 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 238000011176 pooling Methods 0.000 description 4
- 230000006403 short-term memory Effects 0.000 description 4
- 238000013506 data mapping Methods 0.000 description 3
- 238000007689 inspection Methods 0.000 description 3
- 230000033116 oxidation-reduction process Effects 0.000 description 3
- 238000012545 processing Methods 0.000 description 3
- 238000005273 aeration Methods 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000007405 data analysis Methods 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000011156 evaluation Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 230000001537 neural effect Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 239000002351 wastewater Substances 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- OKTJSMMVPCPJKN-UHFFFAOYSA-N Carbon Chemical compound [C] OKTJSMMVPCPJKN-UHFFFAOYSA-N 0.000 description 1
- 229910000831 Steel Inorganic materials 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 239000004568 cement Substances 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000013144 data compression Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000005284 excitation Effects 0.000 description 1
- 229910021389 graphene Inorganic materials 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 210000002364 input neuron Anatomy 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007787 long-term memory Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000003062 neural network model Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 239000003208 petroleum Substances 0.000 description 1
- 238000007670 refining Methods 0.000 description 1
- 238000012216 screening Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 239000010959 steel Substances 0.000 description 1
- 230000026676 system process Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/21—Design, administration or maintenance of databases
- G06F16/215—Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present application relates to a training method, apparatus, computer device, storage medium and computer program product for a key contaminant concentration prediction model. The method comprises the following steps: inputting sample history data of key process parameters and sample history data of key pollutants to an input layer through a first priori knowledge layer; converting the time series sample data into reordered sample data through a second prior knowledge layer; performing feature extraction on the reordered sample data through a feature extraction layer to obtain a feature extraction sample result; inputting the characteristic extraction sample result to a concentration prediction layer through a third priori knowledge layer to obtain a concentration prediction result of the key pollutant; and iteratively updating parameters of the target neural network according to the concentration sample result of the key pollutants and the concentration prediction result of the key pollutants to obtain a key pollutant concentration prediction model. The model obtained by the method can predict the concentration of the key pollutants at the future moment, and can realize the prediction of the sewage quality.
Description
Technical Field
The present application relates to the field of artificial intelligence, and in particular, to a method, apparatus, computer device, storage medium, and computer program product for training a key contaminant concentration prediction model.
Background
For industries such as steel refining, petroleum and petrochemical industry, cement manufacturing and the like, sewage treatment plants are all essential components of related enterprises. The urban sewage treatment plant has the advantages of more common treatment units, long flow, complex system process, complex water quality, linkage relation between the procedures before and after sewage treatment, and strong correlation between the water quality indexes of the key units such as biochemical oxygen demand (Biochemical Oxygen Demand, BOD), chemical oxygen demand (Chemical Oxygen Demand, COD), ammonia nitrogen and the like and the process parameters such as dissolved oxygen, oxidation-reduction potential and the like.
At present, industrial sewage treatment plants mostly adopt manual monitoring means to monitor the water quality of incoming water and water of each treatment unit, and when workers find that the water quality is abnormal, the workers carry out manual bucket carrying and dosing by means of own experience. Therefore, the existing sewage treatment method cannot determine the specific condition of the water quality after the chemical adding operation, further cannot determine whether the chemical adding amount of the chemical adding operation is proper, cannot adjust the chemical adding amount in time, and cannot ensure that the water quality stably meets the standard for a long period.
Therefore, there is a need for a training method of a key contaminant concentration prediction model capable of predicting the quality of sewage.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a training method, apparatus, computer device, computer-readable storage medium, and computer program product for a key contaminant concentration prediction model capable of predicting the quality of wastewater.
In a first aspect, the present application provides a method of training a key contaminant concentration predictive model. The method comprises the following steps:
acquiring a target training data set; the target training data set comprises sample historical data of key process parameters, sample historical data of key pollutants and concentration sample results of the key pollutants;
inputting sample history data of key process parameters and sample history data of key pollutants into a target neural network; the target neural network comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a feature extraction layer, a third priori knowledge layer and a concentration prediction layer;
inputting the sample history data of the key process parameters and the sample history data of the key pollutants to the input layer through the first priori knowledge layer to obtain time sequence sample data corresponding to the sample history data of the key process parameters and the sample history data of the key pollutants;
Converting, by the second prior knowledge layer, the time-series sample data into reordered sample data; performing feature extraction on the reordered sample data through the feature extraction layer to obtain a feature extraction sample result;
inputting the characteristic extraction sample result to the concentration prediction layer through the third priori knowledge layer to obtain a concentration prediction result of the key pollutant;
and iteratively updating parameters of the target neural network according to the concentration sample result of the key pollutants and the concentration prediction result of the key pollutants until a preset training stop condition is met, so as to obtain a key pollutant concentration prediction model.
In one embodiment, the acquiring the target training data set includes:
acquiring an initial training data set; the initial training data set includes a plurality of initial training samples; the initial training sample comprises a plurality of initial training sample data;
aiming at each initial training sample, carrying out data cleaning on each initial training sample data included in the initial training sample to obtain a data cleaning result corresponding to the initial training sample;
and cleaning the data corresponding to each initial training sample to form a target training data set.
In one embodiment, the performing data cleaning on each initial training sample data included in the initial training sample to obtain a data cleaning result corresponding to the initial training sample includes:
performing outlier detection on each initial training sample data included in the initial training samples to obtain outlier results and normal value results;
determining a historical normal value corresponding to each abnormal value included in the abnormal value result, and inputting the historical normal value into a pre-trained repair value prediction model to obtain a repair value corresponding to the abnormal value;
and forming a data cleaning result corresponding to the initial training sample by the normal value result and the repair value corresponding to each abnormal value.
In one embodiment, the performing outlier detection on each initial training sample data included in the initial training samples to obtain an outlier result and a normal value result includes:
constructing an isolated tree according to the initial training sample data included in the initial training samples;
for each initial training sample data, according to a preset abnormal score calculation rule, calculating the abnormal score of the initial training sample data in each isolated tree;
Calculating the abnormal score of the initial training sample data in the isolated forest according to the abnormal score of the initial training sample data in each isolated tree;
determining an abnormal judgment result of the initial training sample data according to the abnormal score of the initial training sample data in the isolated forest and a preset abnormal value judgment rule;
and determining an abnormal value result and a normal value result according to the abnormal judgment result of each initial training sample data.
In one embodiment, the constructing the orphan tree according to each initial training sample data included in the initial training samples includes:
dividing each initial training sample data included in the initial training sample into a plurality of isolated tree data sets, and randomly generating an alternative hyperplane corresponding to each isolated tree data set according to each isolated tree data set;
according to a preset test index calculation rule, respectively calculating test indexes corresponding to each alternative hyperplane, and taking the alternative hyperplane with the maximum test index as a target hyperplane;
determining a maximum value data set and a minimum value data set according to the mapping value of the data of the isolated tree data set mapped on the target hyperplane;
And randomly taking the maximum value data set or the minimum value data set as the isolated tree data set, updating the cutting times, and returning to the step of randomly generating the alternative hyperplane corresponding to the isolated tree data set until the cutting times reach a preset cutting times threshold value to obtain the isolated tree.
In one embodiment, the calculating the anomaly score of the initial training sample data in each of the isolated trees according to a preset anomaly score calculation rule includes:
determining, for each orphan tree, a first quality of the initial training sample data falling at a root node of the orphan tree and a second quality of the initial training sample data falling at a leaf node of the orphan tree;
calculating the relative mass of the initial training sample data falling on the isolated tree according to the first mass, the second mass and a preset data relative mass calculation rule;
and the relative quality of the initial training sample data falling on the isolated tree is used as the abnormal score of the initial training sample data on the isolated tree.
In a second aspect, the present application also provides a method of predicting a concentration of a key contaminant. The method comprises the following steps:
Inputting historical data of key process parameters and historical data of key pollutants into a pre-trained key pollutant concentration prediction model; the key pollutant concentration prediction model comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a characteristic extraction layer, a third priori knowledge layer and a concentration prediction layer;
inputting the historical data of the key process parameters and the historical data of the key pollutants into the input layer through the first priori knowledge layer to obtain time sequence data corresponding to the historical data of the key process parameters and the historical data of the key pollutants;
converting, by the second prior knowledge layer, the time series data into reordered data; performing feature extraction on the reordered data through the feature extraction layer to obtain a feature extraction result;
inputting the characteristic extraction result to the concentration prediction layer through the third priori knowledge layer to obtain a concentration prediction result of the key pollutant;
the key pollutant concentration prediction model is obtained through training by the training method of the key pollutant concentration prediction model in the first aspect.
In a third aspect, the present application further provides a training device for a key contaminant concentration prediction model. The device comprises:
the acquisition module is used for acquiring a target training data set; the target training data set comprises sample historical data of key process parameters, sample historical data of key pollutants and concentration sample results of the key pollutants;
the first input module is used for inputting the sample historical data of the key process parameters and the sample historical data of the key pollutants into the target neural network; the target neural network comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a feature extraction layer, a third priori knowledge layer and a concentration prediction layer;
the first conversion module is used for inputting the sample historical data of the key process parameters and the sample historical data of the key pollutants to the input layer through the first priori knowledge layer to obtain time sequence sample data corresponding to the sample historical data of the key process parameters and the sample historical data of the key pollutants;
a first feature extraction module for converting the time-series sample data into reordered sample data through the second prior knowledge layer; performing feature extraction on the reordered sample data through the feature extraction layer to obtain a feature extraction sample result;
The first concentration prediction module is used for inputting the characteristic extraction sample result to the concentration prediction layer through the third priori knowledge layer to obtain a concentration prediction result of the key pollutant;
and the updating module is used for iteratively updating the parameters of the target neural network according to the concentration sample result of the key pollutant and the concentration prediction result of the key pollutant until the preset training stop condition is met, so as to obtain a key pollutant concentration prediction model.
In one embodiment, the acquiring module is specifically configured to:
acquiring an initial training data set; the initial training data set includes a plurality of initial training samples; the initial training sample comprises a plurality of initial training sample data;
aiming at each initial training sample, carrying out data cleaning on each initial training sample data included in the initial training sample to obtain a data cleaning result corresponding to the initial training sample;
and cleaning the data corresponding to each initial training sample to form a target training data set.
In one embodiment, the acquiring module is specifically configured to:
performing outlier detection on each initial training sample data included in the initial training samples to obtain outlier results and normal value results;
Determining a historical normal value corresponding to each abnormal value included in the abnormal value result, and inputting the historical normal value into a pre-trained repair value prediction model to obtain a repair value corresponding to the abnormal value;
and forming a data cleaning result corresponding to the initial training sample by the normal value result and the repair value corresponding to each abnormal value.
In one embodiment, the acquiring module is specifically configured to:
constructing an isolated tree according to the initial training sample data included in the initial training samples;
for each initial training sample data, according to a preset abnormal score calculation rule, calculating the abnormal score of the initial training sample data in each isolated tree;
calculating the abnormal score of the initial training sample data in the isolated forest according to the abnormal score of the initial training sample data in each isolated tree;
determining an abnormal judgment result of the initial training sample data according to the abnormal score of the initial training sample data in the isolated forest and a preset abnormal value judgment rule;
and determining an abnormal value result and a normal value result according to the abnormal judgment result of each initial training sample data.
In one embodiment, the acquiring module is specifically configured to:
dividing each initial training sample data included in the initial training sample into a plurality of isolated tree data sets, and randomly generating an alternative hyperplane corresponding to each isolated tree data set according to each isolated tree data set;
according to a preset test index calculation rule, respectively calculating test indexes corresponding to each alternative hyperplane, and taking the alternative hyperplane with the maximum test index as a target hyperplane;
determining a maximum value data set and a minimum value data set according to the mapping value of the data of the isolated tree data set mapped on the target hyperplane;
and randomly taking the maximum value data set or the minimum value data set as the isolated tree data set, updating the cutting times, and returning to the step of randomly generating the alternative hyperplane corresponding to the isolated tree data set until the cutting times reach a preset cutting times threshold value to obtain the isolated tree.
In one embodiment, the acquiring module is specifically configured to:
determining, for each orphan tree, a first quality of the initial training sample data falling at a root node of the orphan tree and a second quality of the initial training sample data falling at a leaf node of the orphan tree;
Calculating the relative mass of the initial training sample data falling on the isolated tree according to the first mass, the second mass and a preset data relative mass calculation rule;
and the relative quality of the initial training sample data falling on the isolated tree is used as the abnormal score of the initial training sample data on the isolated tree.
In a fourth aspect, the present application also provides a key contaminant concentration prediction apparatus. The device comprises:
the second input module is used for inputting the historical data of the key process parameters and the historical data of the key pollutants into a pre-trained key pollutant concentration prediction model; the key pollutant concentration prediction model comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a characteristic extraction layer, a third priori knowledge layer and a concentration prediction layer;
the second conversion module is used for inputting the historical data of the key process parameters and the historical data of the key pollutants to the input layer through the first priori knowledge layer to obtain time sequence data corresponding to the historical data of the key process parameters and the historical data of the key pollutants;
A second feature extraction module, configured to convert, through the second a priori knowledge layer, the time series data into reordered data; performing feature extraction on the reordered data through the feature extraction layer to obtain a feature extraction result;
the second concentration prediction module is used for inputting the characteristic extraction result into the concentration prediction layer through the third priori knowledge layer to obtain a concentration prediction result of the key pollutant;
the key pollutant concentration prediction model is obtained through training by the training method of the key pollutant concentration prediction model in the first aspect.
In a fifth aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the steps of the first aspect or the second aspect when the processor executes the computer program.
In a sixth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the first aspect or the second aspect described above.
In a seventh aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, carries out the steps of the first aspect or the second aspect described above.
The key pollutant concentration prediction model is a mixed neural network structure comprising 3 priori knowledge layers, namely a first priori knowledge layer, a second priori knowledge layer and a third priori knowledge layer, the characteristics of a plurality of key process parameters are simultaneously extracted by adopting a characteristic extraction layer to reconstruct data, then the time sequence data with inheritance rules are processed by adopting a concentration prediction layer, the functions of the characteristic extraction layer and the concentration prediction layer are better exerted by utilizing the 3 priori knowledge layers, and the obtained key pollutant concentration prediction model can automatically predict the concentration of the key pollutant at the future moment under the current process parameters, so that the prediction of the sewage quality at the future moment is realized.
Drawings
FIG. 1 is a flow diagram of a method of training a key contaminant concentration prediction model in one embodiment;
FIG. 2 is a schematic diagram of a key contaminant concentration prediction model in one embodiment;
FIG. 3 is a flow chart illustrating the steps for acquiring a target training data set in one embodiment;
FIG. 4 is a flow chart illustrating a data cleansing process according to one embodiment;
FIG. 5 is a schematic diagram of a structure of a model for predicting a repair value in one embodiment;
FIG. 6 is a schematic diagram illustrating the operation of a repair value prediction model in one embodiment;
FIG. 7 is a flowchart illustrating an outlier detection step according to an embodiment;
FIG. 8 is a flow diagram of the steps for building an orphan tree in one embodiment;
FIG. 9 is a flow chart of the step of computing anomaly scores for initial training sample data in each of the orphan trees in one embodiment;
FIG. 10 is a flow diagram of a method of predicting key contaminant concentration in one embodiment;
FIG. 11 is a block diagram of a training device of a key contaminant concentration prediction model in one embodiment;
FIG. 12 is a block diagram of a key contaminant concentration prediction device in one embodiment;
fig. 13 is an internal structural view of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
In one embodiment, as shown in fig. 1, a training method of a key pollutant concentration prediction model is provided, and this embodiment is applied to a terminal for illustration by using the method, it is understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and implemented through interaction between the terminal and the server. The terminal can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things equipment and portable wearable equipment, and the internet of things equipment can be smart speakers, smart televisions, smart air conditioners, smart vehicle-mounted equipment and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers. In this embodiment, the method includes the steps of:
step 101, a target training data set is acquired.
Wherein the target training dataset comprises sample history data of key process parameters, sample history data of key contaminants, and sample results of the concentration of key contaminants.
In the embodiment of the application, the terminal acquires a target training data set. Wherein the target training dataset is a dataset for training a key contaminant concentration prediction model. The target training data set may include a plurality of target training samples. The key technological parameters are the technological parameters of sewage treatment with strong correlation with the key pollutant concentration. The key process parameters may be one or more. For example, the key process parameters can be the process parameters of 10 sewage treatments such as incoming water key pollutant concentration, dissolved oxygen, oxidation-reduction potential, dosage, aeration degree and the like. The key pollutant is a water quality index for evaluating the sewage quality. The key contaminants can be chemical oxygen demand (Chemical Oxygen Demand, COD), ammonia nitrogen, and biochemical oxygen demand (Biochemical Oxygen Demand, BOD). The key contaminant may be one or more. The sample history data of the key process parameters are the sample data of the key process parameters when sewage is treated. The sample history data of the key pollutants are sample data of the key pollutants when sewage is treated. The concentration of the key contaminant sample results in a sample concentration of the key contaminant after a period of treatment of the wastewater.
In one example, the terminal predetermines key process parameters. Specifically, the terminal adopts a main component analysis method, and 10 parameters such as the concentration of key pollutants in incoming water, dissolved oxygen, oxidation-reduction potential, dosage, aeration degree and the like are selected from more than 140 production operation parameters monitored by a decentralized control system (Distributed Control System, DCS) of the sewage treatment plant as key process parameters.
In one example, the terminal trains a set of evaluation criteria that can evaluate the feature subset for quality. The terminal then determines a threshold to stop the search, forming a stopping criterion. Then, the terminal adopts the evaluation criterion and the stopping criterion to search the data set for the characteristics to form a characteristic subset. The terminal then validates the screened feature subset. The specific process of terminal screening key process parameters can be expressed as:
S i =a i1 p 1 +a i2 p 2 +...+a iu p u ,(i=1,2,...,u)
Cov(S i ,S j )=0,(i,j=1,2,...,u,i≠j)
wherein S is i For the contribution rate (newly extracted feature attribute) of the ith production operation parameter, S i ∈[0,1);p k (k=1, 2,., u) is the kth characteristic data after normalization (DCS data, i.e., production run parameter normalization), a= (s ij ) u×u Is an orthogonal matrix, and Ra i =λ i a i R is covariance matrix, a i 、λ i Is the corresponding eigenvector and eigenvalue.
Step 102, inputting the sample history data of the key process parameters and the sample history data of the key contaminants into the target neural network.
The target neural network comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a feature extraction layer, a third priori knowledge layer and a concentration prediction layer.
In an embodiment of the application, the terminal inputs the sample history data of the key process parameters and the sample history data of the key contaminants to the target neural network. The target neural network is a neural network for training a key pollutant concentration prediction model. The target neural network may be a hybrid neural network. The target neural network may be a long-short-term memory (Long Short Term Memory, LSTM) neural network or a convolutional-long-term memory (Convolutional Neural Network-Long Short Term Memory, CNN-LSTM) hybrid neural network.
Step 103, inputting the sample history data of the key process parameters and the sample history data of the key pollutants to an input layer through a first priori knowledge layer to obtain time series sample data corresponding to the sample history data of the key process parameters and the sample history data of the key pollutants.
In the embodiment of the application, the terminal inputs the sample history data of the key process parameters and the sample history data of the key pollutants to the input layer through the first priori knowledge layer. The terminal then converts the sample history data of the key process parameters and the sample history data of the key contaminants into time-series sample data via the input layer. Wherein the first layer of prior knowledge is used to determine key process parameters. The specific process of the first priori knowledge layer construction is the same as the specific process of the terminal pre-determining the key process parameters in step 101. The number of channels of the input layer is the data feature number and is also the sum of the number of types of key process parameters and the number of types of key pollutants. For example, the number of key process parameters is 10, the number of key contaminants is 2, and the number of channels and the number of data features of the input layer are 10+2=12. The time-series sample data is sample data arranged in time sequence. The sample data for each time instant includes sample history data for key process parameters for that time instant and sample history data for key contaminants for that time instant.
Step 104, converting the time series sample data into reordered sample data by the second prior knowledge layer. And carrying out feature extraction on the reordered sample data through a feature extraction layer to obtain a feature extraction sample result.
In the embodiment of the application, the terminal converts the time-series sample data into the reordered sample data through the second priori knowledge layer. And then, the terminal performs feature extraction on the reordered sample data through a feature extraction layer to obtain a feature extraction sample result. The second priori knowledge layer is used for sequencing the influence of each element of the input data set on the target output according to the influence, namely, each key technological parameter is sequentially input into the feature extraction layer according to the order from big to small. The reordered sample data is sample data ordered in order of increasing to decreasing effect on key contaminant concentration. The feature extraction layer is used for extracting features of the multidimensional input data. The feature extraction layer may include one or more CNN layers. The feature extraction layer may include a convolution layer, a pooling layer, and a feature reconstruction layer. The feature extraction sample result is a result obtained by carrying out feature extraction on the multidimensional sample input data. In this way, before the terminal inputs the data into the feature extraction layer, the data is input into the second priori knowledge layer, network constraint conditions are added in the second priori knowledge layer, and the key process parameters are sequentially input into the feature extraction layer according to the order from big to small, so that convolution kernel weights containing important key information can be added, and the features of the key process parameters can be extracted better.
In one embodiment, the feature extraction layer includes a convolution layer and a pooling layer. The terminal performs feature extraction on the reordered sample data through the feature extraction layer to obtain a feature extraction sample result, which can be expressed as:
e i =ω i ·x i +b
E=[e 1 ,e 2 ,...,e L ]
F=[F 1 ,F 2 ,...,F L ]
wherein ω εR 1×h For convolution kernel weights e i Is characterized by representing, x i And b is a bias amount, E is a feature map, L is the number of convolution kernels contained in a convolution layer, and F is a feature map obtained by compressing data of a pooling layer, namely a feature extraction sample result.
And 105, inputting a characteristic extraction sample result to a concentration prediction layer through a third priori knowledge layer to obtain a concentration prediction result of the key pollutant.
In the embodiment of the application, the terminal inputs the feature extraction sample result to the concentration prediction layer through the third priori knowledge layer. And then, the terminal predicts based on the feature extraction sample result through the concentration prediction layer to obtain a concentration prediction result of the key pollutant. Wherein the third prior knowledge layer is used for setting the input data step size. The input data step size may be the least common multiple of the period corresponding to each key process parameter. For example, the input data step size may be 24 hours in succession. The concentration prediction layer is used for predicting the concentration of the key pollutant at the future moment. The concentration prediction layer may be an LSTM layer. The concentration prediction result is the predicted concentration of the key pollutants after the sewage is treated for a period of time.
And step 106, iteratively updating parameters of the target neural network according to the concentration sample result of the key pollutants and the concentration prediction result of the key pollutants until the preset training stop condition is met, so as to obtain a key pollutant concentration prediction model.
In the embodiment of the application, the terminal determines the target loss function according to the concentration sample result of the key pollutant and the concentration prediction result of the key pollutant. And then, the terminal iteratively updates the parameters of the target neural network according to the target loss function. And when the target loss function meets a preset training stopping condition, stopping the iterative updating of the parameters of the target neural network by the terminal to obtain a key pollutant concentration prediction model. Wherein, training stop condition is used for measuring whether the training of the key pollutant concentration prediction model is stopped.
In one embodiment, as shown in FIG. 2, the key contaminant concentration prediction model and the target neural network may be a CNN-LSTM hybrid neural network. The first priori knowledge layer is a feature selection priori knowledge layer, the second priori knowledge layer is a convolution priori knowledge layer, the third priori knowledge layer is an LSTM priori knowledge layer, and the feature extraction layer comprises: the concentration prediction layer is an LSTM layer. The key pollutant is COD, and the key technological parameters are 10 kinds of incoming water concentration (incoming water key pollutant concentration), dissolved oxygen, dosage and the like. X= { X 1 ,x 2 ,…,x n The time-series sample data, k= { K 1 ,k 2 ,…,k n Reordered sample data, e= [ E ] 1 ,e 2 ,...,e L ]And F is the feature map obtained after E is subjected to data compression of the pooling layer.
In the training method of the key pollutant concentration prediction model, the key pollutant concentration prediction model is of a hybrid neural network structure comprising 3 priori knowledge layers of a first priori knowledge layer, a second priori knowledge layer and a third priori knowledge layer, the data are firstly reconstructed by adopting a feature extraction layer, the features of a plurality of key process parameters are simultaneously extracted, then the time series data with inheritance rules are processed by adopting a concentration prediction layer, the obtained key pollutant concentration prediction model can automatically predict the concentration of the key pollutant at the future moment under the current process parameters, the prediction of the water quality at the future moment is realized, whether the current process parameters are proper or not is further determined, the process parameters can be timely adjusted, and the long-period stable standard of the water quality is ensured. And the obtained key pollutant concentration prediction model is a mixed neural network structure comprising 3 layers of priori knowledge layers, and the 3 layers of priori knowledge layers can better play the roles of the feature extraction layer and the concentration prediction layer, so that the accuracy of the key pollutant concentration prediction model can be improved, and the network structure can be simplified. In addition, the key process parameters with strong relevance to the key pollutant concentration are predetermined, priori knowledge can be provided for the key pollutant concentration prediction of the sewage treatment plant, and the training of a more accurate key pollutant concentration prediction model is facilitated.
In one embodiment, as shown in fig. 3, the specific process of acquiring the target training data set includes the following steps:
step 301, an initial training data set is acquired.
Wherein the initial training data set comprises a plurality of initial training samples. The initial training sample includes a plurality of initial training sample data.
In the embodiment of the application, the terminal acquires an initial training data set in a sewage treatment plant. Wherein the initial training data set is a training data set which is not subjected to data cleaning.
Step 302, for each initial training sample, performing data cleaning on each initial training sample data included in the initial training sample, to obtain a data cleaning result corresponding to the initial training sample.
In the embodiment of the application, for each initial training sample, the terminal performs data cleaning on each initial training sample data included in the initial training sample to obtain a data cleaning result corresponding to the initial training sample. The data cleaning result is data obtained by cleaning the data of each initial training sample included in the initial training sample.
In one example, for each initial training sample, the terminal performs outlier detection on each initial training sample data included in the initial training sample, to obtain a normal value result corresponding to the initial training sample. And then, the terminal takes the normal value result corresponding to the initial training sample as the data cleaning result corresponding to the initial training sample.
Step 303, cleaning the data corresponding to each initial training sample to form a target training data set.
In the embodiment of the application, the terminal cleans the data corresponding to each initial training sample to form a target training data set.
In the training method of the key pollutant concentration prediction model, an initial training data set is obtained, data cleaning is carried out on initial training sample data included in each initial training sample aiming at each initial training sample, a data cleaning result corresponding to the initial training sample is obtained, and then the data cleaning result corresponding to each initial training sample is used for forming a target training data set. Therefore, the data of the initial training data set is cleaned, the influence of abnormal values generated by the influence of accidental factors on the subsequent data analysis and the key pollutant concentration prediction in the sampling, transmission and storage processes of key process parameters and key pollutant concentration data of the industrial sewage treatment plant is avoided, and the accuracy of the key pollutant concentration prediction model can be further improved.
In one embodiment, as shown in fig. 4, the specific process of performing data cleaning on each initial training sample data included in the initial training samples to obtain a data cleaning result corresponding to the initial training samples includes the following steps:
Step 401, performing outlier detection on each initial training sample data included in the initial training samples to obtain outlier results and normal value results.
In the embodiment of the application, the terminal detects the abnormal value of each initial training sample data included in the initial training sample, and obtains an abnormal value result and a normal value result.
In one example, the terminal uses an isolated forest algorithm to perform outlier detection on each initial training sample data included in the initial training samples to obtain outlier results and normal value results.
Step 402, for each abnormal value included in the abnormal value result, determining a historical normal value corresponding to the abnormal value, and inputting the historical normal value into a pre-trained repair value prediction model to obtain a repair value corresponding to the abnormal value.
In the embodiment of the application, the terminal trains the repair value prediction model in advance. Then, for each outlier included in the outlier result, the terminal determines a history normal value corresponding to the outlier. Specifically, for each abnormal value included in the abnormal value result, the terminal uses a preset number of normal values before the moment corresponding to the abnormal value as the historical normal values corresponding to the abnormal value. And then, the terminal inputs the historical normal value into a pre-trained repair value prediction model to obtain a repair value corresponding to the abnormal value. The repair value prediction model may be a neural network. For example, the repair value prediction model may be a Back Propagation (BP) neural network.
In one embodiment, as shown in fig. 5, the repair value prediction model is a BP neural network, which can be expressed as:
v i =u i +θ i
y i =f(v i )
wherein x is j (j=1, 2, …, N) is the respective input component of the neuron, i.e. the historical normal value; w (W) ij Weights between the historical normal values and neurons for the input data; input data u i A weighted average sum of the input components, i.e., the inputs to the neurons; θ is a threshold value inside the neuron, and is used for completing data calibration of the input neuron and outputting the calibrated output data v i After passing the excitation function f (), the output y of the neuron can be obtained i 。
In one embodiment, as shown in fig. 6, the repair value prediction model is a BP neural network. The training process of the repair value prediction model comprises the following steps: acquiring a repair value prediction training data set; the repair value prediction training data set comprises a normal sample value and a historical normal sample value corresponding to the normal sample value; the normal sample value and the historical normal sample value corresponding to the normal sample value are sample historical data of key process parameters and sample historical data of key pollutants; inputting a historical normal sample value corresponding to the normal sample value into the BP neural network to obtain a predicted normal value; the BP neural network comprises an input layer, a hidden layer and an output layer; calculating an error and a global loss value according to the normal sample value and the predicted normal value; according to the error, calculating a first calibration value of the link weight between the input layer and the hidden layer and a second calibration value of the link weight between the hidden layer and the output layer, and iteratively updating parameters of the BP neural network according to the first calibration value and the second calibration value; stopping iteratively updating parameters of the BP neural network when the global loss value is smaller than the preset precision and the iteration number is smaller than the preset iteration threshold value, and obtaining a repair value prediction model; when the iteration times are equal to a preset iteration threshold, returning to input a historical normal sample value corresponding to the normal sample value to the BP neural network, obtaining a step of predicting the normal value, and updating the iteration times. Specifically, the terminal uses the historical normal sample value x corresponding to the normal sample value 1 ,x 2 ,…,x n Sequentially input to the input layer and hiddenLayer, get hidden result z 1 ,z 2 ,…,z q . Then, the terminal inputs the hidden result to the output layer to obtain the predicted normal value y 1 ,y2,…,y m . The terminal calculates an error and a global loss value according to the normal sample value and the predicted normal value, and can be expressed as:
wherein error is error, E is global loss value, d o (k) For a normal sample value, y o (k) In order to predict a normal value, k represents a kth sample which is randomly input, m represents the number of output samples, n represents the number of input samples, q represents the number of hidden results, o represents a variable, and the value is from 0 to m. The terminal calculates a first calibration value of the link weight between the input layer and the hidden layer and a second calibration value of the link weight between the hidden layer and the output layer according to the error, and can be expressed as:
wherein DeltaV (k) is a first calibration value of the link weight between the input layer and the hidden layer, deltaW (k) is a second calibration value of the link weight between the hidden layer and the output layer, V is the link weight between the input layer and the hidden layer, and W is the link weight between the hidden layer and the output layer.
And 403, forming a data cleaning result corresponding to the initial training sample by using the normal value result and the repair value corresponding to each abnormal value.
In the embodiment of the application, the terminal forms the data cleaning result corresponding to the initial training sample by using the normal value result and the repair value corresponding to each abnormal value.
In the training method of the key pollutant concentration prediction model, abnormal value detection is carried out on each initial training sample data included in the initial training samples, so as to obtain an abnormal value result and a normal value result; for each abnormal value included in the abnormal value result, determining a historical normal value corresponding to the abnormal value, and inputting the historical normal value into a pre-trained repair value prediction model to obtain a repair value corresponding to the abnormal value; and forming a data cleaning result corresponding to the initial training sample by the normal value result and the repair value corresponding to each abnormal value. In this way, abnormal value detection is firstly carried out on the initial training data set, then a historical normal value corresponding to the abnormal value and a pre-trained repair value prediction model are utilized to predict a repair value corresponding to the abnormal value, and then the normal value and the repair value corresponding to the abnormal value form a data cleaning result, so that the abnormal value detection and the abnormal value repair on the initial training data set are realized, the influence of the abnormal value, which is generated by the influence of accidental factors in the sampling, transmission and storage processes of key process parameters and key pollutant concentration data of an industrial sewage treatment plant, on the subsequent data analysis and key pollutant concentration prediction can be avoided, the time continuity of the data is ensured, and the accuracy of the key pollutant concentration prediction model can be further improved.
In one embodiment, as shown in fig. 7, the specific process of performing outlier detection on each initial training sample data included in the initial training samples to obtain an outlier result and a normal value result includes the following steps:
step 701, constructing an isolated tree according to each initial training sample data included in the initial training samples.
In the embodiment of the application, the terminal adopts an isolated forest algorithm to construct an isolated tree according to the initial training sample data included in the initial training samples.
Step 702, for each initial training sample data, according to a preset anomaly score calculation rule, calculating an anomaly score of the initial training sample data in each isolated tree.
In the embodiment of the application, for each initial training sample data, the terminal calculates the abnormal score of the initial training sample data in each isolated tree according to a preset abnormal score calculation rule. The anomaly score calculation rule is used for calculating the anomaly score of the data in the isolated tree. The anomaly score computation rule may be a data relative quality computation rule.
Step 703, calculating the anomaly score of the initial training sample data in the isolated forest according to the anomaly score of the initial training sample data in each isolated tree.
In the embodiment of the application, the terminal calculates the average value of the anomaly scores of the initial training sample data in each isolated tree. The terminal then uses the average value as an anomaly score for the initial training sample data in an isolated forest. The anomaly score in the isolated forest is used for measuring whether the data is anomaly data or not.
In one embodiment, the terminal calculates the anomaly score of the initial training sample data in the isolated forest according to the anomaly score of the initial training sample data in each isolated tree, which can be expressed as:
wherein S (x) is the anomaly score of the initial training sample data in the isolated forest, S i () The anomaly score of the initial training sample data in the isolated tree i is given, and t is the number of the isolated trees.
Step 704, determining an anomaly determination result of the initial training sample data according to the anomaly score of the initial training sample data in the isolated forest and a preset anomaly value determination rule.
In the embodiment of the application, the terminal determines the abnormal judgment result of the initial training sample data according to the abnormal score of the initial training sample data in the isolated forest and a preset abnormal value judgment rule. The abnormality determination result is used for indicating whether the initial training sample data is an abnormal value or not. The outlier determination rule is used to determine whether the initial training sample data is outlier. The outlier determination rule may include an outlier determination threshold. For example, the outlier determination rule may be that the initial training sample data is outlier if a difference between an outlier score of the isolated forest and the first outlier determination threshold is greater than or equal to the second outlier determination threshold. The first outlier determination threshold may be 1 and the second outlier determination threshold may be 0.2.
Step 705, determining an abnormal value result and a normal value result according to the abnormal determination result of each initial training sample data.
In the embodiment of the present application, the terminal constructs an outlier result by using each initial training sample data whose outlier determination result indicates that the initial training sample data is an outlier. Meanwhile, the terminal constructs normal value results by using each initial training sample data of which the abnormal judgment result represents the abnormal value of the initial training sample data.
In the training method of the key pollutant concentration prediction model, an isolated tree is constructed according to the initial training sample data included in the initial training samples; for each initial training sample data, according to a preset abnormal score calculation rule, calculating the abnormal score of the initial training sample data in each isolated tree; according to the abnormal scores of the initial training sample data in each isolated tree, calculating the abnormal scores of the initial training sample data in the isolated forest; determining an abnormal judgment result of the initial training sample data according to the abnormal score of the initial training sample data in the isolated forest and a preset abnormal value judgment rule; and determining an abnormal value result and a normal value result according to the abnormal judgment result of each initial training sample data. In this way, an isolated tree is constructed, then the abnormal score of the initial training sample data in the isolated tree and the abnormal score of the initial training sample data in the isolated forest are calculated sequentially, whether the initial training sample data is an abnormal value or not is judged according to the abnormal score of the initial training sample data in the isolated forest, and an isolated forest algorithm is adopted to realize the abnormal value detection of the initial training data set, so that the accuracy of abnormal value detection can be improved, and the accuracy of the key pollutant concentration prediction model is further improved.
In one embodiment, as shown in fig. 8, the specific process of constructing the orphan tree according to each initial training sample data included in the initial training samples includes the following steps:
step 801, dividing each initial training sample data included in the initial training sample into a plurality of isolated tree data sets, and randomly generating an alternative hyperplane corresponding to each isolated tree data set for each isolated tree data set.
In the embodiment of the application, the terminal divides each initial training sample data included in the initial training sample into a plurality of isolated tree data sets according to the maximum height of the preset isolated tree and the number of the generated isolated trees. Then, for each isolated tree data set, the terminal randomly generates an alternative hyperplane corresponding to the isolated tree data set according to the preset attribute quantity required for generating the hyperplane and the random hyperplane quantity generated by one splitting point. Wherein the maximum height of the orphan tree is used to represent the data volume of the orphan tree dataset.
In one embodiment, the terminal randomly generates an alternative hyperplane corresponding to the orphan tree dataset, which can be expressed as:
wherein f (X) is an alternative hyperplane, p is a segmentation point of the alternative hyperplane, Q is Q attribute sets of the initial training sample X, c j Is [ -1,1]A constant value, X, randomly selected from j ′ For the j-th attribute value in X', X j For data in the orphan tree dataset X', σ (·) is the normalization function.
Step 802, according to a preset test index calculation rule, calculating test indexes corresponding to each candidate hyperplane respectively, and taking the candidate hyperplane with the largest test index as a target hyperplane.
In the embodiment of the application, the terminal calculates the test indexes corresponding to the alternative hyperplanes respectively according to a preset test index calculation rule. Then, the terminal compares the inspection indexes corresponding to the alternative hyperplanes. Then, the terminal takes the alternative hyperplane with the maximum inspection index as a target hyperplane. The test index calculation rule is used for calculating the test index of the alternative hyperplane. The test index is used to measure whether the candidate hyperplane is the best hyperplane.
In one embodiment, the terminal calculates, according to a preset calculation rule of the test index, the test index corresponding to each alternative hyperplane, which may be expressed as:
wherein, after the alternative hyperplane f (X) is established, the isolated tree data set X' is divided into a left set X L And right set X R Y is the mapping of the orphan tree dataset X' on the alternative hyperplane f (X), Y L ∪Y R =Y,Y L Is left set X L Mapping on an alternative hyperplane f (x), Y R Is left set X R The mapping on the alternative hyperplane f (x), avg (·) represents the mean and σ (·) is the normalization function.
Step 803, determining a maximum value data set and a minimum value data set according to the mapping value of the data mapping of the isolated tree data set on the target hyperplane.
In the embodiment of the present application, when the number of cuts is equal to 1, the terminal maps the data of the orphan tree data set to each data with positive mapping value on the target hyperplane, so as to form the maximum value data set. Meanwhile, the terminal maps the data in the isolated tree data set to each data with negative mapping value on the target hyperplane to form a minimum value data set. The maximum data set is the smallest subset where the data with the largest mapping value mapped on the target hyperplane after target hyperplane cutting is located. The minimum value data set is the smallest subset where the data with the smallest mapping value mapped on the target hyperplane after target hyperplane cutting is located. The number of cuts is the number of times the target hyperplane cuts one orphan tree dataset. The initial value of the number of cuts may be 1.
And under the condition that the cutting times are greater than 1, the terminal maps the data of the isolated tree data set to each data with positive mapping values on the target hyperplane to form an alternative maximum value data set. The terminal then compares the minimum mapping value of the data of the alternative maximum data set on the target hyperplane with the minimum mapping value of the data of the maximum data set on the target hyperplane. And if the minimum mapping value of the data of the alternative maximum value data set mapped on the target hyperplane is larger than the minimum mapping value of the data of the maximum value data set mapped on the target hyperplane, the terminal takes the alternative maximum value data set as the maximum value data set. If the minimum mapping value of the data mapping of the alternative maximum value data set on the target hyperplane is smaller than or equal to the minimum mapping value of the data mapping of the maximum value data set on the target hyperplane, the terminal takes the maximum value data set as the maximum value data set, namely, the maximum value data set is kept unchanged. Meanwhile, the terminal maps the data in the isolated tree data set to each data with negative mapping value on the target hyperplane to form an alternative minimum value data set. The terminal then compares the maximum mapped value of the data of the alternative minimum data set mapped on the target hyperplane with the maximum mapped value of the data of the minimum data set mapped on the target hyperplane. And if the maximum mapping value of the data of the alternative minimum value data set mapped on the target hyperplane is smaller than the maximum mapping value of the data of the minimum value data set mapped on the target hyperplane, the terminal takes the alternative minimum value data set as the minimum value data set. If the maximum mapping value of the data of the alternative minimum value data set mapped on the target hyperplane is greater than or equal to the maximum mapping value of the data of the minimum value data set mapped on the target hyperplane, the terminal takes the minimum value data set as the minimum value data set, namely, the minimum value data set is kept unchanged.
Step 804, randomly using the maximum value data set or the minimum value data set as an isolated tree data set, updating the cutting times, and returning to the step of randomly generating alternative hyperplane corresponding to the isolated tree data set until the cutting times reach a preset cutting times threshold value, thereby obtaining an isolated tree.
In the embodiment of the application, the terminal randomly takes the maximum value data set or the minimum value data set as the isolated tree data set. Meanwhile, the terminal updates the cutting times. Specifically, the terminal adds 1 to the number of cuts. And then, the terminal returns to the step of randomly generating the alternative hyperplane corresponding to the isolated tree data set until the cutting times reach a preset cutting times threshold value, and an isolated tree is obtained. Wherein the switching times threshold is used to measure whether cutting of an orphan tree dataset is stopped.
In one embodiment, the preset cutting frequency threshold of the terminal may be expressed as:
where c (m) is the average tree height of a binary tree consisting of m data points, i.e. the cut-time threshold, H (k) =ln (k) +ζ, ζ is the euler constant.
In the training method of the key pollutant concentration prediction model, for each isolated tree data set divided according to each initial training sample data included in the initial training sample, when each isolated tree data set is cut, an alternative hyperplane is randomly generated, the test index corresponding to each alternative hyperplane is calculated, the alternative hyperplane with the largest test index is used as a target hyperplane, and then the isolated tree data set to be cut is cut by adopting the target hyperplane. Therefore, by adding the splitting criterion, the optimal hyperplane is screened, and when the isolated tree data set is cut each time, the isolated tree data set to be cut is cut by adopting the optimal hyperplane, compared with a classical isolated forest algorithm, the accuracy of outlier detection can be improved, and the accuracy of the key pollutant concentration prediction model is further improved. And, the introduced inspection index Sd gain () The discrete condition of the data can be measured through the standard deviation relation of the data set, the target hyperplane can be guaranteed to be the optimal hyperplane, the accuracy of outlier detection is further improved, and the accuracy of the key pollutant concentration prediction model is further improved.
In one embodiment, as shown in fig. 9, according to a preset anomaly score calculation rule, a specific process of calculating anomaly scores of initial training sample data in each isolated tree includes the following steps:
step 901, for each orphan tree, determining a first quality of initial training sample data falling on a root node of the orphan tree and a second quality of initial training sample data falling on a leaf node of the orphan tree.
In an embodiment of the present application, for each orphan tree, a terminal determines a first quality at which initial training sample data falls on a root node of the orphan tree and a second quality at which initial training sample data falls on a leaf node of the orphan tree.
Step 902, calculating the relative quality of the initial training sample data falling on the isolated tree according to the first quality, the second quality and a preset data relative quality calculation rule.
In the embodiment of the application, the terminal calculates the relative quality of the initial training sample data falling on the isolated tree according to the first quality, the second quality and a preset data relative quality calculation rule. Wherein the data relative quality calculation rule is used to calculate the relative quality of the data falling on the orphan tree.
In one example, the terminal determines the number of samples that the initial training sample data falls on the root node of the orphan tree. The terminal then multiplies the number of samples of the initial training sample data falling on the root node of the orphan tree by the second quality. The terminal then divides the first quality by the product to obtain the relative quality of the initial training sample data falling on the orphan tree.
In one embodiment, the terminal calculates the relative quality of the initial training sample data falling on the orphan tree, which can be expressed as:
wherein s is i () For the relative mass of the initial training sample data falling on the orphan tree, m (T i ' ()) represents an initial trainingThe quality of the sample data falling at the root node, m (T i () A) represents the quality of the initial training sample data falling at the leaf node,normalization is performed for the number of samples of the initial training sample data that fall on the root node of the orphan tree.
Step 903, the relative quality of the initial training sample data falling on the isolated tree is used as the anomaly score of the initial training sample data on the isolated tree.
In the embodiment of the application, the relative quality of the initial training sample data falling on the isolated tree is used as the abnormal score of the initial training sample data on the isolated tree by the terminal.
In the training method of the key pollutant concentration prediction model, for each isolated tree, determining a first quality of initial training sample data falling on a root node of the isolated tree and a second quality of initial training sample data falling on a leaf node of the isolated tree; calculating the relative mass of initial training sample data falling on the isolated tree according to the first mass, the second mass and a preset data relative mass calculation rule; the relative quality of the initial training sample data falling on the isolated tree is used as the abnormal score of the initial training sample data on the isolated tree. In this way, by calculating the relative quality of data, namely the ratio of the quality of the data in two spaces covering the data, the introduced data relative quality idea is utilized to realize the measurement of abnormal score values by utilizing the measurement of adjacent data distribution, and the local abnormal degree of the data is estimated by calculating the data distribution of a local area. In addition, the method can accurately detect the local abnormal value without increasing the number of the isolated trees, and can maintain the accuracy and the robustness of abnormal value detection and the generalization capability of the whole key pollutant concentration prediction model.
In one embodiment, the key process parameters are 10, the key pollutants are COD and ammonia nitrogen, and the concentration prediction result of the key pollutants is the concentration prediction result of the COD and the ammonia nitrogen after 2 hours. The terminal divides sample data of 1 year period stored in a DCS system of a sewage treatment plant, takes the first 80% of data as a training data set, and is used for completing training of a target neural network model; the latter 20% of the data were used as test data sets to verify and judge the predictive power of the key contaminant concentration predictive model. The terminal selects an Adam method as an optimization method of a key pollutant concentration prediction model, and adopts a MinMaxScaler method to perform the following normalization treatment on the data samples.
X scaled = std ×(max-min)+min
Wherein X is std To normalize the result, the essence is to scale the element to minimum distance in each column to the maximum and minimum distances in that column, effectively scaling the data to 0,1]On the interval; x is X scaled For normalization results, it is essential to map the normalized data to a given [ min, max ]]A section; x is X max Representing the maximum value of the characteristic data, X min Representing the minimum value of the feature data, max and min represent the maximum and minimum values of the zoom range, respectively.
In one embodiment, the terminal calculates the mean absolute error, root mean square error, and decision coefficient of the key contaminant concentration prediction model, respectively, and may be expressed as:
Wherein, MAE is the average absolute error, which can effectively reflect the absolute error average between the predicted emission concentration of key pollutants of the sewage treatment plant and the actual emission concentration; the RMSE is root mean square error, and can effectively reflect the standard deviation between the predicted emission concentration of key pollutants of the sewage treatment plant and the actual emission concentration; r is R 2 To determine the coefficient to reflect the fitting degree of the predicted emission concentration to the true emission concentration, the closer the coefficient is to 1, the better the predicted performance is shown; n is the total sample number, o n For the concentration sample result (sample value) of the key pollutant, p n A concentration prediction result (predicted value) of the key pollutant; SSR is the sum of squares of the regression, SST is the sum of the total squares,is the average of the concentration sample results for the key contaminants. The root mean square error of the pre-trained key pollutant concentration prediction model is 21.5401, the normalized root mean square error is 10.51%, the determination coefficient is 0.8753, and the overall effect of key pollutant concentration prediction is good.
In one embodiment, as shown in fig. 10, a method for predicting a concentration of a key pollutant is provided, where the method is applied to a terminal for illustrating, it is understood that the method may also be applied to a server, and may also be applied to a system including the terminal and the server, and implemented through interaction between the terminal and the server. The terminal can be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things equipment and portable wearable equipment, and the internet of things equipment can be smart speakers, smart televisions, smart air conditioners, smart vehicle-mounted equipment and the like. The portable wearable device may be a smart watch, smart bracelet, headset, or the like. The server may be implemented as a stand-alone server or as a server cluster composed of a plurality of servers. It can be appreciated that the application scenario of the method for predicting the concentration of the key contaminant may be the same as or different from the training method of the model for predicting the concentration of the key contaminant, which is not limited in this application. In this embodiment, the method includes the steps of:
Step 1001, inputting historical data of key process parameters and historical data of key contaminants into a pre-trained key contaminant concentration prediction model.
The key pollutant concentration prediction model comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a feature extraction layer, a third priori knowledge layer and a concentration prediction layer.
In the embodiment of the application, the terminal inputs the historical data of the key process parameters and the historical data of the key pollutants into a pre-trained key pollutant concentration prediction model. The key pollutant concentration prediction model may be a hybrid neural network. The key pollutant concentration prediction model can be a long-term memory (Long Short Term Memory, LSTM) neural network or a convolution-long-term memory (Convolutional Neural Network-Long Short Term Memory, CNN-LSTM) hybrid neural network. The historical data of the key process parameters are the data of the key process parameters when sewage is treated. The historical data of the key pollutants are the data of the key pollutants when sewage is treated.
Step 1002, inputting the historical data of the key process parameters and the historical data of the key pollutants to an input layer through a first priori knowledge layer to obtain the historical data of the key process parameters and the time series data corresponding to the historical data of the key pollutants.
In the embodiment of the application, the terminal inputs the historical data of the key process parameters and the historical data of the key pollutants to the input layer through the first priori knowledge layer. The terminal then converts the historical data of the key process parameters and the historical data of the key contaminants into time series data through the input layer. The time series data are arranged according to time sequence. The data for each time instant includes historical data for key process parameters for that time instant and historical data for key contaminants for that time instant.
At step 1003, the time series data is converted into reordered data by a second layer of prior knowledge. And carrying out feature extraction on the reordered data through a feature extraction layer to obtain a feature extraction result.
In the embodiment of the application, the terminal converts the time series data into the reordered data through the second priori knowledge layer. And then, the terminal performs feature extraction on the reordered data through a feature extraction layer to obtain a feature extraction result. Wherein, the reordered data is the data ordered in order of the effect on the concentration of the key contaminant from big to small. The feature extraction result is a result obtained by carrying out feature extraction on the multidimensional input data. Specifically, the specific procedure of step 1003 is similar to the specific procedure of step 104.
And step 1004, inputting the feature extraction result to a concentration prediction layer through a third priori knowledge layer to obtain a concentration prediction result of the key pollutant.
The key pollutant concentration prediction model is obtained through training of the training method of the key pollutant concentration prediction model in any one of the training methods of the key pollutant concentration prediction model.
In the embodiment of the application, the terminal inputs the feature extraction result to the concentration prediction layer through the third priori knowledge layer. And then, the terminal predicts based on the feature extraction result through the concentration prediction layer to obtain a concentration prediction result of the key pollutant.
In the training method of the key pollutant concentration prediction model, the key pollutant concentration prediction model is of a hybrid neural network structure comprising 3 priori knowledge layers of a first priori knowledge layer, a second priori knowledge layer and a third priori knowledge layer, the data are firstly reconstructed by adopting a feature extraction layer, the features of a plurality of key process parameters are simultaneously extracted, then the time series data with inheritance rules are processed by adopting a concentration prediction layer, the obtained key pollutant concentration prediction model can automatically predict the concentration of the key pollutant at the future moment under the current process parameters, the prediction of the water quality at the future moment is realized, whether the current process parameters are proper or not is further determined, the process parameters can be timely adjusted, and the long-period stable standard of the water quality is ensured. In addition, the key pollutant concentration prediction model is a mixed neural network structure comprising 3 priori knowledge layers, and the 3 priori knowledge layers can better play the roles of the feature extraction layer and the concentration prediction layer, so that the accuracy of the key pollutant concentration prediction can be improved, and the network structure can be simplified.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a training device for realizing the key pollutant concentration prediction model of the training method of the key pollutant concentration prediction model. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitations in the embodiments of the training device for one or more key contaminant concentration prediction models provided below may be referred to above as limitations of the training method for the key contaminant concentration prediction model, and will not be repeated here.
In one embodiment, as shown in FIG. 11, a training apparatus 1100 for a key contaminant concentration prediction model is provided, comprising: an acquisition module 1110, a first input module 1120, a first conversion module 1130, a first feature extraction module 1140, a first concentration prediction module 1150, and an update module 1160, wherein:
an acquisition module 1110 for acquiring a target training data set; the target training data set comprises sample historical data of key process parameters, sample historical data of key pollutants and concentration sample results of the key pollutants;
a first input module 1120 for inputting sample history data of key process parameters and sample history data of key contaminants to a target neural network; the target neural network comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a feature extraction layer, a third priori knowledge layer and a concentration prediction layer;
a first conversion module 1130, configured to input, through the first priori knowledge layer, the sample history data of the key process parameter and the sample history data of the key contaminant to the input layer, to obtain time-series sample data corresponding to the sample history data of the key process parameter and the sample history data of the key contaminant;
A first feature extraction module 1140 for converting the time-series sample data into reordered sample data through the second layer of prior knowledge; performing feature extraction on the reordered sample data through the feature extraction layer to obtain a feature extraction sample result;
the first concentration prediction module 1150 is configured to input, through the third priori knowledge layer, the feature extraction sample result to the concentration prediction layer to obtain a concentration prediction result of the key contaminant;
and an updating module 1160, configured to iteratively update parameters of the target neural network according to the concentration sample result of the key pollutant and the concentration prediction result of the key pollutant until a preset training stop condition is met, so as to obtain a key pollutant concentration prediction model.
Optionally, the acquiring module 1110 is specifically configured to:
acquiring an initial training data set; the initial training data set includes a plurality of initial training samples; the initial training sample comprises a plurality of initial training sample data;
aiming at each initial training sample, carrying out data cleaning on each initial training sample data included in the initial training sample to obtain a data cleaning result corresponding to the initial training sample;
And cleaning the data corresponding to each initial training sample to form a target training data set.
Optionally, the acquiring module 1110 is specifically configured to:
performing outlier detection on each initial training sample data included in the initial training samples to obtain outlier results and normal value results;
determining a historical normal value corresponding to each abnormal value included in the abnormal value result, and inputting the historical normal value into a pre-trained repair value prediction model to obtain a repair value corresponding to the abnormal value;
and forming a data cleaning result corresponding to the initial training sample by the normal value result and the repair value corresponding to each abnormal value.
Optionally, the acquiring module 1110 is specifically configured to:
constructing an isolated tree according to the initial training sample data included in the initial training samples;
for each initial training sample data, according to a preset abnormal score calculation rule, calculating the abnormal score of the initial training sample data in each isolated tree;
calculating the abnormal score of the initial training sample data in the isolated forest according to the abnormal score of the initial training sample data in each isolated tree;
Determining an abnormal judgment result of the initial training sample data according to the abnormal score of the initial training sample data in the isolated forest and a preset abnormal value judgment rule;
and determining an abnormal value result and a normal value result according to the abnormal judgment result of each initial training sample data.
Optionally, the acquiring module 1110 is specifically configured to:
dividing each initial training sample data included in the initial training sample into a plurality of isolated tree data sets, and randomly generating an alternative hyperplane corresponding to each isolated tree data set according to each isolated tree data set;
according to a preset test index calculation rule, respectively calculating test indexes corresponding to each alternative hyperplane, and taking the alternative hyperplane with the maximum test index as a target hyperplane;
determining a maximum value data set and a minimum value data set according to the mapping value of the data of the isolated tree data set mapped on the target hyperplane;
and randomly taking the maximum value data set or the minimum value data set as the isolated tree data set, updating the cutting times, and returning to the step of randomly generating the alternative hyperplane corresponding to the isolated tree data set until the cutting times reach a preset cutting times threshold value to obtain the isolated tree.
Optionally, the acquiring module 1110 is specifically configured to:
determining, for each orphan tree, a first quality of the initial training sample data falling at a root node of the orphan tree and a second quality of the initial training sample data falling at a leaf node of the orphan tree;
calculating the relative mass of the initial training sample data falling on the isolated tree according to the first mass, the second mass and a preset data relative mass calculation rule;
and the relative quality of the initial training sample data falling on the isolated tree is used as the abnormal score of the initial training sample data on the isolated tree.
Based on the same inventive concept, the embodiments of the present application also provide a key contaminant concentration prediction apparatus for implementing the above-mentioned related key contaminant concentration prediction method. The implementation of the solution provided by the device is similar to that described in the above method, so the specific limitations in the embodiments of the device for predicting a concentration of a key contaminant provided below may be referred to as the limitations of the method for predicting a concentration of a key contaminant hereinabove, and will not be repeated here.
In one embodiment, as shown in FIG. 12, a key contaminant concentration prediction apparatus 1200 is provided, comprising: a second input module 1210, a second conversion module 1220, a second feature extraction module 1230, and a second concentration prediction module 1240, wherein:
a second input module 1210 for inputting historical data of key process parameters and historical data of key contaminants into a pre-trained key contaminant concentration prediction model; the key pollutant concentration prediction model comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a characteristic extraction layer, a third priori knowledge layer and a concentration prediction layer;
a second conversion module 1220, configured to input, through the first priori knowledge layer, the historical data of the key process parameter and the historical data of the key contaminant to the input layer, so as to obtain time series data corresponding to the historical data of the key process parameter and the historical data of the key contaminant;
a second feature extraction module 1230, configured to convert the time-series data into reordered data through the second prior knowledge layer; performing feature extraction on the reordered data through the feature extraction layer to obtain a feature extraction result;
A second concentration prediction module 1240, configured to input, through the third priori knowledge layer, the feature extraction result to the concentration prediction layer, to obtain a concentration prediction result of the key contaminant;
the key pollutant concentration prediction model is obtained through training of the training method of the key pollutant concentration prediction model in any one of the training methods of the key pollutant concentration prediction model.
The training device of the above-described key pollutant concentration prediction model and the respective modules in the key pollutant concentration prediction device may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a terminal, and the internal structure thereof may be as shown in fig. 13. The computer device includes a processor, a memory, an input/output interface, a communication interface, a display unit, and an input means. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for carrying out wired or wireless communication with an external terminal, and the wireless mode can be realized through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. The computer program when executed by the processor implements a training method of a key contaminant concentration prediction model or a key contaminant concentration prediction method. The display unit of the computer device is used for forming a visual picture, and can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, can also be a key, a track ball or a touch pad arranged on the shell of the computer equipment, and can also be an external keyboard, a touch pad or a mouse and the like.
It will be appreciated by those skilled in the art that the structure shown in fig. 13 is merely a block diagram of a portion of the structure associated with the present application and is not limiting of the computer device to which the present application applies, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, implements the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including, but not limited to, user equipment information, user personal information, etc.) and the data (including, but not limited to, data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data are required to comply with the related laws and regulations and standards of the related countries and regions.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the various embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the various embodiments provided herein may include at least one of relational databases and non-relational databases. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic units, quantum computing-based data processing logic units, etc., without being limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples only represent a few embodiments of the present application, which are described in more detail and are not to be construed as limiting the scope of the present application. It should be noted that it would be apparent to those skilled in the art that various modifications and improvements could be made without departing from the spirit of the present application, which would be within the scope of the present application. Accordingly, the scope of protection of the present application shall be subject to the appended claims.
Claims (10)
1. A method of training a predictive model for key contaminant concentration, the method comprising:
acquiring a target training data set; the target training data set comprises sample historical data of key process parameters, sample historical data of key pollutants and concentration sample results of the key pollutants;
inputting sample history data of key process parameters and sample history data of key pollutants into a target neural network; the target neural network comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a feature extraction layer, a third priori knowledge layer and a concentration prediction layer;
Inputting the sample history data of the key process parameters and the sample history data of the key pollutants to the input layer through the first priori knowledge layer to obtain time sequence sample data corresponding to the sample history data of the key process parameters and the sample history data of the key pollutants;
converting, by the second prior knowledge layer, the time-series sample data into reordered sample data; performing feature extraction on the reordered sample data through the feature extraction layer to obtain a feature extraction sample result;
inputting the characteristic extraction sample result to the concentration prediction layer through the third priori knowledge layer to obtain a concentration prediction result of the key pollutant;
and iteratively updating parameters of the target neural network according to the concentration sample result of the key pollutants and the concentration prediction result of the key pollutants until a preset training stop condition is met, so as to obtain a key pollutant concentration prediction model.
2. The method of claim 1, wherein the acquiring the target training data set comprises:
acquiring an initial training data set; the initial training data set includes a plurality of initial training samples; the initial training sample comprises a plurality of initial training sample data;
Aiming at each initial training sample, carrying out data cleaning on each initial training sample data included in the initial training sample to obtain a data cleaning result corresponding to the initial training sample;
and cleaning the data corresponding to each initial training sample to form a target training data set.
3. The method according to claim 2, wherein the performing data cleansing on each initial training sample data included in the initial training samples to obtain a data cleansing result corresponding to the initial training samples includes:
performing outlier detection on each initial training sample data included in the initial training samples to obtain outlier results and normal value results;
determining a historical normal value corresponding to each abnormal value included in the abnormal value result, and inputting the historical normal value into a pre-trained repair value prediction model to obtain a repair value corresponding to the abnormal value;
and forming a data cleaning result corresponding to the initial training sample by the normal value result and the repair value corresponding to each abnormal value.
4. The method of claim 3, wherein performing outlier detection on each initial training sample data included in the initial training samples to obtain outlier results and normal value results comprises:
Constructing an isolated tree according to the initial training sample data included in the initial training samples;
for each initial training sample data, according to a preset abnormal score calculation rule, calculating the abnormal score of the initial training sample data in each isolated tree;
calculating the abnormal score of the initial training sample data in the isolated forest according to the abnormal score of the initial training sample data in each isolated tree;
determining an abnormal judgment result of the initial training sample data according to the abnormal score of the initial training sample data in the isolated forest and a preset abnormal value judgment rule;
and determining an abnormal value result and a normal value result according to the abnormal judgment result of each initial training sample data.
5. The method of claim 4, wherein constructing an orphan tree from each initial training sample data included in the initial training samples comprises:
dividing each initial training sample data included in the initial training sample into a plurality of isolated tree data sets, and randomly generating an alternative hyperplane corresponding to each isolated tree data set according to each isolated tree data set;
According to a preset test index calculation rule, respectively calculating test indexes corresponding to each alternative hyperplane, and taking the alternative hyperplane with the maximum test index as a target hyperplane;
determining a maximum value data set and a minimum value data set according to the mapping value of the data of the isolated tree data set mapped on the target hyperplane;
and randomly taking the maximum value data set or the minimum value data set as the isolated tree data set, updating the cutting times, and returning to the step of randomly generating the alternative hyperplane corresponding to the isolated tree data set until the cutting times reach a preset cutting times threshold value to obtain the isolated tree.
6. The method of claim 4, wherein calculating the anomaly score of the initial training sample data in each of the orphans according to a predetermined anomaly score calculation rule comprises:
determining, for each orphan tree, a first quality of the initial training sample data falling at a root node of the orphan tree and a second quality of the initial training sample data falling at a leaf node of the orphan tree;
calculating the relative mass of the initial training sample data falling on the isolated tree according to the first mass, the second mass and a preset data relative mass calculation rule;
And the relative quality of the initial training sample data falling on the isolated tree is used as the abnormal score of the initial training sample data on the isolated tree.
7. A method of predicting a concentration of a key contaminant, the method comprising:
inputting historical data of key process parameters and historical data of key pollutants into a pre-trained key pollutant concentration prediction model; the key pollutant concentration prediction model comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a characteristic extraction layer, a third priori knowledge layer and a concentration prediction layer;
inputting the historical data of the key process parameters and the historical data of the key pollutants into the input layer through the first priori knowledge layer to obtain time sequence data corresponding to the historical data of the key process parameters and the historical data of the key pollutants;
converting, by the second prior knowledge layer, the time series data into reordered data; performing feature extraction on the reordered data through the feature extraction layer to obtain a feature extraction result;
inputting the characteristic extraction result to the concentration prediction layer through the third priori knowledge layer to obtain a concentration prediction result of the key pollutant;
Wherein the key contaminant concentration prediction model is trained by the training method of the key contaminant concentration prediction model of any one of claims 1 to 6.
8. A training device for a predictive model of key contaminant concentration, the device comprising:
the acquisition module is used for acquiring a target training data set; the target training data set comprises sample historical data of key process parameters, sample historical data of key pollutants and concentration sample results of the key pollutants;
the first input module is used for inputting the sample historical data of the key process parameters and the sample historical data of the key pollutants into the target neural network; the target neural network comprises a first priori knowledge layer, an input layer, a second priori knowledge layer, a feature extraction layer, a third priori knowledge layer and a concentration prediction layer;
the first conversion module is used for inputting the sample historical data of the key process parameters and the sample historical data of the key pollutants to the input layer through the first priori knowledge layer to obtain time sequence sample data corresponding to the sample historical data of the key process parameters and the sample historical data of the key pollutants;
A first feature extraction module for converting the time-series sample data into reordered sample data through the second prior knowledge layer; performing feature extraction on the reordered sample data through the feature extraction layer to obtain a feature extraction sample result;
the first concentration prediction module is used for inputting the characteristic extraction sample result to the concentration prediction layer through the third priori knowledge layer to obtain a concentration prediction result of the key pollutant;
and the updating module is used for iteratively updating the parameters of the target neural network according to the concentration sample result of the key pollutant and the concentration prediction result of the key pollutant until the preset training stop condition is met, so as to obtain a key pollutant concentration prediction model.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 6 or claim 7 when the computer program is executed.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any one of claims 1 to 6 or claim 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211731100.2A CN116050475A (en) | 2022-12-30 | 2022-12-30 | Training method and device for key pollutant concentration prediction model and computer equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211731100.2A CN116050475A (en) | 2022-12-30 | 2022-12-30 | Training method and device for key pollutant concentration prediction model and computer equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116050475A true CN116050475A (en) | 2023-05-02 |
Family
ID=86132480
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211731100.2A Pending CN116050475A (en) | 2022-12-30 | 2022-12-30 | Training method and device for key pollutant concentration prediction model and computer equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116050475A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116451872A (en) * | 2023-06-08 | 2023-07-18 | 北京中电普华信息技术有限公司 | Carbon emission prediction distributed model training method, related method and device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109508811A (en) * | 2018-09-30 | 2019-03-22 | 中冶华天工程技术有限公司 | Parameter prediction method is discharged based on principal component analysis and the sewage treatment of shot and long term memory network |
CN112784476A (en) * | 2020-12-30 | 2021-05-11 | 浙江大学 | Soft measurement method and device for ammonia nitrogen in effluent of different process type agricultural sewage treatment facilities |
CN113033092A (en) * | 2021-03-24 | 2021-06-25 | 石化盈科信息技术有限责任公司 | Sewage treatment data processing method and device, computer equipment and storage medium |
CN113379149A (en) * | 2021-06-24 | 2021-09-10 | 合肥工业大学智能制造技术研究院 | Air micro-station concentration prediction method based on LSTM neural network |
-
2022
- 2022-12-30 CN CN202211731100.2A patent/CN116050475A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109508811A (en) * | 2018-09-30 | 2019-03-22 | 中冶华天工程技术有限公司 | Parameter prediction method is discharged based on principal component analysis and the sewage treatment of shot and long term memory network |
CN112784476A (en) * | 2020-12-30 | 2021-05-11 | 浙江大学 | Soft measurement method and device for ammonia nitrogen in effluent of different process type agricultural sewage treatment facilities |
CN113033092A (en) * | 2021-03-24 | 2021-06-25 | 石化盈科信息技术有限责任公司 | Sewage treatment data processing method and device, computer equipment and storage medium |
CN113379149A (en) * | 2021-06-24 | 2021-09-10 | 合肥工业大学智能制造技术研究院 | Air micro-station concentration prediction method based on LSTM neural network |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116451872A (en) * | 2023-06-08 | 2023-07-18 | 北京中电普华信息技术有限公司 | Carbon emission prediction distributed model training method, related method and device |
CN116451872B (en) * | 2023-06-08 | 2023-09-01 | 北京中电普华信息技术有限公司 | Carbon emission prediction distributed model training method, related method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111382929A (en) | Method and device for constructing river diatom bloom early warning model | |
He et al. | Potential geographical distribution and its multi-factor analysis of Pinus massoniana in China based on the maxent model | |
Galván et al. | Average vs. extreme salinity conditions: Do they equally affect the distribution of macroinvertebrates in estuarine environments? | |
Zaidan et al. | Predicting atmospheric particle formation days by Bayesian classification of the time series features | |
CN116050475A (en) | Training method and device for key pollutant concentration prediction model and computer equipment | |
CN118350678B (en) | Water environment monitoring data processing method and system based on Internet of things and big data | |
Sotomayor et al. | Implications of macroinvertebrate taxonomic resolution for freshwater assessments using functional traits: The Paute River Basin (Ecuador) case | |
CN113988676B (en) | Safety management method and system for water treatment equipment | |
Asghari et al. | Spatial rainfall prediction using optimal features selection approaches | |
CN114819344A (en) | Global space-time meteorological agricultural disaster prediction method based on key influence factors | |
Ortiz-Lopez et al. | Machine learning models with potential application to predict source water quality for treatment purposes: a critical review | |
Yang et al. | An optimized decomposition integration model for deterministic and probabilistic air pollutant concentration prediction considering influencing factors | |
CN115829172B (en) | Pollution prediction method, pollution prediction device, computer equipment and storage medium | |
CN116701875A (en) | Audible noise probability prediction method and system for extra-high voltage alternating current transmission line | |
Tzima et al. | Sparse episode identification in environmental datasets: The case of air quality assessment | |
CN114363004B (en) | Risk assessment method, risk assessment device, computer equipment and storage medium | |
CN115526330A (en) | Organic matter navigation data calibration method and device, computer equipment and storage medium | |
CN114784795A (en) | Wind power prediction method and device, electronic equipment and storage medium | |
CN112256735B (en) | Power consumption monitoring method and device, computer equipment and storage medium | |
CN111062118B (en) | Multilayer soft measurement modeling system and method based on neural network prediction layering | |
Sanchez-Torres et al. | Support Vector Regression for PM10 Concentration Modeling in Santa Marta Urban Area | |
Yan et al. | A Data Cleaning Framework for Water Quality Based on NLDIW-PSO Based Optimal SVR | |
Qing-Dao-Er-Ji et al. | Research on data mining algorithm of meteorological observation based on data quality control algorithm | |
Hojjatnooghi et al. | Determination of soil properties affecting soil aggregate tensile strength in a semiarid region of Iran using a hybrid algorithm | |
Rong et al. | A new water quality evaluation model based on simplified Hopfield neural network |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20230502 |