Multi-objective optimization method for mine water treatment oriented to cascade reuse

By optimizing the electrocoagulation parameters using an asymmetric polarity reversal mode and a dynamic model based on the neural constant differential equation, the problems of electrode passivation and water quality fluctuations during the electrocoagulation process were solved, enabling efficient graded reuse and optimized utilization of mine water.

CN121948632BActive Publication Date: 2026-06-16ZHONGSHUIHUAIHEGUIHUA DESIGN RES CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHONGSHUIHUAIHEGUIHUA DESIGN RES CO LTD
Filing Date
2026-03-27
Publication Date
2026-06-16

Smart Images

  • Figure CN121948632B_ABST
    Figure CN121948632B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of water treatment, and particularly relates to a mine water multi-objective processing optimization method for cascade reuse, comprising the following steps: step 1, performing spectral clustering on water quality data collected by an inlet water quality sensor group to obtain a working condition category, and matching a corresponding cascade reuse target scene and a water quality upper limit threshold; step 2, using measured data of an outlet water quality sensor group and a Zeta potential online analyzer to perform online parameter updating on a neural ordinary differential equation dynamics model; and step 3, taking the updated neural ordinary differential equation dynamics model as a process constraint, and controlling an electric shunt valve group to guide the outlet water into a corresponding cascade reuse subsequent processing pipeline. The present application realizes the quality-based cascade reuse of mine water, and solves the problems in the prior art that the electric flocculation operation parameters are difficult to adapt to water quality fluctuations due to the dependence on manual experience setting, the efficiency is attenuated due to electrode passivation, and the treated water lacks on-demand quality-based reuse scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of water treatment technology, specifically relating to a multi-objective treatment optimization method for mine water for cascade reuse. Background Technology

[0002] Mine water is an unavoidable byproduct of coal mining. It is characterized by large volume, complex composition, and significant spatiotemporal variability as mining progresses. Mine water typically contains high concentrations of suspended solids, colloidal particles, dissolved salts, and varying levels of heavy metal ions and organic matter. Direct discharge would cause severe pollution of surface water and soil. Meanwhile, coal mining areas often face water scarcity. Appropriately treated mine water can be reused for various purposes, including industrial cooling, domestic use, agricultural irrigation, and ecological replenishment, representing a crucial pathway for water resource recycling in mining areas. Different reuse scenarios have significantly different requirements for water quality indicators. For example, domestic water requires strict control over turbidity and microbial indicators, industrial cooling water focuses on hardness and conductivity, and agricultural irrigation water has specific limits on total salt content and the concentration of certain ions. Therefore, a tiered reuse model, where treated mine water is introduced into different reuse pathways according to its water quality level, has become the mainstream approach for efficient water resource utilization in mining areas.

[0003] Electrocoagulation, a water treatment method that couples electrochemical reactions with flocculation processes, has received increasing attention in the field of mine water treatment in recent years. The basic process of electrocoagulation involves applying current to a sacrificial electrode, causing the anode metal to electrochemically dissolve and generate metal hydroxide flocculants in the water. These in-situ generated flocculants neutralize charges, adsorb, bridge, and sweep suspended solids and colloidal particles in the water, thereby achieving solid-liquid separation. Compared to traditional chemical flocculation methods, electrocoagulation has advantages such as not requiring external chemical additions, producing relatively less sludge, and having a higher degree of automation. Existing research shows that aluminum and iron electrodes exhibit different flocculation characteristics during electrocoagulation: aluminum ion hydrolysis products have a stronger ability to neutralize the charge of colloidal particles, while iron ion hydrolysis forms denser flocs and has a better adsorption and co-precipitation effect on dissolved organic matter and some heavy metal ions. Some researchers have attempted to combine aluminum and iron electrodes to achieve synergistic effects, but there is currently a lack of systematic online optimization methods for the leaching behavior of aluminum-iron composite electrodes under different water quality conditions and the matching relationship of optimal operating parameters.

[0004] A long-standing engineering challenge in electrocoagulation is electrode surface passivation. With prolonged operation, a dense oxide film and fouling layer gradually form on the sacrificial electrode surface, leading to decreased electrochemical dissolution efficiency, abnormally high cell voltage, and increased energy consumption. Polarity reversal is one of the most common techniques for addressing electrode passivation. By periodically switching electrode polarity, the passivation film on the original anode surface is reduced and dissolved at the cathode potential or mechanically stripped during hydrogen evolution. Existing literature reports two modes: symmetrical polarity reversal and asymmetric polarity reversal. Asymmetric polarity reversal uses a shorter reverse pulse specifically for depassivation while retaining a longer forward pulse phase for effective flocculation, theoretically achieving a balance between depassivation and flocculation efficiency. However, there are complex coupling relationships among operating parameters such as pulse frequency, duty cycle, peak current density, and the ratio of forward to reverse pulse duration. Different parameter combinations have varying effects on electrode dissolution rate, electrode passivation degree, flocculation effect, and energy consumption. In current engineering practice, these parameters are mostly determined by human experience or offline experiments, and cannot be adaptively adjusted to keep up with real-time fluctuations in mine water quality. Summary of the Invention

[0005] Therefore, the main objective of this invention is to provide a multi-objective optimization method for mine water treatment oriented towards cascade reuse, which realizes the graded and graded reuse of mine water and solves the problems in the prior art where the electrocoagulation operation parameters rely on manual experience to be adjusted and are difficult to adapt to fluctuations in influent water quality, efficiency decay caused by electrode passivation, and lack of on-demand graded reuse scheduling of treated effluent.

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

[0007] A multi-objective optimization method for mine water treatment oriented towards cascade reuse includes the following steps:

[0008] Step 1: Mine water is introduced into a pulsed electrocoagulation reactor for electrocoagulation treatment. Sacrificial electrodes and insoluble electrodes are installed in the pulsed electrocoagulation reactor, powered by a programmable pulse power supply in asymmetric polarity reversal mode. An influent water quality sensor group is installed at the inlet end, and an effluent water quality sensor group and a Zeta potential online analyzer are installed at the outlet end. An online electrode consumption monitoring device is installed at the sacrificial electrode. Spectral clustering is performed on the water quality data collected by the influent water quality sensor group to obtain the operating condition category, and the corresponding cascade reuse target scenario and water quality upper limit threshold are matched.

[0009] Step 2: Deploy the NCD dynamic model in the edge computing gateway, using effluent water quality indicators as state variables and programmable pulse power supply operating parameters and influent water quality data as driving variables. Obtain the predicted values ​​of the state variables through a state evolution network and a numerical integrator. Update the NCD dynamic model online using measured data from the effluent water quality sensor group and the Zeta potential online analyzer.

[0010] Step 3: Using the updated dynamic model of the neural network's constant differential equations as process constraints, the normalized weighted sum of electrode consumption and energy consumption per unit water volume as the optimization objective, and the state variables satisfying the upper limit threshold of water quality matched in Step 1 as inequality constraints, the optimal operating parameters of the programmable pulse power supply in the control time domain are solved and issued for execution; after each control cycle, return to Step 2 and execute Step 3 again to form a rolling optimization closed loop; determine the reuse level based on the measured data of the effluent water quality sensor group and the Zeta potential online analyzer, and control the electric diversion valve group to guide the effluent into the corresponding cascade reuse subsequent treatment pipeline.

[0011] Furthermore, the sacrificial electrode is an aluminum-iron composite sacrificial electrode with alternating layers of aluminum and iron, and the insoluble electrode is a titanium-based size-stable insoluble electrode.

[0012] Furthermore, in the asymmetric polarity reversal mode, during the forward pulse phase, the sacrificial electrode acts as the anode to electrochemically dissolve and release metal ions, while the insoluble electrode acts as the cathode to evolve hydrogen gas. The duration of the forward pulse phase accounts for 70% to 95% of a single polarity reversal cycle. During the reverse pulse phase, the sacrificial electrode acts as the cathode, and the insoluble electrode acts as the anode. The duration of the reverse pulse phase accounts for 5% to 30% of a single polarity reversal cycle and is used to remove the passivation oxide film on the surface of the sacrificial electrode.

[0013] Furthermore, the programmable pulse power supply has a response time of less than 1ms, a pulse frequency that is continuously adjustable between 0.1Hz and 100Hz, and a peak current density in the positive pulse phase that is continuously adjustable between 0 and 50mA / cm².

[0014] Furthermore, the pulse electrocoagulation reactor is equipped with a bubble refining and dispersion unit, which refines and disperses the hydrogen gas generated at the cathode to form microbubbles. The microbubbles carry the flocs to the surface to complete the air flotation separation. The influent water quality sensor group includes an influent conductivity sensor, an influent turbidity sensor, and an influent pH sensor.

[0015] Furthermore, the effluent water quality sensor group includes an online turbidity sensor, an effluent conductivity sensor, and an effluent pH sensor; the effluent section is also equipped with a bypass sampling branch, on which a flow stabilization unit, a defoaming unit, and an online Zeta potential analyzer based on electrophoretic light scattering are sequentially installed. The bypass sampling branch draws water samples from the effluent section, which are then treated by flow stabilization and defoaming before entering the measurement cell of the online Zeta potential analyzer; the online electrode consumption monitoring device is based on the electrochemical coulometric method, which calculates the electrode dissolution mass by accumulating the total charge flowing through the sacrificial electrode.

[0016] Furthermore, the execution process of spectral clustering in step 1 is as follows: Conductivity, turbidity, and pH values ​​collected by the influent water quality sensor group at multiple consecutive sampling times are used to form a multidimensional water quality feature vector; Gaussian kernel similarity is calculated pairwise for all water quality feature vectors to construct a similarity matrix; a normalized Laplace matrix is ​​calculated for the similarity matrix; eigenvalue decomposition is performed on the normalized Laplace matrix, and the eigenvectors corresponding to the top K smallest eigenvalues ​​are used to form a dimensionality reduction matrix; K-means clustering is performed on each row vector of the dimensionality reduction matrix to obtain K operating condition categories; each operating condition category is pre-associated with one cascade reuse target scenario and its corresponding water quality upper limit threshold; when new influent water quality data arrives, normalization processing consistent with historical samples is performed on the new influent water quality data, and the eigenvectors corresponding to the top K smallest eigenvalues ​​are used to map the normalized new influent water quality data to the dimensionality reduction feature space; the Euclidean distance between the mapped new influent water quality data and the cluster centers of each operating condition category is calculated in the dimensionality reduction feature space, and the operating condition category with the smallest Euclidean distance is taken as the current operating condition category.

[0017] Furthermore, the dynamic model of the neural network for the ordinary differential equation includes a state evolution network and a numerical integrator. The state evolution network is a fully connected neural network with three hidden layers, each containing 64 neurons and using the tanh activation function. The input to the state evolution network is an 8-dimensional vector, which is composed of two state variables and six driving variables at the current time. The two state variables are effluent turbidity and Zeta potential, and the six driving variables are, in order, pulse frequency, positive pulse ratio, peak current density, influent conductivity, influent turbidity, and influent pH. The output of the state evolution network is a 2-dimensional vector, corresponding to the instantaneous change rate of effluent turbidity and Zeta potential relative to continuous time. The numerical integrator adopts the fourth-order, five-level Dormand-Prince adaptive step-size Runge-Kutta method.

[0018] Furthermore, in step 2, the online parameter update adopts a slow cycle approach, performing one parameter update after accumulating N control cycles, where N ranges from 5 to 20. During the update, the measured values ​​of the effluent water quality sensor group and the Zeta potential online analyzer at the beginning of each of the most recent N control cycles are used as the initial conditions for each segment of integration. The numerical integrator integrates segment by segment forward to the end of each cycle to obtain the predicted value. The mean square error between all N predicted values ​​and the corresponding measured values ​​is used as the loss index. The adjoint state method is used to solve the adjoint trajectory in reverse to obtain the gradient of the loss index with respect to all connection weights and biases in the state evolution network. The Adam optimizer is used to perform one-step update according to the gradient, with the learning rate fixed at 0.001.

[0019] Furthermore, in step 3, the optimal control solution adopts the direct collocation method. Twenty collocation points are uniformly set within the control time domain. At each collocation point, the pulse frequency, positive pulse ratio, and peak current density are discretized. Third-order polynomial interpolation is used between the collocation points to transform the continuous time trajectory into 60 discrete decision variables. A tank voltage acquisition unit is set between the sacrificial electrode and the insoluble electrode. The energy consumption per unit water volume is calculated based on the acquisition values ​​of the tank voltage acquisition unit at each collocation point within the control time domain, the peak current density, the effective working area of ​​the sacrificial electrode, the effective energizing time, and the treated water volume. A sequential quadratic programming solver is used to solve the 60 discrete decision variables, with the optimal solution of the previous control cycle used as the initial guess value. The reuse level determination method is as follows: the edge computing gateway compares the effluent turbidity collected by the online turbidity sensor, the zeta potential collected by the online zeta potential analyzer, the effluent conductivity collected by the effluent conductivity sensor, and the effluent pH value collected by the effluent pH sensor with the preset water quality threshold table for each cascade reuse scenario to determine the reuse level.

[0020] By adopting the above technical solution, the present invention has produced the following beneficial effects: The present invention uses a sacrificial electrode in combination with an insoluble electrode and is powered by an asymmetric polarity reversal mode. The forward pulse stage completes effective electrochemical dissolution and flocculation treatment, while the reverse pulse stage reduces and removes the passivation oxide film on the surface of the sacrificial electrode in a shorter duration. This allows the electrode to maintain a high Faraday efficiency and a uniform dissolution state during long-term operation, significantly extending the electrode's service life and reducing the problems of abnormal increase in cell voltage and energy consumption caused by passivation.

[0021] This invention performs spectral clustering on influent water quality data. By utilizing the spectral structure of the normalized Laplace matrix, it performs unsupervised classification of typical water quality states of mine water in a dimensionality-reduced feature space. Compared with traditional working condition discrimination methods based on fixed thresholds or human experience, it can automatically discover the clustering patterns of influent water quality in multidimensional features such as conductivity, turbidity, and pH. It accurately captures the spatiotemporal variations of mine water quality caused by changes in the mining face, seasonal rainfall, and fluctuations in groundwater recharge. Furthermore, it directly associates the classification results with different cascade reuse target scenarios and water quality upper limit thresholds, providing precise target constraints for subsequent optimization control.

[0022] This invention employs a neural network differential equation kinetic model to uniformly describe multiple coupled physicochemical processes such as electrochemical dissolution, colloid destabilization, and floc aggregation during electrocoagulation as a continuous-time kinetic system. Compared with discrete-time recursive models, this model can more realistically reflect the multi-timescale dynamic characteristics of the electrocoagulation process under different pulse frequencies and current densities. At the same time, through a slow-cycle online parameter update mechanism, the model continuously and adaptively corrects its description accuracy of the process dynamics during actual operation, and can track long-term trends such as electrode aging and slow water quality drift without relying on a large number of offline calibration experiments.

[0023] This invention uses the normalized weighted sum of electrode consumption and energy consumption per unit of water as the optimization objective, and the dynamic model of the neural network constant differential equation as the process constraint. By using the direct collocation method and the sequential quadratic programming solver, the optimal time trajectory of the programmable pulse power supply operating parameters is solved in real time in each control cycle. This achieves a quantitative multi-objective balance between the electrocoagulation treatment effect and the operating cost, avoiding the problem of relying on engineers' experience to set static parameters in traditional operations, which cannot cope with fluctuations in influent.

[0024] This invention uses measured data from an effluent water quality sensor group and an online Zeta potential analyzer to determine multiple indicators of the effluent, accurately guiding effluent of different water quality levels into corresponding subsequent treatment pipelines. This maximizes the utilization of mine water resources according to quality tiers, reduces energy and chemical waste caused by over-treatment, and avoids safety hazards caused by substandard effluent entering high-requirement reuse scenarios. Attached Figure Description

[0025] Figure 1 A schematic diagram of the asymmetric polarity reversal pulse current waveform provided in an embodiment of the present invention;

[0026] Figure 2 This is a schematic diagram of the eigenvalue spectrum of the normalized Laplace matrix provided in an embodiment of the present invention;

[0027] Figure 3 This is a schematic diagram of the working condition clustering results in the dimensionality-reduced feature space provided in an embodiment of the present invention;

[0028] Figure 4 The state evolution prediction curve of the dynamic model of the neural ordinary differential equation provided in the embodiment of the present invention is shown. Detailed Implementation

[0029] A multi-objective optimization method for mine water treatment oriented towards cascade reuse includes the following steps:

[0030] Step 1: Mine water is introduced into a pulsed electrocoagulation reactor for electrocoagulation treatment. Sacrificial electrodes and insoluble electrodes are installed in the pulsed electrocoagulation reactor, powered by a programmable pulse power supply in asymmetric polarity reversal mode. An influent water quality sensor group is installed at the inlet end, and an effluent water quality sensor group and a Zeta potential online analyzer are installed at the outlet end. An online electrode consumption monitoring device is installed at the sacrificial electrode. Spectral clustering is performed on the water quality data collected by the influent water quality sensor group to obtain the operating condition category, and the corresponding cascade reuse target scenario and water quality upper limit threshold are matched.

[0031] Step 2: Deploy the NCD dynamic model in the edge computing gateway, using effluent water quality indicators as state variables and programmable pulse power supply operating parameters and influent water quality data as driving variables. Obtain the predicted values ​​of the state variables through a state evolution network and a numerical integrator. Update the NCD dynamic model online using measured data from the effluent water quality sensor group and the Zeta potential online analyzer.

[0032] Step 3: Using the updated dynamic model of the neural network's constant differential equations as process constraints, the normalized weighted sum of electrode consumption and energy consumption per unit water volume as the optimization objective, and the state variables satisfying the upper limit threshold of water quality matched in Step 1 as inequality constraints, the optimal operating parameters of the programmable pulse power supply in the control time domain are solved and issued for execution; after each control cycle, return to Step 2 and execute Step 3 again to form a rolling optimization closed loop; determine the reuse level based on the measured data of the effluent water quality sensor group and the Zeta potential online analyzer, and control the electric diversion valve group to guide the effluent into the corresponding cascade reuse subsequent treatment pipeline.

[0033] Before entering the pulsed electrocoagulation reactor, mine water first passes through a screen and grit chamber in the underground water tank to remove coarse suspended solids and sand particles, and then is pumped to the surface treatment station. An electromagnetic flow meter is installed on the inlet pipe of the surface treatment station to measure the actual volume of water entering the pulsed electrocoagulation reactor. This volume data is used to calculate the energy consumption per unit volume of water in subsequent control optimization. The mine water enters the bottom distribution zone of the pulsed electrocoagulation reactor through the inlet pipe. A porous water distribution plate in the distribution zone ensures that the incoming water is evenly distributed across the reactor's cross-section before flowing upwards, passing sequentially through the electrode zone and the air flotation separation zone, and finally discharged from the top overflow weir.

[0034] The core structure of the pulse electrocoagulation reactor is the electrode zone. A first working electrode and a second working electrode are arranged alternately in parallel within the electrode zone, with a spacing between the plates ranging from 5mm to 20mm. The specific spacing is determined based on the conductivity of the mine water—for mine water with higher conductivity, the plate spacing can be appropriately reduced to lower the cell voltage, while for water with lower conductivity, the spacing needs to be appropriately increased to avoid short-circuit risks. In one specific embodiment, the first working electrode, also known as the sacrificial electrode, employs an aluminum-iron composite sacrificial electrode structure with alternating layers of aluminum and iron. Specifically, the thickness of each aluminum and iron plate is between 1mm and 3mm, and they are fastened together as a single unit using conductive bolts in an aluminum-iron-aluminum-iron sequence. The reason for using an aluminum-iron composite laminated structure instead of a single aluminum plate or a single iron plate is that the hydrolysis products of aluminum ions have a strong ability to neutralize the charge of colloidal particles, making them suitable for treating the turbidity components of mine water, which are mainly composed of suspended solids and colloids. Meanwhile, the flocs generated by the hydrolysis of iron ions have a higher density and better settling performance, and the iron-based flocs have a better ability to adsorb and co-precipitate dissolved organic matter and some heavy metal ions in water than the aluminum-based flocs. The simultaneous release and synergistic effect of the two metal ions in the same reactor can maintain good flocculation effects over a wider pH range. The second working electrode, the insoluble electrode, is, in one specific embodiment, a titanium-based size-stable insoluble electrode. Its substrate is a pure titanium plate, coated with an iridium-ruthenium mixed oxide catalytic layer. The titanium-based size-stable insoluble electrode is not significantly consumed throughout the operation. Its function is to participate in the hydrogen evolution reaction as a cathode during the positive pulse phase and to withstand a short-term oxidation potential as an anode during the reverse pulse phase. In one alternative implementation, the sacrificial electrode can also be made of pure aluminum or pure iron, and the insoluble electrode can also be made of graphite or stainless steel. The specific material selection depends on the ionic composition of the mine water and the target to be removed.

[0035] The pulsed electrocoagulation reactor is powered by a programmable pulsed power supply. The programmable pulsed power supply operates in an asymmetric polarity reversal mode, meaning that the durations of the forward pulse phase and the reverse pulse phase are unequal within each polarity reversal cycle. In the forward pulse phase, the sacrificial electrode is connected to the positive terminal of the power supply as the anode, undergoing electrochemical dissolution to release metal ions, while the insoluble electrode acts as the cathode, precipitating hydrogen gas. The forward pulse phase is the main operating phase for the actual electrocoagulation reaction. In the reverse pulse phase, the sacrificial electrode becomes the cathode, and the insoluble electrode becomes the anode. At this time, the surface of the sacrificial electrode is at the cathode reduction potential, and the passivation oxide film and fouling layer that have gradually accumulated during operation are either reduced and dissolved or mechanically stripped during hydrogen evolution. The reverse pulse phase is designed to have a shorter duration because its purpose is only to remove the passivation film, not to perform effective electrocoagulation treatment. If the reverse phase duration is too long, although the insoluble electrode will not dissolve significantly at the anode potential, it may lead to the slow degradation of the catalytic coating and waste electrical energy without producing effective flocculant. In one specific implementation, the duration of the forward pulse phase accounts for 70% to 95% of a single polarity reversal cycle, and the duration of the reverse pulse phase accounts for 5% to 30% of a single polarity reversal cycle. For example, when a single polarity reversal cycle is 10 seconds, the forward pulse lasts for 8.5 seconds, and the reverse pulse lasts for 1.5 seconds. In an alternative implementation, the forward proportion can be fixed at 85%, and the reverse proportion can be temporarily increased to 30% only when an abnormal increase in the sacrificial electrode tank voltage is detected to perform enhanced depassivation operation.

[0036] The programmable pulse power supply has a response time of less than 1ms, enabling it to switch the output current waveform within 1ms after receiving a control command. The pulse frequency is continuously adjustable from 0.1Hz to 100Hz, and the peak current density during the positive pulse phase is continuously adjustable from 0 to 50mA / cm². These two parameters, pulse frequency and peak current density, directly determine the metal ion dissolution rate of the sacrificial electrode per unit time—a higher frequency means more positive pulses per unit time, and a higher peak current density means a greater dissolution intensity during each pulse. These two parameters, along with the proportion of positive pulses, constitute the three control variables for optimal control in subsequent steps. The programmable pulse power supply has built-in current and voltage sampling circuits that record the cell voltage and output current between the sacrificial and insoluble electrodes in real time. A cell voltage acquisition unit is also installed between the sacrificial and insoluble electrodes. This unit is independent of the internal sampling circuit of the pulse power supply and is directly connected to the leads of the two electrodes to obtain more accurate inter-electrode voltage data, which is used for subsequent calculations of energy consumption per unit volume of water.

[0037] The air flotation separation zone inside the pulsed electrocoagulation reactor is equipped with a bubble refining and dispersion unit. During the forward pulse phase, the insoluble electrode, acting as the cathode, precipitates a large amount of hydrogen gas. These hydrogen bubbles are dispersed and refined by the bubble refining and dispersion unit, forming microbubbles with diameters ranging from 10 to 100 micrometers. As these microbubbles rise, they collide with and adhere to the flocs generated by electrocoagulation, carrying the flocs to the liquid surface to complete the air flotation separation. The scum is collected and discharged by a scraper. In one specific embodiment, the bubble refining and dispersion unit employs a porous titanium plate structure with pore sizes between 50 and 200 micrometers, installed above the electrode zone in the transition section between the air flotation separation zone. In an optional embodiment, the bubble refining and dispersion unit can also employ a stainless steel wire mesh laminate structure or a microporous ceramic plate structure.

[0038] A water quality sensor array is installed at the inlet, comprising an inlet conductivity sensor, an inlet turbidity sensor, and an inlet pH sensor. The inlet conductivity sensor uses a four-electrode method, with a measurement range covering 100 microsiemens per centimeter to 20,000 microsiemens per centimeter, and is used to characterize the total dissolved ion concentration of the mine water. The inlet turbidity sensor uses a 90-degree scattering light method, with a measurement range of 0 to 4000 NTU. The inlet pH sensor uses a glass composite electrode, with a measurement range of 2 to 12. All three sensors collect data at a fixed sampling period, between 1 and 10 seconds. The collected conductivity, turbidity, and pH values ​​constitute the water quality data input required for subsequent spectral clustering.

[0039] A water quality sensor array and an online Zeta potential analyzer are installed in the effluent section. The effluent water quality sensor array includes an online turbidity sensor, an effluent conductivity sensor, and an effluent pH sensor, with measurement principles and ranges consistent with the corresponding sensors at the influent end. A bypass sampling branch is also provided in the effluent section, leading from the main effluent line to a low-flow branch. A flow stabilization unit and an defoaming unit are sequentially installed on this branch. The flow stabilization unit eliminates the interference of main effluent flow pulsations on Zeta potential measurement; in one specific embodiment, a constant-flow buffer tank is used, with an overflow weir inside to maintain a constant liquid level and stable flow rate. The defoaming unit removes microbubbles entrained in the water sample, as the presence of bubbles severely interferes with the measurement accuracy of electrophoretic light scattering; in one specific embodiment, an ultrasonic deaerator is used. After flow stabilization and defoaming treatment, the water sample enters the measurement cell of an online Zeta potential analyzer based on electrophoretic light scattering. The online Zeta potential analyzer drives the directional movement of charged colloidal particles in the water sample by applying an alternating electric field, and detects the electrophoretic velocity of the particles using the laser Doppler velocimetry principle, thereby calculating the Zeta potential value of the particle surface. The Zeta potential reflects the degree of charge neutralization on the particle surface. When the absolute value of the Zeta potential is below a certain threshold, it indicates that the metal ion hydrolysis products during electrocoagulation have sufficiently compressed the colloidal double layer, and the colloid is in a destabilized state, which is conducive to floc aggregation and subsequent sedimentation or flotation separation.

[0040] An online monitoring device for electrode consumption is installed at the support base of the sacrificial electrode. This device, based on electrochemical coulometrics, works as follows: A high-precision current sensor is connected in series in the power supply circuit of the sacrificial electrode to continuously sample and integrate the instantaneous current flowing through it, obtaining the cumulative total charge from the start of operation to the current moment. According to Faraday's law of electrolysis, given the known mass ratio of aluminum and iron in the sacrificial electrode and their respective electrochemical equivalents, the electrode dissolution mass is calculated from the cumulative total charge. Specifically, the electrochemical equivalent of aluminum is 9 grams of aluminum (valent 3) dissolved per 96485 coulombs, and the electrochemical equivalent of iron is 27.9 grams of iron (valent 2) or 18.6 grams of iron (valent 3) dissolved per 96485 coulombs. The actual valence state of the dissolved iron ions depends on the anode potential and the pH of the solution. The online monitoring device continuously outputs the cumulative electrode dissolution mass to the edge computing gateway as input for subsequent optimization objectives.

[0041] All of the aforementioned sensor arrays, the online Zeta potential analyzer, the online electrode consumption monitoring device, the tank voltage acquisition unit, and the programmable pulse power supply are connected to the edge computing gateway via an industrial Ethernet network. The edge computing gateway is responsible for aggregating all acquired data and performing subsequent spectral clustering for operational condition classification, dynamic model inference and updating of neural ordinary differential equations, and optimal control solution.

[0042] refer to Figure 1 , Figure 1 The horizontal axis represents time in seconds, and the vertical axis represents the current density applied between the sacrificial electrode and the insoluble electrode in milliamperes per square centimeter. Figure 1 The diagram shows three consecutive complete polarity reversal cycles, each lasting 10 seconds. Within each polarity reversal cycle, the waveform consists of two distinct phases. The first phase is a positive pulse phase, where the current density jumps from zero to a positive peak and remains at that peak level for approximately 8.5 seconds before returning to zero. During the positive pulse phase, the sacrificial electrode is connected to the positive terminal of the power supply as the anode, undergoing an electrochemical dissolution reaction that releases aluminum and iron ions. These metal ions enter the mine water and hydrolyze to form flocculants, neutralizing the charge and sweeping flocculation of suspended solids and colloidal particles. Simultaneously, the insoluble electrode acts as the cathode, precipitating hydrogen gas, and the resulting microbubbles are used for subsequent air flotation separation. The second phase is a reverse pulse phase, where the current density jumps from zero to a negative value and remains at that level for approximately 1.5 seconds before returning to zero. During the reverse pulse phase, the sacrificial electrode becomes the cathode, and the insoluble electrode becomes the anode. The passivated oxide film that gradually forms on the surface of the sacrificial electrode during its prolonged operation as an anode in the forward pulse phase is reduced and dissolved under the cathodic reduction potential in the reverse phase, or mechanically stripped during hydrogen evolution, thereby restoring the active state of the electrode surface. Figure 1 As can be seen, the duration of the forward pulse phase accounts for 85% of a single polarity reversal cycle, while the reverse pulse phase accounts for only 15%, showing a significant asymmetry in the duration ratio of the two phases. The intention behind this asymmetric design is that the forward phase undertakes the majority of the electrocoagulation treatment task, while the reverse phase only requires a brief energization to effectively remove the passivation film without consuming the same amount of time and energy as the forward phase. Figure 1 The location of the peak current density is also marked. The peak current density is the maximum current density value output by the programmable pulse power supply during the forward pulse phase, and it is optimized as one of the three control variables in the subsequent optimal control solution. The waveforms of the three consecutive cycles show that the waveform shape is completely consistent in each cycle, reflecting the periodic output characteristics of the pulse power supply during steady-state operation. In actual operation, the pulse frequency, the proportion of forward pulses, and the peak current density are all adjusted in real time by the edge computing gateway based on the optimal control solution results. Therefore, the waveform parameters may change between adjacent cycles. Figure 1 The figure shows a typical waveform under a certain steady-state condition.

[0043] After the water quality data collected by the influent water quality sensor group reaches the edge computing gateway, spectral clustering is performed to determine the current operating condition category of the mine water. The execution process of spectral clustering is as follows.

[0044] First, the conductivity, turbidity, and pH values ​​collected by the influent water quality sensor array at multiple consecutive sampling times are combined to form a multidimensional water quality feature vector. Each sampling time corresponds to a 3D water quality feature vector, whose three components are the conductivity, turbidity, and pH values ​​at that time, respectively. During the initial system debugging phase, a sufficient number of water quality feature vectors need to be accumulated to establish a spectral clustering model. In one specific implementation, the number of accumulated sampling times is no less than 500. Zero-mean, unit-variance normalization is then performed on each component of all water quality feature vectors to eliminate the influence of different physical dimensions and numerical ranges.

[0045] Then, Gaussian kernel similarity is calculated pairwise for all normalized water quality feature vectors to construct a similarity matrix. For the ... Water quality feature vectors and the Water quality feature vectors Gaussian kernel similarity between the two The calculation method is as follows: divide the square of the Euclidean distance between the two vectors by twice the kernel bandwidth parameter. The square of is taken, and its negative value is used to calculate the natural exponential function value. Indicates the first The normalized 3D water quality feature vector at each sampling time point Indicates the first The normalized 3D water quality feature vector at each sampling time point The kernel bandwidth parameter controls how quickly similarity decays with distance. When the value is small, only sample pairs that are very close to each other have significant similarity, and the clustering results tend to be more refined; When the value is large, even distant sample pairs retain a certain degree of similarity, and the clustering results tend to be coarse. In one specific implementation, The similarity matrix is ​​calculated by taking the median Euclidean distance between all sample pairs and setting it between 0.5 and 2 times. The Gaussian kernel similarity of all sample pairs is then used to construct the similarity matrix. , It is a symmetric matrix with a dimension equal to the total number of sampling times.

[0046] Next, the similarity matrix Calculate the normalized Laplacian matrix. First, calculate the degree matrix. , Let be a diagonal matrix, and its first... diagonal elements Equal to the similarity matrix No. The sum of all elements in a row. Normalized Laplace matrix. The calculation method is as follows: degree matrix Left and right multiplication of the negative 1 / 2 power by the Laplace matrix ,in equals degree matrix Subtract the similarity matrix Compared to the unnormalized Laplace matrix, the normalized Laplace matrix can eliminate the bias of different node degrees on the clustering results, making the clustering results focus more on the connection structure between data points rather than individual high-connectivity nodes.

[0047] For the normalized Laplace matrix Perform eigenvalue decomposition, sort all eigenvalues ​​in ascending order, and take the first few eigenvalues. The eigenvectors corresponding to the smallest eigenvalues ​​form a dimension-reduced matrix. . The value of is the preset number of working condition categories. In one specific implementation method... The value ranges from 3 to 6, corresponding to different mine water quality states. The value can be determined based on the "interval jump" criterion of the eigenvalue spectrum: when the first... The eigenvalue and the th eigenvalue When a significant jump occurs between eigenvalues, it indicates that the preceding... One eigenvector is sufficient to describe the main clustering structure of the data. Dimensionality reduction matrix The number of rows equals the total number of sampling times, and the number of columns equals... Each row can be considered as the corresponding sampling time. Embedded coordinates in the dimensionality-reduced feature space.

[0048] refer to Figure 2 , Figure 2 The horizontal axis represents the eigenvalue index, arranged in ascending order, while the vertical axis represents the magnitude of the corresponding eigenvalue. Figure 2 The CCP presented 15 characteristic values, arranged from left to right in a bar chart. From Figure 2 A significant structural feature can be observed: the first four eigenvalues ​​are extremely small, all distributed within a narrow range close to zero, approximately 0.001, 0.008, 0.015, and 0.025 respectively; however, starting from the fifth eigenvalue, the value jumps sharply to 0.32, and then gradually increases to around 1.10. There is a clear abrupt change between the fourth and fifth eigenvalues. Figure 2 The position of this transition is marked with a dashed line and labeled. This interval transition has a clear mathematical meaning: in spectral clustering theory, the normalized Laplace matrix... The number of eigenvalues ​​close to zero is directly related to the number of clusters inherent in the data. When the data happens to contain... When there are two separate clusters, Just happen to have One eigenvalue is close to zero, while the remaining eigenvalues ​​deviate significantly from zero. Therefore, the appropriate number of clusters can be determined by observing the interval transition positions in the eigenvalue spectrum. . Figure 2 The jump occurs between the 4th and 5th eigenvalues, indicating that the influent water quality data naturally clusters into four operating condition categories in the dimensionality-reduced feature space. The eigenvectors corresponding to the smallest eigenvalues ​​form a dimension-reduced matrix. Dimensionality reduction matrix Each row corresponds to a sampling time. Embedding coordinates in the dimensionality-reduced feature space. Subsequent steps will involve adjusting the dimensionality-reduced matrix. K-means clustering is performed on each row vector to obtain the final working condition category classification. In practical applications, The selection of the value does not entirely rely on manual visual judgment; it can also be automatically determined by combining quantitative calculation of the eigenvalue interval ratio: when the first... The eigenvalue and the th eigenvalue When the ratio of the individual feature values ​​exceeds a preset multiple threshold, it is determined that... This represents the optimal number of clusters.

[0049] For the dimension reduction matrix K-means clustering is performed on each row vector to obtain... Each operating condition category is assigned a cluster center in the reduced-dimensional feature space. Each operating condition category represents a typical mine water quality state, such as low-turbidity, low-salt condition; high-turbidity, medium-salt condition; and low-turbidity, high-salt condition. Each operating condition category is pre-associated with one cascade reuse target scenario and its corresponding upper limit threshold for water quality. Cascade reuse target scenarios include industrial cooling water reuse, domestic miscellaneous water reuse, agricultural irrigation reuse, and ecological replenishment water reuse. Different reuse scenarios have different upper limit requirements for effluent turbidity, Zeta potential, conductivity, and pH. For example, the upper limit threshold for effluent turbidity in the industrial cooling water reuse scenario can be set to 20 NTU, for the domestic miscellaneous water reuse scenario to 5 NTU, for the agricultural irrigation reuse scenario to 50 NTU, and for the ecological replenishment reuse scenario to 10 NTU. The association between operating condition categories and cascade reuse target scenarios is pre-determined by engineering technicians during the system commissioning phase based on the actual water demand of the mining area and economic analysis under each operating condition.

[0050] When new influent water quality data arrives during actual operation, the edge computing gateway performs normalization processing on the new influent water quality data in the same way as historical samples. Specifically, it uses the mean and standard deviation of each component recorded when establishing the spectral clustering model to perform zero-mean unit variance normalization. After normalization, the previous... The eigenvector corresponding to the smallest eigenvalue maps the normalized new influent water quality data to a reduced-dimensional feature space. In one specific implementation, this mapping process is achieved using the Nystrom approximation method: Utilizing the existing similarity matrix and eigenvectors, the Gaussian kernel similarity vector between the new sample and all historical samples is calculated. Then, by interpolating the existing eigenvalues ​​and eigenvectors, the embedding coordinates of the new sample in the reduced-dimensional feature space are obtained. In the reduced-dimensional feature space, the Euclidean distance between the mapped new influent water quality data and the cluster centers of each operating condition category is calculated, and the operating condition category with the smallest Euclidean distance is taken as the current operating condition category. The edge computing gateway then retrieves the cascade reuse target scenario associated with the current operating condition category and the corresponding water quality upper limit threshold for use in subsequent optimal control solutions.

[0051] refer to Figure 3 , Figure 3 The horizontal and vertical axes represent the first and second dimensions of the reduced feature space, respectively, and are both dimensionless values. Figure 3 Four scatter plots are distributed throughout the data, each distinguished by a different marker shape, corresponding to four operating conditions: Condition 1 is low turbidity and low salinity, Condition 2 is high turbidity and medium salinity, Condition 3 is low turbidity and high salinity, and Condition 4 is high turbidity and high salinity. These four scatter plots occupy different regions in the reduced-dimensional feature space and are mutually separated. Within each cluster, the scatter points are tightly clustered around their respective cluster centers, while the boundaries between different clusters are clearly discernible. The cluster centers of each cluster are marked with larger-sized markers. The cluster centers are derived from the reduced-dimensional matrix. The row vectors obtained after performing K-means clustering Each center vector represents a typical position of each working condition category in the reduced-dimensional feature space. Figure 3 It can be seen that the distribution of the four cluster centers on the two-dimensional plane roughly presents a four-quadrant distribution pattern. Different working conditions have sufficient separation in the dimensionality-reduced feature space, which shows that spectral clustering can effectively distinguish the various water quality states of mine water. Figure 3 The diagram also marks a new influent data mapping point, indicated by a pentagram. This point represents the location of newly arrived influent water quality data at a certain moment during actual operation, mapped to the dimensionality-reduced feature space after normalization. A dashed line segment is drawn between the new influent data mapping point and the cluster center of Condition 1, with the judgment result of the minimum Euclidean distance marked next to it. This indicates that after receiving new influent water quality data, the edge computing gateway calculates the Euclidean distance between the new data mapping point and all four cluster centers in the dimensionality-reduced feature space, and selects the condition category corresponding to the cluster center with the smallest Euclidean distance as the current condition category. Figure 3In the scenario shown, the new influent data mapping point is closest to the cluster center of condition 1, so it is determined to be condition 1, i.e., low turbidity and low salinity condition. Then, it is matched with the pre-associated cascade reuse target scenario and water quality upper limit threshold of condition 1.

[0052] In one optional implementation, when mine water quality frequently switches between different operating conditions, to avoid drastic changes in the control target, a time-sliding window smoothing process can be applied to the classification results of spectral clustering. That is, among the classification results of the most recent consecutive sampling times, the operating condition category with the highest frequency is selected as the currently effective operating condition category. In another optional implementation, the spectral clustering model can also be reconstructed periodically using newly accumulated operational data to adapt to the long-term drift of mine water quality. In one specific implementation, the reconstruction cycle is 7 to 30 days.

[0053] After completing the spectral clustering and operational condition classification in step 1, the edge computing gateway immediately enters the continuous-time dynamic modeling and online optimization control stage of the electrocoagulation process. The core task of this stage is to use the neural network constant differential equation dynamic model to continuously model the coupled processes such as electrochemical dissolution, colloid destabilization, and floc aggregation inside the pulse electrocoagulation reactor, and on this basis, solve the optimal operating parameters of the programmable pulse power supply in real time using a rolling optimization method, so as to minimize electrode consumption and power consumption while meeting the effluent water quality standards.

[0054] The neural network's frequent differential equation dynamics model is deployed in an edge computing gateway, and its overall operation consists of two core components working together: a state evolution network and a numerical integrator. The relationship between the two is that the state evolution network describes the instantaneous change trend of the system state at any given time, while the numerical integrator accumulates this instantaneous trend along the time axis to obtain the predicted state trajectory from the current time to any future time. The neural network frequent differential equations were chosen instead of traditional discrete-time recursive models (such as neural networks in the form of difference equations) because the electrochemical reactions, double-layer compression, and floc collision and aggregation in the electrocoagulation process are all physically continuous-time processes, and their dynamic characteristics vary greatly in time scale under different operating parameters—the state changes rapidly with high-frequency pulses and slowly with low-frequency pulses. Continuous-time modeling naturally adapts to this variation in time scale, while discrete-time models introduce significant model errors when the sampling interval does not match the actual dynamics.

[0055] The state evolution network is a fully connected neural network with three hidden layers, each containing 64 neurons and using the tanh activation function. Tanh was chosen instead of the more common ReLU activation function because its output is continuously differentiable and bounded between -1 and +1. This is crucial for subsequent gradient calculation using the adjoint state method—ReLU is non-differentiable at zeros and its gradient is always zero on the negative half-axis, easily leading to gradient vanishing or numerical instability during backpropagation of the adjoint trajectory. Tanh, on the other hand, is smooth and continuous across the entire domain, ensuring good numerical properties of the solution to the adjoint equation during back-integration. The three hidden layers with 64 neurons each represent a trade-off between model expressiveness and edge computing gateway inference speed. In an alternative implementation, the number of hidden layers can be adjusted to two to five, and the number of neurons per layer can be adjusted to 32 to 128, depending on the computing power margin of the edge computing gateway and the nonlinear complexity of the electrocoagulation process.

[0056] The input to the state evolution network is an 8-dimensional vector, composed of two state variables and six driving variables at the current moment. The two state variables are effluent turbidity and Zeta potential. Effluent turbidity directly reflects the content of residual suspended solids and fine flocs in the water after electrocoagulation treatment, and is a core indicator for determining the quality compliance of cascade reclaimed water. Zeta potential reflects the degree of surface charge neutralization of colloidal particles in the water. The closer the absolute value of the Zeta potential is to zero, the more fully the metal ion hydrolysis products released by electrocoagulation compress the colloidal double layer, the more thorough the destabilization of the colloid, and the better the subsequent floc aggregation and air flotation separation. Choosing these two quantities as state variables precisely characterizes the dynamic behavior of the electrocoagulation process from both macroscopic (turbidity) and microscopic (charge neutralization) levels. The six driving variables are, in order, pulse frequency, positive pulse ratio, peak current density, influent conductivity, influent turbidity, and influent pH value. The first three driving variables are the operating parameters of the programmable pulse power supply, which are controllable inputs; the latter three driving variables are the data collected by the influent water quality sensor group, which are uncontrollable external disturbance inputs. By incorporating both controllable and disturbance inputs into the driving variables, the state evolution network can learn the mapping relationship of "how different power supply operating parameters affect the evolution trend of effluent water quality under specific influent water quality conditions".

[0057] Specifically, at any given moment The state variable vector at that moment and driving variable vector The vectors are concatenated into an 8-dimensional input vector and fed into the state evolution network. It is a 2-dimensional vector, whose first component is the turbidity value of the effluent at that moment, and the second component is the Zeta potential value at that moment; The input is a 6-dimensional vector, whose six components are, in turn, the pulse frequency, the proportion of positive pulses, the peak current density, the influent conductivity, the influent turbidity, and the influent pH value at that moment. After receiving this 8-dimensional input, the state evolution network transforms it layer by layer through three hidden layers, finally outputting a 2-dimensional vector, denoted as [vector name missing]. ,in This represents the set of all connection weights and biases in the state evolution network. The first component of the output vector corresponds to the instantaneous rate of change of effluent turbidity with respect to continuous time, and the second component corresponds to the instantaneous rate of change of Zeta potential with respect to continuous time. In other words, the state evolution network describes: in the current state... and current driving conditions Next, we will examine how the effluent turbidity and Zeta potential will change in the next infinitesimal time interval.

[0058] The numerical integrator integrates the instantaneous rate of change of the state evolution network output along the time axis to obtain the complete evolution trajectory of the state variables from a known initial moment to a future target moment. The numerical integrator employs a 4th-order, 5-level Dormand-Prince adaptive step-size Runge-Kutta method. The Dormand-Prince method belongs to the embedded Runge-Kutta method family. Within each integration step, it simultaneously calculates numerical solutions of both 4th and 5th order precision, using the difference between the two to estimate the local truncation error of the current step. When the estimation error is less than a preset tolerance, the step is accepted and the step size is increased to accelerate the integration speed; when the estimation error exceeds the preset tolerance, the step is rejected and the step size is reduced to ensure accuracy. This adaptive step-size mechanism is particularly suitable for modeling electrocoagulation processes because when the programmable pulse power supply undergoes drastic state changes during pulse switching, the integrator automatically uses a smaller step size to track rapid changes; while during the steady-state phase of the pulse, when state changes are slow, the integrator automatically increases the step size to reduce unnecessary computation. In one specific implementation, the relative error tolerance of the adaptive step size is set to... The absolute error tolerance is set to The initial step size is set to 0.01 seconds.

[0059] The starting point for numerical integration is the beginning of the current control cycle, at which point the initial values ​​of the state variables are directly assigned by the measured values ​​from the effluent water quality sensor group and the online Zeta potential analyzer. Specifically, the effluent turbidity value collected by the online turbidity sensor at this moment is taken as... The first component is the Zeta potential value collected by the online Zeta potential analyzer at that moment. The second component, in which This indicates the start time of the current control cycle. From The numerical integrator proceeds step-by-step by invoking the state evolution network. Within each integration substep, it first reads the values ​​of the driving variables at the corresponding moment (pulse frequency, positive pulse ratio, and peak current density are taken from the current operating parameters or candidate parameters in the optimization solution; influent water quality data are taken from the latest collected values ​​of the influent water quality sensor group or their linear extrapolation values). These values ​​are then concatenated with the current state and fed into the state evolution network to obtain the instantaneous rate of change. Finally, the Dormand-Prince method completes the numerical integration for that substep. This process is repeated until the final moment in the control time domain is reached. ,in To control the time domain length. In one specific implementation, the time domain length is controlled. The control time domain is set to 60 to 300 seconds, and the length of a single control cycle is set to 30 to 120 seconds. The length of the control time domain is longer than the length of a single control cycle, which makes the optimization solution have a certain degree of foresight.

[0060] The parameters of the neural network's frequent differential equation dynamics model are updated online using a slow-period online update method. The reason for not updating the parameters in every control cycle is twofold: First, the inverse integration computation of the single-cycle adjoint state method is costly; if it were executed in every control cycle, coupled with the optimal control solution also performed within the same cycle, the computational load on the edge computing gateway would be excessively concentrated. Second, neural network parameter updates require a certain number of observation samples to obtain a stable gradient direction; updating using only data from one control cycle can easily lead to parameter oscillations. Therefore, the parameters are updated slowly in each cumulative cycle. Parameter updates are performed once every control cycle. The value ranges from 5 to 20. In one specific implementation, Set to 10, meaning that the model parameters will be updated once every 10 control cycles.

[0061] The specific execution process of parameter update is as follows: Retrieve the most recent value. The measured data from each control cycle constitute the training batch. For the first... One control cycle ( From 1 to The measured values ​​of the effluent water quality sensor group and the online Zeta potential analyzer at the beginning of the cycle are used as the initial conditions for this integration segment. The actual operating parameters of the programmable pulse power supply and the collected values ​​from the influent water quality sensor group within this cycle are used as driving variables. The numerical integrator then... Integrate forward to the end of the cycle. , to obtain the predicted value Simultaneously, the measured value at the end of the cycle is read from the sensor's data acquisition and recording. For all The mean square error between the predicted and measured values ​​of a segment is calculated and used as a loss indicator. . Equal to all The square of the difference between the predicted and measured values ​​at the terminal time of each segment is expressed in terms of the sum of the two state components. The average value over the segment.

[0062] Next, the loss metric needs to be calculated. For all connection weights and biases in the state evolution network The gradient is obtained. The adjoint state method is used here. The core idea of ​​the adjoint state method is: instead of directly storing the computation graph of each intermediate step in the forward integration process (which would consume a lot of memory for long-term integration), an adjoint variable with the same dimension as the state variable is introduced. The gradient is calculated by integrating backwards from the terminal time to the initial time. For each integral segment, the adjoint variable at the terminal time... The initial value is set as the partial derivative of the loss index with respect to the predicted value of the terminal segment. This partial derivative can be directly calculated using the analytical expression for the mean square error. Begin by including the accompanying variables. Combined with the state trajectory recorded during forward integration, a backward time integration is performed on an augmented ordinary differential equation system. This augmented system simultaneously contains the evolution equations of the adjoint variables with respect to time and the cumulative equations of the parameter gradients with respect to time. After the backward integration is completed, the loss metric is obtained. The gradient value for each connection weight and each bias is calculated. This method's memory consumption is independent of the number of integration steps, depending only on the state dimension and the number of network parameters, making it suitable for deployment on memory-constrained hardware such as edge computing gateways.

[0063] After obtaining the gradient, use the Adam optimizer to adjust the gradient. A one-step update is performed. The Adam optimizer maintains two exponential moving averages: the first moment estimate of the gradient and the second moment estimate of the gradient, and adaptively adjusts the update step size for each parameter by the ratio of the two. In one specific implementation, the learning rate is fixed at 0.001, and the first moment decay coefficient of the Adam optimizer... Set to 0.9, second-order moment attenuation coefficient The value is set to 0.999. Performing only one parameter adjustment step per update trigger, instead of multiple iterations, is to avoid overfitting on a single batch of data and to control the computation time of a single update to not exceed the real-time requirements of the edge computing gateway. In an alternative implementation, the number of steps in a single update can be increased to 3 to 5 steps, but the slow cycle interval needs to be adjusted accordingly. Increase the learning rate to 15 to 20 to accumulate more observational data. In another alternative implementation, the learning rate can also be gradually decreased from 0.001 to 0.0001 using a cosine annealing strategy to reduce parameter fluctuations as the model tends to stabilize after a long period of operation.

[0064] In step 3, the edge computing gateway performs an optimal control solution once at the beginning of each control cycle. The purpose of this solution is to find the optimal time trajectory of the programmable pulse power supply operating parameters from the current time to the control time domain terminal time, while ensuring that the effluent turbidity and Zeta potential meet the upper limit threshold of water quality matched in step 1, so as to minimize the normalized weighted sum of electrode consumption and energy consumption per unit volume of water.

[0065] The optimal control solution employs the direct collocation method to transform the continuous-time optimal control problem into a finite-dimensional nonlinear programming problem. Specifically, 20 collocation points are uniformly set within the control time domain, denoted as... The time interval between adjacent coordinate points is equal to the length of the control time domain. Divide by 19. At each coordinate point, assign an independent value to each of the three control variables: pulse frequency, positive pulse ratio, and peak current density, thereby generating... There are discrete decision variables. The control variable values ​​between adjacent coordinate points are transitioned using third-order polynomial interpolation to ensure that the control trajectory is continuous and smooth in time, avoiding unnecessary electrical shocks caused by the programmable pulse power supply receiving step command jumps. In an optional implementation, the number of coordinate points can be adjusted to 10 to 30. More coordinate points result in higher time resolution of the control trajectory, but the number of decision variables also increases accordingly, and the solution time becomes longer.

[0066] The direct collocation method requires that the integral consistency condition be satisfied at each collocation point, meaning that the change in state variable values ​​between adjacent collocation points must be consistent with the integral value of the instantaneous rate of change given by the state evolution network over that time interval. These consistency conditions are incorporated into the nonlinear programming problem in the form of equality constraints. Specifically, for the ... The first point and the second For the time interval between each collocation point, using the output values ​​of the state evolution network at the two ends and the midpoint of that segment, as well as the control variable values ​​interpolated by the third-order polynomial, calculate the integral approximation of the state variable over that segment according to the Hermite-Simpson formula, and require that this approximation be close to the first collocation point. The difference between the state variable values ​​at each collocation point is zero. Thus, for 19 adjacent collocation point intervals and 2 state components, a total of [number missing] are generated. Equality constraints.

[0067] The optimization objectives include two aspects. The first is electrode consumption. Electrode consumption is predicted as follows: based on the peak current density and positive pulse ratio at each point within the control time domain, combined with the effective working area of ​​the sacrificial electrode, the average anodic dissolution current during the positive pulse phase at each point is estimated. Then, the accumulated charge is obtained by time integration along the control time domain. Finally, the accumulated charge is converted into a predicted value of the accumulated electrode dissolution mass according to Faraday's law of electrolysis. In one specific implementation, the effective working area of ​​the sacrificial electrode is measured during system installation and stored in the edge computing gateway's configuration file, and is a known constant. The second aspect is energy consumption per unit volume of water. A tank voltage acquisition unit placed between the sacrificial electrode and the insoluble electrode provides real-time inter-electrode voltage data. Energy consumption per unit volume of water is predicted as follows: at each point within the control time domain, the most recent acquisition value from the tank voltage acquisition unit (or an empirically corrected tank voltage value varying with current density in the optimization solution) is multiplied by the peak current density at that point, and then multiplied by the effective working area and effective energization time of the sacrificial electrode to obtain the energy consumption for that point during the corresponding time period. The effective energizing time is equal to the interval between adjacent points multiplied by the proportion of positive pulses, because effective electrical energy is only consumed for electrocoagulation during the positive pulse phase. The sum of the electrical energy consumption at all points, divided by the treated water volume in the control time domain, yields the predicted electrical energy consumption per unit volume of water. The treated water volume is calculated based on the data collected by the electromagnetic flowmeter at the inlet and the length of the control time domain. In an optional implementation, the tank voltage can also be modeled as a function of the peak current density. This involves fitting a linear or quadratic relationship curve between the tank voltage and current density using recent operating data. In the optimization solution, the tank voltage is directly predicted from the current density, thus more tightly coupling the prediction of electrical energy consumption per unit volume with the control variables.

[0068] To synthesize the two optimization objectives into a single scalar objective function to fit the standard solution format of a sequential quadratic programming solver, the two objectives are normalized separately and then weighted and summed according to preset weights. The normalization method involves dividing each term by its respective reference value, mapping both terms to a dimensionless, comparable order of magnitude. The reference value for electrode consumption is taken as one percent of the initial total mass of the sacrificial electrodes, and the reference value for electricity consumption per unit of water is taken as the typical electrocoagulation electricity consumption level corresponding to the current industrial electricity price in the mining area. In one specific implementation, the weight of the electrode consumption normalization term is set to 0.4, and the weight of the electricity consumption normalization term is set to 0.6, reflecting the actual engineering situation where electricity costs are usually higher than electrode consumable costs in mine water treatment operation costs. In one alternative implementation, the weights can also be dynamically adjusted according to the current operating condition category. When the spectral clustering determines that the operating condition is high turbidity and high salinity, electrocoagulation requires a larger current density and a higher pulse frequency to meet the standard. At this time, electrode consumption is more prominent, and the weight of the electrode consumption item can be appropriately increased to 0.5 or even 0.6. Conversely, under the low turbidity and low salinity operating condition, the weight of the power consumption item can be appropriately increased.

[0069] The inequality constraints require that the predicted effluent turbidity and Zeta potential values ​​at all 20 coordinate points within the control time domain satisfy the upper limit threshold for water quality matched in step 1. For effluent turbidity, the predicted value at each coordinate point must not exceed the upper limit threshold for turbidity corresponding to the current cascade reuse target scenario. For Zeta potential, the absolute value of the predicted Zeta potential at each coordinate point must not exceed the upper limit threshold for Zeta potential corresponding to the current cascade reuse target scenario. Thus, for 20 coordinate points and 2 state constraints, a total of [number missing] inequality constraints are generated. There are several inequality constraints. In addition, the three control variables are subject to physical upper and lower bounds at each collocation point: pulse frequency not less than 0.1Hz and not more than 100Hz, positive pulse percentage not less than 70% and not more than 95% (consistent with the setting of the asymmetric polarity reversal mode), and peak current density not less than 0 and not more than 50mA / cm². These upper and lower bound constraints are added to the nonlinear programming problem in the form of simple box constraints. For 20 collocation points and 3 control variables, a total of [number missing] inequality constraints are generated. Individual box constraints.

[0070] In summary, the nonlinear programming problem includes 60 decision variables, 38 equality constraints (integral consistency), 40 inequality constraints (water quality compliance), and 120 bin constraints (physical upper and lower bounds). The objective is to minimize a normalized weighted scalar objective function. A sequential quadratic programming solver is used to solve this nonlinear programming problem. The sequential quadratic programming solver works as follows: at the current iteration point, the nonlinear objective function is approximated with a quadratic function, and the nonlinear constraints are approximated with linear functions. The resulting quadratic programming subproblem obtains the search direction and step size, and then the iteration point is updated. This process is repeated until the convergence criterion is met. In one specific implementation, the convergence criterion is set as: the change in the objective function value between two consecutive iterations is less than... And the total number of constraint violations is less than The maximum number of iterations is set to 200.

[0071] To accelerate the solution process and avoid getting trapped in undesirable local optima, the optimal solution from the previous control cycle is used as the initial guess value for the current cycle. In the first control cycle after system startup, since no historical optimal solution is available, the initial guess value is set to the median value of the physical range of each control variable, i.e., a pulse frequency of 50Hz, a positive pulse ratio of 82.5%, and a peak current density of 25mA / cm². From the second control cycle onwards, the optimal control variable values ​​at the 20 collocation points obtained in the previous cycle are directly used as the initial guess values ​​for the current cycle. Because the influent water quality and system state typically do not change drastically between adjacent control cycles, the optimal solution from the previous cycle is already very close to the optimal solution for the current cycle. Therefore, the sequential quadratic programming solver usually converges within a few iterations (often less than 30), significantly reducing the solution time. In one specific implementation, the computation time for a single optimal control solution on the edge computing gateway does not exceed 3 seconds, far less than the control cycle length (30 to 120 seconds), leaving ample time margin.

[0072] After the solution is obtained, the optimal values ​​of pulse frequency, positive pulse ratio, and peak current density at the first collocation point corresponding to the current moment are taken and sent to the programmable pulse power supply for execution via industrial Ethernet. The response time of the programmable pulse power supply is less than 1ms, and it immediately adjusts the pulse current waveform output to the sacrificial electrode and the insoluble electrode after receiving new operating parameters. During the continuous operation of the current control cycle, the programmable pulse power supply continues to work according to the sent operating parameters until it receives the operating parameters obtained from a new round of optimization at the beginning of the next control cycle. In an optional implementation, if the control cycle is long, a fast update can also be inserted in the middle of the cycle: the interpolation result between the first and second collocation points is taken as the intermediate update value and sent, thereby making the execution granularity of the control trajectory more refined.

[0073] After the current control cycle ends, the effluent water quality sensor group and the online Zeta potential analyzer re-acquire the latest measured data. The online turbidity sensor provides the latest effluent turbidity value, and the online Zeta potential analyzer provides the latest Zeta potential value. These two measured values ​​serve as the new initial conditions for numerical integration in step 2 of the next control cycle. Simultaneously, the edge computing gateway checks whether the currently accumulated number of control cycles has reached the trigger condition for a slow cycle update (i.e., whether it has been completed). (One control cycle). If the triggering condition is met, the above parameter update process is executed, updating the connection weights and biases in the state evolution network; if not, the current parameters are used directly. Regardless of whether the parameter update is triggered, step 3 is immediately entered to execute the optimal control solution for the next control cycle. This cyclical process of "collecting measured data—determining whether to update the model—executing the optimal control solution—issuing operating parameters—waiting for the cycle to end—collecting again" constitutes a complete rolling optimization closed loop. During the continuous operation of the closed loop, the neural network dynamic model continuously corrects its understanding of the dynamic characteristics of the electrocoagulation process through slow-cycle online updates, while the optimal control solution re-plans the future operating strategy based on the latest model and the latest measured state in each control cycle. The two work together to ensure the system's continuous adaptability to fluctuations in influent water quality and slow changes in electrode state.

[0074] refer to Figure 4 , Figure 4The graph contains two sub-graphs, sharing the same horizontal axis representing time in seconds, ranging from 0 to 300 seconds. The vertical axis of the upper sub-graph represents effluent turbidity in NTU. The upper sub-graph contains a smooth solid line curve and several discrete hollow circular scatter points. The solid line curve represents the predicted effluent turbidity trajectory output by the neural network dynamics model based on the constant differential equation, while the scatter points represent the measured values ​​collected by the online turbidity sensor at the corresponding time points. The upper sub-graph shows that the effluent turbidity is approximately 195 NTU initially, then gradually decreases exponentially under electrocoagulation treatment, accompanied by some fluctuations, finally decreasing to approximately 25 NTU around 300 seconds. The solid line prediction curve and the discrete measured scatter points show good agreement, with the scatter points primarily distributed within a narrow band on both sides of the solid line. This narrow band represents the prediction confidence band, characterizing the uncertainty range of the model's predicted values. A horizontal dashed line is also drawn in the upper sub-graph at 20 NTU, representing the upper limit threshold for turbidity in industrial reuse scenarios. Approximately 50 seconds prior, both the predicted curve and the measured value were above this threshold line, indicating that the effluent turbidity had not yet met the standard. Subsequently, as electrocoagulation continued, the effluent turbidity gradually approached and eventually decreased to near the threshold. The upper subplot shows vertical dotted lines at 100 seconds and 200 seconds, representing the moments when the neural network dynamics model performs slow-cycle parameter updates. It can be observed that after the parameter update, the deviation between the predicted curve and the measured scatter plot narrowed, indicating that the online parameter update effectively corrected the model's accuracy in describing the actual electrocoagulation dynamics. The vertical axis of the lower subplot represents the Zeta potential, in millivolts. The lower subplot also includes a solid predicted curve and hollow square measured scatter plots. The Zeta potential is approximately -31 millivolts initially. As metal ions continuously compress the colloidal double layer during electrocoagulation, the absolute value of the Zeta potential gradually decreases, and the curve generally shows a trend of rising from -31 millivolts towards -5 millivolts. The horizontal dashed line at -10 mV in the subplot below is also marked as a reference for the upper limit threshold of the Zeta potential. Both subplots together demonstrate that the neural network dynamics model based on the constant differential equation can accurately track the continuous-time evolution of the two state variables, effluent turbidity and Zeta potential, during electrocoagulation, providing a reliable process prediction basis for subsequent optimal control solutions.

[0075] While continuously optimizing the closed-loop system, the edge computing gateway also performs tiered reuse level determination and diversion control. The effluent treated by the pulse electrocoagulation reactor is discharged from the overflow weir and enters the effluent pipeline. An electrically operated diversion valve assembly is installed on the effluent pipeline, consisting of multiple electrically operated three-way valves connected in series, capable of diverting the effluent into industrial reuse subsequent treatment pipelines, domestic reuse subsequent treatment pipelines, agricultural irrigation reuse subsequent treatment pipelines, or ecological water replenishment reuse subsequent treatment pipelines. The reuse level determination is based on measured data from the effluent water quality sensor group and the online Zeta potential analyzer. Specifically, the edge computing gateway reads the effluent turbidity collected by the online turbidity sensor, the Zeta potential collected by the online Zeta potential analyzer, the effluent conductivity collected by the effluent conductivity sensor, and the effluent pH value collected by the effluent pH sensor, comparing these four data points item by item with a preset water quality threshold table for each tiered reuse scenario. Each tiered reuse scenario in the threshold table corresponds to an upper limit threshold for the four water quality indicators. The judgment logic is as follows: starting from the reuse scenario with the most stringent water quality requirements (usually domestic reuse), the system checks each level sequentially. If all four indicators of the current effluent do not exceed the upper limit threshold of that scenario, the effluent is determined to meet the reuse requirements of that scenario and is then directed to the corresponding subsequent treatment pipeline. If any one indicator exceeds the upper limit threshold of that scenario, the system downgrades to checking the next scenario until a reuse scenario that meets all four indicators is found. If none of the scenarios meet the requirements, the effluent is directed to an emergency storage tank for further treatment. In one specific implementation, the threshold table is set as follows: For domestic reuse scenarios, the effluent turbidity should not exceed 5 NTU, the absolute value of the Zeta potential should not exceed 5 mV, the effluent conductivity should not exceed 1500 micro Siemens per centimeter, and the effluent pH value should be between 6.5 and 8.5; for industrial reuse scenarios, the effluent turbidity should not exceed 20 NTU, the absolute value of the Zeta potential should not exceed 10 mV, the effluent conductivity should not exceed 3000 micro Siemens per centimeter, and the effluent pH value should be between 6.0 and 9.0; for agricultural irrigation reuse scenarios, the effluent turbidity should not exceed 50 NTU, the absolute value of the Zeta potential should not exceed 15 mV, the effluent conductivity should not exceed 5000 micro Siemens per centimeter, and the effluent pH value should be between 5.5 and 9.5; for ecological water replenishment reuse scenarios, the effluent turbidity should not exceed 10 NTU, the absolute value of the Zeta potential should not exceed 8 mV, the effluent conductivity should not exceed 2000 micro Siemens per centimeter, and the effluent pH value should be between 6.0 and 9.0.

[0076] Upon receiving the reuse level command from the edge computing gateway, the electric diversion valve assembly completes valve position switching within 5 seconds, directing the effluent into the corresponding cascade reuse downstream treatment pipeline. Each downstream treatment pipeline is configured with corresponding advanced treatment processes based on the further water quality requirements of its respective reuse scenario. For example, domestic reuse downstream treatment pipelines may be configured with ultrafiltration and disinfection processes, industrial reuse downstream treatment pipelines may be configured with softening and corrosion inhibitor dosing processes, agricultural irrigation reuse downstream treatment pipelines may only be configured with simple sedimentation tanks for further clarification, and ecological replenishment reuse downstream treatment pipelines may be configured with activated carbon adsorption and ecological stabilization ponds. The specific configuration of these downstream treatment processes is not limited by the current method and will be determined by engineering technicians based on the actual water use standards and economic conditions of the mining area.

[0077] In one optional implementation, the reuse level determination can also incorporate a hysteresis mechanism to avoid frequent valve position switching between adjacent levels. Specifically, when the effluent quality improves from a lower level to meet the requirements of a higher level, the upgrade switch is only implemented after the determination results for several consecutive sampling cycles (e.g., 10 consecutive sampling cycles) consistently meet the higher level requirements; conversely, when the quality deteriorates from a higher level to a lower level, the switch is initiated immediately to ensure water safety. In another optional implementation, the electric diversion valve assembly can also adopt a proportional diversion mode instead of a full-flow switching mode, that is, simultaneously distributing effluent to multiple downstream treatment pipelines according to different flow ratios to improve water resource utilization efficiency and reduce valve operation frequency.

[0078] While specific embodiments of the present invention have been described above, those skilled in the art should understand that these specific embodiments are merely illustrative. Those skilled in the art can omit, substitute, and modify the details of the above methods and systems in various ways without departing from the principles and essence of the present invention. For example, combining the above method steps to perform substantially the same function and achieve substantially the same result according to substantially the same method falls within the scope of the present invention. Therefore, the scope of the present invention is defined only by the appended claims.

Claims

1. A multi-objective optimization method for mine water treatment for cascade reuse, characterized in that, Includes the following steps: Step 1: Mine water is introduced into a pulsed electrocoagulation reactor for electrocoagulation treatment. Sacrificial electrodes and insoluble electrodes are installed in the pulsed electrocoagulation reactor, powered by a programmable pulse power supply in asymmetric polarity reversal mode. An influent water quality sensor group is installed at the inlet end, and an effluent water quality sensor group and a Zeta potential online analyzer are installed at the outlet end. An online electrode consumption monitoring device is installed at the sacrificial electrode. Spectral clustering is performed on the water quality data collected by the influent water quality sensor group to obtain the operating condition category, and the corresponding cascade reuse target scenario and water quality upper limit threshold are matched. Step 2: Deploy the NCD dynamic model in the edge computing gateway, using effluent water quality indicators as state variables and programmable pulse power supply operating parameters and influent water quality data as driving variables. Obtain the predicted values ​​of the state variables through a state evolution network and a numerical integrator. Update the NCD dynamic model online using measured data from the effluent water quality sensor group and the Zeta potential online analyzer. Step 3: Using the updated dynamic model of the neural network's constant differential equations as process constraints, the normalized weighted sum of electrode consumption and energy consumption per unit water volume as the optimization objective, and the state variables satisfying the upper limit threshold of water quality matched in Step 1 as inequality constraints, the optimal operating parameters of the programmable pulse power supply in the control time domain are solved and issued for execution; after each control cycle, return to Step 2 and execute Step 3 again to form a rolling optimization closed loop; determine the reuse level based on the measured data of the effluent water quality sensor group and the Zeta potential online analyzer, and control the electric diversion valve group to guide the effluent into the corresponding cascade reuse subsequent treatment pipeline.

2. The method according to claim 1, characterized in that, The sacrificial electrode is an aluminum-iron composite sacrificial electrode with alternating layers of aluminum and iron, and the insoluble electrode is a titanium-based size-stable insoluble electrode.

3. The method according to claim 1, characterized in that, In the asymmetric polarity reversal mode, during the forward pulse phase, the sacrificial electrode acts as the anode, electrochemically dissolving and releasing metal ions, while the insoluble electrode acts as the cathode, precipitating hydrogen gas. The duration of the forward pulse phase accounts for 70% to 95% of a single polarity reversal cycle. During the reverse pulse phase, the sacrificial electrode acts as the cathode, and the insoluble electrode acts as the anode. The duration of the reverse pulse phase accounts for 5% to 30% of a single polarity reversal cycle and is used to remove the passivation oxide film on the surface of the sacrificial electrode.

4. The method according to claim 1, characterized in that, The programmable pulse power supply has a response time of less than 1ms, a pulse frequency that is continuously adjustable between 0.1Hz and 100Hz, and a peak current density in the positive pulse phase that is continuously adjustable between 0 and 50mA / cm².

5. The method according to claim 1, characterized in that, The pulse electrocoagulation reactor is equipped with a bubble refining and dispersion unit, which refines and disperses the hydrogen gas generated at the cathode to form microbubbles. The microbubbles carry the flocs to the surface to complete the air flotation separation. The influent water quality sensor group includes an influent conductivity sensor, an influent turbidity sensor, and an influent pH sensor.

6. The method according to claim 1, characterized in that, The effluent water quality sensor group includes an online turbidity sensor, an effluent conductivity sensor, and an effluent pH sensor; the effluent section is also equipped with a bypass sampling branch, on which a flow stabilization unit, a defoaming unit, and an online Zeta potential analyzer based on electrophoretic light scattering method are installed in sequence. The bypass sampling branch draws water samples from the effluent section, which are then treated by flow stabilization and defoaming before entering the measurement cell of the online Zeta potential analyzer. The online electrode consumption monitoring device is based on the electrochemical coulometric method, which calculates the electrode dissolution mass by accumulating the total charge flowing through the sacrificial electrode.

7. The method according to claim 1, characterized in that, The execution process of spectral clustering in step 1 is as follows: the conductivity, turbidity, and pH values ​​collected by the influent water quality sensor group at multiple consecutive sampling times are used to form a multidimensional water quality feature vector; Gaussian kernel similarity is calculated pairwise for all water quality feature vectors to construct a similarity matrix; Calculate the normalized Laplacian matrix for the similarity matrix; perform eigenvalue decomposition on the normalized Laplacian matrix, and take the eigenvectors corresponding to the first K smallest eigenvalues ​​to form a dimension reduction matrix; K-means clustering is performed on each row vector of the dimensionality reduction matrix to obtain K operating condition categories; each operating condition category is pre-associated with a cascade reuse target scenario and the corresponding water quality upper limit threshold; When new influent water quality data arrives, the new influent water quality data is normalized in the same way as the historical samples. The new normalized influent water quality data is mapped to the dimension-reduced feature space using the feature vectors corresponding to the top K smallest feature values. In the dimension-reduced feature space, the Euclidean distance between the mapped new influent water quality data and the cluster centers of each operating condition category is calculated. The operating condition category with the smallest Euclidean distance is taken as the current operating condition category.

8. The method according to claim 1, characterized in that, The dynamic model of the constant differential equations of the God system includes a state evolution network and a numerical integrator. The state evolution network is a fully connected neural network with three hidden layers, each containing 64 neurons and using the tanh activation function. The input of the state evolution network is an 8-dimensional vector, which is composed of two state variables and six driving variables at the current time step. The two state variables are effluent turbidity and Zeta potential, and the six driving variables are, in order, pulse frequency, positive pulse ratio, peak current density, influent conductivity, influent turbidity, and influent pH value. The output of the state evolution network is a 2-dimensional vector, which corresponds to the instantaneous change rate of effluent turbidity and Zeta potential relative to continuous time. The numerical integrator adopts the fourth-order, five-level Dormand-Prince adaptive step-size Runge-Kutta method.

9. The method according to claim 8, characterized in that, In step 2, the online parameter update adopts a slow cycle approach, performing one parameter update after accumulating N control cycles, where N ranges from 5 to 20. During the update, the measured values ​​of the effluent water quality sensor group and the online Zeta potential analyzer at the beginning of each of the most recent N control cycles are used as the initial conditions for each segment of integration. The numerical integrator integrates segment by segment forward to the end of each cycle to obtain the predicted value. The mean square error between all N predicted values ​​and the corresponding measured values ​​is used as the loss index. The adjoint state method is used to solve the adjoint trajectory in reverse to obtain the gradient of the loss index with respect to all connection weights and biases in the state evolution network. The Adam optimizer is used to perform one-step update according to the gradient, with the learning rate fixed at 0.

001.

10. The method according to claim 1, characterized in that, In step 3, the optimal control solution adopts the direct collocation method. Twenty collocation points are uniformly set within the control time domain. At each collocation point, the pulse frequency, positive pulse ratio, and peak current density are discretized. Third-order polynomial interpolation is used between the collocation points to transform the continuous time trajectory into 60 discrete decision variables. A tank voltage acquisition unit is set between the sacrificial electrode and the insoluble electrode. The energy consumption per unit water volume is calculated based on the acquired values ​​of the tank voltage acquisition unit at each collocation point within the control time domain, the peak current density, the effective working area of ​​the sacrificial electrode, the effective energizing time, and the treated water volume. A sequential quadratic programming solver is used to solve the 60 discrete decision variables, with the optimal solution of the previous control cycle used as the initial guess value. The reuse level determination method is as follows: the edge computing gateway compares the effluent turbidity collected by the online turbidity sensor, the zeta potential collected by the online zeta potential analyzer, the effluent conductivity collected by the effluent conductivity sensor, and the effluent pH value collected by the effluent pH sensor with a preset water quality threshold table for each reuse scenario to determine the reuse level.