CN117059201A - Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage - Google Patents

Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage Download PDF

Info

Publication number
CN117059201A
CN117059201A CN202310921907.0A CN202310921907A CN117059201A CN 117059201 A CN117059201 A CN 117059201A CN 202310921907 A CN202310921907 A CN 202310921907A CN 117059201 A CN117059201 A CN 117059201A
Authority
CN
China
Prior art keywords
sewage
oxygen demand
chemical oxygen
data
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310921907.0A
Other languages
Chinese (zh)
Other versions
CN117059201B (en
Inventor
甘德东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Foshan Nanzhou Intelligent Technology Co ltd
Original Assignee
Foshan Nanzhou Intelligent Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Foshan Nanzhou Intelligent Technology Co ltd filed Critical Foshan Nanzhou Intelligent Technology Co ltd
Priority to CN202310921907.0A priority Critical patent/CN117059201B/en
Publication of CN117059201A publication Critical patent/CN117059201A/en
Application granted granted Critical
Publication of CN117059201B publication Critical patent/CN117059201B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/70Machine learning, data mining or chemometrics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16CCOMPUTATIONAL CHEMISTRY; CHEMOINFORMATICS; COMPUTATIONAL MATERIALS SCIENCE
    • G16C20/00Chemoinformatics, i.e. ICT specially adapted for the handling of physicochemical or structural data of chemical particles, elements, compounds or mixtures
    • G16C20/30Prediction of properties of chemical compounds, compositions or mixtures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Physics & Mathematics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Software Systems (AREA)
  • Evolutionary Biology (AREA)
  • Crystallography & Structural Chemistry (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Feedback Control In General (AREA)
  • Activated Sludge Processes (AREA)

Abstract

The invention discloses a method for predicting the chemical oxygen demand of sewage, and belongs to the technical field of prediction of the chemical oxygen demand of sewage inflow. According to the invention, the sewage water inflow date data is obtained; performing characteristic extraction and conversion on the sewage inflow date data to obtain treated sewage inflow date data; and (3) importing the treated sewage inflow date data into a trained sewage chemical oxygen demand prediction model to predict the chemical oxygen demand, so as to obtain and output a corresponding chemical oxygen demand prediction result. The invention can greatly improve the prediction precision of the chemical oxygen demand, provides a more accurate prediction result of the chemical oxygen demand for a sewage treatment plant, is beneficial to better making a power consumption scheme and a management strategy of the sewage plant, reduces the operation cost and realizes intelligent sewage treatment.

Description

Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage
Technical Field
The invention relates to the technical field of sewage monitoring, in particular to a method, a device, equipment and a storage medium for predicting the chemical oxygen demand of sewage inflow.
Background
Chemical Oxygen Demand (COD) is an important index reflecting the content of organic matters in sewage, but the quality of the sewage inflow water has high randomness and strong fluctuation, and when the COD value is larger, the energy consumption of sewage plant treatment is higher. The traditional COD prediction method is mainly based on data analysis mainly comprising document recording and paper forms, long-term manual experience is needed, and unnecessary energy consumption is probably caused if the mobility of personnel in a sewage treatment plant is large.
In recent years, with the development of deep learning, the power of a neural network on the tasks of sequence learning and prediction is gradually developed. For example, the cyclic neural network (Rerrent Neural Network, RNN) algorithm model and the long-short-term memory algorithm model break through in sequence modeling, but the time consumption efficiency is low due to the cyclic structure, so that if the data size is large during training, the prediction accuracy is reduced more rapidly along with the longer prediction distance, and the long-time sequence learning is difficult to deal with. For example, when the gradient during back propagation is less than 1, successive products of multiple layers may cause the gradient to gradually approach zero, a so-called "gradient vanishing" problem. When the gradient disappears, the learning process of the neural network may be greatly slowed down or stopped completely, and the prediction result has larger deviation from the actual COD value. Therefore, a method for accurately predicting the COD value required for sewage treatment is needed.
The foregoing is provided merely for the purpose of facilitating understanding of the technical solutions of the present invention and is not intended to represent an admission that the foregoing is prior art.
Disclosure of Invention
The invention mainly aims to provide a method for predicting the chemical oxygen demand of sewage, and aims to solve the technical problems in the prior art.
In order to achieve the above object, the present invention provides a method for predicting chemical oxygen demand of sewage, comprising the steps of:
acquiring sewage water inflow date data;
performing characteristic extraction and conversion on the sewage inflow date data to obtain treated sewage inflow date data;
and carrying out chemical oxygen demand prediction on the treated sewage inflow date data through a trained sewage chemical oxygen demand prediction model to obtain and output a corresponding chemical oxygen demand prediction result.
Optionally, the specific training step of the sewage chemical oxygen demand prediction model comprises the following steps:
acquiring historical sewage inflow chemical oxygen demand information data;
carrying out data processing on the historical sewage inflow COD information data to obtain a training information data set;
and importing the training information data set into a sewage chemical oxygen demand prediction model to be trained for cyclic training to obtain a trained sewage chemical oxygen demand prediction model.
Optionally, the specific step of performing data processing on the historical sewage inflow chemical oxygen demand information data to obtain a training information data set comprises the following steps:
carrying out data pretreatment on the historical sewage inflow COD information data, and classifying to obtain a date data set and a COD data set;
performing data feature expansion on the date data set to obtain a date data feature set;
and integrating the date data characteristic set and the chemical oxygen demand data set to obtain the training information data set.
Optionally, the step of carrying out data preprocessing on the historical sewage inflow COD information data and classifying to obtain a date data set and a COD data set comprises the following specific steps:
analyzing and finishing the historical sewage inflow chemical oxygen demand information data, and dividing the historical sewage inflow chemical oxygen demand information data of the same discharge port monitoring station of the sewage drainage pipe network into similar historical sewage inflow chemical oxygen demand information data;
classifying the similar historical sewage inflow COD information data to obtain a date data set and a COD data set.
Optionally, the specific step of expanding the data feature of the date data set to obtain the date data feature set includes:
reading time information data in the date data set;
respectively carrying out sine transformation processing and cosine transformation processing on the time information data to obtain transformation characteristic data;
and integrating and splicing the time information data and the transformation characteristic data to obtain a date data characteristic set.
Optionally, the training information data set is imported into a sewage chemical oxygen demand prediction model to be trained for cyclic training, and the specific steps of obtaining the trained sewage chemical oxygen demand prediction model include:
dividing the training information data set into a training set and a test set, and respectively performing scaling packaging on the data to obtain a packaging training set and a packaging test set;
the packaging training set is led into the sewage chemical oxygen demand prediction model to be trained to carry out multi-round cyclic training, and when each round of cyclic training is finished, the packaging testing set is led into the sewage chemical oxygen demand prediction model to be trained to carry out model detection, and a model detection result is output;
when the model detection result is unqualified, the sewage chemical oxygen demand prediction model to be trained continues to carry out subsequent cycle training;
and stopping the cyclic training of the sewage chemical oxygen demand prediction model to be trained when the model detection result is qualified, and obtaining the trained sewage chemical oxygen demand prediction model.
Optionally, the training of the sewage chemical oxygen demand prediction model is the optimization of the self model operation process, and the model operation formula is as follows:
wherein Q, K and V represent query, key value and value, K T Representing the transpose of the matrix K,representing the dimension of the sample data.
In addition, in order to achieve the above object, the present invention also provides a device for predicting chemical oxygen demand of sewage, the device comprising:
and a data acquisition module: acquiring sewage water inflow date data;
and the feature extraction module is used for: performing characteristic extraction and conversion on the sewage inflow date data to obtain treated sewage inflow date data;
and a result prediction module: and carrying out chemical oxygen demand prediction on the treated sewage inflow date data through a trained sewage chemical oxygen demand prediction model to obtain and output a corresponding chemical oxygen demand prediction result.
In addition, in order to achieve the above object, the present invention also provides a sewage chemical oxygen demand prediction apparatus comprising: a memory, a processor and a prediction program of the chemical oxygen demand of the sewage stored on the memory and operable on the processor, the prediction program of the chemical oxygen demand of the sewage being configured to implement the steps of the method of predicting the chemical oxygen demand of the sewage as described above.
In addition, in order to achieve the above object, the present invention also proposes a computer-readable storage medium storing a computer program, the storage medium storing thereon a prediction program of chemical oxygen demand of sewage, which when executed by a processor, implements the steps of the method of predicting chemical oxygen demand of sewage as described above.
According to the invention, the sewage water inflow date data is obtained; performing characteristic extraction and conversion on the sewage inflow date data to obtain treated sewage inflow date data; and (3) importing the treated sewage inflow date data into a trained sewage chemical oxygen demand prediction model to predict the chemical oxygen demand, so as to obtain and output a corresponding chemical oxygen demand prediction result. The invention can greatly improve the prediction precision of the chemical oxygen demand, provides a more accurate prediction result of the chemical oxygen demand for a sewage treatment plant, is beneficial to better making a power consumption scheme and a management strategy of the sewage plant, reduces the operation cost and realizes intelligent sewage treatment.
Drawings
FIG. 1 is a schematic diagram of a hardware operation environment sewage chemical oxygen demand prediction apparatus according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a first embodiment of the method for predicting the chemical oxygen demand of sewage according to the present invention;
FIG. 3 is a schematic flow chart of a second embodiment of the method for predicting the chemical oxygen demand of sewage according to the present invention;
FIG. 4 is a schematic flow chart of a third embodiment of the method for predicting the chemical oxygen demand of sewage according to the present invention;
FIG. 5 is a block diagram showing the construction of a first embodiment of the apparatus for predicting COD in sewage according to the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a device for predicting the chemical oxygen demand of sewage in a hardware operation environment according to an embodiment of the present invention.
As shown in fig. 1, the apparatus for predicting chemical oxygen demand of sewage may include: a processor 1001, such as a central processing unit (Central Processing Unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a Wireless interface (e.g., a Wireless-Fidelity (Wi-Fi) interface). The Memory 1005 may be a high-speed random access Memory (Random Access Memory, RAM) or a stable nonvolatile Memory (NVM), such as a disk Memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
It will be appreciated by those skilled in the art that the configuration shown in FIG. 1 is not limiting of the apparatus for predicting chemical oxygen demand of wastewater and may include more or fewer components than shown, or certain components may be combined, or a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a program for predicting the chemical oxygen demand of sewage may be included in the memory 1005 as a storage medium.
In the sewage chemical oxygen demand prediction apparatus shown in fig. 1, the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the apparatus for predicting the chemical oxygen demand of sewage according to the present invention may be provided in the apparatus for predicting the chemical oxygen demand of sewage, which calls a program for predicting the chemical oxygen demand of sewage stored in the memory 1005 through the processor 1001, and performs the method for predicting the chemical oxygen demand of sewage according to the embodiment of the present invention.
The embodiment of the invention provides a method for predicting the chemical oxygen demand of sewage, and referring to fig. 2, fig. 2 is a schematic flow chart of a first embodiment of the method for predicting the chemical oxygen demand of sewage.
In this embodiment, the method for predicting the chemical oxygen demand of the sewage includes the following steps:
step S10: acquiring sewage water inflow date data;
it should be noted that, the sewage water inflow date data specifically refers to time data of sewage to be treated reaching a sewage treatment plant, for example: 8 minutes at 6 months and 7 days.
Step S20: performing characteristic extraction and conversion on the sewage inflow date data to obtain treated sewage inflow date data;
it is understood that the trained sewage chemical oxygen demand prediction model specifically refers to a sewage chemical oxygen demand prediction model with accurate prediction capability after enough machine learning.
The processed sewage date data is obtained by further processing the data based on the input sewage date data, and has the data characteristics meeting the prediction conditions of the follow-up model.
Step S30: and carrying out chemical oxygen demand prediction on the treated sewage inflow date data through a trained sewage chemical oxygen demand prediction model to obtain and output a corresponding chemical oxygen demand prediction result.
The predicted result of the chemical oxygen demand refers to the amount of oxygen required to be put into the reaction for the sewage treatment of the batch corresponding to the inputted date data of the sewage, and in a specific implementation, the staff of the sewage treatment plant can input the required oxygen into the sewage treatment tank for the reaction according to the predicted result of the chemical oxygen demand.
In the embodiment, the sewage water inflow date data are acquired; performing characteristic extraction and conversion on the sewage inflow date data to obtain treated sewage inflow date data; and (3) importing the treated sewage inflow date data into a trained sewage chemical oxygen demand prediction model to predict the chemical oxygen demand, so as to obtain and output a corresponding chemical oxygen demand prediction result. The method and the device can greatly improve the prediction accuracy of the chemical oxygen demand, provide more accurate prediction results of the chemical oxygen demand for the sewage treatment plant, help the sewage treatment plant to better formulate a power consumption scheme and a management strategy, reduce the operation cost and realize intelligent sewage treatment.
Referring to fig. 3, fig. 3 is a schematic flow chart of a second embodiment of a method for predicting chemical oxygen demand of sewage according to the present invention.
Based on the first embodiment, in this embodiment, the step S20 specifically further includes:
step S21: acquiring historical sewage inflow chemical oxygen demand information data;
in particular, since the sewage treatment of the same sewage treatment plant has a certain periodicity, the historical sewage information data can be used for machine learning of a subsequent prediction model.
Step S22: carrying out data processing on the historical sewage inflow COD information data to obtain a training information data set;
it should be noted that, the historical sewage information data includes all sewage treatment information of the sewage treatment plant, so in a specific implementation, the historical sewage information data needs to be processed and classified according to sewage sources so as to be used for subsequent data.
Step S23: and importing the training information data set into a sewage chemical oxygen demand prediction model to be trained for cyclic training to obtain a trained sewage chemical oxygen demand prediction model.
It can be understood that the cyclic training of the sewage chemical oxygen demand prediction model is a model machine learning and algorithm iteration process, in this embodiment, parameter adjustment is continuously performed on the transducer neural network model, and finally, after multiple iterations, the optimal transducer neural network model, that is, the trained sewage chemical oxygen demand prediction model, is obtained.
According to the embodiment, the historical sewage inflow chemical oxygen demand information data is firstly obtained, then the historical sewage inflow chemical oxygen demand information data is subjected to data processing to obtain the training information data set, finally the training information data set is imported into the sewage chemical oxygen demand prediction model to be trained for cyclic training to obtain the trained sewage chemical oxygen demand prediction model, so that correction and optimization of the sewage chemical oxygen demand prediction model are realized, and further prediction accuracy of the sewage chemical oxygen demand prediction model is improved.
Referring to fig. 4, fig. 4 is a schematic flow chart of a method for predicting chemical oxygen demand of sewage according to a third embodiment of the present invention.
Based on the above second embodiment, in this embodiment, the step S22 specifically includes:
step S221: carrying out data pretreatment on the historical sewage inflow COD information data, and classifying to obtain a date data set and a COD data set;
the data preprocessing specifically includes dividing the sewage treatment date into month, day, time, etc. information as time characteristics, and chemical oxygen demand concentration as chemical oxygen demand data characteristics.
Step S222: performing data feature expansion on the date data set to obtain a date data feature set;
it can be understood that the data feature expansion is to perform corresponding transformation on the basis of the original data to obtain a series of transformed data features, so that the available data features of the subsequent prediction model are increased, richer feature information is provided, and a stronger prediction model is further constructed.
Step S223: and integrating the date data characteristic set and the chemical oxygen demand data set to obtain the training information data set.
It should be noted that the training information data set includes training data and test data that can be used by a prediction model of the chemical oxygen demand of the sewage to be trained.
According to the embodiment, the historical sewage inflow chemical oxygen demand information data are subjected to data preprocessing, classified to obtain a date data set and a chemical oxygen demand data set, the date data set is subjected to data feature expansion to obtain a date data feature set, and the date data feature set and the chemical oxygen demand data set are integrated to obtain the training information data set, so that richer feature information data are provided.
Further, the data preprocessing is carried out on the historical sewage inflow COD information data, and the date data set and the COD data set are obtained by classification, which comprises the following specific steps: analyzing and finishing historical sewage inflow chemical oxygen demand information data, and dividing the historical sewage information data of the same discharge port monitoring station of the sewage drainage pipe network into similar historical sewage inflow chemical oxygen demand information data; classifying the similar historical sewage inflow COD information data to obtain a date data set and a COD data set.
In particular, the sewage treatment in the sewage treatment plant has a certain periodicity, and the periodicity is reflected on the periodic change of the chemical oxygen demand required in the sewage treatment plant.
Further, the specific step of expanding the data features of the date data set to obtain the date data feature set comprises the following steps: reading time information data in the date data set; respectively carrying out sine transformation processing and cosine transformation processing on the time information data to obtain transformation characteristic data; and integrating and splicing the time information data and the transformation characteristic data to obtain a date data characteristic set.
In a specific implementation, the embodiment firstly expresses the time features of month, day, hour and minute in four dimensions of m, d, h and n respectively, then uses sm, sd, sh and sn to represent the sine transformation of month, day, hour and minute respectively, uses cm, cd, ch and cn to represent the corresponding cosine transformation respectively, and finally splices the original features and the transformed features to obtain [ m, d, h, n, sm, sd, sh, sn, cm, cd, ch, cn ], thereby realizing that the feature dimension is increased from 4 dimensions to 12 dimensions.
It should be further noted that, in specific implementation, this embodiment converts each time feature into three dimensions, that is, an original feature, a sine transform feature, and a cosine transform feature, and the mathematical formula is as follows:
X sin =sin(x)
X cos =cos(x)
wherein X is an original characteristic value, X sin And Xcos are sine and cosine values of the original features respectively, and then the original features and the features after Fourier transformation are spliced, and the mathematical formula is as follows:
X new =concatenate(X,X sin ,X cos ,axis=-1)
wherein X is new Is a new feature set that contains the original features and the fourier transformed features, concatate is a function that concatenates multiple arrays along a specified axis.
For example: the date data [12, 31, 05, 21] can be converted into [12, 31, 05, 21, sin (12), sin (31), sin (05), sin (21), cos (12), cos (31), cos (05), cos (21) ]. Thus, the original four dimensions are extended to twelve dimensions.
Further, the training information data set is imported into a sewage chemical oxygen demand prediction model to be trained for cyclic training, and the specific steps of obtaining the trained sewage chemical oxygen demand prediction model include: dividing the training information data set into a training set and a test set, and respectively performing scaling packaging on the data to obtain a packaging training set and a packaging test set; introducing the packaging training set into a sewage chemical oxygen demand prediction model to be trained for multi-cycle training, introducing the packaging testing set into the sewage chemical oxygen demand prediction model to be trained for model detection after each cycle of cycle training is finished, and outputting a model detection result; when the model detection result is unqualified, the sewage chemical oxygen demand prediction model to be trained continues to carry out subsequent cycle training; and stopping the cyclic training of the sewage chemical oxygen demand prediction model to be trained when the model detection result is qualified, and obtaining the trained sewage chemical oxygen demand prediction model.
In this embodiment, the training information data set is divided into the training set and the test set according to a certain proportion, for example, the training set and the test set may be divided into 8: 2.
It should be further noted that, in a specific implementation, in order to obtain a better training effect, the data of the training set and the test set are scaled to make the range between 0 and 1, and the scaling mathematical formula is as follows:
wherein X is norm Is normalized value, X is original value, X min And X max Respectively, the minimum and maximum values of the original data.
It will be appreciated that this embodiment encapsulates the processed training data into a TensorDataset format, a class of datasets in PyTorch that can typically be used to process tensor data.
Further, the training of the sewage chemical oxygen demand prediction model is to optimize the operation process of the model, and the model operation formula is as follows:
wherein Q, K and V represent query, key value and value, K T Representing the transpose of the matrix K,representing the dimension of the sample data.
It can be understood that the model operation process of the sewage chemical oxygen demand prediction model in the concrete implementation is specifically as follows: first, the dot product of the query and the key value is calculated to determine the importance of each element in the input data to the current location, and then the dot product result is divided byFor preventing the problem of gradient extinction caused by too large a calculation result, then applying a softmax function to the result, converting it into a probability distribution such that the sum of all weights is 1 and each weight is between 0 and 1, and finally multiplying the probability distribution by the value to obtain the final output f (Q, K, V).
It should be further noted that, in the specific implementation, the optimization process of the model of the sewage chemical oxygen demand prediction model specifically includes: firstly setting the training quantity, then entering a training loop, in each model operation iteration, performing one complete traversal on a training data set by the model, outputting a predicted value for each input data in the training set by the model, then calculating the error of the predicted value and the true value, performing back propagation and optimization according to the loss, and finally obtaining the trained sewage chemical oxygen demand prediction model after all iterations are completed.
Furthermore, an embodiment of the present invention also proposes a computer-readable storage medium storing a computer program, the storage medium storing thereon a program for predicting the chemical oxygen demand of sewage, which when executed by a processor, implements the steps of the method for predicting the chemical oxygen demand of sewage as described above.
Because the storage medium adopts all the technical solutions of all the embodiments, at least all the beneficial effects brought by the technical solutions of the embodiments are not described in detail herein.
Referring to fig. 5, fig. 5 is a block diagram showing the construction of a first embodiment of the apparatus for predicting chemical oxygen demand of sewage according to the present invention.
As shown in fig. 5, the apparatus for predicting the chemical oxygen demand of sewage according to the embodiment of the present invention includes:
the data acquisition module 10: acquiring sewage water inflow date data;
feature extraction module 20: performing characteristic extraction and conversion on the sewage inflow date data to obtain treated sewage inflow date data;
the result prediction module 30: and carrying out chemical oxygen demand prediction on the treated sewage inflow date data through a trained sewage chemical oxygen demand prediction model to obtain and output a corresponding chemical oxygen demand prediction result.
In the embodiment, the sewage water inflow date data are acquired; performing characteristic extraction and conversion on the sewage inflow date data to obtain treated sewage inflow date data; and (3) importing the treated sewage inflow date data into a trained sewage chemical oxygen demand prediction model to predict the chemical oxygen demand, so as to obtain and output a corresponding chemical oxygen demand prediction result. The method and the device can greatly improve the prediction accuracy of the chemical oxygen demand, provide more accurate prediction results of the chemical oxygen demand for the sewage treatment plant, help the sewage treatment plant to better formulate a power consumption scheme and a management strategy, reduce the operation cost and realize intelligent sewage treatment.
It should be understood that the foregoing is illustrative only and is not limiting, and that in specific applications, those skilled in the art may set the invention as desired, and the invention is not limited thereto.
It should be noted that the above-described working procedure is merely illustrative, and does not limit the scope of the present invention, and in practical application, a person skilled in the art may select part or all of them according to actual needs to achieve the purpose of the embodiment, which is not limited herein.
In addition, technical details not described in detail in this embodiment can be referred to the method for predicting the chemical oxygen demand of sewage provided in any embodiment of the present invention, which is not described herein.
Furthermore, it should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. Read Only Memory)/RAM, magnetic disk, optical disk) and including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the invention, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein or in the alternative, which may be employed directly or indirectly in other related arts.

Claims (10)

1. A method for predicting chemical oxygen demand of sewage, comprising:
acquiring sewage water inflow date data;
performing characteristic extraction and conversion on the sewage inflow date data to obtain treated sewage inflow date data;
and carrying out chemical oxygen demand prediction on the treated sewage inflow date data through a trained sewage chemical oxygen demand prediction model to obtain and output a corresponding chemical oxygen demand prediction result.
2. The method for predicting chemical oxygen demand of sewage as set forth in claim 1, wherein the specific training step of the sewage chemical oxygen demand prediction model includes:
acquiring historical sewage inflow chemical oxygen demand information data;
carrying out data processing on the historical sewage inflow COD information data to obtain a training information data set;
and importing the training information data set into a sewage chemical oxygen demand prediction model to be trained for cyclic training to obtain a trained sewage chemical oxygen demand prediction model.
3. The method for predicting chemical oxygen demand of sewage as set forth in claim 2, wherein the step of performing data processing on the historical sewage intake chemical oxygen demand information data to obtain a training information data set comprises:
carrying out data pretreatment on the historical sewage inflow COD information data, and classifying to obtain a date data set and a COD data set;
performing data feature expansion on the date data set to obtain a date data feature set;
and integrating the date data characteristic set and the chemical oxygen demand data set to obtain the training information data set.
4. A method for predicting chemical oxygen demand of wastewater according to claim 3, wherein the step of performing data preprocessing on the historical wastewater influent chemical oxygen demand information data and classifying to obtain a date data set and a chemical oxygen demand data set comprises the steps of:
analyzing and finishing the historical sewage inflow chemical oxygen demand information data, and dividing the historical sewage inflow chemical oxygen demand information data of the same discharge port monitoring station of the sewage drainage pipe network into similar historical sewage inflow chemical oxygen demand information data;
classifying the similar historical sewage inflow COD information data to obtain a date data set and a COD data set.
5. The method for predicting chemical oxygen demand of sewage as set forth in claim 4, wherein the specific step of expanding the data characteristic of the date data set to obtain the date data characteristic set includes:
reading time information data in the date data set;
respectively carrying out sine transformation processing and cosine transformation processing on the time information data to obtain transformation characteristic data;
and integrating and splicing the time information data and the transformation characteristic data to obtain a date data characteristic set.
6. A method for predicting the chemical oxygen demand of sewage according to claim 3, wherein the specific step of introducing the training information data set into a sewage chemical oxygen demand prediction model to be trained to perform cyclic training to obtain the trained sewage chemical oxygen demand prediction model comprises the following steps:
dividing the training information data set into a training set and a test set, and respectively performing scaling packaging on the data to obtain a packaging training set and a packaging test set;
the packaging training set is led into the sewage chemical oxygen demand prediction model to be trained to carry out multi-round cyclic training, and when each round of cyclic training is finished, the packaging testing set is led into the sewage chemical oxygen demand prediction model to be trained to carry out model detection, and a model detection result is output;
when the model detection result is unqualified, the sewage chemical oxygen demand prediction model to be trained continues to carry out subsequent cycle training;
and stopping the cyclic training of the sewage chemical oxygen demand prediction model to be trained when the model detection result is qualified, and obtaining the trained sewage chemical oxygen demand prediction model.
7. The method for predicting the chemical oxygen demand of sewage according to any one of claims 1 to 6, wherein the training of the sewage chemical oxygen demand prediction model is an optimization of a self-model operation process, and a model operation formula is:
wherein Q, K and V represent query, key value and value, K T Representing the transpose of the matrix K,representing the dimension of the sample data.
8. A sewage chemical oxygen demand prediction apparatus, characterized in that the sewage chemical oxygen demand prediction apparatus comprises:
and a data acquisition module: acquiring sewage water inflow date data;
and the feature extraction module is used for: performing characteristic extraction and conversion on the sewage inflow date data to obtain treated sewage inflow date data;
and a result prediction module: and carrying out chemical oxygen demand prediction on the treated sewage inflow date data through a trained sewage chemical oxygen demand prediction model to obtain and output a corresponding chemical oxygen demand prediction result.
9. A sewage chemical oxygen demand prediction apparatus, characterized in that the sewage chemical oxygen demand prediction apparatus comprises: a memory, a processor and a prediction program of the chemical oxygen demand of sewage stored on the memory and operable on the processor, the prediction program of the chemical oxygen demand of sewage configured to implement the prediction method of the chemical oxygen demand of sewage according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, is capable of implementing the steps of the method for predicting chemical oxygen demand of sewage as claimed in any one of claims 1 to 7.
CN202310921907.0A 2023-07-26 2023-07-26 Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage Active CN117059201B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310921907.0A CN117059201B (en) 2023-07-26 2023-07-26 Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310921907.0A CN117059201B (en) 2023-07-26 2023-07-26 Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage

Publications (2)

Publication Number Publication Date
CN117059201A true CN117059201A (en) 2023-11-14
CN117059201B CN117059201B (en) 2024-06-11

Family

ID=88667012

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310921907.0A Active CN117059201B (en) 2023-07-26 2023-07-26 Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage

Country Status (1)

Country Link
CN (1) CN117059201B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105060645A (en) * 2015-08-14 2015-11-18 无锡乐华自动化科技有限公司 Sewage treatment system
CN110929809A (en) * 2019-12-14 2020-03-27 北京工业大学 Soft measurement method for key water quality index of sewage by using characteristic self-enhanced circulating neural network
CN112884056A (en) * 2021-03-04 2021-06-01 河北工程大学 Optimized LSTM neural network-based sewage quality prediction method
CN113838542A (en) * 2021-08-25 2021-12-24 华南师范大学 Intelligent prediction method and system for chemical oxygen demand
CN115358461A (en) * 2022-08-18 2022-11-18 上海叁零肆零科技有限公司 Natural gas load prediction method, device, equipment and medium
CN115420707A (en) * 2022-08-31 2022-12-02 杭城人工智能科技(杭州)有限公司 Sewage near infrared spectrum chemical oxygen demand assessment method and system
CN115436591A (en) * 2022-09-02 2022-12-06 湖北中烟工业有限责任公司 Method, device, medium and system for detecting chemical oxygen demand of wastewater
CN115470702A (en) * 2022-09-14 2022-12-13 中山大学 Sewage treatment water quality prediction method and system based on machine learning
CN115561416A (en) * 2022-09-16 2023-01-03 哈尔滨工业大学(深圳) Method and device for detecting inlet water quality of sewage treatment plant in real time
CN116029438A (en) * 2023-02-02 2023-04-28 中国电建集团中南勘测设计研究院有限公司 Modeling method of water quality parameter prediction model and water quality parameter prediction method and device
CN116484747A (en) * 2023-05-16 2023-07-25 江门公用能源环保有限公司 Sewage intelligent monitoring method based on self-adaptive optimization algorithm and deep learning

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105060645A (en) * 2015-08-14 2015-11-18 无锡乐华自动化科技有限公司 Sewage treatment system
CN110929809A (en) * 2019-12-14 2020-03-27 北京工业大学 Soft measurement method for key water quality index of sewage by using characteristic self-enhanced circulating neural network
CN112884056A (en) * 2021-03-04 2021-06-01 河北工程大学 Optimized LSTM neural network-based sewage quality prediction method
CN113838542A (en) * 2021-08-25 2021-12-24 华南师范大学 Intelligent prediction method and system for chemical oxygen demand
CN115358461A (en) * 2022-08-18 2022-11-18 上海叁零肆零科技有限公司 Natural gas load prediction method, device, equipment and medium
CN115420707A (en) * 2022-08-31 2022-12-02 杭城人工智能科技(杭州)有限公司 Sewage near infrared spectrum chemical oxygen demand assessment method and system
CN115436591A (en) * 2022-09-02 2022-12-06 湖北中烟工业有限责任公司 Method, device, medium and system for detecting chemical oxygen demand of wastewater
CN115470702A (en) * 2022-09-14 2022-12-13 中山大学 Sewage treatment water quality prediction method and system based on machine learning
CN115561416A (en) * 2022-09-16 2023-01-03 哈尔滨工业大学(深圳) Method and device for detecting inlet water quality of sewage treatment plant in real time
CN116029438A (en) * 2023-02-02 2023-04-28 中国电建集团中南勘测设计研究院有限公司 Modeling method of water quality parameter prediction model and water quality parameter prediction method and device
CN116484747A (en) * 2023-05-16 2023-07-25 江门公用能源环保有限公司 Sewage intelligent monitoring method based on self-adaptive optimization algorithm and deep learning

Also Published As

Publication number Publication date
CN117059201B (en) 2024-06-11

Similar Documents

Publication Publication Date Title
CN112381673B (en) Park electricity utilization information analysis method and device based on digital twin
Li et al. A novel combined prediction model for monthly mean precipitation with error correction strategy
CN115146700B (en) Runoff prediction method based on transform sequence-to-sequence model
CN112396225A (en) Short-term electricity price prediction method based on long-term and short-term memory network
CN110991737A (en) Ultra-short-term wind power prediction method based on deep belief network
CN115660233A (en) Photovoltaic power prediction method and device, electronic equipment and storage medium
CN112735541A (en) Sewage treatment water quality prediction method based on simple circulation unit neural network
CN114330934A (en) Model parameter self-adaptive GRU new energy short-term power generation power prediction method
CN115561416A (en) Method and device for detecting inlet water quality of sewage treatment plant in real time
CN116402203A (en) Method, system and medium for predicting short-time photovoltaic power generation capacity considering weather conditions
CN112288140A (en) Keras-based short-term power load prediction method, storage medium and equipment
CN116014722A (en) Sub-solar photovoltaic power generation prediction method and system based on seasonal decomposition and convolution network
CN116090359A (en) Comprehensive energy system multi-element load prediction method based on combined prediction model
CN115375014A (en) Source-load combination probability prediction method, device and storage medium
CN117059201B (en) Method, device, equipment and storage medium for predicting chemical oxygen demand of sewage
Salman et al. Hybrid deep learning models for time series forecasting of solar power
CN117371303A (en) Prediction method for effective wave height under sea wave
CN116843012A (en) Time sequence prediction method integrating personalized context and time domain dynamic characteristics
CN116402194A (en) Multi-time scale load prediction method based on hybrid neural network
CN116842195A (en) Knowledge graph and large model based automatic generation report generation method
CN115619449A (en) Deep learning model-based fertilizer price prediction method, device and storage medium
CN116010875A (en) Method and device for classifying ammeter faults, electronic equipment and computer storage medium
Liu et al. [Retracted] Convolutional Neural Network‐Based Algorithm for Predicting the Gross Marine Product in Fujian Province
CN118070134B (en) Method and system for predicting electricity consumption of users in park
CN113256018B (en) Wind power ultra-short term probability prediction method based on conditional quantile regression model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant