Sewage treatment monitoring method, device, equipment and medium based on power big data

By applying the AI ​​analysis method based on power big data in the sewage treatment plant, the multi -layer two -way GRU model and the linear regression model are used to solve the problem of insufficient data use of sewage treatment plants, and achieve more accurate electricity consumption and processing efficiency forecast , Improve the monitoring capacity of sewage treatment.

CN118863182BActive Publication Date: 2025-01-28STATE GRID BEIJING ELECTRIC POWER CO
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Sewage treatment plants cannot make full use of large-scale diversified data for in-depth analysis and optimization, resulting in insufficient sewage treatment prediction capabilities.

Method used

Adopting the electricity prediction model of sewage treatment based on power big data, combined with multi -layer two -way GRU model and linear regression model, through AI and big data analysis, predict electric data and sewage processing efficiency, and use incremental learning algorithm to dynamically update the model parameters of the model parameters. Essence

Benefits of technology

Improve the accuracy, real -time and stability of sewage treatment monitoring, can more accurately predict electricity consumption and processing efficiency, and help optimize operation and save energy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863182B_ABST
    Figure CN118863182B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of electric power big data, and specifically relates to a sewage treatment monitoring method, device, equipment and medium based on electric power big data. This method obtains predicted electricity consumption data based on a sewage treatment electricity consumption prediction model, and uses a linear regression model to obtain predicted sewage treatment efficiency based on the predicted electricity consumption data. The sewage treatment monitoring method provided by this scheme uses data used to train the sewage treatment electricity consumption prediction model obtained through an electric power big data platform. Based on electric power big data, AI and big data analysis are introduced to improve the accuracy, real-time and stability of sewage treatment efficiency monitoring, and effectively solve the problems existing in existing sewage treatment analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of electric power big data, and specifically relates to a sewage treatment monitoring method, device, equipment and medium based on electric power big data. Background Art

[0002] As an indispensable part of human life, sewage treatment industry is very necessary for sewage treatment analysis. Traditional sewage treatment analysis methods mainly rely on experience and rules, such as empirical analysis based on water quality monitoring data and treatment process parameters. This method has limitations when dealing with complex sewage treatment systems, and it is difficult to fully explore the potential correlation between data; and the data in existing sewage treatment systems are usually large and diverse, including multiple indicator data such as water quality, flow, and temperature. However, many sewage treatment plants lack professional data analysts and tools, and cannot make full use of these data for in-depth analysis and optimization. Traditional sewage treatment systems are usually monitored and managed in a static manner, lacking real-time data monitoring and prediction capabilities. This leads to insufficient response to emergencies and inability to effectively prevent and deal with problems. Summary of the invention

[0003] The purpose of the present invention is to provide a sewage treatment monitoring method, device, equipment and medium based on power big data, so as to solve the problem in the prior art that sewage treatment plants cannot make full use of these data for in-depth analysis and optimization, resulting in insufficient prediction capabilities for sewage treatment.

[0004] In order to achieve the above object, the present invention adopts the following technical solution:

[0005] In a first aspect, the present invention provides a sewage treatment monitoring method based on power big data, comprising the following steps:

[0006] Obtaining a pre-trained sewage treatment electricity consumption prediction model; wherein the sewage treatment electricity consumption prediction model is trained based on power big data;

[0007] Obtain real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of sewage treatment plants;

[0008] Inputting the real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant into the sewage treatment power consumption prediction model, and the sewage treatment power consumption prediction model outputs the predicted power consumption data;

[0009] Inputting the predicted electricity consumption data into a pre-trained linear regression model, the linear regression model outputting a predicted sewage treatment efficiency;

[0010] The sewage treatment electricity consumption prediction model is trained as follows:

[0011] Obtain historical electricity consumption data of sewage treatment plants from the power big data platform, as well as historical influent water quality data, historical effluent water quality data and historical data on the operating status of sewage treatment equipment from sewage treatment plants;

[0012] Determine the multi-layer bidirectional GRU model as the basic model of the sewage treatment electricity consumption prediction model;

[0013] Based on the historical electricity consumption data of the sewage treatment plant, the historical influent water quality data, the historical effluent water quality data and the historical data of the operation status of the sewage treatment equipment, the basic model is trained, and after the training is completed, a sewage treatment electricity consumption prediction model is obtained;

[0014] Among them, the mean square error (MSE) between the predicted value and the true value of the sewage treatment electricity consumption prediction model is used as the loss function of the sewage treatment electricity consumption prediction model; the Adam optimizer is used to update the model parameters of the sewage treatment electricity consumption prediction model, and the mean square error (MSE) is minimized to optimize the sewage treatment electricity consumption prediction model.

[0015] Furthermore, a multi-layer bidirectional GRU model is determined as the basic model of the sewage treatment electricity consumption prediction model; wherein:

[0016] The multi-layer bidirectional GRU model is stacked with multiple bidirectional GRU layers, each bidirectional GRU layer includes a forward GRU and a reverse GRU, a Dropout layer is added between adjacent bidirectional GRU layers, and the output of the last bidirectional GRU layer is used as the final output of the sewage treatment electricity consumption prediction model.

[0017] Furthermore, the predicted electricity consumption data is input into a pre-trained linear regression model, and the linear regression model outputs a predicted sewage treatment efficiency, wherein:

[0018] The linear regression model uses a polynomial to represent the relationship between electricity consumption data and sewage treatment efficiency; wherein the independent variable of the polynomial is the electricity consumption data, and the dependent variable is the sewage treatment efficiency.

[0019] Furthermore, during the training of the linear regression model, a regularization parameter is added to the loss function of the linear regression model; wherein the optimal regularization parameter is selected through cross-validation.

[0020] Furthermore, after the sewage treatment electricity consumption prediction model is trained, the following steps are further included:

[0021] An incremental learning algorithm is used to dynamically update and optimize the model parameters of the sewage treatment electricity consumption prediction model.

[0022] Furthermore, after the step of outputting the linear regression model to predict the sewage treatment efficiency, the method further comprises:

[0023] Based on the data visualization platform, the predicted electricity consumption data and the predicted sewage treatment efficiency are visually monitored. If any of the predicted electricity consumption data and the predicted sewage treatment efficiency exceeds the preset fluctuation range, an early warning information prompt is generated; wherein, the data visualization platform is built using Power BI.

[0024] In a second aspect, the present invention provides a sewage treatment monitoring device based on power big data, comprising:

[0025] A model acquisition module is used to acquire a pre-trained sewage treatment electricity consumption prediction model; wherein the sewage treatment electricity consumption prediction model is obtained based on the training of power big data;

[0026] Data acquisition module, used to obtain real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant;

[0027] An electricity consumption prediction module is used to input the real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant into the sewage treatment electricity consumption prediction model, and the sewage treatment electricity consumption prediction model outputs the predicted electricity consumption data;

[0028] The efficiency prediction module is used to input the predicted electricity consumption data into a pre-trained linear regression model, and the linear regression model outputs the predicted sewage treatment efficiency.

[0029] Furthermore, a multi-layer bidirectional GRU model is determined as the basic model of the sewage treatment electricity consumption prediction model; wherein:

[0030] The multi-layer bidirectional GRU model is stacked with multiple bidirectional GRU layers, each bidirectional GRU layer includes a forward GRU and a reverse GRU, a Dropout layer is added between adjacent bidirectional GRU layers, and the output of the last bidirectional GRU layer is used as the final output of the sewage treatment electricity consumption prediction model.

[0031] In a third aspect of the present invention, an electronic device is provided, comprising a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the sewage treatment monitoring method based on electric power big data as described above.

[0032] In a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the sewage treatment monitoring method based on electric power big data as described above is implemented.

[0033] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0034] 1) An embodiment of the present invention provides a sewage treatment monitoring method based on electric power big data, wherein the sewage treatment electricity consumption prediction model is obtained based on the electricity consumption data in the electric power big data platform and the multi-dimensional data training of the sewage treatment plant, and the relationship between the electricity consumption data and the sewage treatment efficiency is obtained through a linear regression model, so as to accurately derive the sewage treatment efficiency. This solution is based on AI and electric power big data analysis, which can improve the accuracy, real-time and stability of sewage treatment monitoring and effectively solve the problems existing in the existing sewage treatment analysis. A sewage treatment monitoring device, electronic device and computer-readable storage medium based on electric power big data provided by the present invention also solve the problems raised in the background technology section.

[0035] 2) This application obtains multi-dimensional data of the sewage treatment plant, including influent water quality, effluent water quality, equipment operating status and power consumption data, to fully understand the operation of the sewage treatment system and provide more information support for monitoring and prediction. It also builds a sewage treatment power consumption prediction model based on artificial neural networks and a relationship model between power consumption data and treatment efficiency based on linear regression models, which can more accurately predict power consumption and treatment efficiency, and help optimize operations and save energy.

[0036] 3) This application uses an incremental learning algorithm to continuously update the sewage treatment electricity consumption prediction model to adapt to the dynamic changes in data, maintain the accuracy and adaptability of the model, and better cope with complex environments and data changes.

[0037] 4) This application detects power consumption and effluent water quality data in real time, calculates real-time sewage treatment efficiency, and combines predicted power consumption and predicted sewage treatment efficiency for visual monitoring, so as to detect problems in time and take measures to improve the stability and efficiency of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The drawings constituting a part of the present application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0039] Figure 1 A schematic diagram of a flow chart of a sewage treatment monitoring method based on power big data according to an embodiment of the present invention;

[0040] Figure 2 Schematic diagram of a sewage treatment electricity consumption prediction model training method in an embodiment of the present invention;

[0041] Figure 3 This is a structural block diagram of a sewage treatment monitoring device based on power big data according to an embodiment of the present invention;

[0042] Figure 4 The present invention is a structural block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.

[0044] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present application belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention.

[0045] Example 1

[0046] like Figure 1 As shown, an embodiment of the present invention provides a sewage treatment monitoring method based on power big data, comprising the following steps:

[0047] S1. Obtain a pre-trained sewage treatment electricity consumption prediction model; wherein the sewage treatment electricity consumption prediction model is obtained based on power big data training;

[0048] S2. Obtain real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant;

[0049] S3, inputting the real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant into the sewage treatment power consumption prediction model, and the sewage treatment power consumption prediction model outputs the predicted power consumption data;

[0050] S4. Input the predicted electricity consumption data into a pre-trained linear regression model, and the linear regression model outputs a predicted sewage treatment efficiency.

[0051] The sewage treatment monitoring method provided in this solution uses data obtained through the power big data platform to train the sewage treatment electricity consumption prediction model. Based on power big data, the introduction of AI (Artificial Intelligence) and big data analysis can improve the accuracy, real-time and stability of sewage treatment efficiency monitoring, and effectively solve the problems existing in existing sewage treatment analysis.

[0052] Another aspect of an embodiment of the present invention provides a sewage treatment monitoring method based on power big data, comprising:

[0053] S10. Obtain a pre-trained sewage treatment electricity consumption prediction model; wherein the sewage treatment electricity consumption prediction model is trained based on power big data.

[0054] like Figure 2 As shown, in an optional implementation, the sewage treatment electricity consumption prediction model involved in this solution is trained in the following manner:

[0055] S101. Obtain historical electricity consumption data of the sewage treatment plant from the power big data platform, and obtain historical influent water quality data, historical effluent water quality data and historical data on the operating status of sewage treatment equipment from the sewage treatment plant.

[0056] Specifically, the historical electricity consumption data of the sewage treatment plant is time series data.

[0057] Specifically, the historical electricity consumption data of a sewage treatment plant may include timestamp, total electricity consumption, electricity consumption of each device, peak and valley values ​​of electricity consumption, etc.

[0058] Historical influent water quality data and historical effluent water quality data may include pH value, suspended matter concentration, nutrient salt content, etc.

[0059] The historical data of sewage treatment equipment operating status may include equipment start / stop time, equipment operating parameters, fault records, maintenance records, etc.

[0060] After obtaining the historical electricity consumption data of the above-mentioned sewage treatment plant, as well as the historical influent water quality data, historical effluent water quality data and historical data on the operating status of sewage treatment equipment from the sewage treatment plant, data preprocessing is also performed to ensure the accuracy and completeness of the data.

[0061] Specifically, preprocessing includes data cleaning, feature extraction, and data standardization. The examples are as follows:

[0062] Data cleaning: handle missing values, outliers and duplicate values ​​to ensure data quality;

[0063] Interpolation methods were used to fill missing values, outlier detection and processing methods were used to handle outliers, and duplicate values ​​were removed;

[0064] Extract features from raw data, including mean, standard deviation, maximum, and minimum values;

[0065] The data is normalized so that the numerical ranges of different features are the same. In this embodiment, Min-Max normalization is adopted.

[0066] S102. Determine a multi-layer bidirectional GRU model as a basic model of a sewage treatment electricity consumption prediction model.

[0067] ‌GRU: Gated Recurrent Unit, a recurrent neural network architecture.

[0068] In an optional implementation, the multi-layer bidirectional GRU model is stacked with multiple bidirectional GRU layers, each bidirectional GRU layer includes a forward GRU and a reverse GRU, a Dropout layer is added between adjacent bidirectional GRU layers, and the output of the last bidirectional GRU layer is used as the final output of the sewage treatment electricity consumption prediction model.

[0069] In an optional solution, a Dropout layer is also added after the output of each GRU layer.

[0070] S103. Based on the historical electricity consumption data of the sewage treatment plant, the historical influent water quality data, the historical effluent water quality data and the historical data of the operation status of the sewage treatment equipment, the basic model is trained. After the training is completed, a sewage treatment electricity consumption prediction model is obtained; wherein the mean square error (MSE) between the predicted value and the true value of the sewage treatment electricity consumption prediction model is used as the loss function of the sewage treatment electricity consumption prediction model; the Adam optimizer is used to update the model parameters of the sewage treatment electricity consumption prediction model, and the mean square error (MSE) is minimized to optimize the sewage treatment electricity consumption prediction model.

[0071] Specifically, when training the basic model, the MSE is calculated between the predicted value and the true value at each time step as the loss function, the Adam optimizer is used to update the model parameters, and the model is optimized by minimizing the MSE loss function. In each training iteration, the gradient of the loss function is calculated and the model parameters are updated to gradually improve the prediction performance of the model.

[0072] In a preferred embodiment, after the sewage treatment electricity consumption prediction model is trained, it also includes the step of: using an incremental learning algorithm to dynamically update and optimize the model parameters of the sewage treatment electricity consumption prediction model.

[0073] Specifically, the incremental learning algorithm uses the AdaGrad (Adaptive Gradient Algorithm) algorithm to dynamically update the sewage treatment electricity consumption prediction model based on the AdaGrad algorithm:

[0074] (1) Obtain the original model parameters of the sewage treatment electricity consumption prediction model, initialize the cumulative gradient sum of squares G0 = 0, set the learning rate η and the smoothing term ε, and each time a new data point is received Then, perform the following steps:

[0075] (2) Calculate the gradient corresponding to the current model parameters:

[0076]

[0077] in, is the loss function, are the current model parameters;

[0078] (3) Update the cumulative sum of squared gradients:

[0079]

[0080] in, represents the element-wise square of the gradient; is the current cumulative gradient sum of squares; is the updated cumulative sum of squared gradients;

[0081] (4) Dynamically adjust the learning rate based on the cumulative sum of squared gradients:

[0082]

[0083] in, is the dynamically adjusted learning rate; is a smoothing term, such as 10 -8 ; is the learning rate;

[0084] (5) Update model parameters using dynamically adjusted learning rate:

[0085]

[0086] in, To update the model parameters;

[0087] For each new data received, steps (2) to (5) are repeated to achieve online update of model parameters.

[0088] S20. Obtain real-time influent water quality data, effluent water quality requirement data, and treatment equipment operation status data of the sewage treatment plant.

[0089] S30, inputting the real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant into the sewage treatment electricity consumption prediction model, and the sewage treatment electricity consumption prediction model outputs the predicted electricity consumption data.

[0090] S40, inputting the predicted electricity consumption data into a pre-trained linear regression model, and the linear regression model outputs a predicted sewage treatment efficiency.

[0091] In an optional embodiment, the electricity consumption data of the sewage treatment plant over the past period of time is collected, including the electricity consumption in each time period, and the treatment efficiency data of the sewage treatment plant in the corresponding time period is collected, including the removal rate and treatment speed, etc. The electricity consumption data and treatment efficiency data are cleaned and processed to ensure data quality and consistency.

[0092] In an optional implementation, the linear regression model uses a polynomial to represent the relationship between electricity consumption data and sewage treatment efficiency; wherein the independent variable of the polynomial is the electricity consumption data, and the dependent variable is the sewage treatment efficiency.

[0093] Specifically, the polynomial is expressed as follows:

[0094]

[0095] in, is the predicted processing efficiency, It is the electricity consumption. is the time characteristic, , , , and are model parameters.

[0096] In a preferred embodiment, when the linear regression model is being trained, a regularization parameter is added to the loss function of the linear regression model; wherein the optimal regularization parameter is selected by cross-validation.

[0097] Optionally, use ridge regression for L2 regularization and add the regularization parameter to the loss function of the linear regression model to control the size of the model parameters. The loss function is as follows:

[0098]

[0099] Where N is the number of samples, is the model prediction value, is the true value, J is the number of features, is the regularization parameter. are model parameters, j=0,1,2,3,4.

[0100] The best regularization parameter is selected through cross-validation.

[0101] Optionally, select the best regularization parameter through cross-validation, as follows;

[0102] The training set of the linear regression model is divided into multiple subsets, and one part is used as the validation set each time, and the rest is used as the training set. In the cross-validation process, for each regularization parameter λ, the linear regression model is trained and the loss function on the validation set is calculated. Finally, the regularization parameter that minimizes the loss of the validation set is selected as the optimal parameter:

[0103] The loss function of cross validation is expressed as:

[0104]

[0105] Among them: K is the number of cross-validation folds, Loss k is the loss function on the k-fold validation set.

[0106] In a preferred embodiment, after step S40, step S50 is also included: visually monitoring the predicted electricity consumption data and the predicted sewage treatment efficiency based on a data visualization platform, and generating an early warning information prompt if either the predicted electricity consumption data or the predicted sewage treatment efficiency exceeds a preset fluctuation range; wherein the data visualization platform is built using Power BI.

[0107] Specifically, Power BI is used to build a data visualization platform to display information such as power consumption, effluent water quality data, and sewage treatment efficiency in real time; monitoring data such as power consumption, effluent water quality data, and sewage treatment efficiency are updated in real time through the data interface to ensure the timeliness and accuracy of the information. Early warning information is displayed on the monitoring interface in the form of charts, reports, etc., so that operation and maintenance personnel can find problems in a timely manner.

[0108] In addition, this solution also designs a user rights management module to ensure that different users can only view the data and information for which they have permissions, in order to protect data security and privacy. It distinguishes different user roles, such as administrators, operators, etc., sets corresponding permissions and functions, and ensures that users can only access data and functions within their authority.

[0109] Optionally, when monitoring power consumption, inlet water quality data and outlet water quality data, power consumption sensors and water quality sensors can be used to collect real-time data and transmit the data to the data collection unit via a wireless or wired network; and in the data analysis unit, the sewage treatment efficiency is calculated in real time based on the real-time inlet water quality data and the outlet water quality data, the real-time monitoring data is compared with the predicted data, and the fluctuation range is calculated. If the real-time data exceeds the preset fluctuation range, the early warning unit is triggered, and the early warning unit automatically sends an early warning notification to relevant personnel via SMS, email or system prompts; the visualization unit is used to display power consumption, outlet water quality data, sewage treatment efficiency and prediction results in real time.

[0110] Example 2

[0111] like Figure 3 As shown, based on the same inventive concept as the above embodiment, the present invention also provides a sewage treatment monitoring device based on power big data, including:

[0112] A model acquisition module is used to acquire a pre-trained sewage treatment electricity consumption prediction model; wherein the sewage treatment electricity consumption prediction model is obtained based on the training of power big data;

[0113] Data acquisition module, used to obtain real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant;

[0114] An electricity consumption prediction module is used to input the real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant into the sewage treatment electricity consumption prediction model, and the sewage treatment electricity consumption prediction model outputs the predicted electricity consumption data;

[0115] The efficiency prediction module is used to input the predicted electricity consumption data into a pre-trained linear regression model, and the linear regression model outputs the predicted sewage treatment efficiency.

[0116] Example 3

[0117] like Figure 4 As shown, the present invention also provides an electronic device 100 for implementing a sewage treatment monitoring method based on power big data in the above embodiment;

[0118] The electronic device 100 includes a memory 101 , at least one processor 102 , a computer program 103 stored in the memory 101 and executable on the at least one processor 102 , and at least one communication bus 104 .

[0119] The memory 101 can be used to store a computer program 103. The processor 102 implements the steps of a sewage treatment monitoring method based on power big data in Example 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101.

[0120] The memory 101 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data (such as audio data) created according to the use of the electronic device 100, etc. In addition, the memory 101 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.

[0121] At least one processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and uses various interfaces and lines to connect various parts of the entire electronic device 100.

[0122] The memory 101 in the electronic device 100 stores a plurality of instructions to implement a sewage treatment monitoring method based on power big data, and the processor 102 can execute the plurality of instructions to implement:

[0123] Obtaining a pre-trained sewage treatment electricity consumption prediction model; wherein the sewage treatment electricity consumption prediction model is trained based on power big data;

[0124] Obtain real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of sewage treatment plants;

[0125] Inputting the real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant into the sewage treatment power consumption prediction model, and the sewage treatment power consumption prediction model outputs the predicted power consumption data;

[0126] The predicted electricity consumption data is input into a pre-trained linear regression model, and the linear regression model outputs a predicted sewage treatment efficiency.

[0127] Example 4

[0128] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. Computer-readable media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory and read-only memory (ROM, Read-Only Memory).

[0129] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0130] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0131] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0132] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0133] In the description of this specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0134] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A sewage treatment monitoring method based on power big data, characterized in that: The steps include: Obtaining a pre-trained sewage treatment electricity consumption prediction model; wherein the sewage treatment electricity consumption prediction model is trained based on power big data; Obtain real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of sewage treatment plants; Inputting the real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant into the sewage treatment power consumption prediction model, and the sewage treatment power consumption prediction model outputs the predicted power consumption data; Inputting the predicted electricity consumption data into a pre-trained linear regression model, the linear regression model outputting a predicted sewage treatment efficiency; The sewage treatment electricity consumption prediction model is trained as follows: Obtain historical electricity consumption data of sewage treatment plants from the power big data platform, as well as historical influent water quality data, historical effluent water quality data and historical data on the operating status of sewage treatment equipment from sewage treatment plants; Determine the multi-layer bidirectional GRU model as the basic model of the sewage treatment electricity consumption prediction model; Based on the historical electricity consumption data of the sewage treatment plant, the historical influent water quality data, the historical effluent water quality data and the historical data of the operation status of the sewage treatment equipment, the basic model is trained, and after the training is completed, a sewage treatment electricity consumption prediction model is obtained; The mean square error (MSE) between the predicted value and the true value of the sewage treatment electricity consumption prediction model is used as the loss function of the sewage treatment electricity consumption prediction model. The Adam optimizer is used to update the model parameters of the sewage treatment electricity consumption prediction model, and the mean square error (MSE) is minimized to optimize the sewage treatment electricity consumption prediction model. The incremental learning algorithm is used to dynamically update and optimize the model parameters of the sewage treatment electricity consumption prediction model, including: (1) Obtain the original model parameters of the sewage treatment electricity consumption prediction model, initialize the cumulative gradient sum of squares G0 = 0, set the learning rate η and the smoothing term ε, and each time a new data point is received Then, perform the following steps: (2) Calculate the gradient corresponding to the current model parameters: in, is the loss function, are the current model parameters; (3) Update the cumulative sum of squared gradients: in, represents the element-wise square of the gradient; is the current cumulative gradient sum of squares; is the updated cumulative sum of squared gradients; (4) Dynamically adjust the learning rate based on the cumulative sum of squared gradients: in, is the dynamically adjusted learning rate; is a smoothing term; is the learning rate; (5) Update model parameters using dynamically adjusted learning rate: in, To update the model parameters; For each new data received, repeat steps (2) to (5); The linear regression model uses a polynomial to represent the relationship between electricity consumption data and sewage treatment efficiency; wherein the independent variable of the polynomial is electricity consumption data, and the dependent variable is sewage treatment efficiency; the polynomial is represented as follows: in, is the predicted processing efficiency, It is the electricity consumption. is the time characteristic, , , , and are model parameters; When the linear regression model is trained, the regularization parameter is added to the loss function of the linear regression model; wherein the optimal regularization parameter is selected by cross-validation; specifically, the method includes: using ridge regression for L2 regularization, adding the regularization parameter to the loss function of the linear regression model, and controlling the size of the model parameters. The loss function is specifically as follows: Where N is the number of samples, is the model prediction value, is the true value, J is the number of features, is the regularization parameter; is the model parameter, j=0,1,2,3,4; The best regularization parameters are selected through cross-validation, as follows; The training set of the linear regression model is divided into multiple subsets, and one part is used as the validation set each time, and the rest is used as the training set. In the cross-validation process, for each regularization parameter λ, the linear regression model is trained and the loss function on the validation set is calculated. Finally, the regularization parameter that minimizes the loss of the validation set is selected as the optimal parameter: The loss function of cross validation is expressed as: Among them: K is the number of cross-validation folds, Loss k is the loss function on the k-fold validation set.

2. The sewage treatment monitoring method based on power big data according to claim 1 is characterized in that: The multi-layer bidirectional GRU model is determined as the basic model of the sewage treatment electricity consumption prediction model; among which: The multi-layer bidirectional GRU model is stacked with multiple bidirectional GRU layers, each bidirectional GRU layer includes a forward GRU and a reverse GRU, a Dropout layer is added between adjacent bidirectional GRU layers, and the output of the last bidirectional GRU layer is used as the final output of the sewage treatment electricity consumption prediction model.

3. The sewage treatment monitoring method based on power big data according to claim 1 is characterized in that: After the step of outputting the linear regression model to predict the sewage treatment efficiency, the method further includes: Based on the data visualization platform, the predicted electricity consumption data and the predicted sewage treatment efficiency are visually monitored. If any of the predicted electricity consumption data and the predicted sewage treatment efficiency exceeds the preset fluctuation range, an early warning information prompt is generated; wherein, the data visualization platform is built using Power BI.

4. A sewage treatment monitoring device based on power big data, characterized in that: include: A model acquisition module is used to acquire a pre-trained sewage treatment electricity consumption prediction model; wherein the sewage treatment electricity consumption prediction model is obtained based on the training of power big data; Data acquisition module, used to obtain real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant; An electricity consumption prediction module is used to input the real-time influent water quality data, effluent water quality requirement data and treatment equipment operation status data of the sewage treatment plant into the sewage treatment electricity consumption prediction model, and the sewage treatment electricity consumption prediction model outputs the predicted electricity consumption data; An efficiency prediction module, used for inputting the predicted electricity consumption data into a pre-trained linear regression model, and the linear regression model outputs a predicted sewage treatment efficiency; The sewage treatment electricity consumption prediction model is trained as follows: Obtain historical electricity consumption data of sewage treatment plants from the power big data platform, as well as historical influent water quality data, historical effluent water quality data and historical data on the operating status of sewage treatment equipment from sewage treatment plants; Determine the multi-layer bidirectional GRU model as the basic model of the sewage treatment electricity consumption prediction model; Based on the historical electricity consumption data of the sewage treatment plant, the historical influent water quality data, the historical effluent water quality data and the historical data of the operation status of the sewage treatment equipment, the basic model is trained, and after the training is completed, a sewage treatment electricity consumption prediction model is obtained; The mean square error (MSE) between the predicted value and the true value of the sewage treatment electricity consumption prediction model is used as the loss function of the sewage treatment electricity consumption prediction model. The Adam optimizer is used to update the model parameters of the sewage treatment electricity consumption prediction model, and the mean square error (MSE) is minimized to optimize the sewage treatment electricity consumption prediction model. The incremental learning algorithm is used to dynamically update and optimize the model parameters of the sewage treatment electricity consumption prediction model, including: (1) Obtain the original model parameters of the sewage treatment electricity consumption prediction model, initialize the cumulative gradient sum of squares G0 = 0, set the learning rate η and the smoothing term ε, and each time a new data point is received Then, perform the following steps: (2) Calculate the gradient corresponding to the current model parameters: in, is the loss function, are the current model parameters; (3) Update the cumulative sum of squared gradients: in, represents the element-wise square of the gradient; is the current cumulative gradient sum of squares; is the updated cumulative sum of squared gradients; (4) Dynamically adjust the learning rate based on the cumulative sum of squared gradients: in, is the dynamically adjusted learning rate; is a smoothing term; is the learning rate; (5) Update model parameters using dynamically adjusted learning rate: in, To update the model parameters; For each new data received, repeat steps (2) to (5); The linear regression model uses a polynomial to represent the relationship between electricity consumption data and sewage treatment efficiency; wherein the independent variable of the polynomial is electricity consumption data, and the dependent variable is sewage treatment efficiency; the polynomial is represented as follows: in, is the predicted processing efficiency, It is the electricity consumption. is the time characteristic, , , , and are model parameters; When the linear regression model is trained, the regularization parameter is added to the loss function of the linear regression model; wherein the optimal regularization parameter is selected by cross-validation; specifically, the method includes: using ridge regression for L2 regularization, adding the regularization parameter to the loss function of the linear regression model, and controlling the size of the model parameters. The loss function is specifically as follows: Where N is the number of samples, is the model prediction value, is the true value, J is the number of features, is the regularization parameter; is the model parameter, j=0,1,2,3,4; The best regularization parameters are selected through cross-validation, as follows; The training set of the linear regression model is divided into multiple subsets, and one part is used as the validation set each time, and the rest is used as the training set. In the cross-validation process, for each regularization parameter λ, the linear regression model is trained and the loss function on the validation set is calculated. Finally, the regularization parameter that minimizes the loss of the validation set is selected as the optimal parameter: The loss function of cross validation is expressed as: Among them: K is the number of cross-validation folds, Loss k is the loss function on the k-fold validation set.

5. The sewage treatment monitoring device based on electric power big data according to claim 4 is characterized in that: The multi-layer bidirectional GRU model is determined as the basic model of the sewage treatment electricity consumption prediction model; among which: The multi-layer bidirectional GRU model is stacked with multiple bidirectional GRU layers, each bidirectional GRU layer includes a forward GRU and a reverse GRU, a Dropout layer is added between adjacent bidirectional GRU layers, and the output of the last bidirectional GRU layer is used as the final output of the sewage treatment electricity consumption prediction model.

6. An electronic device, characterized in that: It comprises a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the sewage treatment monitoring method based on power big data as described in any one of claims 1 to 3.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, it implements the sewage treatment monitoring method based on power big data as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Enterprise pollution discharge prediction method based on electric power big data

    CN116402187A

  • Sewage discharge power consumption prediction method, device and equipment

    CN116502184A

  • Air quality prediction method and system based on space-time fusion RNN and attention mechanism

    CN117422102A