Integrated sewage treatment method and system based on multi-source data fusion

By using multi-source data fusion technology, parameters such as temperature and humidity are collected and analyzed to construct drift feature vectors, perform grouping and clustering and anomaly detection, and generate a set of compensation coefficients. This solves the problem of unstable effluent quality caused by electrode potential signal drift and achieves precise and stable operation of the sewage treatment process.

CN122501970APending Publication Date: 2026-08-04NANTONG VOCATIONAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANTONG VOCATIONAL COLLEGE
Filing Date
2026-04-25
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In existing technologies, electrode potential signals exhibit nonlinear and time-varying drift under the coupling of multiple environmental factors, leading to the failure of voltage and current regulation strategies and poor stability of effluent quality.

Method used

By using a multi-source data fusion method, parameters such as temperature compensation component, humidity interference coefficient, and water quality ion concentration are collected to construct an initial drift feature vector. Grouping and clustering and anomaly detection are performed to generate a set of compensation coefficients. Electrode parameters are iteratively optimized to achieve dynamic calibration.

Benefits of technology

Accurately capturing potential drift in complex environments improves the stability of effluent quality, reduces the risk of equipment misadjustment, and ensures the precise and stable operation of the wastewater treatment process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122501970A_ABST
    Figure CN122501970A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of sewage treatment, and discloses an integrated sewage treatment method and system based on multi-source data fusion, which comprises the following steps: constructing an initial drift characteristic vector by collecting parameters such as a temperature compensation component, a humidity interference coefficient, water quality ion concentration, an electrode aging rate, environmental light intensity and a pressure fluctuation amplitude; determining an electrode aging and ion concentration reference point by adopting grouped K-means clustering; and performing abnormality detection by using a support vector machine. When the voltage drift exceeds a threshold value, a compensation coefficient is obtained from historical data, and the voltage offset and the current step length are iteratively optimized, a calibration parameter sequence is generated, and continuous cycle monitoring is realized. The application can solve the problem that, due to the combined action of day-night temperature difference and temperature and humidity change, electrode reading produces a drift, and a voltage and current regulation strategy fails.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater treatment technology, and in particular to an integrated wastewater treatment method and system based on multi-source data fusion. Background Technology

[0002] Currently, the wastewater treatment sector is directly related to water resource protection and ecological balance, and its importance lies in safeguarding public health and supporting sustainable development.

[0003] In one existing technology, electrochemical advanced oxidation technology utilizes electrodes to electrolyze water to generate hydroxyl radicals for efficient pollutant degradation. However, under complex real-world conditions, the electrode surface potential, as a core indicator for monitoring water quality changes, is easily affected by the coupling of multiple environmental factors. Specifically, factors such as temperature fluctuations, humidity changes, changes in water ion concentration, electrode aging rate, ambient light intensity, and system pressure fluctuations interact to induce complex drift in electrode potential. This drift is not a linear superposition of a single factor but exhibits nonlinear and time-varying characteristics, making it difficult for traditional correction methods based on single parameters or simple linear compensation to accurately capture and eliminate the drift. This leads to distorted monitoring data, affecting the effectiveness of voltage and current regulation strategies, and ultimately resulting in decreased control precision and difficulty in ensuring the stability of effluent quality during wastewater treatment.

[0004] Therefore, existing technologies suffer from insufficient accuracy in correcting electrode potential signal drift during wastewater treatment and poor adaptability to treatment strategies, resulting in unstable effluent quality. Summary of the Invention

[0005] This invention provides an integrated wastewater treatment method and system based on multi-source data fusion, which enables precise capture of potential drift in variable environments and dynamic calibration of electrode parameters accordingly.

[0006] In a first aspect, to address the aforementioned technical problems, this invention provides an integrated wastewater treatment method based on multi-source data fusion, comprising:

[0007] Temperature compensation component, humidity interference coefficient, water ion concentration and electrode aging rate are collected, ambient light intensity, pressure fluctuation amplitude and signal-to-noise ratio are obtained, and a weight matrix is ​​constructed on the signal-to-noise ratio, ambient light intensity and pressure fluctuation amplitude to obtain the initial drift feature vector.

[0008] Based on the initial drift feature vector, grouping and clustering are performed to determine the electrode aging rate benchmark and the water quality ion concentration benchmark, thus obtaining the benchmark reference point;

[0009] Anomaly detection is performed on the reference points using a support vector machine to obtain complete anomaly detection points.

[0010] When the voltage drift of the complete abnormal detection point exceeds the preset voltage drift threshold, the interaction sample of the temperature compensation component and the humidity interference coefficient is obtained from historical data to obtain a set of compensation coefficients.

[0011] Based on the set of compensation coefficients, the dynamic voltage offset and current adjustment step size are iteratively optimized and adjusted to obtain the calibrated parameter values.

[0012] Based on the calibrated parameter values, a periodic sequence is generated for the changes in wastewater quality, resulting in the final strategy sequence;

[0013] The effluent quality indicators are monitored according to the final strategy sequence, feedback data is obtained and looped back to the initial collection stage to obtain the final wastewater treatment scheme.

[0014] Secondly, the present invention provides an integrated wastewater treatment system based on multi-source data fusion, comprising:

[0015] The data acquisition and integration module is used to acquire temperature compensation components, humidity interference coefficient, water quality ion concentration and electrode aging rate, obtain ambient light intensity, pressure fluctuation amplitude and signal-to-noise ratio, and construct a weight matrix for the signal-to-noise ratio, ambient light intensity and pressure fluctuation amplitude to obtain an initial drift feature vector.

[0016] The grouping and clustering module is used to perform grouping and clustering based on the initial drift feature vector, determine the electrode aging rate benchmark and the water quality ion concentration benchmark, and obtain the benchmark reference point;

[0017] Anomaly detection module is used to perform anomaly detection on the reference point using a support vector machine to obtain complete anomaly detection points;

[0018] The data compensation module is used to obtain an interaction sample of the temperature compensation component and the humidity interference coefficient from historical data when the voltage drift of the complete abnormal detection point exceeds a preset voltage drift threshold, thereby obtaining a set of compensation coefficients.

[0019] The compensation adjustment module is used to iteratively optimize and adjust the dynamic voltage offset and current adjustment step size according to the set of compensation coefficients to obtain the calibrated parameter values.

[0020] The sequence generation module is used to generate a periodic sequence for wastewater quality changes based on the calibrated parameter values, and obtain the final strategy sequence.

[0021] The detection reflux module is used to monitor effluent quality indicators according to the final strategy sequence, obtain feedback data, and loop back to the initial acquisition stage to obtain the final sewage treatment solution.

[0022] Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the integrated wastewater treatment method based on multi-source data fusion as described in any one of the above.

[0023] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the integrated wastewater treatment method based on multi-source data fusion described above.

[0024] Compared with the prior art, the present invention has the following beneficial effects:

[0025] (1) This invention ensures the continuous effectiveness of the treatment strategy by establishing a cyclic optimization mechanism based on feedback data. A targeted dynamic adjustment sequence is generated based on the calibrated parameters, and feedback data is obtained by real-time monitoring of effluent quality indicators. The system iterates back to the initial data acquisition stage for strategy optimization, ultimately generating a continuously optimized final wastewater treatment scheme. This dynamic calibration and closed-loop feedback mechanism can provide early warning and automatically implement precise calibration before changes in water quality or fluctuations in environmental factors cause a drift trend in the potential signal, continuously controlling electrode reading deviations within the allowable range. This not only improves the stability of effluent quality but also reduces the risk of process fluctuations and equipment misadjustment caused by electrode drift, achieving precise and stable operation of the wastewater treatment process in complex and variable environments, and solving the technical problem of poor effluent quality stability.

[0026] (2) This invention addresses the complex drift problem of electrode potential during wastewater treatment under the coupled effects of multiple environmental factors, such as temperature, humidity, light, pressure, and electrode aging. It proposes an integrated processing method that integrates multi-source data fusion. By simultaneously collecting six types of parameters, including temperature compensation component, humidity interference coefficient, and water ion concentration, an initial drift feature vector capable of characterizing the complex drift characteristics is constructed. This multi-dimensional data fusion architecture effectively addresses the nonlinearity and time-varying nature of the coupled effects of multiple factors, overcoming the limitations of traditional single-parameter or simple linear calibration. It solves the problem of composite shifts in electrode readings caused by the combined effects of diurnal temperature differences and temperature and humidity changes, which in turn leads to the failure of voltage and current regulation strategies.

[0027] (3) This invention constructs a complete closed-loop processing flow from drift feature identification and anomaly detection to parameter dynamic optimization. By accurately determining the dual benchmarks of electrode aging and ion concentration through grouped K-means clustering, and combining this with support vector machine for anomaly detection of potential deviation, it achieves accurate identification of the drift initiation point and degree. When voltage drift exceeds the threshold, it can automatically mine samples of the interaction between temperature and humidity from historical data, generate a set of compensation coefficients, and iteratively optimize the dynamic voltage offset and current adjustment step size accordingly. This compensation mechanism, based on the fusion of historical experience and real-time data, not only ensures a high degree of matching between calibration parameters and current operating conditions but also takes into account historical operating patterns, significantly enhancing the adaptability and reliability of the correction strategy, and effectively solving the problems of insufficient correction accuracy and poor strategy adaptability in existing technologies. Attached Figure Description

[0028] Figure 1 This is a schematic diagram of the integrated wastewater treatment method based on multi-source data fusion provided in the first embodiment of the present invention;

[0029] Figure 2 This is a schematic diagram of the integrated wastewater treatment system based on multi-source data fusion provided in the second embodiment of the present invention. Detailed Implementation

[0030] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0031] Reference Figure 1 The first embodiment of the present invention provides an integrated wastewater treatment method based on multi-source data fusion, comprising the following steps:

[0032] S11, collect temperature compensation component, humidity interference coefficient, water quality ion concentration and electrode aging rate, obtain ambient light intensity, pressure fluctuation amplitude and signal-to-noise ratio, construct weight matrix for the signal-to-noise ratio, ambient light intensity and pressure fluctuation amplitude, and obtain initial drift feature vector;

[0033] S12, group and cluster according to the initial drift feature vector to determine the electrode aging rate benchmark and the water quality ion concentration benchmark, and obtain the benchmark reference point;

[0034] S13, use a support vector machine to perform anomaly detection on the benchmark reference point to obtain complete anomaly detection points;

[0035] S14, when the voltage drift of the complete abnormal detection point exceeds the preset voltage drift threshold, the interaction sample of the temperature compensation component and the humidity interference coefficient is obtained from historical data to obtain a set of compensation coefficients.

[0036] S15, the dynamic voltage offset and current adjustment step size are iteratively optimized and adjusted according to the set of compensation coefficients to obtain the calibrated parameter values;

[0037] S16, Generate a periodic sequence for wastewater quality changes based on the calibrated parameter values ​​to obtain the final strategy sequence;

[0038] S17. Monitor the effluent quality indicators according to the final strategy sequence, obtain feedback data and cycle back to the initial acquisition stage to obtain the final sewage treatment scheme.

[0039] In step S11, the temperature compensation component, humidity interference coefficient, water ion concentration, and electrode aging rate are collected; ambient light intensity, pressure fluctuation amplitude, and signal-to-noise ratio are obtained; and a weight matrix is ​​constructed on the signal-to-noise ratio, ambient light intensity, and pressure fluctuation amplitude to obtain an initial drift feature vector, including:

[0040] Collect temperature compensation components, humidity interference coefficient, water ion concentration and electrode aging rate, and obtain ambient light intensity, pressure fluctuation amplitude and signal-to-noise ratio;

[0041] The humidity interference coefficient is filtered and separated to obtain a separation signal. When the water ion concentration in the separation signal exceeds a preset water ion concentration threshold, the compensation value of the electrode aging rate is adjusted to obtain a compensation signal.

[0042] The ambient light intensity and signal-to-noise ratio in the compensation signal are weighted and fused to obtain a first fusion vector. When the signal-to-noise ratio in the first fusion vector is lower than a preset signal-to-noise ratio threshold, the pressure fluctuation amplitude correction is introduced to obtain a second fusion vector.

[0043] Based on the second fusion vector, the weight of the temperature compensation component is determined to obtain the first drift vector. When the residual humidity interference coefficient in the first drift vector exceeds the preset residual threshold, the water quality ion concentration is recalibrated to obtain the second drift vector. When the residual humidity interference coefficient in the first drift vector does not exceed the preset residual threshold, the second drift vector is directly output.

[0044] Based on the second drift vector, a multi-source weight matrix is ​​constructed in real time to obtain a third drift vector. When the stability of the third drift vector is lower than a preset stability threshold, the multi-source weight matrix is ​​iteratively updated until the stability reaches the preset stability threshold to obtain an initial drift feature vector.

[0045] First, a sensor array is used to collect data on temperature compensation, humidity interference coefficient, water ion concentration, and electrode aging rate. The temperature compensation component compensates for the thermal effect on the electrode response, while the humidity interference coefficient reflects the interference of ambient moisture on the signal. Water ion concentration represents the level of salt and other ions in the water, and the electrode aging rate quantifies the rate of electrode surface degradation. These data directly affect the drift correction accuracy. Ambient light intensity affects the accuracy of the photoelectric sensor, and its monitoring can identify sources of optical measurement errors. Pressure fluctuation amplitude reflects the mechanical stability of the hardware components; abnormal fluctuations indicate equipment failure or changes in fluid conditions. The signal-to-noise ratio directly characterizes data reliability.

[0046] For example, in water quality testing, the sensor array simultaneously records a temperature of 25.0 degrees Celsius, a humidity interference coefficient of 0.15, a water ion concentration of 50 mg / L, and an electrode aging rate of 0.02% per day, thus providing basic data for subsequent compensation. At 60% relative humidity, with an interference of 0.15 mV, a water ion concentration of 200 mg / L, and an electrode aging rate of 0.001 mV decay per day...

[0047] Subsequently, the water quality ion concentration interference component in the humidity interference coefficient is separated by a filter to obtain the separated signal. This filter can be a variant of the Kalman filter, focusing on isolating ion-induced humidity pseudo-signals. The filter completes the signal separation, where the state vector contains both the true humidity interference and the ion-induced pseudo-signals, and the observation equation is the humidity interference coefficient. ,in for The measured value of the humidity interference coefficient at any given time. This is a state vector containing the actual humidity component. and ion interference components , For the observation matrix, To observe the noise, we can assume it has a mean of 0 and a variance of 0.01mV. 2 Gaussian white noise was used, and the variance was calibrated based on historical sensor error data. For example, Gaussian noise could be set using historical data from the past 3-6 months. Z-score normalization was performed, and the mean and standard deviation of the sample data were calculated to obtain the mean. , and standard deviation , Then normalize to and ,in , This is the initial true humidity data and ion interference data.

[0048] The process involves recursively predicting and updating the water ion concentration as an input variable to estimate the ion interference component. For example, the predicted value of the actual humidity component inherits from the previous optimal estimate, while the predicted value of the ion interference component consists of two parts: the continuation of the previous optimal estimate and the multiplication of the current measured water ion concentration with a preset driving strength coefficient representing the ion concentration's influence on the interference component. Subsequently, the state prediction values ​​are synthesized into the predicted value of the humidity interference coefficient through an observation matrix whose elements are composed of the original standard deviations of each state component. The innovation between the actual observed value and the predicted value is calculated, and the Kalman gain matrix is ​​determined. This matrix assigns innovation weights based on the covariance relationship between prediction uncertainty and observation noise. The Kalman gain is used to correct the state prediction value, obtaining the optimal state estimate for the current moment, and the estimation error covariance matrix is ​​updated synchronously. Finally, the ion interference component in the optimal estimate is denormalized and converted into a physically meaningful ion interference signal value. For example, if the ion component accounts for 40% of the humidity interference coefficient, the separated signal shows an ion interference of 0.06 mV.

[0049] When the concentration of water ions in this signal exceeds the preset water ion concentration threshold of 150 mg / L obtained by linear fitting of historical water ion concentration data within the normal concentration range, the compensation value of the electrode aging rate is adjusted to obtain a compensation signal, such as increasing the aging rate from 0.001 to 0.0015 mV / day. The electrode aging rate adjustment is based on the linear relationship of water ion concentration. According to the pre-calibrated accelerated aging coefficient, the aging rate increases by 0.0005 mV / day for every 50 mg / L increase in ion concentration. The linear relationship between the electrode aging rate and the water ion concentration is based on experimental calibration and curve fitting using historical data.

[0050] Secondly, based on the integrated signal-to-noise ratio (SNR) and ambient light intensity of the compensated signal, a weighted fusion of the interference effect of ambient light intensity on the SNR is performed to obtain a first fusion vector. For example, with a SNR of 20 dB and an illumination intensity of 500 lux, the weighted average can be set with an illumination weight of 0.3. Based on historical data analysis of the interference relationship between ambient light intensity and the SNR, the fused vector shows that the SNR has decreased to 18 dB. If the SNR in this vector is lower than the 15 dB threshold required to avoid significant bit error rates in subsequent operations, the pressure fluctuation amplitude correction is introduced to obtain a second fusion vector.

[0051] For example, applying linear correction, the signal-to-noise ratio of the second fused vector is calculated using the formula:

[0052]

[0053] in This represents the absolute value of the pressure fluctuation amplitude recorded by the sensor. To fit a linear regression using the least squares method and The actual proportional relationship between them, and the slope of the fitted straight line is the dynamically calculated value at the current moment. The minimum data requirement is at least 20 sample points for calculation. For example, having 30 sample points in the cache ensures statistical significance, and the average pressure fluctuation can be calculated. The average signal-to-noise ratio deviation is 7.2 Pascals. The value is 2.36 dB. Substituting this into the least squares formula:

[0054]

[0055] in, The pressure fluctuation amplitude value of historical data points is calculated and obtained. The goodness of fit is approximately 0.28 dB per Pa, where the goodness of fit is... A value greater than 0.7 indicates that pressure fluctuations reliably affect the signal-to-noise ratio, while when... If the value is below 0.7, the historical value will be used. Perform fitting.

[0056] It is worth noting that a stable electrochemical double layer exists at the interface between the sensor's sensing unit surface and the water body, and this structure is highly sensitive to pressure changes. When the water body experiences dynamic pressure changes due to external agitation, flow rate changes, or liquid level fluctuations, this pressure is transmitted to the sensor interface, causing the double layer structure to undergo periodic compression or relaxation, thereby affecting the ion distribution and charge transfer impedance at the interface.

[0057] Then, the correlation coefficient between the pressure fluctuation amplitude and the electrode aging rate in the second fusion vector is extracted, and regression analysis is used to determine the weight of the temperature compensation component of the initial drift characteristic vector, thus obtaining the first drift vector. Specifically, a straight line is fitted using historical data. slope in and intercept , Voltage drift due to temperature Given the current water temperature environment, a correlation coefficient of 0.75 represents the linear relationship between the current water temperature and the voltage drift caused by temperature. A correlation of 0.5 is obtained by fitting the current electrode aging level and voltage drift, ultimately assigning a temperature weight of 0.6. The temperature component of the first drift vector is 0.012 mV. When the residual humidity interference coefficient in the first drift vector exceeds the preset threshold of 0.05 mV (based on historical water quality analysis where excessively high concentrations would cause significant voltage drift), the water ion concentration is recalibrated. Based on the proportional relationship between the preset residual humidity and the deviation of the ion concentration setting, such as approximately 10 mg / L for every 0.01 mV residual error, the ion concentration benchmark is then established at 0.05 mV. This requires a downward correction of approximately 20 mg / L from the current value of 200 mg / L, setting the new calibration value to 180 mg / L, resulting in the second drift vector. The residual value is reduced to 0.03 mV, which helps reduce cumulative error. When the residual humidity interference coefficient in the first drift vector does not exceed the preset residual threshold, it is directly output as the second drift vector.

[0058] Finally, a real-time fusion weight matrix is ​​used to integrate the noise ratio, light intensity, and pressure amplitude of the second drift vector. The determinant of the matrix is ​​then used to determine if it satisfies the stability condition. If it does, the initial drift feature vector is output; otherwise, the weight matrix is ​​iteratively updated until the initial drift feature vector is obtained. Specifically, the gradient direction is obtained by calculating the partial derivative of the determinant of the weight matrix with respect to each weight element. Matrix elements are updated along the gradient ascent direction with a fixed learning rate of 0.01, thereby gradually increasing the determinant value. After each update, the determinant is immediately recalculated for verification until the absolute value of the determinant is greater than or equal to the convergence condition of a stability threshold of 0.1, which avoids over-iteration.

[0059] In step S12, the step of grouping and clustering based on the initial drift feature vector to determine the electrode aging rate benchmark and the water quality ion concentration benchmark, and obtaining the benchmark reference point, includes:

[0060] K-means clustering is performed on the initial drift feature vector to obtain the first clustering grouping result;

[0061] Regression analysis is performed on the influence deviation of the temperature compensation component on the humidity interference coefficient in the first clustering result. When the influence deviation exceeds the preset influence deviation threshold, the cluster center position is adjusted to obtain the first adjustment center.

[0062] The reference difference between the water ion concentration and the electrode aging rate is obtained from the first adjustment center to obtain the reference deviation. When the reference deviation reaches the preset reference condition, the second clustering grouping result is output to determine the reference reference point. When the reference deviation does not reach the preset reference condition, the clustering center is updated to obtain the second adjustment center.

[0063] The final cluster center in the cluster group is determined based on the second adjustment center, and the benchmark reference point is obtained.

[0064] First, the K-means clustering algorithm can be applied to group similar patterns of temperature compensation components and humidity interference coefficients in the initial drift feature vector. Specifically, the algorithm uses the collected temperature compensation components (e.g., 0.02 mV offset) and humidity interference coefficients (e.g., 0.15 mV interference) as input features, iteratively calculating the Euclidean distance to form clusters. The cluster centers are defined by two benchmarks: an electrode aging rate benchmark of 0.001 mV per day and a water quality ion concentration benchmark of 200 mg / L. Based on the initial drift feature vector, the K-means clustering algorithm is applied to group similar patterns of temperature compensation components and humidity interference coefficients. This method iteratively optimizes the cluster centers until the center points converge to obtain the final result.

[0065] For example, in water quality monitoring, the algorithm groups the temperature offset pattern corresponding to 25.0 degrees Celsius with the humidity interference pattern of 0.15 mV. The cluster center uses the electrode aging rate benchmark of 0.001 mV per day and the water quality ion concentration benchmark of 200 mg per liter as reference points to obtain the first clustering grouping result that can clearly distinguish the similarity of signal patterns, thus providing a basis for subsequent deviation correction.

[0066] Subsequently, the correlation coefficient between the cluster centers and the electrode aging rate benchmark was extracted from the first clustering results. Regression analysis was then used to calculate the deviation value of the temperature compensation component on the humidity interference coefficient. The correlation coefficient of 0.65 was obtained through statistical calculation based on historical datasets. Specifically, historical operational data was collected, including the cluster center characteristic values ​​of each monitoring point and the corresponding electrode aging rate benchmark values. These two sets of data were treated as two variable sequences, and the Pearson correlation coefficient formula was used for calculation. This formula quantifies the degree and direction of linear correlation between two variables by dividing the covariance by the product of the standard deviations of the two variables, thus obtaining a value between -1 and +1. For example, if the regression analysis showed that the temperature pattern caused a humidity pattern deviation of 0.04 mV, exceeding the preset historical average threshold of 0.03 mV for temperature pattern-induced humidity pattern deviation, then the cluster center position was adjusted by moving it, such as shifting the center humidity interference coefficient from 0.15 mV to 0.11 mV, to obtain the first adjustment center.

[0067] For example, if the deviation exceeds the threshold of 0.01 mV, an adjustment amount needs to be calculated. The adjustment amount is based on the current center humidity interference coefficient of 0.15 mV and the corresponding value of the average center humidity interference coefficient obtained by fitting historical data, and is corrected and compensated according to the weight set by the degree of deviation. For example, historical data shows that the fitted average center humidity interference coefficient is 0.09 mV. The interference coefficient exceeding the threshold is subtracted from the historical interference coefficient to obtain a deviation interference coefficient of 0.06 mV. The quotient of the deviation interference coefficient divided by the historical interference coefficient is used as the weight of the historical interference coefficient, which is 2 / 3. So, to satisfy the weight of 1, the current interference coefficient is 1 / 3. By multiplying the respective interference coefficients by the weight allocation, the final center humidity interference coefficient of 0.11 mV is obtained.

[0068] Subsequently, the difference between the water quality ion concentration benchmark and the electrode aging rate benchmark is obtained from the first adjustment center. For example, if the benchmark deviation between the concentration benchmark of 180 mg / L and the aging benchmark of 0.0012 mV / day is 0.0002, and this difference is determined to meet the preset benchmark deviation stability condition of 0.0005, the second clustering result is directly output. Otherwise, the benchmark reference point of the cluster center is updated. According to the historical mapping relationship, if the deviation value exceeds the threshold of 0.0001 mV / day, the concentration benchmark is reduced by 1 mg / L to calculate the adjustment amount. For example, when the deviation value is 0.0006, it exceeds the threshold of 0.0001, so the concentration benchmark is reduced by 1 mg / L from 180 mg / L to 179 mg / L, and the second adjustment center is obtained.

[0069] Finally, the final cluster centers for similar patterns of temperature compensation components and humidity interference coefficients in the cluster groups are determined through the second adjustment center. For example, the final center for temperature component is 0.018 mV and humidity is 0.11 mV. A complete reference point is obtained, which includes the electrode aging rate reference of 0.0011 mV per day and the water quality ion concentration reference of 178 mg / L. This reference point integrates multi-mode information, which is beneficial to provide a reliable basis for subsequent drift correction, reduce clustering errors, and ensure the continuous accuracy of water quality monitoring signal grouping.

[0070] In step S13, the use of a support vector machine to perform anomaly detection on the potential deviation value between the reference point and the current potential signal, obtaining complete anomaly detection points, includes:

[0071] The current potential signal is acquired, the potential deviation value between the reference point and the current potential signal is calculated, and the potential deviation value is anomaly detected by a support vector machine to obtain the first anomaly classification result.

[0072] The degree of drift in the first anomaly classification result is calculated to obtain the first adjustment benchmark;

[0073] Based on the first adjustment benchmark, the voltage difference between the potential deviation value and the dynamic voltage offset is obtained. When the voltage difference meets the preset voltage difference stability condition, the second anomaly classification result is determined.

[0074] Based on the second anomaly classification result, the potential drift threshold in the potential deviation value is determined to obtain a complete anomaly detection point.

[0075] First, the current potential signal is acquired, and the potential deviation value of 0.05 mV between the reference point and the current potential signal is calculated. Specifically, the potential deviation value originates from the instantaneous potential change caused by temperature fluctuations. The support vector machine classifier uses this deviation value as input features, and divides the normal and abnormal regions through a hyperplane. If the drift exceeds a preset threshold of 0.03 mV and is accompanied by an abnormal signal-to-noise ratio, such as below 15 dB, a first abnormal classification result is obtained. This result analyzes the process of calculating the deviation value between the reference point and the current potential signal, aiming to quantify the signal changes in the water quality monitoring sensor and identify the drift pattern dominated by environmental interference.

[0076] It should be noted that the Support Vector Machine (SVM) model is constructed based on the principle of structural risk minimization in statistical learning theory. Its core is to map low-dimensional, nonlinearly separable potential deviation values ​​to a high-dimensional feature space using a kernel function to achieve linear partitioning. The model consists of a set of support vectors, a hyperplane equation weight vector, and bias terms. Historically labeled potential deviation datasets are used for training. The maximum margin separating hyperplane is found by solving a convex quadratic programming problem. Specifically, a sequential minimum optimization algorithm is used to efficiently process the feature vectors, and a slack variable mechanism is used to allow some noisy samples to be misclassified to enhance the model's generalization ability. Key parameters include the width parameter γ of the radial basis function kernel to control the range of sample influence; the regularization parameter C to balance the margin and classification error; and to ensure signal validity, an anomaly detection threshold of less than 15 dB for the signal-to-noise ratio is required. The final classifier can accurately distinguish between normal fluctuations and abnormal drift patterns based on a potential deviation value of 0.05 mV and noise features.

[0077] Subsequently, based on the first anomaly classification results, the correlation coefficient between the initial difference of dynamic voltage offset and the anomaly of the signal-to-noise ratio was extracted and found to be 0.72. The correlation coefficient was calculated using the Pearson correlation coefficient formula, which multiplies the standard deviations of the calculated covariances. A correlation coefficient of 0.72 indicates a high degree of correlation between the two. Linear regression was used to fit the potential deviation value, resulting in a deviation correction of 0.038 mV. When the maximum fluctuation preset threshold of 0.03 mV obtained based on historical potential deviation values ​​is exceeded, the reference point position is adjusted. If the electrode aging rate is the state variable to be estimated, when the observed potential deviation value of 0.038 mV continuously exceeds the 0.03 mV threshold, the algorithm updates the state using the state update equation. Make corrections, among which This is the current observation bias. Based on the aging rate of the previous moment, For Kalman gain, The unit is daily, i.e., day⁻¹. The observation matrix establishes the time integral relationship between the aging rate and the observation deviation. Electrode aging is a cumulative process; the small daily aging rate accumulates over time into an observable potential deviation. The ratio of the observation deviation to the aging rate, for example, 0.03 mV divided by 0.001 mV per day, yields S=30. The calculation... That is, by fusing out-of-limit observations in real time, the aging rate benchmark is corrected from 0.0010 to 0.0012 mV / day to obtain the first adjustment benchmark. This adjustment reduces the misjudgment of classification by noise and improves the accuracy of anomaly detection.

[0078] Secondly, the voltage difference between the current potential signal deviation value of 0.045 mV and the initial difference of the dynamic voltage offset of 0.05 mV, obtained from the first adjustment benchmark, is 0.005 mV. When this voltage difference is determined to be within the preset voltage difference stabilization condition of 0.01 mV, the second anomaly classification result is determined. This result confirms that the drift is becoming controllable, reducing the frequency of subsequent corrections. When the voltage difference exceeds the stabilization condition, iterative optimization based on gradient descent is initiated, using the residual between the current voltage difference of 0.005 mV and the stabilization threshold of 0.01 mV as the loss function. , Given the current voltage difference, the partial derivative of the compensation coefficient with respect to the voltage difference is calculated through backpropagation. The weight parameters in the compensation coefficient set are updated with a learning rate of 0.001. The dynamic voltage offset and current adjustment step size are adjusted synchronously until the voltage difference drops below 0.01 mV or the change in voltage difference over three consecutive iterations is less than 0.001 mV.

[0079] Finally, based on the second anomaly classification results, the final threshold of drift in the deviation value was determined to be 0.032 mV. A complete anomaly detection point containing a 12 dB anomaly in the signal-to-noise ratio was obtained. This detection point integrates multi-dimensional deviation information, providing a precise triggering mechanism for drift compensation, significantly improving signal stability and reducing the false alarm rate, ensuring the continuity of water quality monitoring. After integrating the complete anomaly detection point, it can directly guide the compensation module to suppress drift above 0.03 mV and maintain the potential signal fluctuation near the reference point to less than 0.008 mV. This mechanism supports anomaly identification and correction from multiple perspectives, jointly improving the reliability of water quality parameter measurements.

[0080] In step S14, when the voltage drift of the complete abnormal detection point exceeds a preset voltage drift threshold, the interaction sample of the temperature compensation component and the humidity interference coefficient is obtained from historical data to obtain a set of compensation coefficients, including:

[0081] When the voltage drift of the complete abnormal detection point exceeds the preset voltage drift threshold, the interaction samples of the temperature compensation component and the humidity interference coefficient are extracted from historical data, and the interaction samples are clustered to obtain an initial compensation coefficient set; the initial compensation coefficient set includes a current step sequence.

[0082] Based on the set of compensation coefficients and the interaction samples, the correlation coefficient matrix is ​​calculated, and the temperature-dominant compensation component and humidity-dominant interference coefficient are determined based on the absolute value of the correlation coefficient matrix to obtain the set of compensation interference.

[0083] The set of compensation interference and the current step sequence are weighted and fused to obtain the set of correction components. When the set of correction components exceeds the preset correction component threshold, the joint compensation point is marked to obtain the set of joint compensation points.

[0084] Obtain the current difference sequence from the joint compensation point set. When the variance of the current difference sequence is less than a preset variance threshold, obtain the compensation coefficient set.

[0085] First, when the voltage drift at the complete abnormal detection point exceeds a preset voltage drift threshold of 0.04 mV, interaction samples of the temperature compensation component and the humidity interference coefficient are extracted from historical data. The preset voltage drift threshold is based on statistical analysis of long-term fluctuations in the sensor potential signal under historical normal operating conditions. Specifically, the compensation component interaction samples are obtained by linear fitting through analysis of a large amount of historical data, recording a potential shift of 0.02 mV when the daily temperature rises or falls by 1 degree Celsius. The humidity interference coefficient interaction samples capture a signal attenuation of 0.015 mV when the relative humidity increases by 10%. For example, K-means clustering is used to group the temperature compensation component interaction samples and the humidity interference coefficient interaction samples. The cluster centers include two modes: temperature-dominated and humidity-dominated. Similar interaction modes are grouped into one class using Euclidean distance metric, resulting in a compensation coefficient set containing a current step size sequence. Finally, the clustering results are obtained where the initial step size in the set corresponds to the temperature-dominated group (e.g., 0.5 μA) and the humidity-dominated group (e.g., 0.3 μA).

[0086] Subsequently, based on the set of compensation coefficients, a correlation coefficient matrix is ​​calculated between the temperature compensation component interaction samples and the humidity interference coefficient interaction samples. The matrix elements reflect the interaction strength between the two, such as a coefficient of 0.68 between temperature and humidity samples. It should be noted that if more than half of the elements in the correlation coefficient matrix have an absolute value greater than the preset threshold of 0.6, the dominant temperature compensation component is determined to be 0.025 mV per degree Celsius, and the dominant humidity interference coefficient is determined to be 0.018 mV per percentage humidity, thereby determining the contribution of the main environmental factors to drift.

[0087] For example, the adjustment method requires extracting sample sequences containing temperature changes, humidity changes, and corresponding potential drift from historical datasets, and establishing a regression equation:

[0088]

[0089] in This is the potential drift. The change in temperature Let represent the change in humidity. When solving for the coefficients using the least squares method, the sample data is first standardized to eliminate dimensional differences, and then a normal equation is constructed. The coefficient estimates are obtained through matrix operations. The dependent variable observation vector is an n-row, 1-column matrix containing the measured potential drift values ​​of n samples extracted from the historical dataset. Its physical essence is a record of voltage instability exhibited by the system under different environmental conditions. Matrix Design a matrix for the independent variables, which is an n x 2 matrix, where the first column consists entirely of the temperature changes of the samples. The composition, the second column consists entirely of the corresponding humidity changes. Composition. The temperature coefficient was calculated using the above method based on multiple sets of historical interaction samples. millivolts per degree Celsius, humidity coefficient Millivolts per percentage of humidity.

[0090] Secondly, the set of corrected components for the current step sequence is obtained by weighted fusion calculation of the temperature-dominant compensation component and the humidity-dominant interference coefficient. The weights are allocated according to the correlation coefficient, which is calculated using the Pearson correlation coefficient formula. The product of the standard deviations of the calculated covariances is used to obtain the quantified correlation coefficient. For example, when the ambient temperature is 25 degrees Celsius and the humidity is 50%, the temperature weight is 0.6 and the humidity weight is 0.4. These weights are derived from the regression coefficient ratio. The ratio of the temperature coefficient (0.025 mV / degree Celsius) to the humidity coefficient (0.018 mV / percent humidity) is approximately 0.58:0.42, which, after rounding, are 0.6 and 0.4. The correlation coefficient between the temperature and humidity samples in the correlation coefficient matrix is ​​0.68, indicating that temperature has a dominant influence. The corrected step size is 0.6 × 0.5 + 0.4 × 0.3 = 0.42 μA, resulting in a corrected step size of 0.42 μA. For example, if any component in the set of correction components exceeds the preset threshold of 0.4 microamps for the historical maximum correction step size, it is marked as a temperature and humidity joint compensation point, thus obtaining a set of joint compensation points to improve the targeting of compensation.

[0091] Finally, the difference sequence of the current step size sequence is obtained from the joint compensation point set, such as differences of -0.03 microamps and -0.02 microamps. For example, when the variance of the difference sequence is determined to be less than a preset threshold of 0.01 for the historical maximum current adjustment step size fluctuation, a compensation coefficient set is determined. When the variance is greater than the preset threshold of 0.01, a control method based on exponentially weighted moving average combined with a dynamic learning rate adjustment mechanism can be used for processing. First, the exponentially weighted variance of the difference sequence is calculated. If it continuously exceeds the threshold, it is determined that the compensation coefficient is unstable, such as 0.01 microamps per square meter. Then, an adaptive adjustment process is initiated, using the residual between the current difference sequence and the target variance as the loss function.

[0092]

[0093] in It is the exponentially weighted variance, and the target threshold of 0.01 is the variance value of the maximum current adjustment step size fluctuation based on historical data. It is the i-th difference sequence element. For the corresponding weighting coefficients, Adjustment parameters to balance the degree of exceeding limits and the volatility of the sequence.

[0094] The weight parameters in the compensation coefficient set are dynamically updated using the gradient descent method. The learning rate is adjusted inversely according to the degree of variance exceeding the limit. The larger the variance, the lower the learning rate is used, such as decreasing it from 0.01 to 0.001 to ensure convergence stability. At the same time, a sliding window mechanism is introduced to update the parameters using only the most recent 20 sampling points. The iteration terminates when the variance value drops below the threshold of 0.01 microamps or the variance change is less than 0.001 for three consecutive iterations. The final output includes current adjustment step sizes of 0.46 microamps and 0.33 microamps.

[0095] In step S15, the iterative optimization adjustment of the dynamic voltage offset and current adjustment step size based on the compensation coefficient set to obtain calibrated parameter values ​​includes:

[0096] The set of compensation coefficients is fitted to the water ion concentration to obtain an initial calibration parameter sequence; the current adjustment step size is obtained, and the current adjustment step size is iteratively optimized according to the initial calibration parameter sequence to obtain an optimized current compensation sequence;

[0097] The sequence generation period reference is obtained from the optimized current compensation sequence, and the fluctuation variance of the dynamic voltage offset is calculated to obtain a stable parameter set.

[0098] The stable parameter set is weighted and fused to obtain a calibration parameter value sequence. When the reference value in the calibration parameter value sequence exceeds a preset reference value threshold, an abnormal calibration value is marked, and the calibrated parameter value is obtained.

[0099] First, the electrode parameter calibration model, including water ion concentration correction, is updated based on the compensation coefficient set. The correlation between dynamic voltage offset and water ion concentration correction is fitted using the least squares method to obtain an initial calibration parameter sequence that includes a voltage offset reference value. Specifically, the dynamic voltage offset records the potential fluctuations of the sensor under changes in ion concentration; for example, an increase of 1 mg / L corresponds to an offset of 0.03 mV. The fitting process constructs a linear relationship using scatter plot data, with a reference value set at 0.05 mV as the initial reference. The compensation coefficient set is then analyzed and updated to update the electrode parameter calibration, including water ion concentration correction. This helps to accurately adjust the sensor's response point to ion changes.

[0100] Subsequently, based on the initial calibration parameter sequence and voltage offset reference value, an iterative optimization process is performed on the current adjustment step size. When the absolute value of the dynamic voltage offset deviation is determined to be greater than the preset dynamic voltage offset deviation threshold of 0.02 mV, the current adjustment step size is adjusted by an increment of 0.1 μA to determine the optimized current compensation sequence and the iteration convergence point. For example, this iteration starts with an initial step size of 0.4 μA, detecting the absolute value of the deviation between the actual voltage offset and the expected offset. If this value is greater than 0.02 mV, the current adjustment step size is increased by 0.1 μA. After the first iteration, the step size is adjusted to 0.5 μA. If the deviation still exceeds the threshold, the second iteration further increases it to 0.6 μA. When the deviation is detected to be lower than the threshold, in order to balance response speed and stability, a convergence judgment mechanism is used to adjust the step size back to 0.55 μA as the optimal solution. After three adjustments, it converges to 0.55 μA, obtaining the optimized current compensation sequence.

[0101] Secondly, a sequence generation period benchmark is obtained from the optimized current compensation sequence. A sliding window is used to calculate the voltage offset fluctuation variance within adjacent periods. If the variance is less than a preset threshold of 0.008, and the voltage offset fluctuation variance is 0.006, a stable parameter set and a calibrated voltage value are determined. The sliding window covers every 10-minute period. The fluctuation variance reflects signal stability. A calibrated voltage value of 1.25 mV is locked as a reliable benchmark. When the voltage offset fluctuation variance exceeds the preset voltage offset fluctuation variance, the sequence generation period benchmark is re-evaluated, and the sliding window is narrowed to a shorter period to enhance monitoring sensitivity. Furthermore, based on the constant value of the voltage offset fluctuation variance, the current adjustment step size is automatically increased by 0.05 μA for fine-tuning, and multiple periods are continuously monitored until the variance falls below the threshold. If the variance continues to exceed the limit, the system switches to backup calibration parameters, such as a historical stable parameter set, to avoid drift accumulation.

[0102] Finally, based on the stable parameter set and the calibrated voltage values, a weighted fusion is performed for water quality ion concentration correction to obtain the final calibrated parameter value sequence. Weights are assigned according to the offset contribution, such as 0.65 for ion concentration and 0.35 for calibrated voltage. The final parameter value is the product of the calibrated voltage value and its weight, plus the product of the ion concentration correction value and its weight. The fused parameter value output is 1.28 mV. Any parameter in the sequence whose difference from the benchmark value exceeds a preset calibrated difference threshold of 0.03 mV is marked as an abnormal calibration point, and a calibrated parameter value package is obtained. This marking isolates anomalies such as sudden ion peak interference. The abnormal point set integrates data from multiple periods, such as period 5 and period 12.

[0103] In step S16, generating a periodic sequence based on the calibrated parameter values ​​for changes in wastewater quality to obtain the final strategy sequence includes:

[0104] A dynamic adjustment sequence is generated based on the calibrated parameter values, and a dynamic periodic sequence is recorded based on the dynamic adjustment sequence in response to changes in wastewater quality to obtain an initial treatment instruction sequence.

[0105] The initial processing instruction sequence is iteratively calculated. When the convergence rate fluctuation is greater than the preset convergence rate fluctuation threshold, the response threshold increment is adjusted to obtain the optimized threshold sequence.

[0106] The water quality ion concentration correction value is weighted and calculated based on the optimized threshold sequence to obtain the intermediate strategy sequence.

[0107] Abnormal calibration values ​​are obtained from the intermediate policy sequence. When the potential deviation of the abnormal calibration value is greater than the preset potential deviation threshold, the optimized threshold sequence is marked to obtain the final policy sequence.

[0108] First, a dynamic adjustment sequence is generated based on the calibrated parameter values. Then, a dynamic periodic sequence is recorded based on this dynamic adjustment sequence to address changes in wastewater quality. For example, in water quality monitoring, a calibrated parameter value of 1.28 mV is used as a baseline. The sensor potential signal is acquired in real time, and its instantaneous deviation from the baseline value is calculated. A sliding time window is then established to analyze the water quality change trend. When the deviations at multiple consecutive sampling points maintain the same direction, and the fluctuation amplitude exceeds the standard deviation statistic of the historical data noise fluctuation range under stable operating conditions, and a preset tolerance is applied, it is determined to be a water quality change rather than random noise. Subsequently, the baseline value is slightly adjusted based on the strength and persistence of the trend. For example, when a positive deviation is continuously detected, the baseline value is gradually increased by a preset step size. This step size is adjusted by calling the average step size corresponding to the same historical deviation value that is pre-stored. Finally, a smoothly evolving dynamic adjustment sequence is generated, which helps the sensor respond to water quality changes in real time.

[0109] The periodic sequence triggers an instruction set based on real-time acquired ion concentration data. The response threshold is set to 0.5 mg / L based on the maximum fluctuation value of historical ion concentration data. The sequence generation cycle is once every 5 minutes, resulting in an initial processing instruction sequence. The initial processing instruction sequence records an initial convergence rate of 0.75. The initial convergence rate is calculated by analyzing the convergence characteristics of parameters during historical stable periods. Specifically, stable periods in the past 30 calibration cycles where the water ion concentration change was below the threshold of 0.3 mg / L are selected. This threshold represents the maximum fluctuation value of historical water ion concentration. Subsequently, the ratio of the time required for the calibration parameter to return to the steady-state value of 1.28 mV after a sudden change to the standard convergence cycle of 10 minutes is calculated for each cycle. This yields a set of convergence rate samples. After removing outliers, the arithmetic mean of 0.75 is taken as the initial value. For example, during historical stable periods, the average speed at which the data returns to the steady-state value of 1.28 mV after a sudden change is 0.75 times the ideal standard speed, meaning it takes an average of 10 / 0.75 ≈ 13.3 minutes.

[0110] Subsequently, the initial convergence rate reflects the rate at which the iterative process adjusts from offset to stability; a higher initial value helps to quickly lock in reliable parameters. The initial processing instruction sequence includes the initial convergence rate value. A sliding window is used to calculate the fluctuation of the parameter iteration convergence rate within adjacent periods, determining whether the fluctuation exceeds a preset threshold. If the fluctuation exceeds the preset threshold, the response threshold increment is adjusted, ensuring the optimized threshold sequence includes convergence rate monitoring points. For example, the sliding window covers three adjacent periods. The calculated convergence rate fluctuation, such as decreasing from 0.75 to 0.68 and then increasing to 0.72, results in a fluctuation value of 0.07. The iterative convergence rate fluctuation is calculated by taking 1.5 times the standard deviation of the convergence rate difference between adjacent periods in long-term monitoring data as the tolerance boundary. When the convergence rate is determined to be greater than the preset iterative convergence rate fluctuation threshold of 0.05, the response threshold increment is adjusted by 0.2 mg / L. The optimized threshold sequence increases from the initial 0.5 mg / L to 0.7 mg / L, including a convergence rate monitoring point such as 0.71, ensuring the threshold adapts to water quality fluctuations and improving response sensitivity.

[0111] Secondly, a fusion processing sequence is obtained from the optimized threshold sequence. Weighted calculations are performed on the ion concentration correction values ​​to obtain the voltage offset adjustment value in the intermediate strategy sequence. For example, the optimized threshold sequence monitoring point 0.71, combined with the ion concentration correction value (currently 2.3 mg / L), is weighted with ion concentration (0.6) and threshold monitoring (0.4). Regression analysis of historical ion concentration sequences, threshold monitoring point sequences, and corresponding actual voltage offset value sequences yields a standardized coefficient of 0.45 for ion concentration and 0.30 for threshold monitoring points. Therefore, the normalized weights are 0.6 and 0.4, respectively. The fusion processing sequence first normalizes the ion concentration value of 2.3 mg / L. If the sensor range is 0-10 mg / L, the normalization value is 0.23. The threshold monitoring point 0.71 represents the convergence rate, ensuring all data falls within the 0-1 range. Subsequently, a weighted sum of 0.422 is calculated, resulting in an intermediate strategy sequence voltage offset adjustment value of 0.04 mV. This adjustment value balances the influence of concentration correction and threshold, reducing offset misjudgments.

[0112] Finally, the voltage offset adjustment value in the intermediate strategy sequence is obtained. When the absolute value of the abnormal calibration point deviation is greater than a preset threshold of the historical average abnormal calibration point deviation value, the optimized post-processing strategy is marked, and the final strategy sequence is determined. For example, if the voltage offset adjustment value of 0.04 mV is compared with the reference, and the absolute value of the abnormal calibration point deviation of 0.045 mV is greater than the preset threshold of 0.03 mV, then the abnormal point within the period in the optimized post-processing strategy is marked, and the final strategy sequence is determined. If there is an abnormal point in the current final strategy sequence, the sampling frequency is adjusted. If there is, it is adjusted to a preset sampling every 2 minutes; if not, the current sampling frequency is maintained. When the absolute value of the abnormal calibration point deviation is less than the preset threshold, the current optimized post-processing strategy is maintained without triggering the adjustment command, and the original sampling frequency is continued while the calibration point is retained, thus obtaining the final strategy sequence.

[0113] In step S17, the step of monitoring effluent quality indicators according to the final strategy sequence, obtaining feedback data, and looping back to the initial acquisition stage to obtain the final wastewater treatment scheme includes:

[0114] The water quality stability deviation is calculated based on the final strategy sequence. When the water quality stability deviation is greater than the preset stability deviation threshold, the sequence length increment is adjusted to obtain the stability calibration sequence.

[0115] The stability calibration sequence is weighted and fused to obtain an intermediate calibration cycle sequence;

[0116] The overall stability index is calculated based on the intermediate calibration cycle sequence. When the overall stability index is less than the preset stability index threshold, the optimized calibration cycle sequence is obtained.

[0117] Logistic regression is performed on the optimized calibration cycle sequence to calculate the stability prediction value, and the final wastewater treatment scheme is obtained.

[0118] First, a sliding window is used to calculate the stability deviation within adjacent periods based on the fluctuation range of effluent quality indicators and the sequence length feedback value. Effluent quality indicators, such as turbidity, are recorded as 2.1, 2.3, and 2.0 units in consecutive periods. The sequence length feedback value is set to collect 10 sample points per period, and the sliding window covers 3 adjacent periods. The stability deviation is calculated as the average absolute value of the difference in turbidity mean between adjacent periods, such as 0.15 units. This deviation reflects the consistency of response to water quality fluctuations. When the stability deviation is determined to be greater than a preset stability deviation threshold based on the maximum stability fluctuation value in historical samples, the sequence length increment is adjusted. For example, if the preset threshold is set to 0.1 units, and the calculated deviation of 0.15 is greater than the threshold, the sequence length increment is adjusted to 5 sample points. This effectively reduces the impact of deviations caused by individual abnormal data, which helps to capture unstable factors in real time.

[0119] Subsequently, the initial stability calibration sequence was integrated and adjusted to a length of 15 sample points. The initial pressure fluctuation value was taken from the pressure sensor reading at the pump station, which was 80,000 Pascals. This initial value served as a benchmark to indicate the potential impact of pressure on effluent quality. The correlation between pressure fluctuation amplitude compensation data and effluent quality indicators was obtained using the initial stability calibration sequence and the initial pressure fluctuation value. For example, the pressure fluctuation amplitude compensation data was calculated as a pressure difference of 12,000 Pascals between adjacent periods. The correlation between effluent quality indicators was calculated using the Pearson correlation coefficient to determine the linear correlation between the pressure fluctuation sequence and the turbidity change sequence. Aligned pressure and turbidity time series data were collected; for example, one pressure value and one turbidity value were taken from each of three consecutive sampling periods to form a data pair. The arithmetic mean of the two sequences was calculated separately. The covariance of the numerator was calculated by subtracting the pressure mean from each pressure value and the turbidity mean from each turbidity value, resulting in two sets of deviations. The deviations at corresponding positions were multiplied, and all products were summed. Subsequently, the product of the standard deviations of the two sequences in the denominator is calculated, and the covariance is divided by the product of the two standard deviations to obtain a correlation coefficient of 0.85, which is between -1 and 1. This correlation value supports the subsequent fusion weight allocation.

[0120] A weighted fusion calculation is performed on the pressure fluctuation amplitude compensation data and the correlation values ​​of the effluent quality indicators to obtain an intermediate calibration cycle sequence that includes the feedback length adjustment value. Multiple linear regression is performed with pressure fluctuation amplitude and indicator correlation values ​​as independent variables. For example, in one embodiment, the standardized regression coefficient of the pressure fluctuation amplitude is calculated to be 0.35, while the standardized regression coefficient of the effluent quality indicator correlation value is 0.15. This indicates that the actual explanatory power and predictive contribution of pressure fluctuation to the feedback length adjustment value is 2.33 times that of the indicator correlation value. The weight allocation is the result of normalizing these two standardized coefficients to 0.7 and 0.3, respectively. Therefore, 0.7 is assigned a dominant weight, and the correlation value is assigned an auxiliary weight of 0.3. The calculated feedback length adjustment value is used to continuously collect data at this length in the intermediate calibration cycle sequence, ensuring that the compensation data is fully integrated into the calibration process and reducing deviations caused by pressure interference.

[0121] Based on historical data, the normal range for pressure fluctuations is determined to be 0-20000 Pascals, resulting in a normalized pressure fluctuation value of 0.6. After obtaining the real-time pressure fluctuation amplitude of 12000 Pascals for the current period, a minimum-maximum normalization method is used to map it to the 0-1 interval, i.e., 12000 / 20000 = 0.6. A weighted fusion calculation is then performed, yielding a fusion value of 0.7 × 0.6 + 0.3 × 0.85 = 0.675. This fusion value is then mapped to the feedback length adjustment. The baseline feedback length is 15 sample points, with a maximum adjustment to 20 sample points. Therefore, the adjustment amount is 15 + 0.675 × 5 ≈ 18.375, rounded down to 18 sample points.

[0122] Secondly, continuous calibration cycle parameters and overall stability indices are extracted from the intermediate calibration cycle sequence. For example, continuous calibration cycle parameters include a sampling interval of 2 minutes, and the overall stability index is calculated as a turbidity standard deviation of 0.09 units. All turbidity readings within a time window, such as the most recent 10 sampling points, are obtained, and the arithmetic mean of these readings is calculated. Then, the deviation of each reading from the mean is squared, and the sum of all squared deviations is divided by the number of readings minus one. Finally, the square root is taken to obtain the turbidity standard deviation, for example, 0.09 units. The smaller this value, the smaller the turbidity fluctuation and the higher the system stability. When the overall stability index is determined to be less than a preset threshold based on the smallest overall stability index within the historical stability fluctuation range, the optimized calibration cycle sequence and the dynamic value of light intensity are determined.

[0123] Specifically, a preset threshold of 0.12 units is used. If the index of 0.09 is less than the preset overall stability index threshold, the optimized calibration cycle sequence and dynamic value of light intensity are adjusted, such as updating to 75 lux in real time to enhance the sequence's adaptability to ambient light. When the overall stability index is greater than the preset overall stability index threshold, the sampling interval is adjusted from 2 minutes to a preset 30-second acquisition interval to increase data acquisition density and avoid insufficient data density to accurately depict fluctuation details. Secondly, an exponentially weighted moving average method is used to dynamically update the light intensity baseline value. Historical light intensity sequences are collected, and different α candidate values ​​are tested sequentially. For each α value, the exponentially weighted moving average method is used to calculate the predicted value step by step from the beginning of the sequence, and the average absolute error of all predicted points is calculated. Finally, the α value that minimizes the average absolute error is selected as the formal parameter. The measured light intensity value of the current cycle and the baseline value of the previous cycle are obtained and weighted by a smoothing coefficient α. The new baseline value is equal to α multiplied by the current measured value plus the old baseline value. The calibration parameters are iteratively adjusted using a gradient descent algorithm with a learning rate of 0.001 until the indicators do not exceed the preset overall stability indicator threshold for three consecutive cycles.

[0124] Finally, based on the optimized calibration cycle sequence and dynamic values ​​of light intensity, real-time monitoring data and continuous cycle stability of effluent quality indicators are obtained. For example, the real-time monitoring data records turbidity of 1.9 units, and the continuous cycle stability value is averaged over multiple cycles to obtain 0.92. The fluctuation ranges of key effluent quality indicators such as turbidity and pH value over the most recent 10 cycles are collected, normalized, and converted into scores between 0 and 1. The arithmetic mean of these scores is then calculated, and the resulting average is the continuous cycle stability value. Logistic regression is used to calculate the stability prediction value based on the real-time monitoring data and continuous cycle stability value of the effluent quality indicators. The final wastewater treatment scheme is used as the input monitoring data and cycle value for logistic regression. When the predicted value reaches 0.88, the final cycle is triggered to incorporate a pressure compensation sequence, such as limiting the amplitude to within 10,000 Pascals. This sequence ensures the continuous compliance of effluent quality under multivariate conditions, significantly improving robustness and response efficiency.

[0125] It should be noted that the logistic regression algorithm requires a historical dataset, including features such as turbidity and persistent cycle stability, along with their corresponding stability labels (1 for stable and 0 for unstable). The model parameters, including bias terms and feature weights such as turbidity weights, are optimized using maximum likelihood estimation. Stability value weight The parameters are determined by finding the optimal solution that maximizes the probability of occurrence from historical data through an iterative algorithm. Using current monitoring data and stability cycle values ​​as feature inputs, a linear combination is calculated:

[0126]

[0127] in For bias terms, the weighting coefficients and The optimal parameters are obtained through maximum likelihood estimation optimization. This is achieved by collecting historical datasets containing features (such as turbidity and stability cyclic values) and corresponding stability labels (1 for stable, 0 for unstable). A logistic regression model is used to fit the data, and an iterative algorithm (such as gradient descent) is employed to find the optimal parameters that maximize the probability of occurrence of historical data. For example, based on three months of historical data from a wastewater treatment plant, the weights after training are... =0.55, =0.35, bias =−0.2.

[0128] Then through the sigmoid function Will Converted to a probability value, the predicted value of 0.88 represents a stable confidence level. If the predicted value is higher than the preset confidence threshold of 0.8 set based on the classification critical point selected based on historical data analysis, the stress compensation sequence is triggered to be included in the loop, ensuring that the decision is based on data-driven principles.

[0129] In summary, this invention discloses an integrated wastewater treatment method based on multi-source data fusion, which includes collecting temperature compensation components, humidity interference coefficients, water quality ion concentrations and electrode aging rates, obtaining ambient light intensity, pressure fluctuation amplitude and signal-to-noise ratio, constructing a weight matrix for the signal-to-noise ratio, the ambient light intensity and the pressure fluctuation amplitude, and obtaining an initial drift feature vector.

[0130] Based on the initial drift feature vector, grouping and clustering are performed to determine the electrode aging rate benchmark and the water quality ion concentration benchmark, thus obtaining the benchmark reference point;

[0131] Anomaly detection is performed on the reference points using a support vector machine to obtain complete anomaly detection points.

[0132] When the voltage drift of the complete abnormal detection point exceeds the preset voltage drift threshold, the interaction sample of the temperature compensation component and the humidity interference coefficient is obtained from historical data to obtain a set of compensation coefficients.

[0133] Based on the set of compensation coefficients, the dynamic voltage offset and current adjustment step size are iteratively optimized and adjusted to obtain the calibrated parameter values.

[0134] Based on the calibrated parameter values, a periodic sequence is generated for the changes in wastewater quality, resulting in the final strategy sequence;

[0135] The effluent quality indicators are monitored according to the final strategy sequence, feedback data is obtained and looped back to the initial collection stage to obtain the final wastewater treatment scheme.

[0136] This invention utilizes a multi-source data fusion architecture to capture the complex drift caused by the combined effects of temperature fluctuations and humidity changes, thus ensuring the quality of the effluent.

[0137] Reference Figure 2 The second embodiment of the present invention provides an integrated wastewater treatment system based on multi-source data fusion, comprising:

[0138] The data acquisition and integration module is used to acquire temperature compensation components, humidity interference coefficient, water quality ion concentration and electrode aging rate, obtain ambient light intensity, pressure fluctuation amplitude and signal-to-noise ratio, and construct a weight matrix for the signal-to-noise ratio, ambient light intensity and pressure fluctuation amplitude to obtain an initial drift feature vector.

[0139] The grouping and clustering module is used to perform grouping and clustering based on the initial drift feature vector, determine the electrode aging rate benchmark and the water quality ion concentration benchmark, and obtain the benchmark reference point;

[0140] Anomaly detection module is used to perform anomaly detection on the reference point using a support vector machine to obtain complete anomaly detection points;

[0141] The data compensation module is used to obtain an interaction sample of the temperature compensation component and the humidity interference coefficient from historical data when the voltage drift of the complete abnormal detection point exceeds a preset voltage drift threshold, thereby obtaining a set of compensation coefficients.

[0142] The compensation adjustment module is used to iteratively optimize and adjust the dynamic voltage offset and current adjustment step size according to the set of compensation coefficients to obtain the calibrated parameter values.

[0143] The sequence generation module is used to generate a periodic sequence for wastewater quality changes based on the calibrated parameter values, and obtain the final strategy sequence.

[0144] The detection reflux module is used to monitor effluent quality indicators according to the final strategy sequence, obtain feedback data, and loop back to the initial acquisition stage to obtain the final sewage treatment solution.

[0145] It should be noted that the integrated wastewater treatment method system based on multi-source data fusion provided in this embodiment of the invention is used to execute all the process steps of the integrated wastewater treatment method based on multi-source data fusion in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.

[0146] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a K-means clustering program. When the processor executes the computer program, it implements the steps described in the above embodiments of the integrated wastewater treatment method based on multi-source data fusion, for example... Figure 1 The step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as the backflow detection module.

[0147] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0148] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0149] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.

[0150] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0151] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0152] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0153] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.

Claims

1. An integrated wastewater treatment method based on multi-source data fusion, characterized in that, include: Temperature compensation component, humidity interference coefficient, water ion concentration and electrode aging rate are collected, ambient light intensity, pressure fluctuation amplitude and signal-to-noise ratio are obtained, and a weight matrix is ​​constructed on the signal-to-noise ratio, ambient light intensity and pressure fluctuation amplitude to obtain the initial drift feature vector. Based on the initial drift feature vector, grouping and clustering are performed to determine the electrode aging rate benchmark and the water quality ion concentration benchmark, thus obtaining the benchmark reference point; Anomaly detection is performed on the reference points using a support vector machine to obtain complete anomaly detection points. When the voltage drift of the complete abnormal detection point exceeds the preset voltage drift threshold, the interaction sample of the temperature compensation component and the humidity interference coefficient is obtained from historical data to obtain a set of compensation coefficients. Based on the set of compensation coefficients, the dynamic voltage offset and current adjustment step size are iteratively optimized and adjusted to obtain the calibrated parameter values. Based on the calibrated parameter values, a periodic sequence is generated for the changes in wastewater quality, resulting in the final strategy sequence; The effluent quality indicators are monitored according to the final strategy sequence, feedback data is obtained and looped back to the initial collection stage to obtain the final wastewater treatment scheme.

2. The integrated wastewater treatment method based on multi-source data fusion according to claim 1, characterized in that, The system collects temperature compensation components, humidity interference coefficients, water ion concentrations, and electrode aging rates; obtains ambient light intensity, pressure fluctuation amplitude, and signal-to-noise ratio; and constructs a weight matrix for the signal-to-noise ratio, ambient light intensity, and pressure fluctuation amplitude to obtain an initial drift feature vector, including: Collect temperature compensation components, humidity interference coefficient, water ion concentration and electrode aging rate, and obtain ambient light intensity, pressure fluctuation amplitude and signal-to-noise ratio; The humidity interference coefficient is filtered and separated to obtain a separation signal. When the water ion concentration in the separation signal exceeds a preset water ion concentration threshold, the compensation value of the electrode aging rate is adjusted to obtain a compensation signal. The ambient light intensity and signal-to-noise ratio in the compensation signal are weighted and fused to obtain a first fusion vector. When the signal-to-noise ratio in the first fusion vector is lower than a preset signal-to-noise ratio threshold, the pressure fluctuation amplitude correction is introduced to obtain a second fusion vector. Based on the second fusion vector, the weight of the temperature compensation component is determined to obtain the first drift vector. When the residual humidity interference coefficient in the first drift vector exceeds the preset residual threshold, the water quality ion concentration is recalibrated to obtain the second drift vector. When the residual humidity interference coefficient in the first drift vector does not exceed the preset residual threshold, the second drift vector is directly output. Based on the second drift vector, a multi-source weight matrix is ​​constructed in real time to obtain a third drift vector. When the stability of the third drift vector is lower than a preset stability threshold, the multi-source weight matrix is ​​iteratively updated until the stability reaches the preset stability threshold to obtain an initial drift feature vector.

3. The integrated wastewater treatment method based on multi-source data fusion according to claim 1, characterized in that, The step of grouping and clustering based on the initial drift feature vector to determine the electrode aging rate benchmark and the water quality ion concentration benchmark, and obtaining the benchmark reference point, includes: K-means clustering is performed on the initial drift feature vector to obtain the first clustering grouping result; Regression analysis is performed on the influence deviation of the temperature compensation component on the humidity interference coefficient in the first clustering result. When the influence deviation exceeds the preset influence deviation threshold, the cluster center position is adjusted to obtain the first adjustment center. The reference difference between the water ion concentration and the electrode aging rate is obtained from the first adjustment center to obtain the reference deviation. When the reference deviation reaches the preset reference condition, the second clustering grouping result is output to determine the reference reference point. When the reference deviation does not reach the preset reference condition, the clustering center is updated to obtain the second adjustment center. The final cluster center in the cluster group is determined based on the second adjustment center, and the benchmark reference point is obtained.

4. The integrated wastewater treatment method based on multi-source data fusion according to claim 1, characterized in that, The step of using a support vector machine to perform anomaly detection on the benchmark reference point to obtain complete anomaly detection points includes: The current potential signal is acquired, the potential deviation value between the reference point and the current potential signal is calculated, and the potential deviation value is anomaly detected by a support vector machine to obtain the first anomaly classification result. The degree of drift in the first anomaly classification result is calculated to obtain the first adjustment benchmark; Based on the first adjustment benchmark, the voltage difference between the potential deviation value and the dynamic voltage offset is obtained. When the voltage difference meets the preset voltage difference stability condition, the second anomaly classification result is determined. Based on the second anomaly classification result, the potential drift threshold in the potential deviation value is determined to obtain a complete anomaly detection point.

5. The integrated wastewater treatment method based on multi-source data fusion according to claim 1, characterized in that, When the voltage drift of the complete abnormal detection point exceeds a preset voltage drift threshold, the interaction sample of the temperature compensation component and the humidity interference coefficient is obtained from historical data to obtain a set of compensation coefficients, including: When the voltage drift of the complete abnormal detection point exceeds the preset voltage drift threshold, the interaction samples of the temperature compensation component and the humidity interference coefficient are extracted from historical data, and the interaction samples are clustered to obtain an initial compensation coefficient set; the initial compensation coefficient set includes a current step sequence. Based on the set of compensation coefficients and the interaction samples, the correlation coefficient matrix is ​​calculated, and the temperature-dominant compensation component and humidity-dominant interference coefficient are determined based on the absolute value of the correlation coefficient matrix to obtain the set of compensation interference. The set of compensation interference and the current step sequence are weighted and fused to obtain the set of correction components. When the set of correction components exceeds the preset correction component threshold, the joint compensation point is marked to obtain the set of joint compensation points. Obtain the current difference sequence from the joint compensation point set. When the variance of the current difference sequence is less than a preset variance threshold, obtain the compensation coefficient set.

6. The integrated wastewater treatment method based on multi-source data fusion according to claim 1, characterized in that, The step of iteratively optimizing and adjusting the dynamic voltage offset and current adjustment step size according to the compensation coefficient set to obtain calibrated parameter values ​​includes: By fitting the set of compensation coefficients with the water ion concentration, an initial calibration parameter sequence is obtained; Obtain the current adjustment step size, and iteratively optimize the current adjustment step size according to the initial calibration parameter sequence to obtain the optimized current compensation sequence; The sequence generation period reference is obtained from the optimized current compensation sequence, and the fluctuation variance of the dynamic voltage offset is calculated to obtain a stable parameter set. The stable parameter set is weighted and fused to obtain a calibration parameter value sequence. When the reference value in the calibration parameter value sequence exceeds a preset reference value threshold, an abnormal calibration value is marked, and the calibrated parameter value is obtained.

7. The integrated wastewater treatment method based on multi-source data fusion according to claim 1, characterized in that, The step of generating a periodic sequence based on the calibrated parameter values ​​for changes in wastewater quality, to obtain the final strategy sequence, includes: A dynamic adjustment sequence is generated based on the calibrated parameter values, and a dynamic periodic sequence is recorded based on the dynamic adjustment sequence in response to changes in wastewater quality to obtain an initial treatment instruction sequence. The initial processing instruction sequence is iteratively calculated. When the convergence rate fluctuation is greater than the preset convergence rate fluctuation threshold, the response threshold increment is adjusted to obtain the optimized threshold sequence. The water quality ion concentration correction value is weighted and calculated based on the optimized threshold sequence to obtain the intermediate strategy sequence. Abnormal calibration values ​​are obtained from the intermediate policy sequence. When the potential deviation of the abnormal calibration value is greater than the preset potential deviation threshold, the optimized threshold sequence is marked to obtain the final policy sequence.

8. The integrated wastewater treatment method based on multi-source data fusion according to claim 1, characterized in that, The step of monitoring effluent quality indicators according to the final strategy sequence, obtaining feedback data, and looping back to the initial data collection stage to obtain the final wastewater treatment scheme includes: The water quality stability deviation is calculated based on the final strategy sequence. When the water quality stability deviation is greater than the preset stability deviation threshold, the sequence length increment is adjusted to obtain the stability calibration sequence. The stability calibration sequence is weighted and fused to obtain an intermediate calibration cycle sequence; The overall stability index is calculated based on the intermediate calibration cycle sequence. When the overall stability index is less than the preset stability index threshold, the optimized calibration cycle sequence is obtained. Logistic regression is performed on the optimized calibration cycle sequence to calculate the stability prediction value, and the final wastewater treatment scheme is obtained.

9. An integrated wastewater treatment system based on multi-source data fusion, characterized in that, include: The data acquisition and integration module is used to acquire temperature compensation components, humidity interference coefficient, water quality ion concentration and electrode aging rate, obtain ambient light intensity, pressure fluctuation amplitude and signal-to-noise ratio, and construct a weight matrix for the signal-to-noise ratio, ambient light intensity and pressure fluctuation amplitude to obtain an initial drift feature vector. The grouping and clustering module is used to perform grouping and clustering based on the initial drift feature vector, determine the electrode aging rate benchmark and the water quality ion concentration benchmark, and obtain the benchmark reference point; Anomaly detection module is used to perform anomaly detection on the reference point using a support vector machine to obtain complete anomaly detection points; The data compensation module is used to obtain an interaction sample of the temperature compensation component and the humidity interference coefficient from historical data when the voltage drift of the complete abnormal detection point exceeds a preset voltage drift threshold, thereby obtaining a set of compensation coefficients. The compensation adjustment module is used to iteratively optimize and adjust the dynamic voltage offset and current adjustment step size according to the set of compensation coefficients to obtain the calibrated parameter values. The sequence generation module is used to generate a periodic sequence for wastewater quality changes based on the calibrated parameter values, and obtain the final strategy sequence. The detection reflux module is used to monitor effluent quality indicators according to the final strategy sequence, obtain feedback data, and loop back to the initial acquisition stage to obtain the final sewage treatment solution.