Linkage response system and method for sudden water quality impact of industrial sewage treatment plant

By generating an optimal set of weight coefficients through reinforcement learning algorithms, calculating CPI in real time and triggering graded responses, the problem of slow response speed and high false alarm rate of traditional sewage treatment plants in the face of sudden water quality shocks is solved. This achieves fast and accurate automated response and improves the stability and resilience of sewage treatment plants.

CN121661789APending Publication Date: 2026-03-13NANJING GAOKE ENVIRONMENTAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Traditional industrial wastewater treatment plants are slow to respond to sudden water quality shocks, have a high false alarm rate, and lack adaptive adjustment capabilities, leading to the collapse of biological systems and effluent water quality exceeding standards.

Method used

The algorithm uses reinforcement learning to generate the optimal set of weight coefficients, calculates the comprehensive pollution index (CPI) in real time, and triggers graded response operations based on the CPI value, including stopping sludge discharge, increasing the internal recirculation ratio and aeration volume, to achieve rapid and accurate automated response.

Benefits of technology

It significantly shortens response time, reduces impact risk, improves early warning accuracy, reduces human intervention, enhances the stability and resilience of wastewater treatment plant operation, and reduces operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure SMS_71
    Figure SMS_71
  • Figure QLYQS_1
    Figure QLYQS_1
  • Figure QLYQS_5
    Figure QLYQS_5
Patent Text Reader

Abstract

The invention discloses a linkage response system and method for sudden water quality impact of an industrial sewage treatment plant, and the method comprises the following steps: carrying out the training of historical operation data based on the operation data of the sewage treatment plant in a historical time period, employing a reinforcement learning algorithm, taking the effluent reaching the standard as an optimization target, and carrying out the training of the historical operation data, generating a new optimal weight coefficient set; updating the current optimal weight coefficient set used in the online decision making process by using the new optimal weight coefficient set obtained by training; calculating a comprehensive pollution index CPI based on real-time inflow water quality parameters and flow data by using the updated optimal weight coefficient set; and comparing the CPI value with a preset early warning threshold value, and if the CPI value reaches the early warning threshold value, triggering a corresponding grading response operation. The system comprehensively evaluates the impact degree by calculating the CPI in real time based on the method, and automatically triggers the grading response, so that the response time can be effectively shortened, and the impact risk can be greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a linkage response system and method for sudden water quality shocks in industrial wastewater treatment plants, belonging to the field of wastewater treatment technology. Background Technology

[0002] Industrial wastewater treatment plants, especially those receiving mixed industrial wastewater, have long been plagued by significant fluctuations in influent water quality and quantity. When upstream enterprises discharge sudden high concentrations of highly toxic pollutants containing heavy metals, persistent organic matter, strong acids, or alkalis due to production changes or unforeseen accidents, it poses a significant risk to the operation of wastewater treatment plants. Traditional manual monitoring methods suffer from response lag. Once highly polluted wastewater enters core biological treatment units such as aeration tanks, it rapidly inhibits or even kills the microorganisms in the activated sludge, causing loss of sludge activity, deterioration of settling performance, and ultimately leading to the collapse of the biological system and severely substandard effluent quality.

[0003] To effectively withstand such shocks and ensure the continuous and stable operation of the treatment process and compliance with effluent standards, the common practice is to deploy water quality monitoring instruments at the main inlet or key nodes that can monitor parameters such as TOC / COD, ammonia nitrogen, and pH in real time. However, once water quality anomalies occur, corresponding actions must be taken immediately. Traditional manual response is slow and untimely, which may cause the best opportunity for treatment to be missed.

[0004] In existing technologies, some wastewater treatment plants have attempted to use simple threshold alarm systems, but these lack comprehensive index calculation and graded response mechanisms, resulting in high false alarm rates or insufficient response. Furthermore, existing systems typically have fixed parameters and cannot adaptively adjust to changes in water quality, limiting their effectiveness. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a rapid response, accurate judgment, and adaptive optimization system and method for sudden water quality shocks in industrial wastewater treatment plants.

[0006] The technical solution adopted in this invention is as follows:

[0007] A coordinated response method for sudden water quality shocks in industrial wastewater treatment plants includes the following steps:

[0008] S1. Based on the historical operating data of the wastewater treatment plant and using reinforcement learning algorithms, with the goal of achieving effluent standards, the historical operating data is trained to generate a new set of optimal weight coefficients.

[0009] S2. Update the current optimal weight coefficient set used in the online decision-making process with the new optimal weight coefficient set obtained from training;

[0010] S3. Using the updated set of optimal weighting coefficients, calculate the comprehensive pollution index (CPI) based on real-time influent water quality parameters and flow data.

[0011] S4. Compare the CPI value with the preset warning threshold. If the CPI value reaches the warning threshold, trigger the corresponding graded response operation.

[0012] Preferably, the specific method of step S1 is as follows:

[0013] A simulation environment is constructed using historical operational data from the system over a specific period.

[0014] Create a table Q with the dimension s. t Quantity × Action a t Quantity, all Q values ​​are initialized to 0;

[0015] An ε-greedy strategy is employed for multi-round iterative learning, specifically:

[0016] At each simulation time step t, the system adjusts the current state s. t A random action is selected with probability ε, or the action with the highest current Q value is selected with probability 1-ε. t ;

[0017] Perform action a t The reward r is calculated based on the water output data after that moment in historical data. t And observe the new state s t+1 ;

[0018] The Q-value is updated using the Q-Learning update formula, which is:

[0019] ,

[0020] in, For learning rate, As a discount factor, As a reward;

[0021] After iterative learning, the Q-table converges, forming a new set of weight coefficients.

[0022] Preferably, the operational data includes influent water quality, influent flow rate, the weighting coefficients used, and the corresponding effluent water quality results.

[0023] Preferably, state s t This is a quantitative representation of the system's operating status at time step t; the state space is represented as:

[0024] s t =[CPI t E t ,Tt ],

[0025] Among them, CPI t E represents the overall pollution index at the current moment. t Let T be the effluent water quality state vector. t This is a time factor vector.

[0026] Preferably, action a t Defined as an adjustment to the pollutant weight coefficient vector; action space It is a discrete set:

[0027] ,

[0028] in, This indicates the action of increasing the weighting coefficient of the i-th type of pollutant. This represents the action of reducing the weight coefficient of pollutant type i;

[0029] In state Select and perform an action Then, the weight coefficient vector is updated according to the following rules:

[0030] like ,but ;like ,but .in, This is the preset adjustment step size.

[0031] Subsequently, the updated weight coefficient vector is normalized to ensure... .

[0032] Preferably, in state s t Perform action a t Then, the system transitions to state s. t+1 And receive a reward r t ; Defined as:

[0033] ,

[0034] in, As a basic reward, if in the next state s t+1 If all effluent indicators meet the standards, then C pos If any of the effluent indicators exceed the standard, then C neg ;

[0035] Stability penalty:

[0036] ,

[0037] w1 and w2 are parameters that balance the weights of the two items; C pos With C neg All are positive constants; To perform action a t The absolute value of the step size for adjusting the time weight coefficient.

[0038] Preferably, the formula for calculating the Comprehensive Pollution Index (CPI) is as follows:

[0039] ,

[0040] Where, α i Let Σα be the weighting coefficient for the i-th type of pollutant, and Σα be the weighting coefficient for the i-th type of pollutant. i =1;C i C represents the concentration of pollutant of type i as measured by the sensor, in mg / L. 0i The design influent concentration limit for Class i pollutants is given in mg / L; Q is the real-time influent flow rate in m³ / s. 3 / h; Q0 is the design treatment flow rate of the wastewater treatment plant, in m³ / h 3 / h;C i / C 0i When <1, assign a value of 1.

[0041] Preferably, the conditions for triggering the hierarchical response operation and the corresponding operation are as follows:

[0042] When the secondary warning threshold is greater than or equal to the primary warning threshold, a primary warning is triggered, and the operation to stop the discharge of excess sludge is executed.

[0043] When the Level 3 warning threshold > CPI ≥ Level 2 warning threshold, a Level 2 warning is triggered, and the internal reflux ratio, aeration volume and phosphorus removal agent dosage are increased based on the Level 1 warning instructions.

[0044] When CPI is greater than or equal to the Level 3 warning threshold, a Level 3 warning is triggered. Based on the Level 2 warning instruction, the emergency pool is activated to store water and the inflow is reduced.

[0045] Preferably, when CPI ≥ Level 3 warning threshold, the real-time inflow rate Q is reduced until the CPI calculated based on the reduced real-time inflow rate is between the Level 2 and Level 3 warning thresholds.

[0046] A linkage response system for sudden water quality shocks in industrial wastewater treatment plants, applicable to any of the above-mentioned methods, comprising:

[0047] The monitoring unit is used to collect influent water quality, influent flow rate, and effluent water quality in real time. The data acquisition and communication module is connected to the monitoring unit to receive and transmit the collected influent water quality, influent flow rate and effluent water quality. The central controller, which is connected in communication with the data acquisition and communication module, is configured to perform the following operations: Based on the system's historical operational data and using reinforcement learning algorithms, with the goal of achieving water quality standards, the system trains on the historical operational data to generate a new set of optimal weight coefficients. Update the current optimal set of weights used in the online decision-making process with the new optimal set of weights obtained from training. Using the updated optimal set of weighting coefficients, the comprehensive pollution index (CPI) is calculated based on real-time influent water quality parameters and flow data. The CPI value is compared with a preset warning threshold. If the CPI value reaches the warning threshold, a corresponding graded response control command is generated. The actuator, which communicates with the central controller, is used to receive hierarchical response control commands and execute corresponding operations.

[0048] The beneficial effects of this invention are as follows:

[0049] By calculating the CPI in real time to comprehensively assess the impact and automatically triggering tiered responses, the system can effectively shorten response time and significantly reduce the risk of impact. Simultaneously, employing reinforcement learning algorithms, the system can dynamically optimize the weighting coefficients in the CPI formula based on historical operational results. This allows the early warning model to adapt to the specific water quality characteristics and microbial tolerance of wastewater treatment plants, continuously improving early warning accuracy and reducing false alarm rates. The system achieves a complete automated closed loop from monitoring, analysis, decision-making to execution, significantly reducing manual intervention, lowering operating costs, and enhancing the stability and resilience of wastewater treatment plant operations. Detailed Implementation

[0050] System hardware configuration and data acquisition.

[0051] An industrial wastewater treatment plant in Nanjing uses the AAO process. Influent monitoring equipment is installed both downstream of the fine screen and upstream of the effluent open channel. This includes: Hach Amtax-compact II ammonia nitrogen analyzer (measurement range: 0-200 mg / L, accuracy: ±2%); Hach CODmax II COD analyzer (measurement range: 0-5000 mg / L, accuracy: ±5%); Xinruipeng XRPTP2016 total phosphorus analyzer (measurement range: 0-50 mg / L, accuracy: ±3%); Xinruipeng XRPTN2016 total nitrogen analyzer (measurement range: 0-100 mg / L, accuracy: ±3%); Siemens FKD flow meter (measurement range: 0-2000 m³ / h, accuracy: ±1%); and Juguang Technology EasyToxMax online water quality biotoxicity monitor (measurement range: 0-100% EC50, accuracy: ±5%).

[0052] All the above instruments constitute the monitoring unit, and each instrument performs a test once per hour. The data acquisition and communication module communicates with all the above instruments via the Modbus protocol, receiving and transmitting the data collected by the instruments to the central controller (using Siemens PLCS7-1500).

[0053] The central controller performs the following operations:

[0054] Based on historical operational data of the wastewater treatment plant and using reinforcement learning algorithms, with effluent compliance as the optimization objective, the system trains on the historical operational data to generate a new set of optimal weight coefficients. This new set of optimal weight coefficients is then used to update the current set of optimal weight coefficients used in the online decision-making process. Using the updated set of optimal weight coefficients, the system calculates the Comprehensive Pollution Index (CPI) based on real-time influent water quality parameters and flow data. The CPI value is then compared with a preset warning threshold; if the CPI value reaches the warning threshold, a corresponding tiered response control command is generated.

[0055] The formula for calculating the Comprehensive Pollution Index (CPI) is as follows:

[0056] ,

[0057] Where, α i Let Σα be the weighting coefficient for the i-th type of pollutant, and Σα be the weighting coefficient for the i-th type of pollutant. i =1;C i C represents the concentration of pollutant of type i as measured by the sensor, in mg / L. 0i The design influent concentration limit for Class i pollutants, in mg / L; Q is the real-time flow rate, in m³ / s. 3 / h; Q0 is the design treatment flow rate of the wastewater treatment plant, in m³ / h 3 / h;C i / C 0i When <1, assign a value of 1.

[0058] The conditions for triggering a tiered response operation and the corresponding operations are as follows:

[0059] When the secondary warning threshold is greater than or equal to the primary warning threshold, a primary warning is triggered, and the operation to stop the discharge of excess sludge is executed.

[0060] When the Level 3 warning threshold > CPI ≥ Level 2 warning threshold, a Level 2 warning is triggered, and the internal reflux ratio, aeration volume and phosphorus removal agent dosage are increased based on the Level 1 warning instructions.

[0061] When CPI is greater than or equal to the Level 3 warning threshold, a Level 3 warning is triggered. Based on the Level 2 warning instruction, the emergency pool is activated to store water and the inflow is reduced.

[0062] When CPI is greater than or equal to the Level 3 warning threshold, reduce the real-time inflow rate Q until the CPI calculated based on the reduced real-time inflow rate is between the Level 2 and Level 3 warning thresholds.

[0063] The hierarchical response control command is transmitted to the actuator (the actuator is the moving equipment involved in the above-mentioned corresponding operation) via the central controller, and the actuator receives and executes the corresponding operation.

[0064] Specifically, based on historical operational data and utilizing reinforcement learning algorithms, with the goal of achieving effluent standards, the system trains on historical operational data to generate a new set of optimal weight coefficients. This is based on the Q-Learning algorithm to dynamically optimize the weight coefficients α of each pollutant in the Comprehensive Pollution Index (CPI) formula. i .

[0065] The algorithm includes the following core elements.

[0066] 1. State space.

[0067] At time step The state of the system It is a vector consisting of the following components:

[0068] ,

[0069] in, This is the comprehensive pollution index value calculated based on current monitoring data. For one A two-dimensional vector representing the recent effluent water quality status. . A time factor vector, , , The value indicates whether it is a peak production period; 0 represents a non-peak production period, and 1 represents a peak production period.

[0070] 2. Action space.

[0071] action Defined as a vector of weight coefficients Adjustments are made. To reduce complexity, a relative adjustment strategy is adopted, selecting only one weight coefficient for fine-tuning at a time. Action space. It is a discrete set:

[0072] ,

[0073] in, This indicates the action of increasing the weighting coefficient of the i-th type of pollutant. This represents the action of reducing the weight coefficient of pollutant type i;

[0074] In state Select and perform an action Then, the weight coefficient vector is updated according to the following rules:

[0075] like ,but ;like ,but .in, This is the preset adjustment step size.

[0076] Subsequently, the updated weight coefficient vector is normalized to ensure... .

[0077] 3. Reward function.

[0078] In state Execute action After that, the system transitions to state. And receive a reward Reward function Defined as:

[0079] ,

[0080] in,

[0081] This is the basic reward, in the next state. If all effluent indicators meet the standards or any effluent indicator exceeds the standards, then The following formula:

[0082] ,

[0083] and It is a positive constant.

[0084] It's a stability penalty, encouraging gradual adjustments:

[0085] ,

[0086] These are weighting coefficients used to balance the contributions of the two terms. This is the preset adjustment step size.

[0087] Q-Learning update rules.

[0088] The algorithm maintains a Q-value table. , indicating the state Next action The long-term expected return. The Q table is updated according to the following rules:

[0089]

[0090] in, It's the learning rate. . It is a discount factor. .

[0091] Strategy selection (ε-greedy strategy).

[0092] During training, movements Based on the following probability distribution, from state Select:

[0093] ,

[0094] in, It is the exploration rate.

[0095] Timed mechanism.

[0096] The execution of the algorithm is controlled by two timing cycles:

[0097] Decision cycle The system every Time (e.g.) (hours) based on current status Perform an action (Adjust the weights once.)

[0098] Learning cycle The system every Time (e.g.) (hours), utilizing the past Real interaction data collected within the time period Perform a batch update on table Q.

[0099] Validation of the weight coefficient optimization algorithm.

[0100] Parameter limits and initial weight settings.

[0101] Design influent concentration limit: Biotoxicity (EC50): C 01 =50mg / L; COD: C 02 =350mg / L; Ammonia nitrogen: C 03 =20mg / L; TP:C 04 =3.5mg / L; TN:C 05 =55mg / L; Design flow rate: Q0=1666m³ / h.

[0102] The initial weights were set based on toxicity priority and impact susceptibility indicators: biotoxicity: α1=0.3500; COD: α2=0.2500; ammonia nitrogen: α3=0.2000; TP: α4=0.1000; TN: α5=0.1000.

[0103] Algorithm parameters: learning rate Discount factor Exploration rate Adjust step size Basic reward constant: , Basic reward weight: Stability penalty weight: Decision-making cycle Learning cycle .

[0104] The first decision cycle (t=1).

[0105] Actual measured concentration of influent: Real-time traffic: The current CPI (using initial weights) is approximately 1.221. After the system is put into operation, if this CPI value reaches the preset warning threshold, the corresponding tiered response operation will be triggered.

[0106] All effluent meets the standards (average water quality parameters over the most recent 4 hours), therefore the status is... .

[0107] Time factor: (This indicates that it is 2 PM, during the peak production period).

[0108] Status Code: .

[0109] Action selection (based on ε-greedy strategy):

[0110] Generate a random number 0.15 > 0.1(ε), and select the utilization mode.

[0111] Query the Q table (initially empty, assuming the optimal action is based on prior knowledge or simulation). (Increase the weight of biotoxicity).

[0112] Action performed: Temporarily update weights: .

[0113] Proportional normalization (ensuring the sum of weight coefficients is 1):

[0114] =0.1980, .

[0115] Reward calculation (wait 4 hours to observe water output effect):

[0116] Water outflow status observed: (All standards were still met)

[0117] Basic Rewards: ,

[0118] Stability penalty: .

[0119] Total Rewards: .

[0120] Q value update:

[0121] New status (The CPI has changed slightly due to the adjustment of the weighting coefficient. Assuming it is recalculated to 1.215, the effluent still meets the standard. Time moves to 18:00):

[0122]

[0123] Assuming in state The maximum Q value is: .

[0124] Then update the Q value to:

[0125] .

[0126] The second decision cycle (t=2).

[0127] State observations (using updated weights):

[0128] Actual measured concentration of influent: Real-time traffic: The current CPI is approximately 1.450. After the system is put into operation, if this CPI value reaches the preset warning threshold, the corresponding tiered response operation will be triggered.

[0129] The effluent still meets the standards: Time factor: Status code: .

[0130] Action selection:

[0131] Generate a random number 0.05 < 0.1(ε), and select exploration mode.

[0132] Randomly select actions (Reduce ammonia nitrogen weight).

[0133] Action performed: Temporarily update weights: .

[0134] Proportion normalization processing:

[0135] =0.1899, .

[0136] Reward calculation (after 4 hours):

[0137] Water outflow status observed: (All exceeded the standard);

[0138] Basic reward: Stability penalty: ,

[0139] Total Rewards: .

[0140] Q value update:

[0141] New status (CPI rises, but the peak season has begun):

[0142]

[0143] Assuming in state The maximum Q value is: .

[0144] Update Q value:

[0145]

[0146] After multiple rounds of iterative training, the system learns a better weighting coefficient configuration to better reflect the actual impact of each pollutant on the effluent exceeding the standard.

[0147] After multiple rounds of iterative training, the optimized weight coefficients are: α1=0.4000, α2=0.2200, α3=0.1800, α4=0.1000, α5=0.1000. The algorithm automatically increased the weight for biotoxicity (from 0.3500 to 0.4000), indicating that the system learned that this indicator is particularly crucial for shock warning; the weight coefficients for COD and ammonia nitrogen were appropriately reduced, making the weight allocation more consistent with the actual influent characteristics and effluent impact.

[0148] Based on the optimized weighting coefficients, the triggering conditions and processing methods for the hierarchical response operation are as follows:

[0149] Design influent concentration limit: Biotoxicity (EC50): C 01 =50mg / L; COD: C 02 =350mg / L; Ammonia nitrogen: C 03 =20mg / L; TP:C 04 =3.5mg / L; TN:C05 =55mg / L; Design flow rate: Q0=1666m³ / h.

[0150] Level 1 Warning (1.5 > CPI ≥ 1.2): A warning signal is sent to the central control room, and the discharge of excess sludge is stopped. For example, at this time, the influent EC50 is 50 mg / L, COD is 500 mg / L, ammonia nitrogen is 35 mg / L, TP is 5 mg / L, TN is 70 mg / L, and the influent flow rate is 1666 m³ / L. 3 / h. Based on the formula, the CPI is calculated to be 1.299 > 1.2. At this point, an early warning signal is sent to the central control room, and the remaining sludge discharge valve and water pump are shut off.

[0151] Level II Warning (1.8 > CPI ≥ 1.5): Based on Level I warning, increase the internal recirculation ratio, aeration rate, and phosphorus removal agent dosage, proportional to the CPI value (e.g., if CPI is 1.6, increase by 1.6 times). For example, at this time, the influent EC50 is 60 mg / L, COD is 700 mg / L, ammonia nitrogen is 45 mg / L, TP is 5 mg / L, TN is 80 mg / L, and the influent flow rate is 1700 m³ / L. 3 / h. Based on the formula, the CPI is calculated to be 1.646 > 1.5. At this point, an early warning signal is sent to the central control room, and the remaining sludge discharge valve and water pump are shut off. Furthermore, the internal return pump frequency, blower frequency, and dosing pump flow rate are adjusted to increase the internal return flow rate, aeration volume, and phosphorus removal agent dosage by 1.646 times.

[0152] Level 3 Warning (CPI ≥ 1.8): Based on the Level 2 warning, activate the emergency storage tank and reduce the influent flow (reduce the influent flow to bring the CPI down to 1.5). For example, at this time, the influent EC50 is 80 mg / L, COD is 800 mg / L, ammonia nitrogen is 45 mg / L, TP is 5 mg / L, TN is 80 mg / L, and the influent flow rate is 1900 m³ / L. 3 / h. Based on the formula, the CPI is calculated to be 2.092 > 1.8. Therefore, an early warning signal is sent to the central control room, and the remaining sludge discharge valve and water pump are shut off. The emergency storage tank is activated, and the influent flow rate is reduced. The actual influent flow rate is adjusted to 1362 m³ / h by adjusting the opening of the emergency tank influent pipe valve. 3 / h, after adjustment, due to the reduced flow rate, the CPI recovers to slightly greater than 1.5. Therefore, the internal reflux pump frequency, blower frequency, and dosing pump flow rate are adjusted to increase the internal reflux flow rate, dissolved oxygen value, and phosphorus removal agent dosage by 1.5 times.

[0153] Once the aforementioned tiered response operation is triggered, operations corresponding to the threshold range will be stopped or operations within the threshold period will be stopped successively after the subsequently calculated CPI decreases to the next threshold range or below the lowest threshold.

Claims

1. A linkage response method for sudden water quality shocks in industrial wastewater treatment plants, characterized in that, Includes the following steps: S1. Based on the historical operating data of the wastewater treatment plant and using reinforcement learning algorithms, with the goal of achieving effluent standards, the historical operating data is trained to generate a new set of optimal weight coefficients. S2. Update the current optimal weight coefficient set used in the online decision-making process with the new optimal weight coefficient set obtained from training; S3. Using the updated set of optimal weighting coefficients, calculate the comprehensive pollution index (CPI) based on real-time influent water quality parameters and flow data. S4. Compare the CPI value with the preset warning threshold. If the CPI value reaches the warning threshold, trigger the corresponding graded response operation.

2. The linkage response method for sudden water quality shocks in industrial wastewater treatment plants according to claim 1, characterized in that, The specific method for step S1 is as follows: A simulation environment is constructed using historical operational data from the system over a specific period. Create a table Q with the dimension 'states'. t Quantity × Action a t Quantity, all Q values ​​are initialized to 0; An ε-greedy strategy is employed for multi-round iterative learning, specifically: At each simulation time step t, the system adjusts the current state s. t A random action is selected with probability ε, or the action with the highest current Q value is selected with probability 1-ε. t ; Perform action a t The reward r is calculated based on the water output data after that moment in historical data. t And observe the new state s t+1 ; The Q-value is updated using the Q-Learning update formula, which is: , in, For learning rate, As a discount factor, As a reward; After iterative learning, the Q-table converges, forming a new set of weight coefficients.

3. The linkage response method for sudden water quality shocks in industrial wastewater treatment plants according to claim 2, characterized in that, The operational data includes influent water quality, influent flow rate, the weighting coefficients used, and the corresponding effluent water quality results.

4. The linkage response method for sudden water quality shocks in industrial wastewater treatment plants according to claim 2, characterized in that, state s t This is a quantitative representation of the system's operating status at time step t; the state space is represented as: s t =[CPI t ,E t ,T t ], Among them, CPI t E represents the overall pollution index at the current moment. t Let T be the effluent water quality state vector. t This is a time factor vector.

5. The linkage response method for sudden water quality shocks in industrial wastewater treatment plants according to claim 4, characterized in that, Action a t Defined as an adjustment to the pollutant weight coefficient vector; the action space A is a discrete set, represented as: , in, This indicates the action of increasing the weighting coefficient of the i-th type of pollutant. This represents the action of reducing the weight coefficient of pollutant type i; In state Select and perform an action Then, the weight coefficient vector is updated according to the following rules: like ,but ;like ,but ;in, The preset adjustment step size; Subsequently, the updated weight coefficient vector is normalized to ensure... .

6. The linkage response method for sudden water quality shocks in industrial wastewater treatment plants according to claim 5, characterized in that, In state s t Perform action a t Then, the system transitions to state s. t+1 And receive a reward r t ; Defined as: , in, As a basic reward, if in the next state s t+1 If all effluent indicators meet the standards, then C pos If any of the effluent indicators exceed the standard, then C neg ; Stability penalty: , w1 and w2 are parameters that balance the weights of the two items; C pos With C neg All are positive constants; To perform action a t The absolute value of the step size for adjusting the time weight coefficient.

7. The linkage response method for sudden water quality shocks in industrial wastewater treatment plants according to claim 1, characterized in that, The formula for calculating the Comprehensive Pollution Index (CPI) is as follows: , Where, α i Let Σα be the weighting coefficient for the i-th type of pollutant, and Σα be the weighting coefficient for the i-th type of pollutant. i =1;C i C represents the concentration of pollutant of type i as measured by the sensor, in mg / L. 0i The design influent concentration limit for Class i pollutants is given in mg / L; Q is the real-time influent flow rate in m³ / s. 3 / h; Q0 is the design treatment flow rate of the wastewater treatment plant, in m³ / h 3 / h;C i / C 0i When <1, assign a value of 1.

8. The linkage response method for sudden water quality shocks in industrial wastewater treatment plants according to claim 7, characterized in that, The conditions for triggering a tiered response operation and the corresponding operations are as follows: When the secondary warning threshold is greater than or equal to the primary warning threshold, a primary warning is triggered, and the operation to stop the discharge of excess sludge is executed. When the Level 3 warning threshold > CPI ≥ Level 2 warning threshold, a Level 2 warning is triggered, and the internal reflux ratio, aeration volume and phosphorus removal agent dosage are increased based on the Level 1 warning instructions. When CPI is greater than or equal to the Level 3 warning threshold, a Level 3 warning is triggered. Based on the Level 2 warning instruction, the emergency pool is activated to store water and the inflow is reduced.

9. The linkage response method for sudden water quality shocks in industrial wastewater treatment plants according to claim 8, characterized in that, When CPI is greater than or equal to the Level 3 warning threshold, reduce the real-time inflow rate Q until the CPI calculated based on the reduced real-time inflow rate is between the Level 2 and Level 3 warning thresholds.

10. A linkage response system for sudden water quality shocks in industrial wastewater treatment plants, applicable to the method described in any one of claims 1-9, characterized in that, include: The monitoring unit is used to collect influent water quality, influent flow rate, and effluent water quality in real time. The data acquisition and communication module is connected to the monitoring unit to receive and transmit the collected influent water quality, influent flow rate and effluent water quality. The central controller, which is connected in communication with the data acquisition and communication module, is configured to perform the following operations: Based on the system's historical operational data and using reinforcement learning algorithms, with the goal of achieving water quality standards, the system trains on the historical operational data to generate a new set of optimal weight coefficients. Update the current optimal set of weights used in the online decision-making process with the new optimal set of weights obtained from training. Using the updated optimal set of weighting coefficients, the comprehensive pollution index (CPI) is calculated based on real-time influent water quality parameters and flow data. The CPI value is compared with a preset warning threshold. If the CPI value reaches the warning threshold, a corresponding graded response control command is generated. The actuator, which communicates with the central controller, is used to receive hierarchical response control commands and execute corresponding operations.