Sewage treatment method and system
The sewage treatment system based on edge computing gateway and cloud platform solves the problems of poor adaptability to water quality fluctuations and insufficient energy consumption optimization in traditional sewage treatment systems, and realizes the precise, intelligent and energy-saving operation of the sewage treatment process.
Patent Information
- Application Number
- CN202511175778.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-10-03
AI Technical Summary
Traditional sewage treatment systems have problems such as poor adaptability to water quality fluctuations, low sludge management efficiency and insufficient energy consumption optimization.
A sewage treatment system consisting of sensors, edge computing gateways, and a cloud platform is used. The sensor data is read and preprocessed through the edge computing gateway, and time series prediction analysis is performed to generate a device control instruction set to optimize the control parameters of the sewage treatment execution equipment, achieve dynamic adjustment, and predict future water quality changes.
It has achieved precise, intelligent and energy-saving operation of the sewage treatment process, improved water quality stability, reduced manual intervention costs and energy consumption, supported network outage prediction, and improved response speed.
Smart Images

Figure CN120736596A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sewage treatment, and in particular to a sewage treatment method and system. Background Art
[0002] Wastewater treatment systems are a vital component of modern environmental protection. They remove pollutants from wastewater through a series of physical, chemical, and biological processes, ensuring it meets discharge standards or is suitable for reuse. Traditional underground wastewater treatment systems typically rely on real-time monitoring data and fixed control logic for operation and regulation. These systems suffer from poor adaptability to water quality fluctuations, inefficient sludge management, and insufficient energy optimization. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to provide a sewage treatment method and system to solve the technical problems of poor adaptability to water quality fluctuations, low sludge management efficiency and insufficient energy consumption optimization existing in traditional sewage treatment systems.
[0004] In a first aspect, the present invention provides a sewage treatment method, which is applied to a sewage treatment system, wherein the sewage treatment system includes a sensor, a sewage treatment execution device, an edge computing gateway, and a cloud platform. The sewage treatment method includes: reading sensor data and sewage treatment execution device status data through the edge computing gateway according to a preset sampling time interval; wherein the sensor data includes water quality parameters and process parameters, the water quality parameters include chemical oxygen demand, ammonia nitrogen value, total phosphorus value, and pH value, and the process parameters include dissolved oxygen, sludge concentration, and water flow; preprocessing the read sensor data and sewage treatment execution device status data through the edge computing gateway, using the preprocessed sensor data and sewage treatment execution device status data as historical data, and uploading the historical data to the cloud platform; performing time series prediction analysis through the edge computing gateway based on the historical data of a preset time step to generate sensor prediction data and device status prediction data of a preset prediction time; optimizing device control parameters through the edge computing gateway based on the sensor prediction data and device status prediction data of the preset prediction time to generate a device control instruction set; and issuing the device control instruction set to the sewage treatment execution device through the edge computing gateway.
[0005] In a second aspect, the present invention also provides a sewage treatment system, which implements the above-mentioned sewage treatment method. The sewage treatment system includes a sensor, a sewage treatment execution device, an edge computing gateway and a cloud platform. The edge computing gateway is communicatively connected with the sensor, the sewage treatment execution device and the cloud platform. The edge computing gateway includes: a data acquisition module for reading sensor data and sewage treatment execution device status data according to a preset sampling time interval; wherein the sensor data includes water quality parameters and process parameters, the water quality parameters include chemical oxygen demand, ammonia nitrogen value, total phosphorus value and pH value, and the process parameters include dissolved oxygen content, sludge concentration and water flow rate; data A data preprocessing module is used to preprocess the sensor data and sewage treatment execution equipment status data obtained by reading, and use the preprocessed sensor data and sewage treatment execution equipment status data as historical data, and upload the historical data to the cloud platform; a time series prediction analysis module is used to perform time series prediction analysis based on the historical data of a preset time step, and generate sensor prediction data and equipment status prediction data of a preset prediction time; a control strategy generation module is used to optimize equipment control parameters based on the sensor prediction data and equipment status prediction data of a preset prediction time, and generate an equipment control instruction set; an instruction issuance execution module is used to issue the equipment control instruction set to the sewage treatment execution equipment.
[0006] The beneficial technical effects of the present invention are as follows: the sewage treatment method of the present invention is applied to a sewage treatment system including sensors, sewage treatment execution equipment, an edge computing gateway and a cloud platform, and the sensor data and sewage treatment execution equipment status data are read by the edge computing gateway according to a preset sampling time interval and pre-processed as historical data, and a time series prediction analysis is performed based on the historical data of a preset time step, and sensor prediction data and equipment status prediction data of a preset prediction time length are generated to optimize equipment control parameters, and an equipment control instruction set is generated to predict future water quality changes, dynamically optimize the control parameters of the corresponding sewage treatment execution equipment, and then adjust and control the work of the sewage treatment execution equipment to ensure that the water quality of the effluent is stable and meets the standards, with low manual intervention costs, and It can predict the future sludge concentration to adjust the sludge discharge cycle to avoid sludge aging or excessive discharge. It can also predict the status of the sewage treatment execution equipment to adjust and optimize the start-stop control strategy of the sewage treatment execution equipment, which is conducive to reducing energy consumption, thereby realizing the precise, intelligent and energy-saving operation of the sewage treatment process, solving the problems of poor adaptability to water quality fluctuations, low sludge management efficiency and insufficient energy consumption optimization. Moreover, through the edge computing gateway, predictions are made to intelligently control and optimize the operation of the sewage treatment execution equipment, which can improve the response speed, without relying on cloud servers for predictions, and support network disconnection predictions with low communication dependence. Moreover, the edge computing gateway can also upload historical data to the cloud platform for storage, and can analyze water quality based on historical data through the cloud platform. The sewage treatment system of the present invention also has the above functions. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0008] Figure 1 A schematic diagram of a sewage treatment system according to an embodiment of the present invention;
[0009] Figure 2 A schematic diagram of the framework of an edge computing gateway for a sewage treatment system provided by an embodiment of the present invention;
[0010] Figure 3 A schematic flow chart of a sewage treatment method provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0011] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0012] See also Figures 1 to 2 , Figure 1 The framework diagram of the sewage treatment system provided in an embodiment of the present invention includes a sensor 102, a sewage treatment execution device 103, an edge computing gateway 101 and a cloud platform 104. The edge computing gateway is communicatively connected with the sensor 102, the sewage treatment execution device 103 and the cloud platform 104. The edge computing gateway 101 includes a data acquisition module 1001, a data preprocessing module 1002, a time series prediction and analysis module 1003, a control strategy generation module 1004 and an instruction issuance execution module 1005. The data acquisition module 1001 is used to read sensor data and sewage treatment execution device status data according to a preset sampling time interval; wherein the sensor data includes water quality parameters and process parameters, and the water quality parameters include chemical oxygen demand, ammonia nitrogen value, total phosphorus value and pH value. The process parameters include dissolved oxygen content, sludge concentration and water flow rate; the data preprocessing module 1002 is used to preprocess the sensor data and sewage treatment execution equipment status data read, and use the preprocessed sensor data and sewage treatment execution equipment status data as historical data, and upload the historical data to the cloud platform 104; the time series prediction analysis module 1003 is used to perform time series prediction analysis based on historical data of a preset time step, and generate sensor prediction data and equipment status prediction data of a preset prediction time; the control strategy generation module 1004 is used to optimize equipment control parameters based on the sensor prediction data and equipment status prediction data of a preset prediction time, and generate an equipment control instruction set; the instruction issuance execution module 1005 is used to issue the equipment control instruction set to the sewage treatment execution equipment 103.
[0013] Among them, sensor data refers to data collected by sensor 102, and sewage treatment execution equipment status data refers to data on the status of sewage treatment execution equipment 103. Sensors 102 may be of various types, and the number of each type of sensor 102 may be multiple. Sewage treatment execution equipment 103 may be of various types, and the number of each type of sewage treatment execution equipment 103 may be multiple. Sewage treatment execution equipment 103 may include programmable logic controllers (PLCs) for controlling operations, so that the PLCs can receive device control instruction sets and control sewage treatment execution equipment 103 to perform operations corresponding to the instructions according to the corresponding instructions. Sensor 102 is in contact with sewage and is used to collect water quality parameters related to water quality indicators of the sewage and process parameters related to the operating performance of sewage treatment execution equipment 103. Sewage treatment execution equipment status data includes the power and / or frequency of sewage treatment execution equipment 103. The edge computing gateway 101, sensor 102 and sewage treatment execution device 103 are all located at the sewage treatment site. The edge computing gateway 101 communicates with the sensor 102 and the sewage treatment execution device 103 respectively through the MQTT protocol to achieve encrypted communication. The quality of service (QoS) level is 1 and the heartbeat interval is 30 seconds. The edge computing gateway 101 transmits data with the cloud platform 104 through the TLS encrypted channel to upload historical data to the cloud platform 104. The cloud platform 104 includes a cloud-based time series database to achieve millisecond-level data writing and data persistence storage. The cloud-based time series database can use InfluxDB. The cloud platform 104 also includes a cloud-based rule engine for water quality analysis. The sewage treatment execution device 103 includes an aerator, a water pump and a dosing pump.The sewage treatment system includes a sensor 102, a sewage treatment execution device 103, an edge computing gateway 101 and a cloud platform 104. The data acquisition module 1001 of the edge computing gateway 101 reads the sensor data and the sewage treatment execution device status data according to a preset sampling time interval. The data preprocessing module 1002 preprocesses the read sensor data and the sewage treatment execution device status data as historical data. The time series prediction analysis module 1003 performs time series prediction analysis based on the historical data of a preset time step. The control strategy generation module 1004 optimizes the device control parameters based on the sensor prediction data and the device status prediction data of the preset prediction time length, generates a device control instruction set, and predicts future water quality changes, dynamically optimizes the control parameters of the corresponding sewage treatment execution device 103, and then adjusts the control of the sewage treatment execution device 103. Work to ensure that the water quality of the effluent is stable and meets the standards, with low manual intervention costs, and can predict future sludge concentration to adjust the sludge discharge cycle to avoid sludge aging or excessive discharge. It can also predict the status of the sewage treatment execution equipment 103 to adjust and optimize the start and stop control strategy of the sewage treatment execution equipment 103, which is conducive to reducing energy consumption, thereby realizing the precise, intelligent and energy-saving operation of the sewage treatment process, and solving the problems of poor adaptability to water quality fluctuations, low sludge management efficiency and insufficient energy consumption optimization. Moreover, through the edge computing gateway 101, predictions are made to intelligently control and optimize the operation of the sewage treatment execution equipment 103, which can improve the response speed, without relying on cloud servers for predictions, and support network disconnection predictions with low communication dependence; moreover, the edge computing gateway 101 can also upload historical data to the cloud platform 104 for storage, and can analyze water quality based on historical data through the cloud platform 104.
[0014] See also Figure 3 , Figure 3 This is a flow chart of a sewage treatment method provided in an embodiment of the present invention. The sewage treatment method is applied to the above-mentioned sewage treatment system, which includes a sensor, a sewage treatment execution device, an edge computing gateway, and a cloud platform. The sewage treatment method includes the following steps:
[0015] S10: Reading sensor data and sewage treatment execution equipment status data through the edge computing gateway according to a preset sampling time interval; wherein, the sensor data includes water quality parameters and process parameters, the water quality parameters include chemical oxygen demand (COD), ammonia nitrogen value, total phosphorus value and pH value, and the process parameters include dissolved oxygen content, sludge concentration and water flow rate.
[0016] Preferably, there may be multiple types of sensors, the number of each type of sensors may be multiple, there may be multiple types of sewage treatment execution equipment, the number of each type of sewage treatment execution equipment may be multiple. The preset sampling interval may be 5 seconds, and the sewage treatment execution equipment status data includes the power and / or frequency of the sewage treatment execution equipment.
[0017] S20: Preprocess the read sensor data and sewage treatment execution equipment status data through the edge computing gateway, use the preprocessed sensor data and sewage treatment execution equipment status data as historical data, and upload the historical data to the cloud platform.
[0018] Specifically, the preprocessing of the sensor data and sewage treatment execution equipment status data obtained by the edge computing gateway in step S20 is specifically as follows:
[0019] The edge computing gateway performs data verification, outlier elimination and formatting on the sensor data and sewage treatment execution equipment status data read.
[0020] Preferably, in some embodiments, the edge computing gateway performs data verification, outlier removal, and formatting on the sensor data and sewage treatment execution equipment status data read, specifically including:
[0021] The sensor data obtained by reading is verified according to the preset sensor data range, and the sewage treatment execution equipment status data is verified according to the preset equipment data range; among which, by verifying the corresponding data according to the preset data range, the accuracy of subsequent predictions can be preliminarily ensured.
[0022] A box plot is used to detect data outliers on the sensor data after data verification. A dynamic threshold algorithm is used to mark and remove data corresponding to outliers that exceed 1.5 times the interquartile range. The data is then supplemented and processed to obtain sensor data after removing outliers.
[0023] A box plot is used to detect data outliers in the sewage treatment equipment status data after data verification. A dynamic threshold algorithm is used to mark and eliminate data corresponding to outliers exceeding 1.5 times the interquartile range. The data is then supplemented and processed to obtain the sewage treatment equipment status data after eliminating outliers.
[0024] Among them, the interquartile range (IQR) is calculated on the data stream using a rolling window through the box plot to perform outlier detection.
[0025] The sensor data after removing outliers is normalized to obtain normalized sensor data, and the sewage treatment execution equipment status data after removing outliers is normalized to obtain normalized sewage treatment execution equipment status data; wherein, for multimodal data, such as the standby or running status of sewage treatment execution equipment, an exponential weighted moving average (EMA) algorithm can be used to update the feature range in real time and process the multimodal data in segments to perform data normalization.
[0026] The normalized sensor data is formatted to obtain formatted sensor data, and the normalized sewage treatment execution device status data is formatted to obtain formatted sewage treatment execution device status data. The formatting process is used to convert the data into JSON format, and the formatted sensor data includes a timestamp, sensor ID, and data unit, and the formatted sewage treatment execution device status data includes a timestamp, device ID, and data unit. The formatted sensor data and the formatted sewage treatment execution device status data are used as historical data, and the historical data can be uploaded to the cloud platform in a time series for storage. The edge computing gateway can upload data to the cloud platform through a TLS encrypted channel, so that the end-to-end transmission delay is less than 500 milliseconds, and the data integrity rate can reach 99.99%.
[0027] Specifically, in some embodiments, the supplementary processing of the data includes:
[0028] When the number of eliminated data is less than 1% of the total amount of data for data outlier detection, it is judged as a single point missing, and a linear interpolation algorithm is used to obtain supplementary data to supplement the data after eliminating the outliers; among them, when outlier detection is performed on the sensor data after data verification, the eliminated data is the abnormal sensor data, and when outlier detection is performed on the sewage treatment execution equipment status data after data verification, the eliminated data is the abnormal sewage treatment execution equipment status data.
[0029] When the amount of data removed is not less than 1% of the total amount of data for data outlier detection and not more than 5% of the total amount of data for data outlier detection, it is judged as continuous missing, and the Kalman filter algorithm is used to predict and obtain supplementary data to supplement the data after the outliers are removed;
[0030] When the amount of data removed exceeds 5% of the total data for data outlier detection, it is considered a large-scale missing data set. The data corresponding to the non-outlier point preceding each outlier is obtained in a time-series manner as supplementary data to supplement the data after outlier removal. Outliers are defined as points that exceed 1.5 times the interquartile range when calculating the interquartile range using a rolling window on the data stream using a box plot. Non-outliers are points other than outliers.
[0031] S30: The edge computing gateway performs time series prediction analysis based on historical data of a preset time step to generate sensor prediction data and device status prediction data of a preset prediction time.
[0032] The format of the sensor prediction data and device status prediction data generated for the preset prediction time is JSON format with confidence intervals. The preset time step can be 60 minutes, and the preset prediction time can be 30 minutes. The edge computing gateway can then perform time series prediction analysis based on the sensor data and sewage treatment execution equipment status data read and pre-processed every 5 seconds over the past 60 minutes, and generate sensor prediction data and equipment status prediction data for the next 30 minutes, including the chemical oxygen demand prediction value, ammonia nitrogen prediction value, total phosphorus prediction value, pH prediction value, dissolved oxygen prediction value, sludge concentration prediction value, water flow prediction value, sewage treatment execution equipment power prediction value, and sewage treatment execution equipment frequency prediction value within the next 30 minutes.
[0033] Preferably, after step S30, that is, after the edge computing gateway performs time series prediction analysis based on historical data of a preset time step and generates sensor prediction data and device status prediction data of a preset prediction time, the method further includes:
[0034] An attention mechanism is used to capture the coupling relationship between sensor data and sewage treatment equipment based on historical data at a preset time step. For example, the coupling relationship between sensor data and sewage treatment equipment can be used to dynamically correlate aerator power with dissolved oxygen levels.
[0035] S40: Optimize device control parameters using the edge computing gateway based on sensor prediction data and device status prediction data with a preset prediction duration, and generate a device control instruction set. The device control instruction set is a collection of control instructions for controlling different types of sewage treatment execution equipment. The generated device control instruction set is a structured control instruction set, each of which includes a device ID, a target range value, and an execution time window. The generation cycle of the device control instruction set can be stabilized within 200 milliseconds.
[0036] Specifically, in some embodiments, the sewage treatment execution equipment includes an aerator, a water pump, and a dosing pump, and the dosing pump is used to add drugs to the sewage for sewage treatment. Then, the sewage treatment execution equipment status data may include aerator power, aerator frequency, water pump power, water pump frequency, dosing pump power, and dosing pump frequency. The power prediction value of the sewage treatment execution equipment and the frequency prediction value of the sewage treatment execution equipment within the next 30 minutes may be the aerator power prediction value, aerator frequency prediction value, water pump power prediction value, water pump frequency prediction value, dosing pump power prediction value, and dosing pump frequency prediction value within the next 30 minutes. In step S40, that is, optimizing the equipment control parameters according to the sensor prediction data and equipment status prediction data of the preset prediction time length through the edge computing gateway, specifically includes:
[0037] The aeration volume control parameters of the aerator are adjusted and optimized using a fuzzy PID algorithm according to the sensor prediction data of the preset prediction time and the dissolved oxygen content prediction value in the equipment status prediction data;
[0038] Based on the sensor prediction data of the preset prediction time and the chemical oxygen demand prediction value and water flow in the equipment status prediction data, combined with the preset dosage coefficient, the material balance model is used to calculate the dosing pump frequency, and the control parameters of the dosing pump are adjusted and optimized; wherein, the dosing pump frequency meets the safety margin of 5%.
[0039] The sludge return ratio is optimized using a genetic algorithm based on the sensor prediction data of the preset prediction time and the ammonia nitrogen prediction value in the equipment status prediction data;
[0040] Optimize the start and stop control strategies of aerators and water pumps based on equipment status prediction data with preset prediction time.
[0041] S50: Sending a device control instruction set to the sewage treatment execution device through the edge computing gateway. The edge computing gateway may send the device control instruction set through the Modbus-TCP protocol.
[0042] Preferably, in some embodiments, the step S50, i.e., sending a device control instruction set to the sewage treatment execution device through the edge computing gateway, specifically includes:
[0043] Performing encoding conversion on the generated device control instruction set to obtain a transcoded device control instruction set;
[0044] The transcoded device control instruction set is encapsulated to obtain an encapsulated device control instruction set; wherein, the transcoded device control instruction set is encapsulated into binary frames of function code 06 (write single register) and function code 16 (write multiple registers) according to the Modbus RTU protocol specification, and a CRC-16 checksum is attached to obtain the encapsulated device control instruction set.
[0045] The packaged device control instruction set is sent to the sewage treatment execution device. The packaged device control instruction set can be sent to the sewage treatment execution device in a loop via the RS485 industrial bus, using a master-slave polling mechanism to ensure instruction timing, with each frame interval of 50 milliseconds.
[0046] The sewage treatment method is applied to a sewage treatment system including sensors, sewage treatment execution equipment, an edge computing gateway and a cloud platform. The edge computing gateway reads sensor data and sewage treatment execution equipment status data according to a preset sampling time interval and pre-processes them as historical data. Time series prediction analysis is performed based on the historical data of a preset time step, and sensor prediction data and equipment status prediction data of a preset prediction time are generated to optimize equipment control parameters. A device control instruction set is generated to predict future water quality changes, dynamically optimize the control parameters of the corresponding sewage treatment execution equipment, and then adjust and control the operation of the sewage treatment execution equipment to ensure that the effluent water quality is stable and meets the standards. The cost of manual intervention is low, and future sewage quality can be predicted. The sludge concentration can be adjusted to adjust the sludge discharge cycle to avoid sludge aging or excessive discharge. The status of the sewage treatment execution equipment can also be predicted to adjust and optimize the start-stop control strategy of the sewage treatment execution equipment, which is conducive to reducing energy consumption, thereby realizing the precise, intelligent and energy-saving operation of the sewage treatment process, and solving the problems of poor adaptability to water quality fluctuations, low sludge management efficiency and insufficient energy consumption optimization. Moreover, predictions are made through the edge computing gateway to intelligently control and optimize the operation of the sewage treatment execution equipment, which can improve the response speed, without relying on cloud servers for predictions, supporting network disconnection predictions, and low communication dependence. Moreover, the edge computing gateway can also upload historical data to the cloud platform for storage, and can analyze water quality based on historical data through the cloud platform.
[0047] Specifically, in some embodiments, before step S10, that is, before reading sensor data and sewage treatment execution device status data according to a preset sampling time interval by the edge computing gateway, the sewage treatment method further includes:
[0048] The parameters of the pre-trained artificial intelligence model are loaded through the edge computing gateway, a communication connection between the edge computing gateway and the sensor is established, a communication connection between the edge computing gateway and the sewage treatment execution equipment is established, configuration parameters are read, the data cache is initialized, and pre-calculated memory resources are allocated. The edge computing gateway controls the operation of the sewage treatment execution equipment after loading the pre-trained artificial intelligence model for prediction, wherein the pre-trained artificial intelligence model adopts LSTM (Long Short-Term Memory) or Transformer architecture, and the parameters of the pre-trained artificial intelligence model include the model display trend style, the number of turning points automatically detected by the model, the number of sampling simulations and the sampling method. The number of turning points automatically detected by the model can be 5, the number of sampling simulations can be 1000 times, and the sampling method can be equal interval sampling or random sampling. The communication connection between the edge computing gateway and the sensor is established through the MQTT protocol, and the communication connection between the edge computing gateway and the sewage treatment execution equipment is established through the MQTT protocol. The configuration parameters include sampling frequency and control period. The sampling frequency can be 1Hz, the control period can be 100 milliseconds, the data cache area is the data cache area of the edge computing gateway, the capacity of the data cache area can be 100,000 records, the pre-calculated memory resources occupy 128MB, and the memory resource allocation error is less than 1%.
[0049] Preferably, after step S50, that is, after the device control instruction set is sent to the sewage treatment execution device through the edge computing gateway, the sewage treatment method further includes:
[0050] The edge computing gateway reads the operating data of the sewage treatment execution equipment, the energy consumption data of the sewage treatment execution equipment and the actual water quality parameters collected by the sensor, calculates the prediction error, and records the situation where the prediction error exceeds the corresponding preset error threshold as an error prediction event. When the error prediction event continues to occur for a preset number of times, the parameters of the pre-trained artificial intelligence model are updated to obtain an updated pre-trained artificial intelligence model. The performance of the updated pre-trained artificial intelligence model is verified based on the sensor data and sewage treatment execution equipment status data at the current moment, and the version of the updated pre-trained artificial intelligence model is archived and rollback managed.
[0051] Among them, through this step, the sewage treatment system can achieve dynamic optimization of prediction accuracy while maintaining continuous operation, ensuring the continuous adaptability of the system. The prediction error includes the predicted mean square error (MSE) and the predicted root mean square error (RMSE). The case where the prediction error exceeds the corresponding preset error threshold is the case where the predicted mean square error exceeds the preset mean square error threshold and the predicted root mean square error exceeds at least one of the preset root mean square error threshold. If the erroneous prediction event continues to occur for a preset number of times, it is the case where the predicted mean square error exceeds the preset mean square error threshold and the predicted root mean square error exceeds at least one of the preset root mean square error threshold for the consecutive preset number of times. The parameters of the pre-trained artificial intelligence model are updated online using an incremental learning algorithm.
[0052] Specifically, in some embodiments, before step S10, that is, before reading sensor data and sewage treatment execution device status data according to a preset sampling time interval by the edge computing gateway, the sewage treatment method further includes:
[0053] The edge computing gateway checks the communication connection status between the edge computing gateway and the sensor, the sewage treatment execution device and the cloud platform using a heartbeat packet mechanism.
[0054] By checking the communication connection status, the packet loss rate can be reduced. When an abnormality occurs in the communication connection status, the faulty device can be switched, the communication interruption emergency mode can be activated, and automatic recovery can be triggered without manual intervention. When an abnormality is detected in at least one of the communication connection statuses of the edge computing gateway and the sensor, the edge computing gateway and the sewage treatment execution device, and the edge computing gateway and the cloud platform, the backup sensor can be automatically switched, the local cache can be enabled to maintain contact control so that it can continue to operate for a set period of time even if communication is interrupted, and the watchdog mechanism can be triggered to achieve self-recovery. This achieves fully automated control of the abnormal response process without the need for manual intervention.
[0055] Specifically, in some embodiments, the sewage treatment method further comprises:
[0056] The resource occupancy rate is monitored in real time through the edge computing gateway.
[0057] In summary, the sewage treatment method of the present invention is applied to a sewage treatment system including sensors, sewage treatment execution equipment, edge computing gateways and cloud platforms. The edge computing gateway reads sensor data and sewage treatment execution equipment status data according to a preset sampling time interval and pre-processes them as historical data. Time series prediction analysis is performed based on the historical data of a preset time step, and sensor prediction data and equipment status prediction data of a preset prediction time are generated to optimize equipment control parameters, and an equipment control instruction set is generated to predict future water quality changes, dynamically optimize the control parameters of the corresponding sewage treatment execution equipment, and then adjust and control the operation of the sewage treatment execution equipment to ensure that the water quality of the effluent is stable and meets the standards, with low manual intervention costs and predictable future changes. The sludge concentration can be used to adjust the sludge discharge cycle to avoid sludge aging or excessive discharge. The status of the sewage treatment execution equipment can also be predicted to adjust and optimize the start-stop control strategy of the sewage treatment execution equipment, which is conducive to reducing energy consumption, thereby realizing the precise, intelligent and energy-saving operation of the sewage treatment process, solving the problems of poor adaptability to water quality fluctuations, low sludge management efficiency and insufficient energy consumption optimization. Moreover, the edge computing gateway is used to make predictions to intelligently control and optimize the operation of the sewage treatment execution equipment, which can improve the response speed, without relying on the cloud server for prediction, to support network disconnection prediction, and with low communication dependence; moreover, the edge computing gateway can also upload historical data to the cloud platform for storage, and can analyze water quality based on historical data through the cloud platform. The sewage treatment system of the present invention also has the above functions.
[0058] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A sewage treatment method, characterized in that: Applied to a sewage treatment system, the sewage treatment system includes sensors, sewage treatment execution equipment, edge computing gateways and a cloud platform, and the sewage treatment method includes: Reading sensor data and sewage treatment execution equipment status data through the edge computing gateway according to a preset sampling time interval; wherein the sensor data includes water quality parameters and process parameters, the water quality parameters include chemical oxygen demand, ammonia nitrogen value, total phosphorus value and pH value, and the process parameters include dissolved oxygen content, sludge concentration and water flow rate; Preprocessing the sensor data and sewage treatment execution equipment status data obtained by reading through the edge computing gateway, using the preprocessed sensor data and sewage treatment execution equipment status data as historical data, and uploading the historical data to the cloud platform; The edge computing gateway performs time series prediction analysis based on historical data of a preset time step to generate sensor prediction data and device status prediction data of a preset prediction time length; The edge computing gateway optimizes device control parameters based on sensor prediction data of preset prediction duration and device status prediction data, and generates a device control instruction set; The device control instruction set is sent to the sewage treatment execution device through the edge computing gateway.
2. The sewage treatment method according to claim 1, characterized in that: The edge computing gateway pre-processes the sensor data and sewage treatment execution equipment status data obtained by reading, specifically: The edge computing gateway performs data verification, outlier elimination and formatting on the sensor data and sewage treatment execution equipment status data read.
3. The sewage treatment method according to claim 2, characterized in that: The edge computing gateway performs data verification, outlier removal, and formatting on the sensor data and sewage treatment execution equipment status data obtained by reading the data, including: The sensor data obtained by reading is verified according to the preset sensor data range, and the sewage treatment execution equipment status data is verified according to the preset equipment data range; A box plot is used to detect data outliers on the sensor data after data verification. A dynamic threshold algorithm is used to mark and remove data corresponding to outliers that exceed 1.5 times the interquartile range. The data is then supplemented and processed to obtain sensor data after removing outliers. A box plot is used to detect data outliers in the sewage treatment equipment status data after data verification. A dynamic threshold algorithm is used to mark and eliminate data corresponding to outliers exceeding 1.5 times the interquartile range. The data is then supplemented and processed to obtain the sewage treatment equipment status data after eliminating outliers. Normalizing the sensor data after removing the outliers to obtain normalized sensor data, and normalizing the sewage treatment execution equipment status data after removing the outliers to obtain normalized sewage treatment execution equipment status data; The normalized sensor data is formatted to obtain formatted sensor data, and the normalized sewage treatment execution equipment status data is formatted to obtain formatted sewage treatment execution equipment status data.
4. The sewage treatment method according to claim 3, characterized in that: The supplementary processing of the data includes: When the number of eliminated data is less than 1% of the total data for data outlier detection, it is judged as a single point missing, and a linear interpolation algorithm is used to obtain supplementary data to supplement the data after the outlier points are eliminated; When the amount of data removed is not less than 1% of the total amount of data for data outlier detection and not more than 5% of the total amount of data for data outlier detection, it is judged as continuous missing, and the Kalman filter algorithm is used to predict and obtain supplementary data to supplement the data after the outliers are removed; When the amount of eliminated data is higher than 5% of the total amount of data for data outlier detection, it is judged as a large-scale missing data, and the data corresponding to the previous non-outlier point of each outlier is obtained in time sequence as supplementary data to supplement the data after the outlier points are eliminated.
5. The sewage treatment method according to claim 1, characterized in that: The sewage treatment execution equipment includes an aerator, a water pump, and a dosing pump. The edge computing gateway optimizes the equipment control parameters according to the sensor prediction data of the preset prediction time and the equipment status prediction data, including: The aeration volume control parameters of the aerator are adjusted and optimized using a fuzzy PID algorithm according to the sensor prediction data of the preset prediction time and the dissolved oxygen content prediction value in the equipment status prediction data; Based on the sensor prediction data of the preset prediction time and the chemical oxygen demand prediction value and water flow in the equipment status prediction data, combined with the preset dosage coefficient, the material balance model is used to calculate the dosing pump frequency, and the control parameters of the dosing pump are adjusted and optimized; The sludge return ratio is optimized using a genetic algorithm based on the sensor prediction data of the preset prediction time and the ammonia nitrogen prediction value in the equipment status prediction data; Optimize the start and stop control strategies of aerators and water pumps based on equipment status prediction data with a preset prediction time.
6. The sewage treatment method according to claim 1, characterized in that: The sending of a device control instruction set to the sewage treatment execution device through the edge computing gateway includes: Performing encoding conversion on the generated device control instruction set to obtain a transcoded device control instruction set; Encapsulating the transcoded device control instruction set to obtain an encapsulated device control instruction set; The packaged device control instruction set is sent to the sewage treatment execution device.
7. The sewage treatment method according to claim 1, characterized in that: Before reading sensor data and sewage treatment execution equipment status data by the edge computing gateway according to a preset sampling time interval, the sewage treatment method further includes: The parameters of the pre-trained artificial intelligence model are loaded through the edge computing gateway, a communication connection is established between the edge computing gateway and the sensor, a communication connection is established between the edge computing gateway and the sewage treatment execution equipment, configuration parameters are read, the data cache area is initialized, and pre-calculated memory resources are allocated.
8. The sewage treatment method according to claim 7, characterized in that: After the device control instruction set is sent to the sewage treatment execution device through the edge computing gateway, the sewage treatment method further includes: The edge computing gateway reads the operating data of the sewage treatment execution equipment, the energy consumption data of the sewage treatment execution equipment and the actual water quality parameters collected by the sensor, calculates the prediction error, and records the situation where the prediction error exceeds the corresponding preset error threshold as an error prediction event. When the error prediction event continues to occur for a preset number of times, the parameters of the pre-trained artificial intelligence model are updated to obtain an updated pre-trained artificial intelligence model. The performance of the updated pre-trained artificial intelligence model is verified based on the sensor data and sewage treatment execution equipment status data at the current moment, and the version of the updated pre-trained artificial intelligence model is archived and rollback managed.
9. The sewage treatment method according to claim 1, characterized in that: Before reading sensor data and sewage treatment execution equipment status data by the edge computing gateway according to a preset sampling time interval, the sewage treatment method further includes: The edge computing gateway checks the communication connection status between the edge computing gateway and the sensor, the sewage treatment execution device and the cloud platform using a heartbeat packet mechanism.
10. A sewage treatment system, characterized in that: The sewage treatment system implements the sewage treatment method according to any one of claims 1 to 9, and the sewage treatment system includes a sensor, a sewage treatment execution device, an edge computing gateway, and a cloud platform. The edge computing gateway is communicatively connected with the sensor, the sewage treatment execution device, and the cloud platform, and the edge computing gateway includes: A data acquisition module, configured to read sensor data and sewage treatment equipment status data according to a preset sampling time interval; wherein the sensor data includes water quality parameters and process parameters, wherein the water quality parameters include chemical oxygen demand, ammonia nitrogen value, total phosphorus value, and pH value; and the process parameters include dissolved oxygen, sludge concentration, and water flow rate; A data preprocessing module is used to preprocess the sensor data and sewage treatment execution equipment status data obtained by reading, use the preprocessed sensor data and sewage treatment execution equipment status data as historical data, and upload the historical data to the cloud platform; The time series prediction analysis module is used to perform time series prediction analysis based on historical data of a preset time step and generate sensor prediction data and device status prediction data of a preset prediction time step; A control strategy generation module is used to optimize device control parameters based on sensor prediction data of preset prediction time and device status prediction data, and generate a device control instruction set; The instruction sending and executing module is used to send the equipment control instruction set to the sewage treatment execution equipment.
Citation Information
Patent Citations
Automatic adjustment method for equipment state time sequence data over-limit threshold under variable working conditions
CN119003979A
A sewage treatment system based on intelligent perception and dynamic regulation
CN119758936A
Pesticide pollution treatment control method and system based on Internet of Things
CN120406163A
Intelligent detection system for sewage treatment
CN120446414A
Sewage treatment system and method based on large language model and multi-agent cooperation
CN120463275A