A sewage plant total phosphorus intelligent control system and method based on edge cloud cooperation

The intelligent total phosphorus control system for wastewater treatment plants, which combines edge nodes and cloud parameter databases, enables precise dosing of chemicals under complex operating conditions. This solves the problems of poor adaptability and high cost in existing chemical dosing control technologies, achieving efficient and economical total phosphorus control.

CN122151638APending Publication Date: 2026-06-05GUIZHOU WATER OPERATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUIZHOU WATER OPERATION CO LTD
Filing Date
2026-03-02
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing technologies for controlling total phosphorus dosage in wastewater treatment plants are insufficient for precise regulation under complex operating conditions, making it difficult to balance compliance priorities with cost control.

Method used

A wastewater treatment plant total phosphorus intelligent control system based on edge-cloud collaboration is adopted. Real-time data is acquired through edge nodes and combined with cloud parameter library to generate operating condition labels and expert parameter groups, and to optimize the initial value of reagent addition to obtain the optimal dosage.

Benefits of technology

It achieves precise, real-time, and economical control of reagent dosing, improves adaptability to complex operating conditions, reduces operating costs, and ensures that the total phosphorus in the effluent meets discharge standards.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122151638A_ABST
    Figure CN122151638A_ABST
Patent Text Reader

Abstract

The application discloses a sewage plant total phosphorus intelligent control system and method based on edge cloud cooperation. Each edge node performs the following processing: obtaining an effective edge data set and a local parameter library; generating a current working condition label and an expert parameter group according to the effective edge data set and the local parameter library; generating a medicament adding initial value of a current edge side real-time control cycle according to the effective edge data set of the current edge side real-time control cycle and the expert parameter group; and performing optimization processing on the medicament adding initial value of the current edge side real-time control cycle, so as to obtain an optimal adding amount of the current edge side real-time control cycle. The application constructs a layered progressive intelligent control logic of edge cloud data support-working condition parameter matching-initial value accurate generation-addition amount optimization, deeply couples edge side real-time working condition data and cloud end global optimization parameters, and realizes the precision, real-time, intelligence and economy of medicament adding control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, specifically to an intelligent control system and method for total phosphorus in wastewater treatment plants based on edge-cloud collaboration. Background Technology

[0002] With the continuous strengthening of ecological and environmental protection efforts in my country, the "Pollutant Discharge Standard for Urban Wastewater Treatment Plants" and its local detailed standards have become increasingly stringent in their requirements for total phosphorus (TP) limits in effluent. TP has become a core limiting indicator for assessing the compliance of wastewater treatment plant effluent. Chemical phosphorus removal, due to its rapid reaction rate and stable removal effect, is the core process for wastewater treatment plants to ensure compliance with TP discharge standards. Precise control of PAC dosage directly determines the balance between treatment effectiveness and operating costs. However, the quality and quantity of influent to wastewater treatment plants are affected by multiple factors, including intermittent industrial discharges, overflows from combined sewer overflows, and seasonal changes, exhibiting multi-scale and strongly coupled fluctuation characteristics. Traditional control methods are no longer suitable for the precise regulation needs under complex operating conditions.

[0003] Currently, total phosphorus dosing control technology in wastewater treatment plants has evolved from manual, experience-based dosing and fixed flow rate ratio dosing to intelligent control. Existing mainstream technologies fall into two main categories: one is feedforward-feedback closed-loop control based on online water quality monitoring, which dynamically adjusts the dosage by collecting real-time data on influent total phosphorus concentration, flow rate, and effluent total phosphorus concentration, combined with a preset stoichiometric ratio; the other is an intelligent dosing system integrating machine learning, fuzzy control, or gradient optimization algorithms, attempting to fit the correlation between water quality and dosage through algorithmic models to achieve more precise control. Meanwhile, with the development of industrial internet technology, the application of edge-cloud collaborative architecture in smart water management is gradually increasing. Some solutions propose combining real-time computing at the edge with big data analysis in the cloud to balance low latency control with long-term model optimization capabilities.

[0004] Although existing technologies have improved the automation level of total phosphorus dosing control to some extent, there are still many key technical defects in practical engineering applications, making it difficult to meet the core requirements of "compliance first and cost best". Summary of the Invention

[0005] The purpose of this invention is to provide an intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration to at least solve one of the above-mentioned technical problems.

[0006] One aspect of the present invention provides an intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration. The intelligent control system includes multiple edge nodes and a cloud terminal, and each edge node performs the following processing:

[0007] Obtain the valid edge-side dataset for the current edge-side real-time control cycle and the local parameter library transmitted from the cloud for the current edge-cloud data synchronization cycle;

[0008] Based on the effective edge-side dataset of the current edge-side real-time control cycle and the local parameter library transmitted from the cloud in the current edge-cloud data synchronization cycle, the current operating condition label and expert parameter group are generated.

[0009] The initial values ​​for agent dosing in the current edge-side real-time control cycle are generated based on the effective edge-side dataset and expert parameter group.

[0010] The initial value of the agent addition in the current edge-side real-time control cycle is optimized to obtain the optimal addition amount in the current edge-side real-time control cycle.

[0011] Optionally, each edge node further includes the following processing:

[0012] Send the optimal dosage for the current edge-side real-time control cycle to the dosing device;

[0013] The actual dosage fed back by the dosing device after dosing the drug according to the optimal dosage of the current edge side real-time control cycle is obtained.

[0014] Optionally, the edge node further includes:

[0015] Determine if the next edge-cloud data synchronization cycle has been reached; if so, then...

[0016] Send the actual amount of feed, the optimal amount of feed for the current edge-side real-time control cycle, and the effective edge-side dataset for the current edge-side real-time control cycle to the cloud terminal;

[0017] The cloud terminal updates the global database in the cloud and generates incremental parameter packages to be distributed based on the actual deployment amount, optimal deployment amount, and effective datasets on the edge side obtained between the current edge cloud data synchronization cycle and the next edge cloud data synchronization cycle.

[0018] Optionally, the optimization process for the initial drug dosage in the current edge-side real-time control cycle to obtain the optimal dosage for the current edge-side real-time control cycle includes:

[0019] The water quality fluctuation level and comprehensive fluctuation score are generated based on the effective edge-side dataset of the current edge-side real-time control cycle.

[0020] The operating condition baseline step size, compliance safety distance coefficient, gradient decay coefficient, estimated step size for each round, and initial predicted effluent concentration are generated based on water quality fluctuation level, comprehensive fluctuation score, and initial chemical dosing value.

[0021] Based on the operating condition baseline step size, the compliance safety distance coefficient, the gradient decay coefficient, the estimated value of each round step size, and the initial predicted effluent concentration, a variable step size multi-round gradient bottoming and critical dosage locking process is performed to obtain the initial value of the critical dosage and the corresponding predicted effluent concentration.

[0022] The final candidate dosage set is generated based on the initial critical dosage value and the corresponding predicted effluent concentration;

[0023] The final candidate dosage set after sorting is subjected to bi-objective dynamic weighted optimization to obtain the final candidate dosage set.

[0024] Optionally, the effective edge-side dataset for the current edge-side real-time control cycle includes the influent total phosphorus concentration, the effluent total phosphorus concentration, the influent COD concentration, and the influent SS concentration for the current edge-side real-time control cycle; as well as the influent total phosphorus concentration, the effluent total phosphorus concentration, the influent COD concentration, and the influent SS concentration for the previous edge-side real-time control cycle.

[0025] Based on the effective edge-side dataset of the current edge-side real-time control cycle, water quality fluctuation levels and comprehensive fluctuation scores are generated, including:

[0026] The relative change rate of total phosphorus concentration in the influent is obtained based on the total phosphorus concentration in the influent during the current real-time control cycle on the edge side and the total phosphorus concentration in the effluent during the previous real-time control cycle on the edge side.

[0027] The total phosphorus concentration fluctuation coefficient of effluent is generated based on the total phosphorus concentration of effluent in the current edge side real-time control cycle and the total phosphorus concentration of effluent in the previous edge side real-time control cycle.

[0028] The water quality synergistic change rate is generated based on the influent COD concentration, SS concentration, and COD and SS concentration of the previous edge side real-time control cycle.

[0029] The water quality fluctuation level and comprehensive fluctuation score are generated based on the relative change rate of total phosphorus concentration in the influent, the fluctuation coefficient of total phosphorus concentration in the effluent, and the water quality synergistic change rate.

[0030] Optionally, the step of generating the operating condition baseline step size, compliance safety distance coefficient, gradient decay coefficient, estimated step size for each round, and initial predicted effluent concentration based on water quality fluctuation level, comprehensive fluctuation score, and initial reagent dosage includes:

[0031] Obtain a preset volatility level-correction coefficient mapping table, which includes multiple volatility levels and the correction coefficient corresponding to each volatility level;

[0032] The corresponding correction coefficient is obtained from the preset fluctuation level-correction coefficient mapping table based on the obtained water quality fluctuation level;

[0033] The baseline step size for the working condition is calculated by using the base coefficients of the greedy algorithm as the base and combining them with the level correction coefficients.

[0034] Obtain a preset prediction model for total phosphorus removal efficiency on the edge side;

[0035] The initial value of the reagent dosage is input into the edge-side total phosphorus removal efficiency prediction model to obtain the predicted value of total phosphorus in the effluent;

[0036] The basic compliance safety distance coefficient is calculated based on the difference between the predicted total phosphorus value in the effluent and the preset compliance threshold.

[0037] Obtain the rate of coordinated change in water quality;

[0038] The final compliance safety distance coefficient is generated based on the basic compliance safety distance coefficient and the water quality co-change rate.

[0039] The greedy algorithm generates the amount of feed per round of bottoming out based on the final safety distance coefficient to generate the current edge-side real-time control cycle.

[0040] Optionally, the step of performing variable-step multi-round gradient bottoming and critical dosage locking based on the operating condition baseline step size, the compliance safety distance coefficient, the gradient decay coefficient, the estimated value of each round step size, and the initial predicted effluent concentration to obtain the initial value of the critical dosage and the corresponding predicted effluent concentration includes:

[0041] Based on the operating condition baseline step size, the compliance safety distance coefficient, the gradient decay coefficient, the estimated step size for each round, and the initial predicted effluent concentration, the greedy algorithm bottom-seeking full parameter initialization is performed to obtain the greedy algorithm bottom-seeking initialization parameter set.

[0042] Based on the initialized greedy algorithm bottom-finding full parameter set, the round-level variable step size gradient bottom-finding calculation of the current edge side real-time control cycle is performed to obtain the candidate dosage for the last effective round and the predicted total phosphorus value of the effluent corresponding to the candidate dosage.

[0043] Based on the candidate dosage in the last effective round and the predicted total phosphorus in the effluent corresponding to the candidate dosage, the initial value of the critical dosage for bottoming out and the corresponding predicted effluent concentration are generated by the greedy algorithm in the current edge-side real-time control cycle.

[0044] Optionally, the step of generating the final candidate dosage set after sorting based on the initial value of the critical dosage and the corresponding predicted effluent concentration includes:

[0045] Generate multi-scale neighborhood configuration parameters based on the initial value of the critical dosage;

[0046] An initial candidate dosing quantity set is generated based on multi-scale neighborhood configuration parameters;

[0047] The initial candidate dosage set is subjected to a two-layer process constraint candidate value screening and sorting to obtain the final candidate dosage set after sorting.

[0048] Optionally, the step of performing bi-objective dynamic weighted optimization on the sorted final candidate dosage set to obtain the final candidate dosage set includes:

[0049] Construct a dual-objective optimization function and obtain a preset dual-objective quantization table of candidate values;

[0050] Based on the water quality fluctuation level, a dual-objective dynamic weight set, the optimal dosage, and the predicted total phosphorus value in the effluent corresponding to the optimal dosage are generated.

[0051] This application also provides a smart control method for total phosphorus in wastewater treatment plants based on edge-cloud collaboration, the smart control method for total phosphorus in wastewater treatment plants based on edge-cloud collaboration includes:

[0052] Obtain the valid edge-side dataset for the current edge-side real-time control cycle and the local parameter library transmitted from the cloud for the current edge-cloud data synchronization cycle;

[0053] Based on the effective edge-side dataset of the current edge-side real-time control cycle and the local parameter library transmitted from the cloud in the current edge-cloud data synchronization cycle, the current operating condition label and expert parameter group are generated.

[0054] The initial values ​​for agent dosing in the current edge-side real-time control cycle are generated based on the effective edge-side dataset and expert parameter group.

[0055] The initial value of the agent addition in the current edge-side real-time control cycle is optimized to obtain the optimal addition amount in the current edge-side real-time control cycle.

[0056] This application's edge-cloud collaborative intelligent control system for total phosphorus in wastewater treatment plants constructs a hierarchical, progressive intelligent control logic that integrates edge-cloud data support, operating parameter matching, precise initial value generation, and dosage optimization. It deeply couples real-time operating data from the edge side with global optimization parameters in the cloud, achieving precision, real-time control, intelligence, and economy in reagent dosing control. This effectively solves the technical defects of traditional total phosphorus dosing control, such as poor parameter adaptability, large initial value deviation, high degree of blind optimization, and disconnect between edge and cloud collaboration.

[0057] This solution acquires a valid dataset for the real-time control cycle at the edge and a local parameter library distributed from the cloud during the edge-cloud data synchronization cycle, forming a dual-source data support system of real-time operating data at the edge and global optimization parameters in the cloud. The valid dataset at the edge directly reflects real-time operating conditions such as water quality and quantity, ensuring low latency and on-site adaptability of control commands. The local parameter library is synchronized from the cloud to the edge based on historical operating data from the entire plant and iterative optimization of industry process standards, avoiding the control limitations caused by isolated edge data. This achieves complementary advantages between edge and cloud data, laying a precise and comprehensive data foundation for subsequent full-process control calculations.

[0058] This solution generates current operating condition labels and expert parameter groups based on real-time effective datasets from the edge and a local parameter library in the cloud. The operating condition labels accurately classify and identify current influent water quality fluctuations, water volume changes, and coupling characteristics. Then, specific expert parameter groups are matched to different operating condition labels, replacing the traditional, crude approach of applying fixed parameters to all operating conditions. The expert parameter groups are deeply bound to the current real-time operating conditions, effectively avoiding the problems of poor adaptability and large control deviations of fixed parameters when water quality fluctuates dynamically. This ensures that subsequent initial values ​​for reagent dosing and optimization are supported by process parameters that are closely aligned with the actual site conditions, significantly improving the control logic's adaptability to complex and dynamic operating conditions.

[0059] This solution combines real-time, effective edge-side datasets with a dedicated expert parameter set to generate initial reagent dosage values. This ensures the initial values ​​are accurately reflected in real-time water quality and quantity, avoiding the disconnect from real-time conditions that occurs with traditional methods that rely solely on fixed cloud-based parameters. Furthermore, by incorporating process principles and global optimization experience into the expert parameter set, it avoids the susceptibility to random interference and large deviations inherent in traditional edge-side instantaneous data-driven initial values. The generated initial values ​​more closely approximate the actual optimal dosage range, significantly reducing the number of iterations in subsequent optimization processes, lowering the computational load on the edge side, ensuring rapid response within the edge-side real-time control cycle, and meeting the real-time control requirements of industrial sites.

[0060] This solution uses highly accurate initial reagent dosage values ​​as a foundation to conduct targeted optimization to obtain the optimal dosage. This transforms the optimization process from blind, large-scale exploration to precise, small-scale optimization, significantly improving efficiency and accuracy. The optimization process is centered on real-time edge-side operating conditions and uses expert parameter groups as process constraints. While strictly ensuring that the total phosphorus in the effluent meets discharge standards, it minimizes the reagent dosage, effectively balancing the reliability of total phosphorus control with the economic efficiency of reagent consumption. This resolves the technical contradictions of traditional technologies, such as wasteful reagent consumption due to fixed dosage and the risk of compliance issues with coarse adjustments, significantly reducing the operating costs of chemical phosphorus removal in wastewater treatment plants.

[0061] The technical solution features a progressively layered logic with highly interconnected inputs and outputs, forming a structured control logic for the entire process from data acquisition to the final optimal dosage output. Each step is based on accurate preceding data / parameters, eliminating redundant calculations and blind decisions, significantly improving the traceability, stability, and reliability of the control results. Furthermore, the entire process is designed based on real-time edge control cycles, with all calculations and optimizations completed at the edge. The cloud is only responsible for iterating and synchronizing the parameter library, fully leveraging the real-time computing advantages of the edge while utilizing the big data analytics capabilities of the cloud. This clear division of labor and efficient collaboration between the edge and cloud makes the technical solution easy to deploy industrially and implement in engineering. Moreover, parameters and optimization rules can be flexibly adjusted according to the actual process requirements of wastewater treatment plants, demonstrating good versatility and scalability. Attached Figure Description

[0062] Figure 1 This is a schematic diagram of a total phosphorus intelligent control system for wastewater treatment plants based on edge-cloud collaboration, according to an embodiment of this application. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be described in more detail below with reference to the accompanying drawings. In the drawings, the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The described embodiments are some, but not all, embodiments of this application. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application. The embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0064] like Figure 1 The edge-cloud collaborative intelligent control system for total phosphorus in wastewater treatment plants shown includes multiple edge nodes and a cloud terminal. Each edge node performs the following processing:

[0065] Obtain the valid edge-side dataset for the current edge-side real-time control cycle and the local parameter library transmitted from the cloud for the current edge-cloud data synchronization cycle;

[0066] Based on the effective edge-side dataset of the current edge-side real-time control cycle and the local parameter library transmitted from the cloud in the current edge-cloud data synchronization cycle, the current operating condition label and expert parameter group are generated.

[0067] The initial values ​​for agent dosing in the current edge-side real-time control cycle are generated based on the effective edge-side dataset and expert parameter group.

[0068] The initial value of the agent addition in the current edge-side real-time control cycle is optimized to obtain the optimal addition amount in the current edge-side real-time control cycle.

[0069] In this embodiment, each edge node further includes the following processing:

[0070] Send the optimal dosage for the current edge-side real-time control cycle to the dosing device;

[0071] The actual dosage fed back by the dosing device after dosing the drug according to the optimal dosage of the current edge side real-time control cycle is obtained.

[0072] In this embodiment, the edge node further includes:

[0073] Determine if the next edge-cloud data synchronization cycle has been reached; if so, then...

[0074] Send the actual amount of feed, the optimal amount of feed for the current edge-side real-time control cycle, and the effective edge-side dataset for the current edge-side real-time control cycle to the cloud terminal;

[0075] The cloud terminal updates the global database in the cloud and generates incremental parameter packages to be distributed based on the actual deployment amount, optimal deployment amount, and effective datasets on the edge side obtained between the current edge cloud data synchronization cycle and the next edge cloud data synchronization cycle.

[0076] In this embodiment, the period is defined as follows:

[0077] Edge-side real-time control cycle T1: The value is 1 minute (short cycle), used for edge-side data acquisition, calculation and execution.

[0078] The edge-cloud data synchronization cycle T2 is set to 60 minutes (medium cycle), T2 = n × T1 (n = 60), and is used for uploading data on the edge side and receiving incremental updates from the cloud.

[0079] The cloud-based global optimization cycle T3 is set to 24 hours (long cycle), and T3 = m × T2 (m = 24). It is used for full data optimization in the cloud.

[0080] In this embodiment, obtaining the valid edge-side dataset for the current edge-side real-time control cycle includes:

[0081] The current period is defined as the t-th T1 period, and the time window is [t]. start ,t end ];

[0082] In t start At any given moment, the edge controller locks the time window of the current T1 cycle and starts the acquisition timer to ensure that all data in this cycle is acquired within this time window;

[0083] Parallel data acquisition by data type: Independent acquisition threads are started according to data type to complete synchronous acquisition. The core parameters for acquisition are:

[0084] Key water quality parameters: Influent total phosphorus concentration (C) in Total phosphorus concentration in effluent C actual Influent COD concentration, influent SS concentration;

[0085] Process operating parameters: influent flow velocity v, influent flow rate Q, current operating frequency f of the reagent dosing pump;

[0086] Equipment status parameters: sensor online / fault status status, dosing pump operation feedback signal;

[0087] Raw data frame encapsulation: All acquired parameters are encapsulated into a raw data frame D for the t-th T1 cycle, in the format of parameter name-acquisition timestamp-raw value-signal range. raw (t), with an additional period number and a data collection completion identifier.

[0088] Invalid value cleaning: Traverse D raw All numerical parameters in (t) are compared with the hard boundary verification rules of the process, and drift values ​​and transmission error values ​​that are out of range are eliminated, and the channels where invalid values ​​are located are marked.

[0089] Missing value completion: For blank parameters after missing or invalid values ​​have been collected, a process-level timing completion strategy is executed (only effective for occasional missing values; continuous missing values ​​trigger an alarm):

[0090] Core water quality parameters ( ): Using the previous period D edge Complete the corresponding valid values ​​of (t−1);

[0091] Process operating parameters ( ): Read and complete the actual output / detection buffer value of the edge controller;

[0092] Status verification: Verify the status parameters of the sensors and dosing pumps. If the core water quality sensors (total phosphorus / COD / SS) fail for two consecutive cycles, a local alarm signal is generated. Data is still processed according to the completion rules to ensure continuous system operation.

[0093] Through the above cleaning process, a preliminary, effective dataset D is obtained after cleaning and completion. mid (t);

[0094] For the initial valid dataset D mid (t) is processed as follows:

[0095] Dimensional normalization processing: for D midIn (t), the numerical parameters that need to participate in the algorithm operation are standardized without dimension to eliminate the influence of dimension differences on subsequent calculations, and only the original values ​​are retained for data recording.

[0096] Parameter filtering and normalization: From D mid In (t), select the core effective parameters (you can choose which parameters you need according to the subsequent steps), remove redundant state parameters that do not need to participate in the calculation, and organize the parameter format according to the fixed naming convention.

[0097] Standardized dataset encapsulation: The normalized core parameters, cleaned and completed logs, and periodic identifiers are integrated and encapsulated into a standardized effective dataset D for the edge side T1 periodicity. edge (t), and simultaneously generate the cost cycle preprocessing log L ogedge (t).

[0098] In this embodiment, the local parameter library transmitted from the cloud is constructed in the following manner:

[0099] Obtain the following preset data:

[0100] Original data from expert experience, such as operating condition adaptation rules for total phosphorus removal agent dosing and different water quality ranges. (Total phosphorus correction factor) (COD coupling coefficient) (SS coupling coefficient) (Basic addition compensation amount) empirical value, emergency parameters for abnormal working conditions;

[0101] Historical operational dataset: Wastewater treatment plant water quality data for the past 1-3 years at the T1 cycle level ( The effective sample set of data on pesticide dosage and effluent compliance, after cloud preprocessing;

[0102] Define the dosage formula:

[0103] .

[0104] The expert experience is broken down into four core parameters and linked to water quality fluctuation levels (L0-L3) to achieve precise matching of operating conditions and parameters:

[0105] Total phosphorus correction factor α( The level changes with fluctuations in the total phosphorus concentration of the influent;

[0106] Water quality coupling coefficient The level of fluctuation changes in tandem with COD and SS.

[0107] Basic addition compensation amount Adapts to the overall water quality fluctuation level to compensate for basic process losses;

[0108] Historical data calibration: Substitute the initial values ​​of expert experience into the dosage formula, compare them with the actual dosage and effluent compliance in the historical sample set, and fine-tune the parameters using the least squares method to ensure that the initial parameters meet the compliance rate ≥99% and the chemical consumption is close to the historical optimum.

[0109] Supplementing parameters for abnormal operating conditions: Based on expert experience, emergency parameters for three types of abnormal operating conditions are supplemented (significant fluctuations in effluent, a sudden increase in total phosphorus in influent, and abrupt changes in water quality coupling). The priority of these parameters is clarified to be higher than that of parameters for normal operating conditions, ultimately resulting in a standardized set of expert experience parameters: including... (L0-L3) and emergency parameters for abnormal operating conditions, with parameter value range and calibration basis; and parameter-operating condition matching table, which clarifies the parameter calling rules for different fluctuation levels and abnormal operating conditions.

[0110] Core database table creation: Two core structured tables are built in the cloud database, and initial writes are completed.

[0111] "Expert Experience Master Parameter Table": The primary key is version number + fluctuation level, and the fields include... Effective date, calibration sample size;

[0112] The "Parameter-Node Matching Table" has the following primary key: edge node ID + version number, and fields include node adaptation parameter set, distribution status, and update time.

[0113] Node adaptation binding: Based on the edge node whitelist, the parameter set is bound to the corresponding edge node ID to ensure that edge nodes of different process units only obtain the parameters adapted to themselves.

[0114] In this embodiment, generating the current operating condition label and expert parameter group based on the effective edge-side dataset of the current edge-side real-time control cycle and the local parameter library transmitted from the cloud during the current edge-cloud data synchronization cycle includes:

[0115] In this embodiment, the t-th T1-period standardized effective dataset D edge (t) must include at least the following parameters:

[0116] Current edge-side real-time control cycle of influent total phosphorus concentration The current real-time control cycle for the effluent total phosphorus concentration and the current real-time control cycle for the influent COD concentration. The influent SS concentration during the current edge-side real-time control cycle. The total phosphorus concentration in the influent and the total phosphorus concentration in the effluent during the previous real-time control cycle on the edge side. The influent COD concentration during the real-time control cycle on the upper edge side The influent SS concentration during the real-time control cycle on the upper edge side ;

[0117] From the standardized valid dataset D of the t-th T1 period edge Extract three core quantization features from (t) for working condition matching:

[0118] The relative change rate of total phosphorus in influent, rP(t), is calculated using the following formula:

[0119] ;

[0120] Water quality co-change rate The formula is as follows:

[0121] ;

[0122] Total phosphorus fluctuation coefficient in effluent First, calculate the average total phosphorus content in the effluent for two consecutive cycles:

[0123] ;

[0124] Standard deviation:

[0125] ;

[0126] Recalculate:

[0127] .

[0128] The calculation is complete. The feature validity marker is bound to the current T1 cycle identifier t to generate the t-th T1 cycle operating condition feature set. ;

[0129] Retrieve the preset working condition matching rule library, including the following:

[0130] The specific judgment thresholds for the three types of abnormal operating conditions (significant fluctuations in effluent, sudden increase in total phosphorus in influent, and abrupt changes in water quality coupling) are as follows (e.g., significant fluctuations in effluent: And this condition is met for three consecutive T1 periods);

[0131] The comprehensive fluctuation score range for four normal operating conditions (L0-L3) (L0: S(t)≤5%, L1: 5%) <S(t)≤20%、L2:20%<S(t)≤50%、L3:50%<S(t)≤80%);

[0132] The process preset operating condition matching priority (abnormal operating condition > severe fluctuation L3 > moderate fluctuation L2 > slight fluctuation L1 > no fluctuation L0);

[0133] Entropy weight method scoring parameters (constant k = 1 / ln2, sample size is 2);

[0134] Abnormal operating conditions are prioritized: based on the operating condition matching priority, first... The three feature values ​​are compared one by one with the judgment thresholds for three types of abnormal operating conditions. The judgment order is: large fluctuation in effluent → sudden increase in total phosphorus in influent → sudden change in water quality coupling. If any abnormal operating condition is matched, the current operating condition is directly marked as the corresponding abnormality identifier. (If the water level fluctuates significantly, mark it as) If no abnormal operating conditions are matched, the subsequent normal operating condition matching will be terminated; if no abnormal operating conditions are matched, the normal operating condition level matching will begin.

[0135] Comprehensive scoring and rating matching under normal operating conditions: using the entropy weight method. The three feature values ​​are used to make a comprehensive score. The steps are as follows:

[0136] Standardization process: for Perform 0-1 normalization;

[0137] Entropy weighting: Calculate the probability percentage of each feature. Information entropy Weight (satisfy );

[0138] Overall Score and Grade Matching: Calculating the Overall Fluctuation Score By comparing the scoring ranges in the rule base, the corresponding normal operating condition level is matched. (L0 / L1 / L2 / L3);

[0139] If the feature validity is marked as downgraded, the currently matched normal operating condition level will be upgraded by 1 level (e.g., L1 will be upgraded to L2, while L3 will remain unchanged) to ensure the conservatism of parameter retrieval and avoid the risk of compliance failure caused by sudden changes in water quality; if it is marked as normal, the matched operating condition level will remain unchanged.

[0140] Operating condition result confirmation: Integrate the above processing results to determine the final operating condition matching result for the t-th T1 cycle. It synchronously records the complete basis for matching working conditions (feature values, threshold comparison results, scoring calculation process, and correction status).

[0141] In this embodiment, the expert parameter group is obtained through the following method:

[0142] Parameter subset targeted retrieval: based on Types, from (The preset expert experience parameter set for the current effective version includes normal operating conditions (L0-L3): the corresponding parameter set for each level) Core dosing parameters and abnormal operating conditions (3 types): For each abnormal type, the emergency dosage and emergency correction parameters (with higher priority than normal operating condition parameters) are precisely retrieved from a unique subset of parameters, with no redundant or missing parameters, and the retrieval rules are public and clear.

[0143] Abnormal operating conditions Based on the specific type of anomaly, retrieve the corresponding emergency dosage (e.g., retrieve the maximum safe dosage if total phosphorus in the influent suddenly increases) and emergency correction parameters (α correction value adapted to the abnormal operating conditions) to ensure the rationality of emergency dosing.

[0144] Normal operating conditions : Retrieve the corresponding level The core dosing parameters have values ​​that correspond one-to-one with the operating condition level, with no cross-calling.

[0145] Parameter version and operating condition binding: The retrieved subset of parameters is bound to the current T1 cycle identifier t and the final operating condition. The working condition matching criteria are linked and bound to clarify the applicable period and applicable working conditions of the parameters to prevent parameter confusion and misuse across periods;

[0146] Standardized encapsulation: Based on the calling requirements of subsequent calculation modules, the associated subset of parameters is encapsulated into a standardized calculation parameter package. The parameter format and naming conventions are fully compatible with the calculation logic of subsequent steps and can be directly called by the calculation modules of subsequent steps without additional format conversion.

[0147] Log and traceability record generation: Generate parameter retrieval process log Record in detail the retrieval time, cycle identifier t, and operating conditions. Parameter library version The system retrieves detailed parameters, parameter binding information, and encapsulation results; it also generates a traceability record of the correlation between operating conditions and parameters to ensure that the retrieval of each parameter has a clear basis, is traceable, and verifiable.

[0148] In this embodiment, generating the initial values ​​for agent dosing for the current edge-side real-time control cycle based on the effective edge-side dataset and expert parameter group includes:

[0149] Calculated using the total phosphorus dosage formula:

[0150] ;

[0151] This represents the initial value for drug dosage in the t-th T1 cycle; This is the total phosphorus correction factor; This represents the difference between the total phosphorus concentration in the influent and the target value for the process. γ is the influent flow rate; β is the COD coupling coefficient; COD is the influent COD concentration; γ is the SS coupling coefficient; SS is the influent SS concentration; δ is the basic dosage compensation amount.

[0152] First, calculate the difference (ΔP) between the total phosphorus concentration in the influent and the process target value. The formula is: difference = total phosphorus concentration in the influent - process target value. If the difference is negative (total phosphorus in the influent is lower than the target value), then take the difference as 0 to avoid negative dosage.

[0153] The initial value of the drug dosage in the t-th T1 cycle is calculated using the above formula.

[0154] In this embodiment, the optimization process for the initial drug dosage in the current edge-side real-time control cycle to obtain the optimal dosage in the current edge-side real-time control cycle includes:

[0155] The water quality fluctuation level and comprehensive fluctuation score are generated based on the effective edge-side dataset of the current edge-side real-time control cycle.

[0156] In this embodiment, the generation of water quality fluctuation level and comprehensive fluctuation score based on the effective edge-side dataset of the current edge-side real-time control cycle includes:

[0157] The relative change rate of total phosphorus concentration in the influent is obtained based on the total phosphorus concentration in the influent during the current real-time control cycle on the edge side and the total phosphorus concentration in the effluent during the previous real-time control cycle on the edge side (the formula is the same as above and will not be repeated here).

[0158] The total phosphorus concentration fluctuation coefficient of the effluent is generated based on the total phosphorus concentration of the effluent in the current real-time control cycle of the edge side and the total phosphorus concentration of the effluent in the previous real-time control cycle of the edge side (the formula is the same as above and will not be repeated here).

[0159] The water quality synergistic change rate is generated based on the influent COD concentration, SS concentration, and COD and SS concentration of the previous edge side real-time control cycle.

[0160] In this embodiment, the water quality co-change rate is obtained using the following formula:

[0161] .

[0162] The water quality fluctuation level and comprehensive fluctuation score are generated based on the relative change rate of total phosphorus concentration in the influent, the fluctuation coefficient of total phosphorus concentration in the effluent, and the water quality synergistic change rate.

[0163] In this embodiment, the water quality fluctuation level and comprehensive fluctuation score are generated based on the relative change rate of total phosphorus concentration in the influent, the fluctuation coefficient of total phosphorus concentration in the effluent, and the synergistic change rate of water quality.

[0164] right Perform 0-1 normalization to eliminate dimensional differences;

[0165] The overall volatility score is obtained using the following formula:

[0166] ;

[0167] Where x is the normalized influent total phosphorus change rate; y is the normalized effluent total phosphorus fluctuation coefficient; z is the normalized water quality synergistic change rate; and S is the comprehensive fluctuation score (0-100 points).

[0168] Water quality fluctuation level classification:

[0169] L0 (no fluctuation): S≤10

[0170] L1 (Slight fluctuation): 10 <S≤30

[0171] L2 (moderate fluctuation): 30 <S≤60

[0172] L3 (severe fluctuation): S>60.

[0173] The operating condition baseline step size, compliance safety distance coefficient, gradient decay coefficient, estimated step size for each round, and initial predicted effluent concentration are generated based on water quality fluctuation level, comprehensive fluctuation score, and initial chemical dosing value.

[0174] In this embodiment, the process of generating the baseline step size, compliance safety distance coefficient, gradient decay coefficient, estimated step size for each round, and initial predicted effluent concentration based on water quality fluctuation level, comprehensive fluctuation score, and initial reagent dosage includes:

[0175] Obtain a preset volatility level-correction coefficient mapping table, which includes multiple volatility levels and the correction coefficient corresponding to each volatility level;

[0176] Table 1 below is a preset fluctuation level-correction coefficient mapping table:

[0177] ;

[0178] The corresponding correction coefficient is obtained from the preset fluctuation level-correction coefficient mapping table based on the obtained water quality fluctuation level; for example, if the fluctuation level is L2, the correction coefficient 1.3 is directly retrieved; if the fluctuation level is L0, the correction coefficient 1.0 is directly retrieved.

[0179] The baseline step size for the operating condition is calculated using the base coefficients of the greedy algorithm and the grade correction coefficients. The specific formula is as follows:

[0180] ;

[0181] in, This is the reference step size for the operating condition; The base coefficient for the greedy algorithm (a fixed value preset by the process, such as 0.5 mg / L); The fluctuation level corresponds to the correction factor.

[0182] Obtain a preset prediction model for total phosphorus removal efficiency on the edge side;

[0183] In this embodiment, the prediction model for total phosphorus removal efficiency on the edge side is a lightweight multilayer perceptron (MLP) regression model with a 4-layer structure, as follows:

[0184] Input layer:

[0185] Key parameters: The number of neurons in the input layer is fixed at 8, corresponding one-to-one with the 8 input features, with no redundant neurons; the neuron activation mode is linear activation (without non-linear transformation), only completing the dimensional mapping and numerical alignment of the features.

[0186] Input features and neuron mapping: 8 neurons are bound to the following features (1 neuron corresponds to 1 feature):

[0187] Neuron 1: Initial drug dosage (mg / L);

[0188] Neuron 2: Total phosphorus concentration in influent during the current cycle (mg / L);

[0189] Neuron 3: Current influent COD concentration (mg / L);

[0190] Neuron 4: Current cycle influent SS concentration (mg / L);

[0191] Neuron 5: Current cycle influent flow rate (m³ / h);

[0192] Neuron 6: Relative change rate of total phosphorus concentration in influent (dimensionless, normalized).

[0193] Neuron 7: Fluctuation coefficient of total phosphorus concentration in effluent (dimensionless, normalized).

[0194] Neuron 8: Co-variance rate of water quality (dimensionless, normalized).

[0195] Numerical alignment processing: The input layer performs min-max normalization on the original feature values ​​received by the 8 neurons, mapping all features to the [0,1] interval to eliminate dimensional differences; the maximum / minimum values ​​of the features are fixed values ​​pre-calibrated based on historical data during the cloud training stage, which can be directly reused during edge inference without real-time calculation.

[0196] The input layer outputs an 8-dimensional feature vector (8×1 dimension), which is directly fed into the feature fusion layer without any feature filtering or discarding.

[0197] Feature fusion layer:

[0198] Core parameters: The feature fusion layer has 16 neurons, adopts a two-layer operation structure of fully connected + feature cross, and uses ReLU (corrected linear unit) as the activation function to extract nonlinear correlations between multiple features.

[0199] Operational logic: First, the 8-dimensional feature vector output from the input layer is mapped to 16-dimensional initial fused features through a fully connected matrix (8×16 dimensions), with the matrix weights being optimizable parameters learned during model training. Second, feature cross-operation is performed on the 16-dimensional initial fused features, and then the cross-features are compressed back to 16 dimensions through a dimension compression matrix (120×16 dimensions) to strengthen the potential correlation between features. Third, ReLU activation is performed on the compressed 16-dimensional features to suppress negative and ineffective features and retain positive and effective correlated features.

[0200] Output format: Output a 16-dimensional fused feature vector (dimension 16×1), with no dimension loss, and directly pass it into the first hidden layer.

[0201] First hidden layer (main feature extraction layer):

[0202] Key parameters: 32 neurons, fully connected structure, activation function is Leaky-ReLU (with leakage correction linear unit).

[0203] Operational logic: First, the 16-dimensional feature vector output by the feature fusion layer is mapped to 32-dimensional primary features through a fully connected matrix (dimension 16×32); Second, Leaky-ReLU activation is performed on the 32-dimensional primary features to retain the effective information of weakly negative features; Third, Dropout regularization is performed (dropout rate is fixed at 0.2), randomly discarding 20% ​​of the neuron outputs to avoid model overfitting.

[0204] Output a 32-dimensional primary feature vector (32×1 dimension) and pass it into the second hidden layer.

[0205] Second hidden layer (fine feature optimization layer):

[0206] Key parameters: 16 neurons, fully connected structure, activation function is ELU (Exponential Linear Unit), to further improve the accuracy of nonlinear fitting while avoiding gradient explosion.

[0207] Operational logic: First, the 32-dimensional feature vector output from the first hidden layer is mapped to 16-dimensional fine features through a fully connected matrix (32×16 dimensions); Second, ELU activation is performed on the 16-dimensional fine features to smooth the gradient changes of negative features; Third, L2 regularization is performed (the regularization coefficient is fixed at 0.001) to constrain the numerical range of the weight parameters and prevent the parameters from being too large, which would lead to a decrease in the model's generalization ability.

[0208] Output a 16-dimensional fine feature vector (dimension 16×1) and feed it into the output layer.

[0209] Output layer:

[0210] Core parameters: 1 neuron, linear activation function.

[0211] Operational logic: First, the 16-dimensional feature vector output from the second hidden layer is mapped to a 1-dimensional original predicted value (normalized to the [0,1] interval) through a fully connected matrix (dimension 16×1); Second, the original predicted value is inversely normalized, and the calculation formula is: Effluent total phosphorus predicted value = original predicted value × (actual effluent total phosphorus maximum value - actual effluent total phosphorus minimum value) + actual effluent total phosphorus minimum value; where the actual effluent total phosphorus maximum / minimum value is a fixed value calibrated based on historical data during the cloud training stage (e.g., maximum value 5mg / L, minimum value 0.01mg / L), which is directly reused on the edge side.

[0212] The output effluent total phosphorus prediction value (mg / L) (e.g., 0.45 represents a predicted effluent total phosphorus concentration of 0.45 mg / L) is directly used for subsequent steps on the edge side without any intermediate conversion process.

[0213] The model training process is as follows:

[0214] Training data acquisition and preprocessing:

[0215] Data collection: Collect T1 cycle operation data for 6 consecutive months at the edge of the wastewater treatment plant in the cloud. The data for each cycle includes the raw values ​​of 8 input features and the actual total phosphorus concentration in the effluent (directly used as training labels). The total sample size is ≥10,000. There is no need to calculate the removal efficiency. The label is directly the actual total phosphorus concentration in the effluent (mg / L).

[0216] Remove the following outlier samples:

[0217] Sensor malfunction causing empty characteristic values / actual effluent total phosphorus values / samples exceeding the reasonable range of the process (e.g., effluent total phosphorus > 5 mg / L or < 0.01 mg / L).

[0218] Samples from abnormal operating conditions such as interrupted drug dosing or equipment shutdown; the percentage of valid samples after screening is ≥95%.

[0219] Data partitioning: The effective samples are divided into training set (70%), validation set (20%), and test set (10%) in a ratio of 7:2:1. When partitioning, the distribution ratio of each working condition (no fluctuation / small fluctuation / moderate fluctuation / severe fluctuation) is consistent in the three datasets.

[0220] Feature preprocessing:

[0221] Calculate the historical minimum and maximum values ​​for each of the 8 input features, and perform min-max normalization (mapped to [0,1]).

[0222] The labels (actual total phosphorus concentration in the effluent) are also subjected to min-max normalization (mapped to the [0,1] interval) to facilitate model training;

[0223] Perform "outlier truncation" on the normalized features / labels, forcibly correcting extreme values ​​outside the [0,1] range to 0 or 1.

[0224] Iterative training in the cloud:

[0225] Initialization parameters: Randomly initialize the weights of each fully connected matrix of the model (following a normal distribution, mean 0, standard deviation 0.01) and the bias term (initial value 0); Set the training hyperparameters: batch size = 64, learning rate = 0.001, number of iterations = 200, optimizer is Adam.

[0226] Positive communication training:

[0227] The training set samples are input into the model in batches, and the forward operation of input layer → feature fusion layer → double hidden layer → output layer is completed batch by batch to obtain the "normalized total phosphorus prediction value of effluent" of the samples in the batch.

[0228] The batch loss value is calculated using mean squared error (MSE) as the loss function.

[0229] Backpropagation optimization:

[0230] The gradients of the weights and biases of each layer are calculated based on the loss value using the chain rule.

[0231] The Adam optimizer is used to update parameters (adaptive learning rate adjustment, first moment estimation decay rate = 0.9, second moment estimation decay rate = 0.999) to gradually reduce the loss value;

[0232] Every 10 iterations, the MSE of the current model is calculated using the validation set, and the validation set loss value is recorded.

[0233] Early stopping mechanism trigger: If the validation set loss value does not decrease for 20 consecutive iterations (fluctuation range < 0.001), training is immediately terminated, and the model parameters of the current iteration (i.e., "optimal model parameters") are saved to avoid overfitting.

[0234] Model accuracy verification and optimization:

[0235] Accuracy verification: Input the test set samples into the optimal model, output the inverse normalized predicted total phosphorus value in the effluent, and calculate the core evaluation indicators of the test set:

[0236] Mean square error (MSE) ≤ 0.01 (mg / L)²;

[0237] The coefficient of determination (R²) should be ≥0.9 (the closer R² is to 1, the higher the prediction accuracy). If the target is not met, readjust the hyperparameters (such as the learning rate and the number of neurons in the hidden layer) and repeat the training process until the target is met.

[0238] Lightweight optimization:

[0239] Weight pruning: Remove redundant parameters with absolute weight values ​​less than 0.001 to reduce the number of model parameters;

[0240] Quantization compression: Reduce the floating-point precision of the model parameters from 32 bits (FP32) to 16 bits (FP16) to reduce the model size (<10MB after compression).

[0241] Operator fusion: The fully connected layer and feature cross-operation of the feature fusion layer are fused into a single operator, reducing the computational steps during inference.

[0242] The initial value of the reagent dosage is input into the edge-side total phosphorus removal efficiency prediction model to obtain the predicted value of total phosphorus in the effluent;

[0243] The basic compliance safety distance coefficient is calculated based on the difference between the predicted total phosphorus value in the effluent and the preset compliance threshold.

[0244] In this embodiment, the basic compliance safety distance coefficient is calculated based on the difference between the predicted total phosphorus value in the effluent and the preset compliance threshold, including:

[0245] The initial predicted effluent concentration is calculated using the following formula:

[0246] ;

[0247] in, This is the initial predicted effluent concentration; The total phosphorus concentration in the influent during the current real-time control cycle at the edge side; The total phosphorus removal efficiency is denoted as .

[0248] The basic compliance safety distance coefficient is calculated using the following formula:

[0249] ;

[0250] in, The basic safety distance coefficient for compliance; This is the initial predicted effluent concentration; Set a threshold for total phosphorus compliance in the process (fixed value, e.g., 0.5 mg / L).

[0251] Obtain the water quality co-change rate (which has already been obtained above and will not be repeated here);

[0252] The final compliance safety distance coefficient is generated based on the basic compliance safety distance coefficient and the water quality co-change rate.

[0253] The specific formula for the final safety distance coefficient is as follows:

[0254] ;

[0255] in, The final safety distance coefficient; The basic safety distance coefficient for compliance; The rate of change in water quality;

[0256] The greedy algorithm generates the amount of feed per round of bottoming out based on the final safety distance coefficient to generate the current edge-side real-time control cycle.

[0257] In this embodiment, the amount of feed added in each round of bottom-finding by the greedy algorithm that generates the current edge-side real-time control cycle based on the final safety distance coefficient includes:

[0258] Set the gradient decay coefficient as follows:

[0259] L0 (no fluctuation), L1 (small fluctuation): Gradient decay coefficient = 1.0 (no decay, stable step size).

[0260] L2 (moderate variability): Gradient decay coefficient = 0.9 (slight decay to avoid excessively large step size);

[0261] L3 (Severe fluctuation): Gradient attenuation coefficient = 0.8 (moderate attenuation to ensure compliance with safety standards).

[0262] Calculate the estimated step size for each round:

[0263] ;

[0264] in, Estimate the step size for each round; This is the reference step size for the operating condition; This is the gradient decay coefficient.

[0265] Calculate the amount of injection during each bottoming-out phase in the current cycle:

[0266] ;

[0267] in, The greedy algorithm for the current edge-side real-time control cycle determines the bottoming-out injection amount in each round; Estimate the step size for each round; This is the final safe distance coefficient to meet the standard.

[0268] Based on the operating condition baseline step size, the compliance safety distance coefficient, the gradient decay coefficient, the estimated value of each round step size, and the initial predicted effluent concentration, a variable step size multi-round gradient bottoming and critical dosage locking process is performed to obtain the initial value of the critical dosage and the corresponding predicted effluent concentration.

[0269] The process of performing variable-step, multi-round gradient bottom-finding and critical dosage locking based on the operating condition baseline step size, the compliance safety distance coefficient, the gradient decay coefficient, the estimated value of each round step size, and the initial predicted effluent concentration to obtain the initial value of the critical dosage and the corresponding predicted effluent concentration includes:

[0270] The greedy algorithm bottom-finding full parameter initialization is performed based on the working condition baseline step size, the standard safety distance coefficient, the gradient decay coefficient, the estimated step size for each round, and the initial predicted effluent concentration, thereby obtaining the greedy algorithm bottom-finding initialization parameter set;

[0271] In this embodiment, all parameters calculated in the preceding steps are directly retrieved: operating condition baseline step size, final compliance safety distance coefficient, gradient decay coefficient, estimated step size for each round, initial predicted effluent concentration, and initial value of reagent addition.

[0272] Add the following fixed parameters preset in the process: total number of bottom-testing rounds (fixed to 3 rounds, balancing efficiency and reliability, no need for dynamic adjustment), total phosphorus compliance threshold, and lower limit of dosage;

[0273] Categorized and integrated into a greedy algorithm bottom-finding initialization parameter set based on parameter type, specifically including:

[0274] Step size parameters: baseline step size, estimated step size per round, gradient decay coefficient;

[0275] Safety parameters: final compliance safety distance coefficient, total phosphorus compliance threshold;

[0276] Dosing parameters: initial dosage of the agent, lower limit of dosage;

[0277] Control parameters: total number of bottom exploration rounds (3 rounds), initial predicted effluent concentration.

[0278] Based on the initialized greedy algorithm bottom-finding full parameter set, the round-level variable step size gradient bottom-finding calculation of the current edge side real-time control cycle is performed to obtain the candidate dosage for the last effective round and the predicted total phosphorus value of the effluent corresponding to the candidate dosage.

[0279] Specifically, the initial settings for bottoming out are as follows: the initial value of the chemical dosage is used as the candidate dosage for the first round, and the initial predicted effluent concentration is used as the predicted value for the first round of candidate effluent.

[0280] Round iteration rules (fixed 3 rounds, consistent logic in each round, no complex changes):

[0281] First round of bottoming out: Candidate dosage = initial value of reagent dosage - estimated value of step size per round; substitute into the previous model to calculate the predicted value of candidate effluent in the first round;

[0282] Second round of bottoming out: Candidate injection amount = First round candidate injection amount - (Estimated step size per round × gradient decay coefficient); Similarly, substitute into the model to calculate the predicted value of the second round candidate water discharge;

[0283] Third round of bottoming out: Candidate injection amount = Second round candidate injection amount - (Estimated step size per round × gradient decay coefficient²); Substitute into the model to calculate the predicted value of the third round candidate water discharge;

[0284] Valid round determination:

[0285] After each round of bottom-out, the candidate effluent predicted value is determined to be less than or equal to the total phosphorus compliance threshold, and the candidate dosage is greater than or equal to the lower limit of the dosage.

[0286] If the above conditions are met in a certain round, the subsequent bottoming process should be stopped immediately (it is not necessary to complete all 3 rounds), and that round is the last valid round.

[0287] If all three rounds meet the requirements, the third round is taken as the last valid round; if none of the three rounds meet the requirements, the third round is taken as the last valid round (subsequent adjustments are possible, this scheme only locks the initial value).

[0288] Output the candidate dosage for the last effective round and the corresponding predicted total phosphorus value in the effluent.

[0289] Based on the candidate dosage in the last effective round and the predicted total phosphorus in the effluent corresponding to the candidate dosage, the initial value of the critical dosage for bottoming out and the corresponding predicted effluent concentration are generated by the greedy algorithm in the current edge-side real-time control cycle.

[0290] Specifically, the initial value of the critical injection amount is: the candidate injection amount of the last effective round is directly used as the initial value of the critical injection amount for the greedy algorithm to bottom out in the current cycle;

[0291] Corresponding predicted effluent concentration: The predicted total phosphorus value of the candidate effluent from the last effective cycle is directly used as the predicted effluent concentration corresponding to the initial value of the critical dosage, and is bound one-to-one with the initial value of the critical dosage.

[0292] Result verification: Determine whether the initial critical dosage value is between the lower limit of dosage and the initial dosage value of the reagent. If it is within the range, output directly; if it is outside the range, take the lower limit of dosage as the initial critical dosage value (to avoid ineffective dosage), and substitute the corresponding predicted effluent concentration into the model for calculation based on the lower limit of dosage.

[0293] The final candidate dosage set is generated based on the initial critical dosage value and the corresponding predicted effluent concentration;

[0294] The final candidate dosage set, generated and sorted according to the initial critical dosage value and the corresponding predicted effluent concentration, includes:

[0295] Generate multi-scale neighborhood configuration parameters based on the initial value of the critical dosage;

[0296] Specifically, a fixed-scale multi-scale configuration is adopted, and the initial value of the critical dosage is directly used as the benchmark to calculate the neighborhood step size of three fixed scales, forming the multi-scale neighborhood configuration parameters:

[0297] Small-scale neighborhood step size = initial critical dosage value × 1%

[0298] Mesoscale neighborhood step size = initial critical dosage value × 3%

[0299] Large-scale neighborhood step size = initial critical dosage value × 5%

[0300] The above three fixed step sizes are the multi-scale neighborhood configuration parameters for this bottoming process.

[0301] An initial candidate dosing quantity set is generated based on multi-scale neighborhood configuration parameters;

[0302] Specifically, using the initial critical dosage value as the center, the system expands upwards and downwards through basic addition and subtraction operations to directly generate an initial candidate dosage set without complex combinational logic.

[0303] Downward neighbor candidate values:

[0304] Initial value of critical dosage − large-scale neighborhood step size;

[0305] Initial critical dosage - mesoscale neighborhood step size;

[0306] Initial critical dosage - small-scale neighborhood step size;

[0307] Central candidate value: Initial value of critical dosage;

[0308] Upward neighborhood candidate value: initial value of critical dosage + small-scale neighborhood step size;

[0309] Initial critical dosage + mesoscale neighborhood step size;

[0310] Initial critical dosage + large-scale neighborhood step size;

[0311] The sum of these 7 values ​​gives us the initial candidate dosage set.

[0312] The initial candidate dosage set is subjected to a two-layer process constraint candidate value screening and sorting to obtain the final candidate dosage set after sorting.

[0313] Specifically, a two-layer process with hard constraints is used for screening, followed by ascending sorting:

[0314] (1) First layer of constraint: Initial screening of process dosage range

[0315] Values ​​in the initial candidate set that do not meet the physical constraints of the process are removed:

[0316] Remove values ​​that are less than the minimum dosage of the drug;

[0317] Values ​​exceeding the maximum dosage of the reagent are discarded, while candidate values ​​within the upper and lower limits of the process are retained.

[0318] (2) Second layer of constraints: Initial screening for effluent compliance constraints:

[0319] Substitute the candidate values ​​retained in the first layer into the model to calculate the predicted effluent concentration corresponding to each candidate value, and retain only the candidate values ​​whose predicted effluent concentration is ≤ total phosphorus effluent compliance threshold.

[0320] (3) Sort to generate the final set:

[0321] The remaining candidate values ​​that meet the criteria after two layers of screening are sorted in ascending order of the dosage value from smallest to largest. The sorted set is the final candidate dosage set after sorting.

[0322] The final candidate dosage set after sorting is subjected to bi-objective dynamic weighted optimization to obtain the final candidate dosage set.

[0323] The step of performing bi-objective dynamic weighted optimization on the sorted final candidate dosage set to obtain the final candidate dosage set includes:

[0324] Construct a dual-objective optimization function and obtain a preset dual-objective quantization table of candidate values;

[0325] In this embodiment, the bi-objective optimization function is as follows:

[0326] ;

[0327] Where F(x) is the total bi-objective optimization score of the candidate dosage x (the higher the score, the better). The weighting of cost targets (determined by the level of water quality fluctuations and dynamically adjusted); Weights for water quality targets ( =1− ); Quantify the cost target score for candidate dosage amount x; Quantify the water quality target score for candidate dosage x;

[0328] The preset candidate value bi-objective quantization table is as follows:

[0329] Cost Target Quantification Table (the smaller the amount added, the higher the score):

[0330] ;

[0331] Water quality target quantification table (the closer the effluent concentration is to the compliance threshold, the higher the score):

[0332] ;

[0333] Based on the water quality fluctuation level, a dual-objective dynamic weight set, the optimal dosage, and the predicted total phosphorus value in the effluent corresponding to the optimal dosage are generated.

[0334] Specifically, a dual-objective dynamic weight set is generated:

[0335] A preset fluctuation level-weight mapping table is used to directly match and obtain the weights, which constitutes the dynamic weight set for the two objectives:

[0336] ;

[0337] Calculate the total optimization score for each candidate dosage:

[0338] For each value in the sorted final candidate dosage set, perform the following operation:

[0339] Substitute the candidate value into the model to calculate the predicted total phosphorus value in the effluent.

[0340] By referring to the dual-objective quantification table, obtain the cost quantification score for each. Water quality score ;

[0341] The optimization total score F(x) is calculated using a dynamic weight set.

[0342] Determine the optimal dosage and corresponding predicted effluent values:

[0343] Optimal dosage: Select the candidate dosage with the highest optimization total score F(x) (if multiple scores are the same, select the one with the smallest dosage).

[0344] The predicted total phosphorus value in the effluent is the effluent concentration calculated by substituting the optimal dosage into the model.

[0345] Sort all candidate injection quantities from high to low according to the total optimization score F(x) (if the total scores are the same, the injection quantity with the smaller injection quantity is ranked first). The sorted set is the final candidate injection quantity set after bi-objective optimization.

[0346] In this embodiment, the actual dosage fed back by the dosing device after dosing the drug according to the optimal dosage of the current edge-side real-time control cycle includes:

[0347] Edge nodes will have the optimal dosage The control commands are converted into control instructions for the drug dosing execution unit (such as the operating frequency and stroke of the precision metering pump), which drive the execution unit to do the drug dosing according to the specified values.

[0348] After the addition is completed, the actual total phosphorus concentration in the effluent for the current cycle is collected. (included) (Update) Record the actual amount added. (When the equipment is fault-free) Consistent);

[0349] Deviation calculation: based on predicted total phosphorus concentration in effluent And the ones collected this time Calculate the prediction deviation of the dosage effect. .

[0350] In this embodiment, every time a T2 cycle is reached (e.g., the j-th T2, which includes data from t=60j to t=60j−59 of T1), the actual dosage, the optimal dosage for the current edge-side real-time control cycle, and the effective edge-side dataset for the current edge-side real-time control cycle are sent to the cloud terminal.

[0351] In this embodiment, the cloud terminal updates the global cloud database and generates an incremental parameter package to be distributed based on the actual deployment amount, optimal deployment amount, and effective edge data set obtained between the current edge cloud data synchronization cycle and the next edge cloud data synchronization cycle.

[0352] Cloud-based T2 periodic data aggregation and incremental updates:

[0353] The cloud receives T2 periodic data packets from the edge. ,Will After parsing, the data is appended to the global cloud database according to the time dimension. .

[0354] Specifically, analysis Extract core fields (timestamp, edge node ID, dosage, effluent concentration, fluctuation level) and append them to the time dimension. .

[0355] examine (Does the cloud-based benchmark parameter library (standard parameter library symbols, storing core benchmark parameters for all operating conditions: fluctuation level-correction coefficient mapping table, total phosphorus removal model coefficients, upper and lower limits of dosage, basic coefficient k of the greedy algorithm, etc.) exist for the global optimization update generated in the d-th T3 cycle (i.e.) Does it exist? (The superscript opt ​​indicates after optimization).

[0356] If updates exist, extract. and The differences are packaged into ΔUpdate(j);

[0357] If no update is available ( (This is the standard empty set symbol, indicating no incremental parameter).

[0358] Cloud-based delivery: Push ΔUpdate(j) to the corresponding edge node via standard communication protocol;

[0359] Every time the d-th T3 cycle is reached (d∈ , (This is a standard set of positive integer symbols), and the T3 period has already aggregated data from 24 consecutive T2 periods.

[0360] Global optimization: Employing a particle swarm optimization algorithm, the goal is to maximize the effluent compliance rate while minimizing the reagent dosage. The core parameter (fluctuation level correction coefficient) The model coefficients for total phosphorus removal (β, etc.) were refitted, and the optimization formula is as follows:

[0361] ;

[0362] In the formula, Obj is the optimization objective ( ω1 / ω2 are fixed weights. To ensure the effluent meets standards, (This refers to the average dosage).

[0363] Coefficient optimization: based on Using the full dataset, calculate the basic coefficients of the optimal greedy algorithm under each working condition to form a globally optimal coefficient set:

[0364] ;

[0365] In the formula, m is the number of working conditions, and ki′ is the optimal greedy coefficient for the i-th working condition.

[0366] Finally, obtain the globally optimized cloud-based benchmark parameter library. .

[0367] This application has the following advantages:

[0368] The edge-side total phosphorus removal efficiency prediction model adopts a 4-layer lightweight MLP structure. Through optimization methods such as weight pruning, 16-bit floating-point quantization, and operator fusion, the model size is compressed to less than 10MB. Redundant parameters and computational steps are eliminated to avoid computational delay caused by insufficient computing power at edge nodes. It can complete fast inference within a 1-minute T1 real-time control cycle and is fully compatible with the hardware performance of industrial edge controllers.

[0369] All core edge-side operations (fluctuation scoring, gradient bottoming, candidate set optimization, etc.) use basic mathematical operations and fixed rule judgments, without complex iterations and gradient solving. The optimization process can be completed in just 3 rounds of gradient bottoming. While ensuring optimization accuracy, it minimizes the computational load on the edge side and improves the output efficiency of control commands.

[0370] The prediction model's input layer uses linear activation and fixed-value normalization. During edge-side inference, the pre-calibrated maximum / minimum values ​​in the cloud are directly reused, eliminating the need for real-time calculation of normalization parameters. This reduces the computational steps in a single inference and further shortens the model's output time.

[0371] The comprehensive water quality fluctuation score uses the Euclidean distance method to quantify the multi-feature coupled fluctuation. Compared with the traditional linear weighting method, it can more accurately reflect the actual situation of the coordinated fluctuation of multiple indicators such as total phosphorus in the influent, total phosphorus in the effluent, COD+SS, etc., and avoid the quantitative deviation caused by excessive weight of a single indicator. The fluctuation level classification has a higher degree of matching with the actual working conditions.

[0372] The operating condition determination adopts a two-layer rule of prioritizing abnormal operating conditions and downgrading the effectiveness of features. Abnormal operating conditions such as large fluctuations in effluent and sudden increases in total phosphorus in influent are first identified, and then normal fluctuation levels are matched. When features are invalid, the operating condition level is automatically upgraded. This ensures rapid identification of abnormal operating conditions and avoids compliance risks caused by sudden changes in water quality through conservative parameter retrieval, thus adapting to the on-site characteristics of sudden fluctuations in water quality at wastewater treatment plants.

[0373] The operating condition feature extraction selects only three core quantitative features: the relative change rate of total phosphorus in the influent, the fluctuation coefficient of total phosphorus in the effluent, and the coordinated change rate of water quality. Redundant water quality parameters are eliminated. While ensuring the accuracy of operating condition identification, the amount of data collection and calculation is reduced, and the impact of sensor failure on operating condition judgment is reduced.

[0374] The entire optimization process, from initial value calculation to gradient exploration, candidate set generation, and critical value locking, is embedded with hard boundary constraints of the wastewater treatment plant process: during initial value calculation, the difference between the total phosphorus in the influent and the process target value is processed to avoid negative dosage; during the gradient exploration and candidate set screening, invalid values ​​below the lower limit of dosage and above the upper limit of dosage are eliminated; the critical dosage is checked for range, and the lower limit of the process is automatically taken when it exceeds the range. All calculation results are reasonable values ​​that can be executed in industrial settings, and there are no theoretically invalid solutions.

[0375] The candidate dosage set is screened using a two-layer process with hard constraints. First, the physical dosage range is screened, and then the water quality compliance threshold is screened. This greatly reduces the computational load of subsequent dual-objective optimization, and the final candidate set consists of dosages that meet the standards and are executable, thus avoiding the decoupling of optimization results from the actual process.

[0376] The weight set of the dual-objective optimization is dynamically adjusted according to the level of water quality fluctuation. When there is no fluctuation or a small fluctuation, the focus is on minimizing the cost of reagents. When there is moderate or severe fluctuation, the focus is on achieving the effluent compliance. Instead of using fixed weights, the control objectives of compliance priority and cost optimization are dynamically switched under different operating conditions, which is suitable for the characteristics of multi-scale and strong fluctuation of influent water quality in sewage treatment plants.

[0377] The step size attenuation coefficient of gradient bottom exploration is directly linked to the fluctuation level. The more violent the fluctuation, the more obvious the step size attenuation. This can avoid the effluent exceeding the standard due to excessive bottom exploration step size when the water quality fluctuates greatly. In the optimization process, bottom exploration efficiency and compliance safety are taken into account, achieving a balance between conservatism and efficiency in directional optimization.

[0378] A three-tiered cycle (T1 / T2 / T3) is adopted for edge-cloud collaboration. The T1 cycle on the edge side is responsible for real-time control, the T2 cycle is responsible for data aggregation and incremental parameter synchronization, and the T3 cycle on the cloud side is responsible for global optimization. The three have clear division of labor and matching time scales, which not only ensures the real-time control on the edge side, but also provides sufficient full data support for global optimization on the cloud side, avoiding "optimization lag" or "data redundancy" caused by cycle mismatch.

[0379] This application also provides a smart control method for total phosphorus in wastewater treatment plants based on edge-cloud collaboration, the smart control method for total phosphorus in wastewater treatment plants based on edge-cloud collaboration includes:

[0380] Obtain the valid edge-side dataset for the current edge-side real-time control cycle and the local parameter library transmitted from the cloud for the current edge-cloud data synchronization cycle;

[0381] Based on the effective edge-side dataset of the current edge-side real-time control cycle and the local parameter library transmitted from the cloud in the current edge-cloud data synchronization cycle, the current operating condition label and expert parameter group are generated.

[0382] The initial values ​​for agent dosing in the current edge-side real-time control cycle are generated based on the effective edge-side dataset and expert parameter group.

[0383] The initial value of the agent addition in the current edge-side real-time control cycle is optimized to obtain the optimal addition amount in the current edge-side real-time control cycle.

[0384] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. A smart control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration, characterized in that, The intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration includes multiple edge nodes and a cloud terminal. Each edge node performs the following processing: Obtain the valid edge-side dataset for the current edge-side real-time control cycle and the local parameter library transmitted from the cloud for the current edge-cloud data synchronization cycle; Based on the effective edge-side dataset of the current edge-side real-time control cycle and the local parameter library transmitted from the cloud in the current edge-cloud data synchronization cycle, the current operating condition label and expert parameter group are generated. The initial values ​​for agent dosing in the current edge-side real-time control cycle are generated based on the effective edge-side dataset and expert parameter group. The initial value of the agent addition in the current edge-side real-time control cycle is optimized to obtain the optimal addition amount in the current edge-side real-time control cycle.

2. The intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration as described in claim 1, characterized in that, Each edge node further includes the following processing: Send the optimal dosage for the current edge-side real-time control cycle to the dosing device; The actual dosage fed back by the dosing device after dosing the drug according to the optimal dosage of the current edge side real-time control cycle is obtained.

3. The intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration as described in claim 2, characterized in that, The edge node further includes: Determine if the next edge-cloud data synchronization cycle has been reached; if so, then... Send the actual amount of feed, the optimal amount of feed for the current edge-side real-time control cycle, and the effective edge-side dataset for the current edge-side real-time control cycle to the cloud terminal; The cloud terminal updates the global database in the cloud and generates incremental parameter packages to be distributed based on the actual deployment amount, optimal deployment amount, and effective datasets on the edge side obtained between the current edge cloud data synchronization cycle and the next edge cloud data synchronization cycle.

4. The intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration as described in claim 1, characterized in that, The process of optimizing the initial value of the agent addition for the current edge-side real-time control cycle to obtain the optimal addition amount for the current edge-side real-time control cycle includes: The water quality fluctuation level and comprehensive fluctuation score are generated based on the effective edge-side dataset of the current edge-side real-time control cycle. The operating condition baseline step size, compliance safety distance coefficient, gradient decay coefficient, estimated step size for each round, and initial predicted effluent concentration are generated based on water quality fluctuation level, comprehensive fluctuation score, and initial chemical dosing value. Based on the operating condition baseline step size, the compliance safety distance coefficient, the gradient decay coefficient, the estimated value of each round step size, and the initial predicted effluent concentration, a variable step size multi-round gradient bottoming and critical dosage locking process is performed to obtain the initial value of the critical dosage and the corresponding predicted effluent concentration. The final candidate dosage set is generated based on the initial critical dosage value and the corresponding predicted effluent concentration; The final candidate dosage set after sorting is subjected to bi-objective dynamic weighted optimization to obtain the final candidate dosage set.

5. The intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration as described in claim 4, characterized in that, The effective edge-side dataset for the current edge-side real-time control cycle includes the influent total phosphorus concentration, the effluent total phosphorus concentration, the influent COD concentration, and the influent SS concentration for the current edge-side real-time control cycle; as well as the influent total phosphorus concentration, the effluent total phosphorus concentration, the influent COD concentration, and the influent SS concentration for the previous edge-side real-time control cycle. Based on the effective edge-side dataset of the current edge-side real-time control cycle, water quality fluctuation levels and comprehensive fluctuation scores are generated, including: The relative change rate of total phosphorus concentration in the influent is obtained based on the total phosphorus concentration in the influent during the current real-time control cycle on the edge side and the total phosphorus concentration in the effluent during the previous real-time control cycle on the edge side. The total phosphorus concentration fluctuation coefficient of the effluent is generated based on the total phosphorus concentration of the effluent in the current real-time control cycle of the edge side and the total phosphorus concentration of the effluent in the previous real-time control cycle of the edge side. The water quality synergistic change rate is generated based on the influent COD concentration, SS concentration, and COD and SS concentration of the previous edge side real-time control cycle. The water quality fluctuation level and comprehensive fluctuation score are generated based on the relative change rate of total phosphorus concentration in the influent, the fluctuation coefficient of total phosphorus concentration in the effluent, and the synergistic change rate of water quality.

6. The intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration as described in claim 5, characterized in that, The process of generating the baseline step size, compliance safety distance coefficient, gradient decay coefficient, estimated step size for each round, and initial predicted effluent concentration based on water quality fluctuation level, comprehensive fluctuation score, and initial reagent dosage includes: Obtain a preset volatility level-correction coefficient mapping table, which includes multiple volatility levels and the correction coefficient corresponding to each volatility level; The corresponding correction coefficient is obtained from the preset fluctuation level-correction coefficient mapping table based on the obtained water quality fluctuation level; The baseline step size for the working condition is calculated by using the base coefficients of the greedy algorithm as the base and combining them with the level correction coefficients. Obtain a preset prediction model for total phosphorus removal efficiency on the edge side; The initial value of the reagent dosage is input into the edge-side total phosphorus removal efficiency prediction model to obtain the predicted value of total phosphorus in the effluent; The basic compliance safety distance coefficient is calculated based on the difference between the predicted total phosphorus value in the effluent and the preset compliance threshold. Obtain the rate of coordinated change in water quality; The final compliance safety distance coefficient is generated based on the basic compliance safety distance coefficient and the water quality co-change rate. The greedy algorithm generates the amount of feed per round of bottoming out based on the final safety distance coefficient to generate the current edge-side real-time control cycle.

7. The intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration as described in claim 6, characterized in that, The process of performing variable-step, multi-round gradient bottom-finding and critical dosage locking based on the operating condition baseline step size, the compliance safety distance coefficient, the gradient decay coefficient, the estimated value of each round step size, and the initial predicted effluent concentration to obtain the initial value of the critical dosage and the corresponding predicted effluent concentration includes: The greedy algorithm bottom-finding full parameter initialization is performed based on the working condition baseline step size, the standard safety distance coefficient, the gradient decay coefficient, the estimated step size for each round, and the initial predicted effluent concentration, thereby obtaining the greedy algorithm bottom-finding initialization parameter set; Based on the initialized greedy algorithm bottom-finding full parameter set, the round-level variable step size gradient bottom-finding calculation of the current edge side real-time control cycle is performed to obtain the candidate dosage for the last effective round and the predicted total phosphorus value of the effluent corresponding to the candidate dosage. Based on the candidate dosage in the last effective round and the predicted total phosphorus in the effluent corresponding to the candidate dosage, the initial value of the critical dosage for bottoming out and the corresponding predicted effluent concentration are generated by the greedy algorithm in the current edge-side real-time control cycle.

8. The intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration as described in claim 7, characterized in that, The final candidate dosage set, generated and sorted according to the initial critical dosage value and the corresponding predicted effluent concentration, includes: Generate multi-scale neighborhood configuration parameters based on the initial value of the critical dosage; An initial candidate dosing quantity set is generated based on multi-scale neighborhood configuration parameters; The initial candidate dosage set is subjected to a two-layer process constraint candidate value screening and sorting to obtain the final candidate dosage set after sorting.

9. The intelligent control system for total phosphorus in wastewater treatment plants based on edge-cloud collaboration as described in claim 8, characterized in that, The step of performing bi-objective dynamic weighted optimization on the sorted final candidate dosage set to obtain the final candidate dosage set includes: Construct a dual-objective optimization function and obtain a preset dual-objective quantization table of candidate values; Based on the water quality fluctuation level, a dual-objective dynamic weight set, the optimal dosage, and the predicted total phosphorus value in the effluent corresponding to the optimal dosage are generated.

10. A smart control method for total phosphorus in wastewater treatment plants based on edge-cloud collaboration, characterized in that, The intelligent control method for total phosphorus in wastewater treatment plants based on edge-cloud collaboration includes: Obtain the valid edge-side dataset for the current edge-side real-time control cycle and the local parameter library transmitted from the cloud for the current edge-cloud data synchronization cycle; Based on the effective edge-side dataset of the current edge-side real-time control cycle and the local parameter library transmitted from the cloud in the current edge-cloud data synchronization cycle, the current operating condition label and expert parameter group are generated. The initial values ​​for agent dosing in the current edge-side real-time control cycle are generated based on the effective edge-side dataset and expert parameter group. The initial value of the agent addition in the current edge-side real-time control cycle is optimized to obtain the optimal addition amount in the current edge-side real-time control cycle.