Method for evaluating carbon source quality of terminal effluent of sewage treatment plant
Patent Information
- Application Number
- CN202510793872.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2045-06-13
AI Technical Summary
[0003]本发明的主要目的在于提供一种污水处理厂终端出水碳源质量检评价方法,解决能针对碳源质量评价的全流程自动化算法体系尚未成熟,尤其在多源数据融合、异常检测与模型动态更新的协同机制方面存在技术空白的问题
[0014]本发明提供了一种污水处理厂终端出水碳源质量检评价方法,该方法通过在线水质全光谱检测仪实现终端出水有机物含量原始光谱数据的高频实时采集,结合变分模态分解等算法去除噪声干扰,确保数据准确性与时效性;利用互信息特征选择、支持向量机分类及回归算法,实现从原始数据到特征提取、量化结果及异常判定的多维度精准分析,全面反映碳源质量特性;引入动态权重调整机制与自适应模型优化算法,根据实时反馈数据动态更新评价模型权重分布,提升模型对水质波动的适应性;通过构建时间序列分析与频域分解模型,有效分离有机物含量变化的长期趋势与周期性波动,为异常检测提供多维度数据支撑;结合局部异常因子算法与马氏距离适配度计算,实现异常状态的快速检测与参数组合的有效性验证,缩短异常响应时间;采用强化学习与模糊逻辑算法生成工艺调整参数建议,联动自动化控制系统执行动态调控,并通过反馈数据闭环优化控制指令,形成 “检测 -评价 - 调控 - 验证” 的完整智能闭环,显著提高污水处理效率与出水质量稳定性,保障碳源质量持续达标。
Smart Images

Figure CN120609749B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of effluent carbon source quality assessment, and in particular to a method for assessing the quality of carbon sources in the terminal effluent of a wastewater treatment plant. Background Technology
[0002] The quality of carbon sources in the final effluent of wastewater treatment plants directly affects the effectiveness of subsequent treatment processes and water quality compliance. Traditional evaluation methods largely rely on offline sampling and analysis, which suffers from data lag and limited coverage dimensions, making it difficult to reflect changes in carbon source quality in real time. With the development of online monitoring technology and intelligent algorithms, there is an urgent need for an automated evaluation method that integrates real-time data acquisition, multi-dimensional analysis, and dynamic control to address the shortcomings of existing technologies, such as insufficient data timeliness, delayed anomaly response, and poor evaluation model flexibility. While spectral analysis, time series models, and machine learning algorithms have seen preliminary applications in water quality monitoring, a fully automated algorithm system for carbon source quality evaluation is still immature, particularly lacking in the collaborative mechanisms for multi-source data fusion, anomaly detection, and dynamic model updates. Therefore, it is necessary to construct a complete technical solution covering data acquisition, feature extraction, anomaly detection, model optimization, and process control to improve the accuracy and real-time performance of carbon source quality assessment in wastewater treatment plant effluent. Summary of the Invention
[0003] The main objective of this invention is to provide a method for evaluating the quality of carbon sources in the final effluent of wastewater treatment plants, addressing the problem that a fully automated algorithm system for evaluating carbon source quality is not yet mature, especially in terms of the collaborative mechanism for multi-source data fusion, anomaly detection, and dynamic model updates.
[0004] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for evaluating the quality of carbon sources in the terminal effluent of a wastewater treatment plant, the method comprising: The raw spectral data stream of organic matter content in the terminal effluent is obtained through an online full-spectrum water quality analyzer. Based on the original spectral data stream, preliminary quantitative results of organic matter content are obtained; Based on the preliminary quantification results, data on the changing trend of organic matter content were obtained; If the trend data exceeds a preset threshold range, an anomaly detection mechanism is triggered, and an anomaly determination result is output. Based on the anomaly determination result, a suitable combination of evaluation parameters is obtained to update the weight distribution of the evaluation model. Through the updated evaluation model weight distribution, the carbon source quality of the current terminal effluent is scored in multiple dimensions to obtain a comprehensive quality score. Based on the comprehensive quality score, obtain the process adjustment parameter suggestions corresponding to the score and output specific process control instructions; According to the process control instructions, the automated control system of the wastewater treatment plant is linked to obtain the feedback data after execution; The feedback data after execution is compared and analyzed with the initial comprehensive quality score. If the feedback data indicates that the effluent quality does not meet the standard, the evaluation model parameters are readjusted and a new process control command is output.
[0005] In the preferred embodiment, a water quality full-spectrum analyzer is used to perform a preliminary scan of the initial signal data to obtain the original spectral data stream related to the carbon source quality index; The original spectral data stream is preprocessed to remove noise interference, resulting in a cleaned spectral data set. Based on the cleaned spectral data set, key feature values related to quality indicators are extracted to determine the carbon source quality characteristics in the effluent. If the extracted feature values do not match the preset threshold range, the spectral data set is subjected to a secondary calibration process to obtain a calibrated feature dataset. Using the calibrated feature dataset, the support vector machine algorithm is applied to classify and judge the effluent feature parameters to obtain classification result data. Based on the classification results data and combined with the pre-established feature parameter mapping relationship, the final effluent feature parameter description is determined. In the noise removal step, a variational mode decomposition algorithm is used to transform the original spectral data stream. Decomposed into K modal components Its optimization model is: ; The constraints are By solving the model, effective signal components are obtained, and a cleaned spectral data set is constructed.
[0006] In the preferred embodiment, based on the original spectral data stream, a preliminary quantification result of the organic matter content is obtained, including: The original spectral data stream is preliminarily cleaned by the data stream processing module to remove irrelevant interference signals, resulting in a processed spectral data set. Based on the processed spectral data set, key signal points are screened using feature extraction methods to obtain a set of feature signals related to organic matter content; In the process of selecting key signal points using feature extraction, a feature selection formula based on mutual information is introduced to calculate the features. With organic matter content target value mutual information : ; Sort by mutual information value and select those with mutual information values higher than a set threshold. The features constitute a set of feature signals; Using the feature signal set, a pre-built evaluation model library is applied, combined with a support vector regression algorithm, to perform regression calculations on the signal set and obtain initial quantization values; If the initial quantization value does not match the preset threshold range, the feature signal set is subjected to secondary correction processing to obtain the corrected quantized data set. Based on the corrected quantified data set, multi-dimensional comparisons are performed through the data analysis layer to determine the distribution characteristics of organic matter content; Based on the distribution characteristics, a preset classification rule is used for stratification to determine the final content assessment result; Based on the final content assessment results, combined with the pre-established mapping relationship table, analytical data descriptions that match business objectives are obtained.
[0007] In the preferred embodiment, based on the preliminary quantification results, data on the changing trend of organic matter content are obtained, including: By preprocessing the raw monitoring data, the initial time series data of organic matter content is obtained, resulting in a standardized basic dataset. Based on the standardized basic dataset, a time series analysis method is used to construct a trend model of organic matter content changes, and an autoregressive moving average model is used to fit the data to determine trend characteristic parameters. For the aforementioned trend characteristic parameters, the periodic component in the changing trend is extracted, the long-term trend and short-term fluctuation parts are separated, and the distribution pattern of the periodic characteristics is obtained. In extracting periodic components, an improved algorithm of empirical mode decomposition is used to transform the time series... Decomposed into eigenmode functions and residual components : ; By calculating each By analyzing the frequency characteristics, periodic feature components are selected to obtain the distribution pattern of periodic features. If there is a significant fluctuation period in the distribution pattern of the periodic feature, the fluctuation period is decomposed by frequency domain analysis to obtain the specific period frequency value. Based on the periodic frequency value and combined with long-term trend data, a predictive framework for water quality fluctuations is constructed to determine whether the fluctuation pattern conforms to the preset periodic threshold range. Based on the judgment results of the fluctuation pattern, a correlation mapping between water quality fluctuations and changes in organic matter content is generated to determine the key time nodes of the fluctuation impact. If the fluctuations at the key time points exceed a preset threshold range, the data for the relevant time period are weighted to obtain adjusted trend data.
[0008] In the preferred embodiment, if the trend data exceeds a preset threshold range, an anomaly detection mechanism is triggered, and an anomaly determination result is output, including: By collecting real-time data transmitted by environmental sensors, change trend information is obtained and stored in the data processing module to obtain a preliminary change trend record. Based on the recorded trend of change, a preset threshold is used for comparison. If the trend of change exceeds the preset threshold range, an anomaly detection process is triggered to determine a preliminary anomaly signal. For the aforementioned preliminary abnormal signal, historical data is retrieved from the database and compared with the current data in multiple dimensions. The support vector machine algorithm is used to classify the water quality fluctuation characteristics and determine whether there is a significant deviation. In determining whether significant bias exists, a local anomaly factor algorithm is introduced to calculate the sample points. Locally achievable density : ; Thus, sample points are obtained. Local anomalous factors ,when Greater than the set threshold At that time, the judgment showed a significant bias; If the support vector machine algorithm determines that there is a significant deviation in water quality fluctuations, then the fluctuation data is matched with the abnormal state standard to obtain abnormal state confirmation information. Based on the abnormal status confirmation information, a judgment result data is generated and stored in the result output module to obtain a structured abnormal judgment record; Based on the anomaly detection record, the linkage system adjustment module automatically generates adjustment parameter suggestions and outputs them to the relevant control unit. Obtain the execution feedback data of the proposed adjustment parameters, compare and analyze it with historical data, determine whether the water quality fluctuations after the system adjustment have returned to the normal range, and output the final verification results.
[0009] In the preferred embodiment, based on the anomaly determination result, a suitable combination of evaluation parameters is obtained to update the weight distribution of the evaluation model, including: By obtaining relevant data for anomaly determination from the system database, and performing preliminary screening on records under abnormal conditions, an initial anomaly dataset is obtained. Based on the initial abnormal dataset, key features of water quality fluctuations are extracted using feature analysis methods to determine the distribution pattern of the fluctuation features; If the distribution pattern of the fluctuation characteristics exceeds the preset threshold range, the corresponding rule is invoked to match the applicable evaluation parameters from the system database and obtain the corresponding parameter combination. By standardizing the obtained parameter combinations, we can analyze their compatibility with the evaluation model and determine the effectiveness of the parameter combinations. In analyzing the fit between parameter combinations and the evaluation model, a fit calculation formula based on Mahalanobis distance is used, assuming the parameter combination vector is... The mean vector of the evaluation model parameter distribution is The covariance matrix is Then the fit for: ; when Less than the set threshold When the parameter combination is valid, it is determined that the combination is valid. If the parameter combination is deemed valid, it is applied to the evaluation model, the weight distribution is updated, and a new model configuration is generated. Based on the new model configuration, water quality fluctuations under abnormal conditions are monitored in real time to obtain updated evaluation results. The persistence of the model update is determined by storing and comparing the updated evaluation results.
[0010] In the preferred scheme, the carbon source quality of the current terminal effluent is scored from multiple dimensions using the updated evaluation model weight distribution to obtain a comprehensive quality score, including: By collecting data from the effluent at the terminal, relevant indicators of carbon source quality are obtained, and combined with information on organic matter content and water quality fluctuations, a preliminary dataset is obtained. Based on the preliminary dataset, a pre-established evaluation model is used to score the carbon source quality in multiple dimensions, and the score result for each dimension is determined. The comprehensive quality score is obtained by weighting the multi-dimensional scoring results and combining the weight distribution. In calculating the weighted overall quality score, a dynamic weight adjustment formula based on the entropy weight method is introduced, where the weight is set to... Each dimension's score is Its weight The calculation formula is: ; in , For the sample size, The number of dimensions is used to calculate the overall quality score. ; If the overall quality score is lower than the preset threshold, the fluctuation data of water quality will be analyzed to determine whether the fluctuation range exceeds the normal range. If the fluctuation amplitude exceeds the normal range, the abnormal time period characteristics are extracted from the fluctuation data to obtain the process information corresponding to the abnormal fluctuation and determine the adjustment direction. By using the process information corresponding to the abnormal fluctuations and combining it with the comprehensive quality score, the support vector machine algorithm is used to optimize and simulate the process parameters to obtain the specific parameter values of the adjustment scheme. Based on the specific parameter values of the adjustment scheme, guide data for process adjustment is generated to determine the final direction of process optimization.
[0011] In the preferred embodiment, based on the comprehensive quality score, suggested process adjustment parameters corresponding to the score are obtained, and specific process control instructions are output, including: By extracting key indicators from the quality scoring data and using preset mapping rules, the data is compared with process optimization data in the parameter library to obtain preliminary matching results. Based on the preliminary matching results, the accuracy of the score matching is verified. If the verification result is lower than the preset threshold, a closer adjustment parameter is retrieved from the parameter library to determine the final parameter recommendation. In verifying the accuracy of the score matching, the cosine similarity formula is used to calculate the similarity between the preliminary matching results and the actual scores. : ; in For the initial matching of process optimization data index values, The index value corresponding to the actual score. For the number of indicators, when Below the set threshold At that time, reacquire the adjustment parameters; After obtaining the final parameter suggestions, the suggestions are converted into specific control instructions based on the process control requirements, thereby generating an executable process adjustment plan. The real-time optimization module acquires the current status data of the wastewater treatment process and compares it with the generated control commands to determine whether it meets the requirements for process adjustment. If the process adjustment requirements are met, the control command is sent to the wastewater treatment equipment to update the process parameters in real time. Based on the device feedback data after execution, the actual effect of the process adjustment is obtained, and the deviation between the effect and the expectation is used to determine whether further parameter adjustments are needed. If the deviation exceeds the preset range, process optimization data is re-extracted from the parameter library, and new control commands are generated based on the feedback from real-time optimization.
[0012] In the preferred embodiment, the feedback data after execution is compared and analyzed with the initial comprehensive quality score. If the feedback data indicates that the effluent quality does not meet the standard, the evaluation model parameters are readjusted, and new process control instructions are output, including: By obtaining feedback data from the monitoring system, a preliminary comparison is made between the effluent quality and the preset threshold to determine whether it meets the standards. If the feedback data indicates that the effluent quality does not meet the standards, a data comparison method is used to conduct a detailed analysis of the feedback data and the initial quality score to determine the range of deviation. Based on the deviation range obtained from the analysis, the parameters of the evaluation model are adjusted, and the parameters are optimized using a pre-established support vector machine model to obtain the adjusted model parameters. Based on the adjusted model parameters, new process control instructions are generated to perform real-time regulation of key links in the wastewater treatment process and determine the specific execution content of the instructions. Obtain real-time feedback data after regulation and compare it again with the adjusted quality score to determine whether the effluent quality meets the expected standard. If the comparison still shows that the standard is not met, the process control instructions are adjusted by analyzing historical data and combining the results of quality analysis to obtain an optimized control scheme. Based on the optimized control scheme, feedback data during the wastewater treatment process is continuously monitored, and dynamic adjustments are made in response to changing trends.
[0013] In the preferred embodiment, when adjusting the evaluation model parameters, an adaptive learning rate adjustment formula based on gradient descent is used, where the model parameters are set as follows: The loss function is Learning rate The dynamic adjustment formula is: ; in The attenuation coefficient is... For the first In each iteration, the gradient of the loss function with respect to the parameters is used to update the model parameters and optimize the control commands.
[0014] This invention provides a method for evaluating the carbon source quality of wastewater effluent from wastewater treatment plants. The method utilizes an online full-spectrum water quality analyzer to achieve high-frequency real-time acquisition of raw spectral data on organic matter content in the effluent. Algorithms such as variational mode decomposition are used to remove noise interference, ensuring data accuracy and timeliness. Mutual information feature selection, support vector machine classification, and regression algorithms are employed to achieve multi-dimensional and precise analysis from raw data to feature extraction, quantification results, and anomaly detection, comprehensively reflecting the carbon source quality characteristics. A dynamic weight adjustment mechanism and adaptive model optimization algorithm are introduced to dynamically update the weight distribution of the evaluation model based on real-time feedback data, improving the model's adaptability to water quality fluctuations. By constructing a time series analysis and frequency domain decomposition model, the long-term trend and periodic fluctuations of organic matter content changes are effectively separated, providing multi-dimensional data support for anomaly detection. Combining local anomaly factor algorithms and Mahalanobis distance fit calculations enables rapid detection of abnormal states and verification of the effectiveness of parameter combinations, shortening anomaly response time. Reinforcement learning and fuzzy logic algorithms are used to generate process adjustment parameter suggestions, linking the automated control system to perform dynamic control, and optimizing control commands through feedback data in a closed-loop manner, forming a "detection-evaluation-control-verification" process. The complete intelligent closed loop significantly improves wastewater treatment efficiency and effluent quality stability, ensuring that carbon source quality continuously meets standards. Attached Figure Description
[0015] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a flowchart of the invention; Detailed Implementation Example 1 like Figure 1 As shown, a method for evaluating the quality of carbon sources in the final effluent of a wastewater treatment plant includes: The raw spectral data stream of organic matter content in the terminal effluent is obtained through an online full-spectrum water quality analyzer. Based on the original spectral data stream, preliminary quantitative results of organic matter content are obtained; Based on the preliminary quantification results, obtain data on the changing trend of organic matter content; If the trend data exceeds a preset threshold range, an anomaly detection mechanism is triggered, and an anomaly determination result is output. Based on the anomaly determination result, a suitable combination of evaluation parameters is obtained to update the weight distribution of the evaluation model. Through the updated evaluation model weight distribution, the carbon source quality of the current terminal effluent is scored in multiple dimensions to obtain a comprehensive quality score. Based on the comprehensive quality score, obtain the process adjustment parameter suggestions corresponding to the score and output specific process control instructions; According to the process control instructions, the automated control system of the wastewater treatment plant is linked to obtain the feedback data after execution; The feedback data after execution is compared and analyzed with the initial comprehensive quality score. If the feedback data indicates that the effluent quality does not meet the standard, the evaluation model parameters are readjusted and a new process control command is output.
[0016] First, an online full-spectrum water quality analyzer is used to collect raw spectral data streams of organic matter content in the terminal effluent. The raw spectral data streams are then processed to obtain preliminary quantification results of organic matter content. Based on these preliminary quantification results, trend data is obtained. If this trend data exceeds a preset threshold, an anomaly detection mechanism is triggered, outputting an anomaly judgment result. Based on the anomaly judgment result, an appropriate combination of evaluation parameters is obtained to update the weight distribution of the evaluation model. The updated model then performs multi-dimensional scoring of the carbon source quality in the terminal effluent to obtain a comprehensive quality score. For this score, corresponding process adjustment parameter suggestions are obtained, and specific process control instructions are output. These instructions are executed through a linked automated control system, and feedback data is obtained. The feedback data is compared and analyzed with the initial comprehensive quality score. If the effluent quality does not meet the standards, the evaluation model parameters are readjusted, and new process control instructions are output.
[0017] Real-time data acquisition is achieved through online full-spectrum water quality analyzers, ensuring data timeliness and accuracy. Processing and multi-dimensional scoring of the raw spectral data stream enable comprehensive and accurate evaluation of carbon source quality. Anomaly detection mechanisms can promptly identify water quality anomalies. Based on anomaly results, the evaluation model weight distribution is updated and process control instructions are output, enabling dynamic adjustments to the wastewater treatment process. By comparing and analyzing feedback data with initial scores, the evaluation model and process control instructions are continuously optimized, effectively improving the carbon source quality of the wastewater treatment plant's final effluent, enhancing wastewater treatment efficiency and effectiveness, and ensuring stable compliance of effluent quality standards.
[0018] The signal from the online water quality full-spectrum analyzer is: HEMERA's L800D from France: can measure multiple components in water or fluids, up to 7 at a time.
[0019] The HD-S1000 Hyperspectral Intelligent Water Quality Analyzer: The testing process requires no chemical reagents, and the results are displayed in real time. It boasts significant advantages such as portability, speed, all-weather operation, and intelligence, meeting the needs for rapid, real-time online monitoring in scenarios such as surface water and wastewater.
[0020] Hikvision's hyperspectral water quality multi-parameter monitor: Installed on the water surface like a probe, it can distinguish the spectral characteristics of different water qualities and achieve second-level acquisition of 11 water quality data such as chlorophyll, permanganate index, and transparency. It effectively observes the distribution of chlorophyll, suspended solids, etc. in the water body, thereby identifying common water pollution problems such as eutrophication and algal blooms. It has been applied in many lakes and drinking water sources in Jiangsu, Zhejiang, Shanghai, South China, and Northwest China.
[0021] Example 2 The initial signal data was preliminarily scanned using a water quality full-spectrum analyzer to obtain the original spectral data stream related to the carbon source quality index; The original spectral data stream is preprocessed to remove noise interference, resulting in a cleaned spectral data set. Based on the cleaned spectral data set, key feature values related to quality indicators are extracted to determine the carbon source quality characteristics in the effluent. If the extracted feature values do not match the preset threshold range, the spectral data set is subjected to a secondary calibration process to obtain a calibrated feature dataset. Using the calibrated feature dataset, the support vector machine algorithm is applied to classify and judge the effluent feature parameters to obtain classification result data. Based on the classification results data and combined with the pre-established feature parameter mapping relationship, the final effluent feature parameter description is determined. In the noise removal step, a variational mode decomposition algorithm is used to transform the original spectral data stream. Decomposed into K modal components Its optimization model is: ; The constraints are By solving the model, effective signal components are obtained, and a cleaned spectral data set is constructed.
[0022] High-frequency data acquisition of the terminal effluent is performed using online sensors to obtain initial signal data related to organic matter content: the sampling frequency of the online sensors is set. Ensure within a unit of time Completed internally Each sampling is performed. During each sampling, the sensor converts the detected optical signal into an electrical signal, which is then recorded. ,in This forms an initial signal data sequence. To ensure data accuracy, the sensor needs to be calibrated before sampling by comparing the spectral data of a known standard solution with the sensor's measurements to correct measurement deviations.
[0023] Let the response function of the sensor be... The actual light intensity is The electrical signal output by the sensor The relationship with light intensity can be expressed as: ; in, and This refers to the wavelength range detected by the sensor. This formula is used to measure noise. It describes the conversion process from optical signals to electrical signals by the sensor. This formula can be used to analyze the relationship between the sensor's measurement results and the actual light intensity, so as to facilitate subsequent data calibration and error analysis.
[0024] The initial signal data is preliminarily scanned using spectral analysis techniques to obtain the raw spectral data stream related to the carbon source quality indicators: the initial signal data is input into a spectral analysis instrument, which uses a dispersive element to separate the light signal according to wavelength. The light intensity was measured at different wavelengths to obtain the raw spectral data stream. To improve spectral resolution, multiple scans and averaging can be used on the same water sample. Each scan is performed, and the results of each scan are weighted and averaged. .
[0025] In spectral analysis, the relationship between light intensity and wavelength can be obtained by converting a time-domain signal into a frequency-domain spectrum using Fourier transform. Let the time-domain signal be... Its Fourier transform is: ; in, Angular frequency, For frequency. In spectral analysis scenarios, wavelength can be used. With frequency Establish corresponding relationships (e.g.) , (where the speed is light) The time-domain electrical signal collected by the sensor is converted into frequency-domain spectral data using the Fourier transform formula, thereby obtaining the original spectral data stream, which is used for subsequent analysis of the correlation between light intensity and carbon source quality indicators at different wavelengths.
[0026] The original spectral data stream is preprocessed to remove noise interference, resulting in a cleaned spectral data set. This is achieved using the Variational Mode Decomposition (VMD) algorithm, first setting the number of modes to be decomposed. and penalty factor (Used to balance decomposition accuracy and computational complexity). For the raw spectral data stream... Perform VMD decomposition and iteratively solve the optimization model to obtain... Modal components and the corresponding center frequency When the percentage of retained energy exceeds a certain threshold. The modal components are then reconstructed into cleaned spectral data. ,in A set of modal indices that satisfy the energy threshold condition.
[0027] The optimization model for VMD is: ; The constraints are ; in, Indicates time Differentiate, Here, $*$ represents the Dirac delta function, and $*$ denotes the convolution operation. for Norm. This formula decomposes the original spectral data stream into modal components with different frequency characteristics by minimizing the sum of the bandwidths of each modal component, thereby separating noise from effective signals, removing noise interference, and retaining effective spectral signals related to the carbon source quality.
[0028] Based on the cleaned spectral data set, key feature values related to quality indicators were extracted to determine the carbon source quality characteristics in the effluent: a feature extraction method based on Local Fisher Discriminant Analysis (LFDA) was employed. First, the cleaned spectral data was divided into different categories according to known carbon source quality class labels (e.g., high, medium, low quality). The local neighborhood of each data point was calculated. Determine its Nearest neighbor set Calculate the within-class scatter matrix. and inter-class scatter matrix By solving the generalized eigenvalue problem , to obtain the feature vector The projection matrix is constructed by selecting the eigenvectors corresponding to the larger eigenvalues. By projecting the spectral data into a low-dimensional space, key feature vectors are obtained. .
[0029] Intraclass scatter matrix The calculation formula is: ; Inter-class scatter matrix The calculation formula is: ; in, For the number of categories, For the first Class data collection, For the first The mean of the data. The mean of all data. For the first The number of data types. The eigenvectors obtained by solving the generalized eigenvalue problem are used to construct a projection matrix, which maps high-dimensional spectral data to a low-dimensional space, extracts key eigenvalues with high distinguishability of carbon source quality categories, and thus determines the quality characteristics of carbon sources in water.
[0030] If the extracted feature values do not match the preset threshold range, a secondary calibration process is performed on the spectral dataset to obtain a calibrated feature dataset. A nonlinear mapping model between the feature values and the spectral data is established, employing kernel-based support vector regression (KSVR). The deviation between the extracted feature values and the preset threshold is used as the training label, and the original spectral data is used as the training samples. A suitable kernel function (such as the radial basis function kernel) is selected. Train the KSVR model. Use the trained model to predict the original spectral data to obtain calibrated spectral data. Then, re-extract feature values until the feature values fall within a preset threshold range to form a calibrated feature dataset.
[0031] The optimization objective function of KSVR is: ; The constraints are: ; ; ; in, For the weight vector, For bias terms, As slack variables, For penalty parameters, To tolerate error, For actual labels, , This is a nonlinear mapping that uses a kernel function to map input data to a high-dimensional space. The formula establishes a nonlinear relationship model between eigenvalue deviation and spectral data by minimizing structural and empirical risks. This model is used to calibrate the spectral data, ensuring that the extracted eigenvalues meet preset requirements and improving the accuracy of carbon source quality assessment.
[0032] Using the calibrated feature dataset, a support vector machine algorithm is applied to classify the effluent feature parameters, obtaining classification results. The calibrated feature dataset is divided into training and testing sets, and an improved multi-class support vector machine (MSVM) algorithm is used, such as a one-vs-one (OVO) or one-vs-rest (OVR) strategy. For the OVO strategy, in... Training in pairs of categories A binary classification SVM model is used. During the testing phase, each sample votes on all binary classification models, and the category with the most votes is used as the final classification result, thus obtaining the classification result data of the effluent characteristic parameters.
[0033] The decision function for binary classification SVM is: ; in, Let be the sign function. In multi-class classification scenarios, for the OVO strategy, let be... The first category, the The and the first The decision function of the SVM model trained for each category is: ,sample The final classification result is:
[0034] in, For indicator functions, when The value is 1 if the condition is met, and 0 otherwise. This formula uses a combination of multiple binary SVM models to classify and judge the characteristic parameters of multiple categories of effluent, providing classification results for carbon source quality assessment.
[0035] Based on the classification results data and a pre-established feature parameter mapping relationship, the final effluent feature parameter descriptions are determined: a feature parameter mapping table is established, which records the carbon source quality feature parameter descriptions corresponding to different classification results. Based on the classification results data, the corresponding record is searched in the mapping table to obtain the final effluent feature parameter description information, such as "high concentration of easily degradable carbon source" or "low concentration of difficult-to-degrade carbon source".
[0036] Let the classification result be The feature parameter mapping relationship is as follows The final effluent characteristic parameters are described. It can be represented as:
[0037] This formula simply and intuitively describes the mapping process from classification results to the final feature parameter description. Through the pre-established mapping relationship, the abstract classification results are transformed into a practical and understandable description of carbon source quality characteristics, providing a clear basis for subsequent wastewater treatment process adjustments.
[0038] Example 3 Based on the original spectral data stream, preliminary quantitative results of organic matter content are obtained, including: The original spectral data stream is preliminarily cleaned by the data stream processing module to remove irrelevant interference signals, resulting in a processed spectral data set. Based on the processed spectral data set, key signal points are screened using feature extraction methods to obtain a set of feature signals related to organic matter content; In the process of selecting key signal points using feature extraction, a feature selection formula based on mutual information is introduced to calculate the features. With organic matter content target value mutual information : ; Sort by mutual information value and select those with mutual information values higher than a set threshold. The features constitute a set of feature signals; Using the feature signal set, a pre-built evaluation model library is applied, combined with a support vector regression algorithm, to perform regression calculations on the signal set and obtain initial quantization values; If the initial quantization value does not match the preset threshold range, the feature signal set is subjected to a secondary correction process to obtain the corrected quantized data set. Based on the corrected quantified data set, multi-dimensional comparisons are performed through the data analysis layer to determine the distribution characteristics of organic matter content; Based on the aforementioned distribution characteristics, a preset classification rule is used for stratification to determine the final content assessment result; Based on the final content assessment results, combined with the pre-established mapping relationship table, analytical data descriptions that match business objectives are obtained.
[0039] The original spectral data stream is initially cleaned by the data stream processing module to remove irrelevant interference signals, resulting in a processed spectral data set. A method combining mathematical morphology and adaptive median filtering is employed. First, the structuring element is defined. For the raw spectral data stream Perform opening operation Remove peak noise from the data; then perform a closing operation. This fills in the low-level noise in the data. Next, the median filter window size is dynamically adjusted based on the local variance of the data, and the median filter is calculated for each data point. Neighborhood variance ,like (High variance threshold), then increase the window; if If the variance threshold is low, the window is reduced, and adaptive median filtering is applied to the data to obtain the processed spectral data set. .
[0040] Opening formula: ,in For erosion calculation, For dilation operations. Erosion operations are defined as follows: The expansion operation is defined as follows: Closing operation formula: .
[0041] Adaptive median filter window adjustment formula: ; in, For data points Window size at that location Minimum window For the largest window, Adjust the window step size.
[0042] These formulas remove noise peaks and troughs through mathematical morphology operations, and adaptive median filtering dynamically adjusts the window based on the local characteristics of the data, effectively removing irrelevant interference signals and preserving the true characteristics of the spectral data.
[0043] Based on the processed spectral data set, a feature extraction method is used to screen key signal points and obtain a set of feature signals related to organic matter content: based on a combination of mutual information and an improved genetic algorithm (GA). First, the mutual information formula is used... Calculate the characteristics of each wavelength With organic matter content target value The mutual information values are used to obtain the mutual information vector. Then, the mutual information value is used as the fitness function of individuals in the genetic algorithm to encode the individuals (e.g., binary encoding, where 1 indicates feature retention and 0 indicates feature removal). Through selection, crossover, and mutation operations, multiple generations of evolution are performed. In each generation, individuals with high fitness (large mutual information value) are retained, while those with low fitness are eliminated, ultimately obtaining the optimal feature combination, which constitutes the feature signal set. .
[0044] The selection process uses a roulette wheel selection method, with individuals... Probability of being selected for: ; The crossover operation uses a two-point crossover, with two parent individuals. and Randomly select two intersection points and ( ), swapping two parent individuals in and Gene fragments between them are used to obtain offspring individuals. Mutation operations are performed based on mutation probability. To flip individual genes.
[0045] Using these formulas, with mutual information as the fitness guide for genetic algorithm search, key features with high correlation to organic matter content can be efficiently screened from numerous wavelength features to form a feature signal set.
[0046] Using the aforementioned feature signal set, a pre-built evaluation model library is applied, combined with a support vector regression algorithm, to perform regression calculations on the signal set and obtain initial quantized values: Support Vector Regression (QKSVR) based on quantum kernel functions is employed. First, a suitable base model is selected from the evaluation model library, and then the feature signal set... As input data The known true values of organic matter content are used as output data. Define the quantum kernel function. ,in Let be the quantum state mapping function. Construct the optimization objective function for QKSVR: ; The constraints are: ; ; ; in By solving this optimization problem, the parameters of the regression model are obtained. and Then, regression calculations are performed on the feature signal set to obtain the initial quantization value. .
[0047] A specific form of quantum kernel function (taking the quantum rotation gate kernel function as an example):
[0048] in, For feature dimension, and Data respectively and The dimensional features, For the angle parameters of the quantum rotating door.
[0049] If the initial quantization value does not match the preset threshold range, a secondary correction process is performed on the feature signal set to obtain the corrected quantized data set: a Bayesian optimization-based locally weighted regression (BO-LWR) is introduced. The initial quantization value is calculated. With preset threshold range deviation With deviation With minimization as the objective, the parameters of the locally weighted regression (such as the bandwidth parameter of the weight function) are adjusted using the Bayesian optimization algorithm. For each data point According to its relationship with the current point Distance calculation weight Construct a locally weighted regression model ,in This involves mapping the kernel function. Parameters are continuously updated using Bayesian optimization. Regression correction is performed on the feature signal set to obtain the corrected quantized data set. .
[0050] In Bayesian optimization, a Gaussian process model is used to predict the objective function (bias). The value at the new parameter point. Assume it is known. sample points , Construct the covariance function of the Gaussian process (such as the squared exponential covariance function) ,in For signal variance, (For length scale parameters), predict new parameter points. objective function value at mean and variance : ; ; in, , , For noise variance, It is an identity matrix.
[0051] Based on the corrected quantified data set, multi-dimensional comparisons are performed through a data analysis layer to determine the distribution characteristics of organic matter content: a method based on density peak clustering (DPC) and fractal dimension analysis is employed. First, the distribution characteristics of each data point in the corrected quantified data set are calculated. Local density ,in For unit step function, Distance between data points To truncate the distance, recalculate the distance between the data points. With local density x-axis represents distance A decision graph is plotted on the y-axis to identify cluster centers. Then, the fractal dimension of each cluster is calculated using the box-counting method. : ,in For a side length of The number of clustered data points covered by the boxes. Based on the clustering results and fractal dimension, determine the distribution characteristics of organic matter content in different regions, such as uniform distribution, aggregated distribution, etc.
[0052] Approximate formula for calculating box dimension (in actual calculation) (Taking finite values): ; To address the aforementioned distribution characteristics, a stratified processing method based on preset classification rules is employed to determine the final content assessment result: a classification model based on fuzzy rules and the Analytic Hierarchy Process (AHP) is constructed. Distribution characteristic indicators such as fractal dimension and the number of cluster centers are used as fuzzy input variables, defining multiple fuzzy sets (e.g., "low fractal dimension," "high fractal dimension," "few cluster centers," "many cluster centers," etc.). The degree to which each indicator belongs to different fuzzy sets is determined based on the membership function. A fuzzy rule base is established, for example, "if the fractal dimension is low and the number of cluster centers is small, then the organic matter content distribution is simple." The weights of each fuzzy rule are determined using the Analytic Hierarchy Process, a judgment matrix is constructed, and the weight vector is obtained by calculating the eigenvectors and the largest eigenvalue of the matrix. For each sample, multiple classification results are obtained based on fuzzy rule reasoning. These results are then weighted and summed to determine the final content assessment result, such as "uniform low content" or "aggregated high content".
[0053] Fuzzy rule reasoning employs the Mamdani reasoning method, based on the premise that "if..." yes and yes ,but yes Taking the type rule as an example, the output fuzzy set C' is: ; In the analytic hierarchy process (AHP), the judgment matrix Maximum eigenvalue and eigenvectors satisfy The weight vector is obtained by solving the equation and is used to weight the fuzzy inference results.
[0054] These formulas combine fuzzy logic to handle the fuzziness of the data and use the analytic hierarchy process (AHP) to determine the rule weights, thereby achieving accurate classification and evaluation of the distribution characteristics of organic matter content.
[0055] Based on the final content assessment results and a pre-established mapping table, analytical data descriptions matching the business objectives are obtained: a dynamically updated mapping table is established, recording the business description information corresponding to different content assessment results. Simultaneously, a reinforcement learning mechanism is introduced to update the mapping table based on feedback from the actual effects of wastewater treatment process adjustments. A state space is defined. For content assessment results, action space For business description options, reward function The setting is based on the degree of improvement in effluent quality after process adjustments. This is determined each time content assessment results are obtained. Then, select an action. After obtaining the business description and performing the process adjustment operation, a new status is obtained. and rewards The Q-value table is updated using the Q-learning algorithm:
[0056] in, For learning rate, This is the discount factor. Based on the updated Q-value table, the mapping relationship is optimized to obtain the analytical data description that best matches the business objectives.
[0057] Example 4 Based on the preliminary quantification results, data on the changing trend of organic matter content were obtained, including: By preprocessing the raw monitoring data, the initial time series data of organic matter content is obtained, resulting in a standardized basic dataset. Based on the standardized basic dataset, a time series analysis method is used to construct a trend model of organic matter content changes, and an autoregressive moving average model is used to fit the data to determine trend characteristic parameters. For the aforementioned trend characteristic parameters, the periodic component in the changing trend is extracted, the long-term trend and short-term fluctuation parts are separated, and the distribution pattern of the periodic characteristics is obtained. In extracting periodic components, an improved algorithm of empirical mode decomposition is used to transform the time series... Decomposed into Individual eigenmode functions and residual components : ; By calculating each By analyzing the frequency characteristics, periodic feature components are selected to obtain the distribution pattern of periodic features. If there is a significant fluctuation period in the distribution pattern of the periodic feature, then the fluctuation period is decomposed by frequency domain analysis to obtain the specific period frequency value. Based on the periodic frequency value and combined with long-term trend data, a prediction framework for water quality fluctuations is constructed to determine whether the fluctuation pattern conforms to the preset periodic threshold range. Based on the judgment results of the fluctuation pattern, a correlation mapping between water quality fluctuations and changes in organic matter content is generated to determine the key time nodes of the fluctuation impact. If the fluctuations at the key time points exceed a preset threshold range, the data for the relevant time period are weighted to obtain adjusted trend data.
[0058] By preprocessing the raw monitoring data, initial time-series data of organic matter content are obtained, resulting in a standardized basic dataset. The preprocessing method combines singular spectral analysis (SSA) with quantile normalization. First, the raw monitoring data are arranged in chronological order to form the raw time series. Singular spectral analysis was performed on it to decompose the time series into multiple subsequences. Each subsequence corresponds to different time-scale features. The mean of each subsequence is calculated. and standard deviation Handle outliers (if data points) satisfy If a value is not found, it is considered an outlier and repaired using neighbor-to-neighbor interpolation. Then, quantile standardization is applied to map the processed subsequences to the same quantile space, making different time series comparable and ultimately yielding a standardized base dataset. .
[0059] Based on the standardized basic dataset, a time series analysis method was used to construct a trend model of organic matter content changes. An autoregressive moving average model was then used to fit the data to determine trend characteristic parameters: an improved adaptive autoregressive moving average (ARMA) model was employed. First, the order of the ARMA model was preliminarily determined using the minimum information criterion (AIC) and the Bayesian information criterion (BIC). and To obtain the initial model Then, a dynamic weighting factor is introduced. The model parameters are dynamically adjusted based on the temporal correlation and volatility of the data. The local autocorrelation coefficient of the data is calculated. and partial autocorrelation coefficient Through function Determine the weighting factors. In each iteration of model parameter updates, incorporate the weighting factors into the parameter estimation, enabling the model to better adapt to data changes and ultimately determine the trend characteristic parameters. .
[0060] An improved algorithm based on Empirical Mode Decomposition (EMD)—combining Empirical Mode Decomposition (EEMD) with Variational Mode Decomposition (VMD)—is adopted. First, EEMD decomposition is performed on the normalized time series data. Then, white noise is added multiple times, followed by EMD decomposition. Finally, the results of each decomposition are averaged to obtain multiple Intrinsic Mode Functions (IMFs). and residual components This effectively suppresses mode aliasing. Next, VMD decomposition is performed on the obtained IMF components, further decomposing each IMF component into multiple mode components with different frequency characteristics. By calculating the center frequency of each modal component. and bandwidth Select modal components with periodic characteristics (if Within the preset periodic frequency range and If the modal component is less than a certain threshold, it is considered to have periodicity. Finally, statistical analysis is performed on the selected periodic modal components to obtain the distribution pattern of periodic characteristics, and the remaining components are combined to obtain the long-term trend and short-term fluctuation components.
[0061] If the distribution pattern of the periodic features contains significant fluctuation periods, then the fluctuation periods are decomposed using frequency domain analysis to obtain specific periodic frequency values: a frequency domain analysis method based on the fusion of Hilbert-Huang Transform (HHT) and Wavelet Packet Transform (WPT) is adopted. First, Hilbert-Huang Transform is performed on the time series with significant fluctuation periods, and multiple IMF components are obtained through Empirical Mode Decomposition. Then, Hilbert Transform is performed on each IMF component to obtain the Hilbert spectrum. The frequency range of the fluctuation period is initially analyzed from the Hilbert spectrum. Then, wavelet packet transform is performed on the original time series to decompose the signal into different frequency bands, obtaining the wavelet packet coefficients. Based on the frequency range determined by the Hilbert spectrum, corresponding wavelet packet coefficients are selected for reconstruction to obtain sub-signals with different frequency components. Finally, the power spectral density of the sub-signals is calculated. Determine the specific periodic frequency value (the frequency corresponding to the peak power spectral density is the periodic frequency value).
[0062] Based on the stated periodic frequency values and long-term trend data, a prediction framework for water quality fluctuations is constructed to determine whether the fluctuation pattern conforms to a preset periodic threshold range. This framework is a hybrid prediction framework based on Gated Recurrent Units (GRUs) and seasonal decomposition. First, the periodic frequency values and long-term trend data are encoded and converted into a format suitable for model input. The data is divided into training and testing sets. During the training phase, seasonal decomposition methods (such as the X-13 method) are used to separate seasonal, trend, and random components from the training data. The seasonal and trend components are used as input features to the GRU model. The model is trained by adjusting its parameters (such as the number of hidden layer neurons and the learning rate) to learn the data's variation patterns and periodicity. During the prediction phase, test data is input into the trained model to obtain predicted water quality fluctuation data. Then, the periodic frequency and fluctuation amplitude of the predicted data are calculated and compared with the preset periodic threshold range to determine whether the fluctuation pattern meets the requirements.
[0063] Based on the judgment results of the fluctuation pattern, a correlation mapping between water quality fluctuations and changes in organic matter content is generated to determine the key time nodes of the fluctuation impact: a correlation mapping method based on dynamic time warping (DTW) and cross-correlation analysis is adopted. First, the water quality fluctuation data and organic matter content change data are normalized to make the data comparable. Then, the similarity distance between the two is calculated using the dynamic time warping algorithm. The process involves finding the optimal matching path between two time series to determine their temporal correspondence. Next, the cross-correlation function between the two series is calculated. ,in For water quality fluctuation data, This data represents changes in organic matter content. and These are their means. Based on the magnitude of the cross-correlation function values, the degree of correlation and time delay between water quality fluctuations and changes in organic matter content are determined. Finally, based on the results of the fluctuation pattern analysis, the time points where the fluctuations had a significant impact were identified in the correlation mapping and determined as key time nodes.
[0064] If the fluctuation impact of the key time node exceeds a preset threshold range, the data for the relevant time period is weighted to obtain adjusted trend data: a weighting method based on fuzzy logic and adaptive weight allocation is adopted. First, the fuzzy input variables are defined as the fluctuation amplitude and duration at the key time node, which are divided into multiple fuzzy sets (such as "low amplitude, short duration", "high amplitude, long duration", etc.). The degree to which they belong to different fuzzy sets is determined according to the membership function. A fuzzy rule base is established, for example, "if the fluctuation amplitude is high and the duration is long, the data weight should be significantly increased". Then, reasoning is performed according to the fuzzy rules to obtain the fuzzy weight of each data point. At the same time, an adaptive weight adjustment mechanism is introduced to dynamically adjust the fuzzy weights according to the local variance and the degree of overall trend change of the data. Let the data point be... The local variance is The overall trend change rate is Through function Adjust the weights. Finally, multiply the adjusted weights by the original data to obtain the weighted, adjusted trend data.
[0065] Fuzzy rule inference employs the Mamdani inference method, and the output fuzzy set C' is... ; in and This is the membership function for the input variables.
[0066] The adaptive weight adjustment formula is: The final weighted data ,in The weights are obtained from fuzzy inference.
[0067] These formulas use fuzzy logic to handle the uncertainty of data and combine adaptive weight allocation to reasonably adjust data weights based on fluctuations at key time points, thereby obtaining more accurate trend data.
[0068] Example 5 If the trend data exceeds a preset threshold range, an anomaly detection mechanism is triggered, and an anomaly determination result is output, including: By collecting real-time data transmitted by environmental sensors, change trend information is obtained and stored in the data processing module to obtain a preliminary change trend record. Based on the recorded trend of change, a preset threshold is used for comparison. If the trend of change exceeds the preset threshold range, an anomaly detection process is triggered to determine a preliminary anomaly signal. For the aforementioned preliminary abnormal signal, historical data is retrieved from the database and compared with the current data in multiple dimensions. The support vector machine algorithm is used to classify the water quality fluctuation characteristics and determine whether there is a significant deviation. In determining whether significant bias exists, a local anomaly factor algorithm is introduced to calculate the sample points. Locally achievable density : ; Thus, sample points are obtained. Local anomalous factors ,when Greater than the set threshold At that time, the judgment showed a significant bias; If the support vector machine algorithm determines that there is a significant deviation in water quality fluctuations, then the fluctuation data is matched with the abnormal state standard to obtain abnormal state confirmation information. Based on the abnormal status confirmation information, a judgment result data is generated and stored in the result output module to obtain a structured abnormal judgment record; Based on the anomaly detection record, the linkage system adjustment module automatically generates adjustment parameter suggestions and outputs them to the relevant control unit. Obtain the execution feedback data of the proposed adjustment parameters, compare and analyze it with historical data, determine whether the water quality fluctuations after the system adjustment have returned to the normal range, and output the final verification results.
[0069] By collecting real-time data transmitted from environmental sensors, trend information is obtained and stored in the data processing module to obtain a preliminary record of the trend. A distributed multi-sensor fusion and data compression algorithm is employed. First, data is collected in real time from multiple environmental sensors (such as water quality sensors and flow sensors), with the data from each sensor represented as follows: ,in Indicates the sensor number, Represents time. Data from each sensor is preprocessed, including noise removal (using wavelet thresholding, assuming the wavelet function is...). The threshold is The data after denoising is ,in (wavelet coefficients) and normalization (mapping the data to the $[0,1]$ interval, Then, a distributed multi-sensor fusion algorithm, such as a fusion method based on D-S evidence theory, is used to fuse data from multiple sensors. Let each sensor's judgment of the changing trend be considered a piece of evidence, and the basic probability allocation function of the evidence be... ,in For different states of trend change (e.g., rising, falling, stable), the basic probability assignment function after fusion is calculated using the D-S synthesis rule. : ; in This is a normalization constant. Finally, the fused data undergoes lossless data compression (using a dictionary-based compression algorithm, such as the LZ77 algorithm, to construct a dictionary). Representing the data sequence as In the form of, The position of the matching string in the dictionary. The length of the matching string, (For the next character), it is stored in the data processing module to obtain a preliminary record of the trend. .
[0070] Based on the recorded trend, a preset threshold is used for comparison. If the trend exceeds the preset threshold range, an anomaly detection process is triggered to determine a preliminary anomaly signal: a comparison method based on dynamic thresholds and fuzzy logic is employed. First, an initial preset threshold range is determined based on historical data and expert experience. Then, a dynamic threshold adjustment model is established through analysis of historical data. Time series analysis methods (such as the ARIMA model) are used to model historical trend data and predict the threshold range for a future period. Let the predicted threshold range be... In the actual comparison process, the current trend data will be used. The data is compared with a dynamic threshold range. Simultaneously, fuzzy logic is introduced to fuzzify both the trend data and the threshold range. Let the fuzzy set of the trend data be... The fuzzy set of the threshold range is Define the membership function and The fuzzy reasoning method (such as the Mamdani reasoning method) is used to determine whether the trend of change exceeds the threshold range. If this occurs, the anomaly detection process is triggered to determine the initial anomaly signal.
[0071] ARIMA model prediction threshold formula: Let the historical trend data be... Modeling is performed using the ARIMA(p,d,q) model to predict values. for ,in These are the autoregressive coefficients. The moving average coefficient is... The sequence is white noise. The threshold range is adjusted based on the predicted values. .
[0072] Example of a fuzzy membership function (using Gaussian membership function as an example): ,in The mean, The standard deviation is used to fuzzify trend data and threshold ranges to facilitate fuzzy inference.
[0073] For the aforementioned preliminary abnormal signals, historical data is retrieved from the database and compared with the current data in multiple dimensions. A support vector machine (SVM) algorithm is used to classify the water quality fluctuation characteristics and determine if significant deviations exist. A combination of multi-kernel SVM and principal component analysis (PCA) is employed. First, historical data with a similar time span to the current data is retrieved from the database. . The current data Compared with historical data By concatenating the data, we obtain the dataset. For the dataset Principal component analysis (PCA) is performed to reduce data dimensionality and extract key features. Let the dataset after PCA be... Then, a multi-core support vector machine algorithm is used to... Classification is performed. Multi-kernel support vector machines combine multiple kernel functions (such as linear kernel functions) to perform classification. Gaussian kernel function (etc.), to improve classification accuracy. Let the kernel function combination be... ,in These are the weighting coefficients. The optimization problem is solved as follows: ; The constraints are , ,in For the weight vector, For bias terms, As slack variables, For penalty parameters, This is a function mapped to a high-dimensional space through a kernel function. A classification model is obtained to determine whether the current water quality fluctuation characteristics deviate significantly from historical data.
[0074] If the support vector machine algorithm determines that there is a significant deviation in water quality fluctuations, the fluctuation data is matched with the abnormal state criteria to obtain abnormal state confirmation information: a deep learning-based abnormal state matching algorithm is used. First, a deep neural network (such as a convolutional neural network CNN) is constructed, using the fluctuation data as input and the abnormal state criteria as labels for training. Let the structure of the deep neural network be... Layer, number The output of the layer is Its calculation formula is ,in This is the weight matrix. For bias terms, For activation functions (such as the ReLU function) During training, the cross-entropy loss function is used. ,in For real labels, To predict labels, the network parameters are updated using the backpropagation algorithm. After training, the current fluctuation data is input into the trained network to obtain the predicted abnormal state labels. Then, the predicted labels are matched with abnormal state criteria to obtain abnormal state confirmation information.
[0075] Based on the abnormal state confirmation information, judgment result data is generated and stored in the result output module to obtain a structured abnormal judgment record: a blockchain-based distributed storage and encryption algorithm is used. First, the abnormal state confirmation information is encoded and converted into a digital signature. Let the abnormal state confirmation information be... Through hash function Generate digital signature Then, blockchain technology is used to store the digital signature in a distributed ledger. A blockchain consists of multiple blocks, each containing the hash value of the previous block, a timestamp, and data (i.e., the digital signature). Information such as ) . Let the first The hash value of each block is Its calculation formula is ,in The hash value of the previous block. For timestamps, This is the data for the current block. This method ensures the immutability and traceability of the data. Finally, the data in the blockchain is stored in the result output module, resulting in a structured anomaly detection record.
[0076] Based on the anomaly detection records, the linkage system adjustment module automatically generates adjustment parameter suggestions and outputs them to the relevant control units: employing a reinforcement learning-based intelligent adjustment algorithm. First, the state space of the system adjustment module is defined. This includes information such as current water quality parameters (e.g., organic matter content, pH value, dissolved oxygen, etc.) and equipment operating status (e.g., pump flow rate, aeration time, etc.). Define the action space. This refers to the adjustment measures that can be taken (such as increasing the pump flow rate, extending the aeration time, etc.). Let the current state be... Actions taken The resulting reward function The optimal adjustment strategy is determined based on factors such as water quality improvement and equipment operating costs. A reinforcement learning algorithm (such as a Deep Q-Network, DQN) is used to learn the optimal adjustment strategy. The Deep Q-Network uses a neural network (such as a Multilayer Perceptron, MLP) as the Q-value function estimator, with the state as its input. The output is the Q-value for each action. During training, by continuously trying different actions, the parameters of the Q-value function are updated according to the reward function. Let the parameters of the Q-value function be... The parameters are updated using the stochastic gradient descent algorithm: ; in For learning rate, This is the discount factor. After training, based on the current state... Choose the action with the highest Q value. As suggested adjustment parameters, the output is sent to the relevant control unit.
[0077] The execution feedback data of the proposed adjustment parameters is obtained and compared with historical data to determine whether the water quality fluctuations after the system adjustment have returned to the normal range. The final verification result is output: a verification method based on grey relational analysis and time series prediction is used. First, the feedback data after the proposed adjustment parameters are executed is obtained. This includes information such as water quality parameters and equipment operating status. The feedback data will be... Compared with historical data Perform grey relational analysis to calculate the correlation degree. Let the sequence of the feedback data be... The sequence of historical data is Grey relational degree The calculation formula is: ; in The resolution coefficient is typically set to $0.5$. Then, time series forecasting methods (such as the LSTM model) are used to predict water quality fluctuations over a future period. Let the input to the LSTM model be historical data. and feedback data The output is the predicted water quality fluctuation data. . Predicted data The system compares the predicted data with the normal range threshold to determine whether the water quality fluctuations after adjustment have returned to the normal range. If the predicted data is within the normal range, the final verification result is output as "adjustment successful"; otherwise, the adjustment fails, and the adjustment strategy is further optimized.
[0078] Example 6 Based on the anomaly detection result, a suitable combination of evaluation parameters is obtained to update the weight distribution of the evaluation model, including: By obtaining relevant data for anomaly determination from the system database, and performing preliminary screening on records under abnormal conditions, an initial anomaly dataset is obtained. All records related to anomaly determination are queried from the system database. These records contain information such as various water quality parameters, timestamps, and anomaly determination results.
[0079] For records in abnormal states, a preliminary screening is performed based on pre-set filtering criteria. For example, filtering can be based on the type of abnormality (such as abnormal organic matter content, abnormal pH value, etc.) or the time range in which the abnormality occurred.
[0080] The filtered records are organized into an initial anomaly dataset, which will serve as the basis for subsequent analysis.
[0081] Based on the initial abnormal dataset, key features of water quality fluctuations are extracted using feature analysis methods to determine the distribution pattern of the fluctuation features; Preprocessing of water quality fluctuation data in the initial abnormal dataset, including noise reduction and normalization, is performed to improve data quality and comparability.
[0082] Principal component analysis (PCA) was used to extract features from the preprocessed data. The covariance matrix of the data was calculated, and then the principal components were obtained through eigenvalue decomposition.
[0083] Key features are determined based on the contribution rate of principal components. Typically, the top few principal components with higher contribution rates are selected as key features.
[0084] Analyze key features to determine the distribution pattern of fluctuation characteristics. For example, the distribution of features can be observed by drawing histograms, box plots, etc.
[0085] If the distribution pattern of the fluctuation characteristics exceeds the preset threshold range, the corresponding rule is invoked to match the applicable evaluation parameters from the system database and obtain the corresponding parameter combination. The determined fluctuation characteristic distribution pattern is compared with a preset threshold range. The threshold range can be set based on historical data, experience, or industry standards.
[0086] If the distribution pattern of the fluctuation characteristics exceeds a preset threshold range, the corresponding rule is triggered. These rules can be based on expert knowledge, machine learning models, or other rules of thumb.
[0087] Based on the triggered rules, the system database retrieves matching evaluation parameters. The system database stores various evaluation parameters and their applicable conditions.
[0088] The matched evaluation parameters are combined into a parameter set, which will be used for subsequent model updates.
[0089] By standardizing the obtained parameter combinations, we can analyze their compatibility with the evaluation model and determine the effectiveness of the parameter combinations. In analyzing the fit between parameter combinations and the evaluation model, a fit calculation formula based on Mahalanobis distance is used, assuming the parameter combination vector is... The mean vector of the evaluation model parameter distribution is The covariance matrix is Then the fit for: ; when Less than the set threshold When the parameter combination is valid, it is determined that the combination is valid. If the parameter combination is deemed valid, it is applied to the evaluation model, the weight distribution is updated, and a new model configuration is generated. If a combination of parameters is deemed valid, it is applied to the evaluation model. The evaluation model can be any machine learning model or a statistical model.
[0090] The weight distribution of the evaluation model is updated based on the parameter combinations. The specific update method depends on the type and structure of the evaluation model.
[0091] Generate a new model configuration, including updated weight distribution, model parameters, and other information.
[0092] Based on the new model configuration, water quality fluctuations under abnormal conditions are monitored in real time to obtain updated evaluation results. The new model configuration is applied to the real-time monitoring system to monitor water quality fluctuations under abnormal conditions.
[0093] Water quality data is collected in real time and input into the updated evaluation model for calculation.
[0094] Obtain updated evaluation results, which may include information such as the overall water quality evaluation score and the degree of anomaly.
[0095] The persistence of the model update is determined by storing and comparing the updated evaluation results.
[0096] The updated evaluation results are stored in the database for subsequent analysis and comparison.
[0097] The updated evaluation results are compared with the historical evaluation results periodically or irregularly.
[0098] By comparing and analyzing data, the sustainability of model updates can be determined. For example, changes in indicators such as the stability and accuracy of the evaluation results can be observed.
[0099] Example 7 By using the updated evaluation model weight distribution, the carbon source quality of the current terminal effluent is scored from multiple dimensions to obtain a comprehensive quality score, including: By collecting data from the effluent at the terminal, relevant indicators of carbon source quality are obtained, and combined with information on organic matter content and water quality fluctuations, a preliminary dataset is obtained. Based on the preliminary dataset, a pre-established evaluation model is used to score the carbon source quality in multiple dimensions, and the score result for each dimension is determined. The comprehensive quality score is obtained by weighting the multi-dimensional scoring results and combining the weight distribution. In calculating the weighted overall quality score, a dynamic weight adjustment formula based on the entropy weight method is introduced, where the weight is set to... Each dimension's score is Its weight The calculation formula is: ; in , For the sample size, The number of dimensions is used to calculate the overall quality score. ; If the overall quality score is lower than the preset threshold, the fluctuation data of water quality will be analyzed to determine whether the fluctuation range exceeds the normal range. If the fluctuation amplitude exceeds the normal range, the abnormal time period characteristics are extracted from the fluctuation data to obtain the process information corresponding to the abnormal fluctuation and determine the adjustment direction. By using the process information corresponding to the abnormal fluctuations and combining it with the comprehensive quality score, the support vector machine algorithm is used to optimize and simulate the process parameters to obtain the specific parameter values of the adjustment scheme. Based on the specific parameter values of the adjustment scheme, guide data for process adjustment is generated to determine the final direction of process optimization.
[0100] By collecting data from the effluent from the terminal, relevant indicators of carbon source quality are obtained. Combined with information on organic matter content and water quality fluctuations, a preliminary dataset is obtained. Collect data on the effluent from the collection terminal, including but not limited to indicators such as organic matter content, pH value, dissolved oxygen, and turbidity.
[0101] The collected data is preprocessed, such as noise removal and missing value filling, to improve data quality.
[0102] By integrating information on organic matter content and water quality fluctuations with other relevant indicators, a preliminary dataset is formed.
[0103] Based on the preliminary dataset, a pre-established evaluation model is used to score the carbon source quality across multiple dimensions, determining the score for each dimension. The preliminary dataset is then input into the pre-established evaluation model. The evaluation model can be constructed based on machine learning algorithms (such as neural networks, decision trees, etc.) or statistical methods (such as multiple linear regression, etc.).
[0104] The evaluation model scores the quality of carbon sources from multiple dimensions based on the input data, with each dimension corresponding to a specific evaluation index (such as the biodegradability and stability of the carbon source).
[0105] Output the score results for each dimension, which will serve as the basis for subsequent comprehensive quality scoring.
[0106] For the multi-dimensional scoring results, a weighted calculation is performed based on the weight distribution to obtain the comprehensive quality score: a dynamic weight adjustment formula based on the entropy weight method is introduced. First, the entropy value of each dimension score is calculated. The formula is ,in For the sample size, It is the first The first dimension The score of each sample.
[0107] Calculate the weight of each dimension based on the entropy value. The formula is ,in The number of dimensions.
[0108] The comprehensive quality score is obtained by weighting the multi-dimensional scoring results. .
[0109] If the overall quality score is lower than a preset threshold, the fluctuation data is analyzed to determine whether the fluctuation range exceeds the normal range: the overall quality score is compared with the preset threshold. The preset threshold can be determined based on historical data, industry standards, or experience.
[0110] If the overall quality score is lower than the preset threshold, the water quality fluctuation data will be further analyzed.
[0111] The magnitude of water quality fluctuations can be calculated, for example, by calculating statistical measures such as standard deviation and range.
[0112] The calculated fluctuation range is compared with the normal range to determine whether the fluctuation range exceeds the normal range.
[0113] If the fluctuation amplitude exceeds the normal range, abnormal time period features are extracted from the fluctuation data to obtain the process information corresponding to the abnormal fluctuation and determine the adjustment direction: When the fluctuation amplitude exceeds the normal range, time series analysis is performed on the fluctuation data. Methods such as the sliding window method or wavelet transform can be used to extract abnormal time period features. Combining the wastewater treatment process flowchart and related knowledge, the correlation between abnormal fluctuations and various process steps is analyzed. Information on process steps that may cause abnormal fluctuations is identified, such as equipment failure or abnormal operating parameters. Based on the identified process step information, an adjustment direction is formulated, such as adjusting equipment operating parameters or repairing equipment failures.
[0114] Using the process information corresponding to the abnormal fluctuations and the comprehensive quality score, the process parameters are optimized and simulated using the support vector machine algorithm to obtain the specific parameter values of the adjustment scheme: the process information corresponding to the abnormal fluctuations and the comprehensive quality score are used as input data to construct a support vector machine (SVM) model.
[0115] The SVM model is trained using historical or simulated data as training samples, and the model parameters are adjusted to enable it to accurately predict the optimized values of process parameters.
[0116] The trained SVM model is used to optimize and simulate the current process parameters. The current process information and comprehensive quality score are input to obtain the specific parameter values of the adjustment scheme.
[0117] Based on the specific parameter values of the adjustment plan, guidance data for process adjustment is generated to determine the final direction of process optimization: This guidance data may include specific operating instructions, equipment parameter settings, etc.
[0118] The guidance data for process adjustments is communicated to relevant operators or automated control systems to implement the adjustments.
[0119] Monitor and evaluate the effects of the process adjustments, further optimize the adjustment plan based on the actual situation, and determine the final direction of process optimization.
[0120] Example 8 Based on the overall quality score, obtain suggested process adjustment parameters corresponding to the score, and output specific process control instructions, including: By extracting key indicators from the quality scoring data and using preset mapping rules, the data is compared with process optimization data in the parameter library to obtain preliminary matching results. Based on the preliminary matching results, the accuracy of the score matching is verified. If the verification result is lower than the preset threshold, a closer adjustment parameter is retrieved from the parameter library to determine the final parameter recommendation. In verifying the accuracy of the score matching, the cosine similarity formula is used to calculate the similarity between the preliminary matching results and the actual scores. : ; in For the initial matching of process optimization data index values, The index value corresponding to the actual score. For the number of indicators, when Below the set threshold At that time, reacquire the adjustment parameters; After obtaining the final parameter suggestions, the suggestions are converted into specific control instructions based on the process control requirements, thereby generating an executable process adjustment plan. The real-time optimization module acquires the current status data of the wastewater treatment process and compares it with the generated control commands to determine whether it meets the requirements for process adjustment. If the process adjustment requirements are met, the control command is sent to the wastewater treatment equipment to update the process parameters in real time. Based on the device feedback data after execution, the actual effect of the process adjustment is obtained, and the deviation between the effect and the expectation is used to determine whether further parameter adjustments are needed. If the deviation exceeds the preset range, process optimization data is re-extracted from the parameter library, and new control commands are generated based on the feedback from real-time optimization.
[0121] By extracting key indicators from the quality score data and comparing them with process optimization data in the parameter library using preset mapping rules, preliminary matching results are obtained: key indicators are determined from the quality score data, which may include organic matter content, water quality fluctuation range, carbon source stability, etc.
[0122] For each key indicator, it is mapped to the corresponding process optimization data in the parameter library according to the preset mapping rules. The mapping rules can be based on experience, historical data, or models.
[0123] The process optimization data that is closest to the mapped key indicators is found in the parameter library to obtain preliminary matching results.
[0124] Based on the preliminary matching results, the accuracy of the score matching is verified. If the verification result is lower than a preset threshold, closer adjustment parameters are retrieved from the parameter library to determine the final parameter recommendations: the cosine similarity formula is used to calculate the similarity between the preliminary matching results and the actual scores. The formula is: ,in For the initial matching of process optimization data index values, The index value corresponding to the actual score. This refers to the number of indicators.
[0125] The calculated similarity With the set threshold Compare them.
[0126] if Below the set threshold If the accuracy of the score matching is low, it is considered that the adjustment parameters need to be obtained from the parameter library to be closer.
[0127] Repeat the above steps until you find adjustment parameters that meet the accuracy requirements, and then determine the final parameter recommendations.
[0128] After obtaining the final parameter suggestions, the suggestions are transformed into specific control instructions based on the process control requirements, generating an executable process adjustment plan: clarifying the specific process control requirements, such as adjusting the operating parameters of the wastewater treatment equipment, changing the process flow, etc.
[0129] Based on the final parameter recommendations, these are translated into specific control commands. This may involve converting parameter values into a signal or command format acceptable to the device.
[0130] Based on the process control flow and logic, generate an executable process adjustment plan. This plan should include specific operating steps, timelines, and responsible personnel.
[0131] The real-time optimization module acquires the current status data of the wastewater treatment process and compares it with the generated control commands to determine whether it meets the requirements for process adjustment. The real-time optimization module continuously monitors the current status data of the wastewater treatment process, including equipment operating parameters and water quality indicators.
[0132] The current status data is compared with the generated control commands to check whether the actual operation meets the adjustment requirements. Various comparison methods and metrics can be used to assess consistency. If the process adjustment requirements are met, the control command is sent to the wastewater treatment equipment to update the process parameters in real time. If the comparison result between the current status data and the control command meets the process adjustment requirements, the control command is sent to the wastewater treatment equipment.
[0133] After receiving control commands, the wastewater treatment equipment updates process parameters in real time to adjust the wastewater treatment process.
[0134] Based on the equipment feedback data after execution, obtain the actual effect of the process adjustment. For the deviation between the effect and the expectation, determine whether further parameter adjustments are needed. Recommendation: Collect feedback data after the sewage treatment equipment executes control commands, including water quality improvement and equipment operating status.
[0135] Based on the feedback data, evaluate the actual effects of the process adjustments, such as calculating changes in water quality indicators and reductions in equipment energy consumption. Compare the actual results with the expected results and calculate the deviation.
[0136] Determine if the deviation exceeds the preset range; if it does, further parameter adjustments are recommended.
[0137] If the deviation exceeds the preset range, process optimization data is retrieved again from the parameter library, and new control commands are generated based on the feedback from real-time optimization. When the deviation exceeds the preset range, process optimization data is retrieved again from the parameter library. Relevant process optimization data can be selected specifically based on the direction and magnitude of the deviation.
[0138] Based on the feedback information provided by the real-time optimization module, the re-extracted process optimization data is adjusted and optimized.
[0139] Based on the optimized process data, new control commands are generated, and the above process is repeated until satisfactory wastewater treatment results are achieved.
[0140] Example 9 The feedback data after execution is compared and analyzed with the initial comprehensive quality score. If the feedback data indicates that the effluent quality does not meet the standards, the evaluation model parameters are readjusted, and new process control instructions are output, including: By obtaining feedback data from the monitoring system, a preliminary comparison is made between the effluent quality and the preset threshold to determine whether it meets the standards. If the feedback data indicates that the effluent quality does not meet the standards, a data comparison method is used to conduct a detailed analysis of the feedback data and the initial quality score to determine the range of deviation. Based on the deviation range obtained from the analysis, the parameters of the evaluation model are adjusted, and the parameters are optimized using a pre-established support vector machine model to obtain the adjusted model parameters. Based on the adjusted model parameters, new process control instructions are generated to conduct real-time regulation of key links in the wastewater treatment process and determine the specific execution content of the instructions. Obtain real-time feedback data after regulation and compare it again with the adjusted quality score to determine whether the effluent quality meets the expected standard. If the comparison still shows that the standard is not met, the process control instructions are adjusted by analyzing historical data and combining the results of quality analysis to obtain an optimized control scheme. Based on the optimized control scheme, feedback data during the wastewater treatment process is continuously monitored, and dynamic adjustments are made in response to changing trends.
[0141] In the preferred embodiment, when adjusting the evaluation model parameters, an adaptive learning rate adjustment formula based on gradient descent is used, where the model parameters are set as follows: The loss function is Learning rate The dynamic adjustment formula is: ; in The attenuation coefficient is... For the first In each iteration, the gradient of the loss function with respect to the parameters is used to update the model parameters and optimize the control commands.
[0142] The above embodiments are merely preferred technical solutions of the present invention and should not be considered as limitations on the present invention. The scope of protection of the present invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of the present invention.
Claims
1. A method for evaluating the quality of carbon sources in the final effluent of a wastewater treatment plant, characterized by: The method includes: The raw spectral data stream of organic matter content in the terminal effluent is obtained through an online full-spectrum water quality analyzer. Based on the original spectral data stream, preliminary quantitative results of organic matter content are obtained; Based on the preliminary quantification results, data on the changing trend of organic matter content were obtained; If the trend data exceeds a preset threshold range, an anomaly detection mechanism is triggered, and an anomaly determination result is output. Based on the anomaly determination result, a suitable combination of evaluation parameters is obtained to update the weight distribution of the evaluation model. Through the updated evaluation model weight distribution, the carbon source quality of the current terminal effluent is scored in multiple dimensions to obtain a comprehensive quality score. Based on the comprehensive quality score, obtain the process adjustment parameter suggestions corresponding to the score and output specific process control instructions; According to the process control instructions, the automated control system of the wastewater treatment plant is linked to obtain the feedback data after execution; The feedback data after execution is compared and analyzed with the initial comprehensive quality score. If the feedback data indicates that the effluent quality does not meet the standard, the evaluation model parameters are readjusted and a new process control command is output. Based on the original spectral data stream, preliminary quantitative results of organic matter content are obtained, including: The original spectral data stream is preliminarily cleaned by the data stream processing module to remove irrelevant interference signals, resulting in a processed spectral data set. Based on the processed spectral data set, key signal points are screened using feature extraction methods to obtain a set of feature signals related to organic matter content; In the process of selecting key signal points using feature extraction, a feature selection formula based on mutual information is introduced to calculate the features. With organic matter content target value mutual information : ; in, Wavelength characteristics The target value for organic matter content, Features With organic matter content target value Mutual information value; Sort by mutual information value and select those with mutual information values higher than a set threshold. The features constitute a set of feature signals; Using the feature signal set, a pre-built evaluation model library is applied, combined with a support vector regression algorithm, to perform regression calculations on the signal set and obtain initial quantization values; If the initial quantization value does not match the preset threshold range, the feature signal set is subjected to a secondary correction process to obtain the corrected quantized data set. Based on the corrected quantified data set, multi-dimensional comparisons are performed through the data analysis layer to determine the distribution characteristics of organic matter content; Based on the aforementioned distribution characteristics, a preset classification rule is used for stratification to determine the final content assessment result; Based on the final content assessment results, combined with the pre-established mapping relationship table, analytical data descriptions that match business objectives are obtained. Based on the preliminary quantification results, data on the changing trend of organic matter content were obtained, including: By preprocessing the raw monitoring data, the initial time series data of organic matter content is obtained, resulting in a standardized basic dataset. Based on the standardized basic dataset, a time series analysis method is used to construct a trend model of organic matter content changes, and an autoregressive moving average model is used to fit the data to determine trend characteristic parameters. For the aforementioned trend characteristic parameters, the periodic component in the changing trend is extracted, the long-term trend and short-term fluctuation parts are separated, and the distribution pattern of the periodic characteristics is obtained. In extracting periodic components, an improved algorithm of empirical mode decomposition is used to transform the time series... Decomposed into eigenmode functions and residual components : ; in, It is a time series. The number of intrinsic mode functions. For intrinsic mode functions, This is the residual component; By calculating each By analyzing the frequency characteristics, periodic feature components are selected to obtain the distribution pattern of periodic features. If there is a significant fluctuation period in the distribution pattern of the periodic feature, the fluctuation period is decomposed by frequency domain analysis to obtain the specific period frequency value. Based on the periodic frequency value and combined with long-term trend data, a prediction framework for water quality fluctuations is constructed to determine whether the fluctuation pattern conforms to the preset periodic threshold range. Based on the judgment results of the fluctuation pattern, a correlation mapping between water quality fluctuations and changes in organic matter content is generated to determine the key time nodes of the fluctuation impact. If the fluctuation impact of the key time node exceeds the preset threshold range, the data of the relevant time period is weighted to obtain the adjusted trend data. By using the updated evaluation model weight distribution, the carbon source quality of the current terminal effluent is scored from multiple dimensions to obtain a comprehensive quality score, including: By collecting data from the effluent at the terminal, relevant indicators of carbon source quality are obtained, and combined with information on organic matter content and water quality fluctuations, a preliminary dataset is obtained. Based on the preliminary dataset, a pre-established evaluation model is used to score the carbon source quality in multiple dimensions, and the score result for each dimension is determined. The comprehensive quality score is obtained by weighting the multi-dimensional scoring results and combining the weight distribution. In calculating the weighted overall quality score, a dynamic weight adjustment formula based on the entropy weight method is introduced, where the weight is set to... Each dimension's score is Its weight The calculation formula is: ; in , For the sample size, The number of dimensions is used to calculate the overall quality score. ; in, For the first The entropy value of the score values in each dimension For the first The first dimension The score values of each sample For the first Weights of each dimension The number of dimensions; This is the overall quality score. For the first Weights of each dimension For the first Each dimension's score value The number of dimensions; If the overall quality score is lower than the preset threshold, the fluctuation data of water quality will be analyzed to determine whether the fluctuation range exceeds the normal range. If the fluctuation amplitude exceeds the normal range, the abnormal time period characteristics are extracted from the fluctuation data to obtain the process information corresponding to the abnormal fluctuation and determine the adjustment direction. By using the process information corresponding to the abnormal fluctuations and combining it with the comprehensive quality score, the support vector machine algorithm is used to optimize and simulate the process parameters to obtain the specific parameter values of the adjustment scheme. Based on the specific parameter values of the adjustment scheme, guide data for process adjustment is generated to determine the final direction of process optimization.
2. The method for evaluating the quality of carbon sources in wastewater effluent from wastewater treatment plants according to claim 1, characterized in that: The initial signal data was preliminarily scanned using a water quality full-spectrum analyzer to obtain the original spectral data stream related to the carbon source quality index; The original spectral data stream is preprocessed to remove noise interference, resulting in a cleaned spectral data set. Based on the cleaned spectral data set, key feature values related to quality indicators are extracted to determine the carbon source quality characteristics in the effluent. If the extracted feature values do not match the preset threshold range, the spectral data set is subjected to a secondary calibration process to obtain a calibrated feature dataset. Using the calibrated feature dataset, the support vector machine algorithm is applied to classify and judge the effluent feature parameters to obtain classification result data. Based on the classification results data and combined with the pre-established feature parameter mapping relationship, the final effluent feature parameter description is determined. In the noise removal step, a variational mode decomposition algorithm is used to transform the original spectral data stream. Decomposed into K modal components Its optimization model is: ; The constraints are The effective signal components are obtained by solving the model, and a cleaned spectral data set is constructed. in, For the raw spectral data stream, Let be the number of modes in the decomposition. For modal components, For the corresponding center frequency, Indicates time Differentiate, For the Dirac function, This represents the convolution operation. for Norm.
3. The method for evaluating the quality of carbon sources in wastewater effluent from a wastewater treatment plant according to claim 1, characterized in that: If the trend data exceeds a preset threshold range, an anomaly detection mechanism is triggered, and an anomaly determination result is output, including: By collecting real-time data transmitted by environmental sensors, change trend information is obtained and stored in the data processing module to obtain a preliminary change trend record. Based on the recorded trend of change, a preset threshold is used for comparison. If the trend of change exceeds the preset threshold range, an anomaly detection process is triggered to determine a preliminary anomaly signal. For the aforementioned preliminary abnormal signal, historical data is obtained from the database and compared with the current data in multiple dimensions. The support vector machine algorithm is used to classify the water quality fluctuation characteristics and determine whether there is a significant deviation. In determining whether significant bias exists, a local anomaly factor algorithm is introduced to calculate the sample points. Locally achievable density : ; Thus, sample points are obtained. Local anomalous factors ,when Greater than the set threshold At that time, the judgment showed a significant bias; in, For sample points, For sample points Locally achievable density, For sample points Local anomalous factors; when Greater than the set threshold At that time, the judgment showed a significant bias; If the support vector machine algorithm determines that there is a significant deviation in water quality fluctuations, then the fluctuation data is matched with the abnormal state standard to obtain abnormal state confirmation information. Based on the abnormal status confirmation information, a judgment result data is generated and stored in the result output module to obtain a structured abnormal judgment record; Based on the anomaly detection record, the linkage system adjustment module automatically generates adjustment parameter suggestions and outputs them to the relevant control unit. Obtain the execution feedback data of the proposed adjustment parameters, compare and analyze it with historical data, determine whether the water quality fluctuations after the system adjustment have returned to the normal range, and output the final verification results.
4. The method for evaluating the quality of carbon sources in wastewater effluent from a wastewater treatment plant according to claim 3, characterized in that: Based on the anomaly detection result, a suitable combination of evaluation parameters is obtained to update the weight distribution of the evaluation model, including: By obtaining relevant data for anomaly determination from the system database, and performing preliminary screening on records under abnormal conditions, an initial anomaly dataset is obtained. Based on the initial abnormal dataset, key features of water quality fluctuations are extracted using feature analysis methods to determine the distribution pattern of the fluctuation features; If the distribution pattern of the fluctuation characteristics exceeds the preset threshold range, the corresponding rule is invoked to match the applicable evaluation parameters from the system database and obtain the corresponding parameter combination. By standardizing the obtained parameter combinations, we can analyze their compatibility with the evaluation model and determine the effectiveness of the parameter combinations. In analyzing the fit between parameter combinations and the evaluation model, a fit calculation formula based on Mahalanobis distance is used, assuming the parameter combination vector is... The mean vector of the evaluation model parameter distribution is The covariance matrix is Then the fit for: ; when Less than the set threshold When the parameter combination is valid, it is determined that the combination is valid. in, For parameter combination vectors, To evaluate the mean vector of the model parameter distribution, Let covariance matrix be the variance matrix. For compatibility; If the parameter combination is deemed valid, it is applied to the evaluation model, the weight distribution is updated, and a new model configuration is generated. Based on the new model configuration, water quality fluctuations under abnormal conditions are monitored in real time to obtain updated evaluation results. The persistence of the model update is determined by storing and comparing the updated evaluation results.
5. The method for evaluating the quality of carbon sources in wastewater effluent from a wastewater treatment plant according to claim 1, characterized in that: Based on the overall quality score, obtain suggested process adjustment parameters corresponding to the score, and output specific process control instructions, including: By extracting key indicators from the quality scoring data and using preset mapping rules, the data is compared with process optimization data in the parameter library to obtain preliminary matching results. Based on the preliminary matching results, the accuracy of the score matching is verified. If the verification result is lower than the preset threshold, a closer adjustment parameter is retrieved from the parameter library to determine the final parameter recommendation. In verifying the accuracy of the score matching, the cosine similarity formula is used to calculate the similarity between the preliminary matching results and the actual scores. : ; in For the initial matching of process optimization data index values, The index value corresponding to the actual score. For the number of indicators, when Below the set threshold At that time, reacquire the adjustment parameters; After obtaining the final parameter suggestions, the suggestions are converted into specific control instructions based on the process control requirements, thereby generating an executable process adjustment plan. The real-time optimization module acquires the current status data of the wastewater treatment process and compares it with the generated control commands to determine whether it meets the requirements for process adjustment. If the process adjustment requirements are met, the control command is sent to the wastewater treatment equipment to update the process parameters in real time. Based on the device feedback data after execution, the actual effect of the process adjustment is obtained, and the deviation between the effect and the expectation is used to determine whether further parameter adjustments are needed. If the deviation exceeds the preset range, process optimization data is re-extracted from the parameter library, and new control commands are generated based on the feedback from real-time optimization.
6. The method for evaluating the quality of carbon sources in wastewater effluent from a wastewater treatment plant according to claim 5, characterized in that: The feedback data after execution is compared and analyzed with the initial comprehensive quality score. If the feedback data indicates that the effluent quality does not meet the standards, the evaluation model parameters are readjusted, and new process control instructions are output, including: By obtaining feedback data from the monitoring system, a preliminary comparison is made between the effluent quality and the preset threshold to determine whether it meets the standards. If the feedback data indicates that the effluent quality does not meet the standards, a data comparison method is used to conduct a detailed analysis of the feedback data and the initial quality score to determine the range of deviation. Based on the deviation range obtained from the analysis, the parameters of the evaluation model are adjusted, and the parameters are optimized using a pre-established support vector machine model to obtain the adjusted model parameters. Based on the adjusted model parameters, new process control instructions are generated to perform real-time regulation of key links in the wastewater treatment process and determine the specific execution content of the instructions. Obtain real-time feedback data after regulation and compare it again with the adjusted quality score to determine whether the effluent quality meets the expected standard. If the comparison still shows that the standard is not met, the process control instructions are adjusted by analyzing historical data and combining the results of quality analysis to obtain an optimized control scheme. Based on the optimized control scheme, feedback data during the wastewater treatment process is continuously monitored, and dynamic adjustments are made in response to changing trends.
7. The method for evaluating the quality of carbon sources in wastewater effluent from a wastewater treatment plant according to claim 6, characterized in that: in, When adjusting the evaluation model parameters, an adaptive learning rate adjustment formula based on gradient descent is used. Let the model parameters be... The loss function is Learning rate The dynamic adjustment formula is: ; in The attenuation coefficient is... For the first In each iteration, the gradient of the loss function with respect to the parameters is used to update the model parameters and optimize the control commands.
Citation Information
Patent Citations
Series arc fault detection method based on random forest
CN113552447A
Battery capacity estimation method and system based on short-time discharge data, and medium
CN116819347A