A sewage treatment effect detection method based on spectral analysis
By extracting features from multi-band spectral data and fusing multi-modal task-driven autoencoders, combined with an intelligent spectral analysis model, the problem of insufficient generalization ability of existing spectral analysis methods in wastewater treatment is solved. This achieves high-precision and real-time prediction of pollutant concentrations, improving the efficiency and effectiveness of wastewater treatment.
Patent Information
- Application Number
- CN202411820278.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-12-11
AI Technical Summary
Existing spectral analysis methods lack effective feature extraction and fusion mechanisms in wastewater treatment, resulting in poor model generalization ability and robustness, which cannot meet the requirements of high accuracy, real-time performance and reliability.
Feature extraction is performed using multi-band spectral data. A multimodal task-driven autoencoder is used to fuse spectral data to build an intelligent spectral analysis model. The model is trained using random forest, support vector machine and neural network models to output pollutant concentration prediction results and dynamically adjust the processing parameters.
It improves the accuracy and robustness of wastewater treatment effect detection, ensures the model's adaptability to complex data and the stability of prediction results, and realizes accurate evaluation and dynamic adjustment of wastewater treatment effect.
Smart Images

Figure CN119757251B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent spectrum analysis, and particularly relates to a sewage treatment effect detection method based on spectrum analysis. BACKGROUND
[0002] With the increasingly serious environmental pollution problem, the development of sewage treatment technology has become a key issue in the field of environmental protection. As a non-invasive detection method, spectrum analysis shows unique advantages in water quality monitoring. In recent years, multi-band spectrum analysis technology based on ultraviolet, visible and near-infrared spectrum data has been widely studied and applied. Through these spectrum information, various pollutant components in water bodies can be effectively identified. However, the traditional spectrum analysis method often relies on single-band data processing, which limits its adaptability and accuracy to a certain extent. In addition, the existing spectrum analysis model mostly uses simple statistical methods for feature extraction and concentration prediction, lacking effective mining of the internal relationship between multi-modal data, resulting in insufficient model generalization ability.
[0003] Although some existing researches attempt to improve detection accuracy through multi-band spectrum data, these methods usually lack effective feature extraction and fusion mechanisms. Specifically, the existing multi-band spectrum analysis method often uses simple feature splicing or linear combination, failing to fully utilize the complementary information between different bands. In addition, the traditional method is easily affected by noise and redundant information in the feature extraction process, resulting in poor generalization ability and robustness of the model. Therefore, there is an urgent need for a method that can effectively fuse multi-band spectrum data, extract key features and improve prediction accuracy to meet the demand for high precision, real-time and reliability in modern sewage treatment. SUMMARY
[0004] In view of the above existing problems, the present application is proposed.
[0005] Therefore, the present application provides a sewage treatment effect detection method based on spectrum analysis to solve the accuracy problem of detection results.
[0006] To solve the above technical problems, the present application provides the following technical solutions:
[0007] In the first aspect, the present application provides a sewage treatment effect detection method based on spectrum analysis, which comprises collecting multi-band spectrum data in sewage and preprocessing; based on the preprocessed multi-band spectrum data, feature extraction is performed and multi-modal task-driven autoencoder fusion is used to generate a feature data set; according to the feature data set, an intelligent spectrum analysis model is constructed, multi-band feature data combination is performed, and a pollutant concentration prediction result is output; based on the pollutant concentration prediction result, the sewage treatment effect is evaluated, and the processing parameters are dynamically adjusted.
[0008] As a preferred scheme of the sewage treatment effect detection method based on spectrum analysis, the multi-band spectrum data includes ultraviolet spectrum data, visible spectrum data and near-infrared spectrum data.
[0009] As a preferred scheme of the sewage treatment effect detection method based on spectrum analysis, the preprocessing includes baseline correction, smoothing processing and data normalization.
[0010] As a preferred scheme of the sewage treatment effect detection method based on spectrum analysis, the feature extraction and fusion using multi-modal task-driven autoencoder include the following steps:
[0011] Align the collection time and collection position of the ultraviolet spectrum data, visible spectrum data and near-infrared spectrum data;
[0012] Extract principal component features of the ultraviolet spectrum data, visible spectrum data and near-infrared spectrum data by principal component analysis;
[0013] Extract target features of the pollutant concentration of the ultraviolet spectrum data, visible spectrum data and near-infrared spectrum data by partial least squares method;
[0014] Extract frequency domain features of the ultraviolet spectrum data, visible spectrum data and near-infrared spectrum data by wavelet transform;
[0015] Encode the principal component features, target features and frequency domain features using multi-modal task-driven autoencoder respectively, and extract hidden space features;
[0016] Fuse the hidden space features of the principal component features, target features and frequency domain features into a shared hidden space, and the expression is:
[0017]
[0018] Wherein, Z is the final shared hidden space, g is a nonlinear mapping function, and Z m is the hidden space of the mth feature in the set M, is the element-wise product between features, is feature splicing, M is a multi-modal feature set, and m is the index of the multi-modal feature;
[0019] Based on the fused feature data in the shared hidden space, generate a feature data set, and use the shared hidden space as a decoder to reconstruct the principal component features, target features and frequency domain features;
[0020] Use the shared hidden space to predict the pollutant concentration, and minimize the task error;
[0021] By distribution alignment, the distribution difference of the principal component features, the target features and the frequency domain features in the shared hidden space is reduced, and the alignment error is minimized.
[0022] As a preferred scheme of the sewage treatment effect detection method based on spectrum analysis, the intelligent spectrum analysis model is constructed, and the specific steps are,
[0023] The input is defined as a feature data set, and the output is defined as a prediction result.
[0024] The single-band feature data of the multi-band feature data is defined as a single feature in the principal component feature, the target feature and the frequency domain feature of the ultraviolet spectrum data, the visible spectrum data and the near-infrared spectrum data.
[0025] The double-band feature data of the multi-band feature data is defined as a combination feature in the principal component feature, the target feature and the frequency domain feature of the ultraviolet spectrum data, the visible spectrum data and the near-infrared spectrum data.
[0026] The triple-band feature data of the multi-band feature data is defined as all features in the principal component feature, the target feature and the frequency domain feature of the ultraviolet spectrum data, the visible spectrum data and the near-infrared spectrum data.
[0027] The feature data set is divided into a training set and a test set.
[0028] Random forest, support vector machine and neural network model are selected as the basic model of the intelligent spectrum analysis model and are trained.
[0029] The threshold is set, the multi-band feature data combination and the basic model in the intelligent spectrum analysis model are selected for training, and the prediction result is output.
[0030] The performance of the intelligent spectrum analysis model is tested by cross-validation.
[0031] As a preferred scheme of the sewage treatment effect detection method based on spectrum analysis, the threshold is set, and the specific steps are,
[0032] When low-precision detection is used, single-band feature data and a random forest model are used.
[0033] When medium-precision detection is used, double-band feature data and a support vector machine model are used.
[0034] When high-precision detection is used, triple-band feature data and a neural network model are used.
[0035] As a preferred scheme of the sewage treatment effect detection method based on spectrum analysis, the multi-band feature data combination and the basic model in the intelligent spectrum analysis model are selected for training, and the expression is,
[0036]
[0037] where P is the predicted pollutant concentration result, f is the base model, D i is the i-th spectral data, S is the feature set, D j is the j-th spectral data, i is the feature index in the feature set, j is another feature index in the feature set different from i, represents the element-wise product of the i-th and j-th spectral data.
[0038] As a preferred scheme of the sewage treatment effect detection method based on spectral analysis provided by the application, the sewage treatment effect is evaluated and the treatment parameters are dynamically adjusted, and the specific steps are:
[0039] the prediction results obtained by low-precision detection, medium-precision detection and high-precision detection;
[0040] a sewage treatment evaluation standard is defined, and the sewage treatment parameters are dynamically adjusted, and the expression is:
[0041] Delta X=k1*sign(P-T1)+k2*sign(P-T2);
[0042] where Delta X is the parameter adjustment amount, k1 is the adjustment coefficient for adjusting between low-precision detection and medium-precision detection, k2 is the adjustment coefficient for adjusting between medium-precision detection and high-precision detection, sign is a function that returns a value according to the function, T1 is the boundary between low-precision and medium-precision, and T2 is the boundary between medium-precision and high-precision.
[0043] In a second aspect, the application provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the computer program, when executed by the processor, implements any step of the sewage treatment effect detection method based on spectral analysis according to the first aspect of the application.
[0044] In a third aspect, the application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements any step of the sewage treatment effect detection method based on spectral analysis according to the first aspect of the application.
[0045] The present application has the beneficial effects that: the present application realizes effective processing of complex data relations by constructing an intelligent spectrum analysis model, extracting spectrum features from the data set and combining multi-band features; specifically, the model selection includes random forest, support vector machine and neural network, these models can capture and process the nonlinear features of multi-band data, improve the accuracy and robustness of prediction; through multi-band combination and cross-validation, the model can better adapt to different types of sewage samples, ensuring the stability and reliability of the prediction results; finally, the pollutant concentration prediction results output by the intelligent spectrum analysis model provide a basis for the evaluation and dynamic adjustment of the sewage treatment effect, significantly improving the efficiency and effect of sewage treatment. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0047] Figure 1 Flowchart of the sewage treatment effect detection method based on spectrum analysis in embodiment 1.
[0048] Figure 2 Flowchart of the detection threshold setting in embodiment 1. DETAILED DESCRIPTION
[0049] In order to make the above-mentioned purposes, features and advantages of the present application more apparent and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings of the specification.
[0050] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from those described herein, and those skilled in the art can make similar generalizations without departing from the connotation of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0051] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor is it an embodiment that is separate or selectively excluded from other embodiments.
[0052] Embodiment 1, refer to Figure 1 and Figure 2 , the first embodiment of the present application provides a sewage treatment effect detection method based on spectrum analysis, including the following steps:
[0053] S1. Collecting multi-band spectral data in sewage and preprocessing.
[0054] Further, at multiple key nodes of sewage treatment, three types of spectrometers are installed; the spectrometer types include ultraviolet spectrometer, near-infrared spectrometer and visible light spectrometer; the corresponding wavelength ranges of each spectrometer are: ultraviolet (200-400 nm), visible light (400-800 nm) and near-infrared (800-2500 nm); these spectrometers collect spectral data in sewage in real time through transparent windows.
[0055] The positions where the spectrometers are installed should be selected at key nodes in the sewage treatment process, such as the water inlet, aeration tank, sedimentation tank and water outlet, to ensure that the entire sewage treatment process is covered; the collected spectral data contains light absorption information of the sewage sample at different wavelengths, and all spectral data is automatically attached with a time stamp when collected to ensure the synchronization of subsequent data processing;
[0056] The collection frequency is a fixed time interval, and it is recommended to set the collection frequency to once every 10 seconds.
[0057] S1.1, preprocessing, specifically,
[0058] Further, use spectral software (including Origin, MATLAB, Python) to correct the baseline of the data and eliminate background interference; fit the background signal by polynomial, and then subtract the fitted background signal from the original spectrum; select several points in the low-intensity region of the spectrum, connect these points into a curve as the baseline, and achieve baseline correction;
[0059] Use smoothing algorithm (such as Savitzky-Golay filter) to reduce noise and improve data quality;
[0060] Standardize the data of different wavebands by Z-score to ensure that the data is on the same scale for subsequent analysis;
[0061] It should be noted that by installing ultraviolet, visible light and near-infrared spectrometers at key nodes of sewage treatment, real-time multi-band spectral data is collected, and baseline correction, smoothing and data normalization preprocessing are performed, which eliminates background interference and noise, improves the quality and stability of the data; standardization ensures that different waveband data is on the same scale for subsequent analysis, providing a reliable foundation for feature extraction and model construction, significantly improving the accuracy and reliability of the detection results.
[0062] S2, feature extraction and fusion based on the preprocessed multi-band spectral data to generate a feature dataset.
[0063] Further, the collection time of the ultraviolet spectrum data, the visible spectrum data and the near-infrared spectrum data is aligned;
[0064] The collection positions of the ultraviolet spectrum data, the visible spectrum data and the near-infrared spectrum data are aligned;
[0065] Principal component features of the ultraviolet spectrum data, the visible spectrum data and the near-infrared spectrum data are extracted by principal component analysis;
[0066] Target features (pollutant concentration related features) of the ultraviolet spectrum data, the visible spectrum data and the near-infrared spectrum data pollutant concentration are extracted by the partial least squares method;
[0067] Frequency domain features of the ultraviolet spectrum data, the visible spectrum data and the near-infrared spectrum data are extracted by wavelet transform;
[0068] The principal component features, the target features and the frequency domain features are encoded respectively by using a multi-modal task-driven autoencoder, and hidden space features are extracted;
[0069] The hidden space features of the principal component features, the target features and the frequency domain features are fused into a shared hidden space, capturing the correlation and complementarity of multi-modal features, and the expression is:
[0070]
[0071] Wherein, Z is the final shared hidden space, which is a comprehensive representation of the principal component features, the target features and the frequency domain features after fusion, g is a nonlinear mapping function (such as multilayer perception MLP), which is used for further nonlinear transformation and information fusion of the spliced features, and Z m is the hidden space of the mth feature in the set M, such as Z1, Z2 and Z3, is the element-wise product between features, which is used to capture the interaction between different modal features, is feature splicing, which splices multiple features along the feature dimension, M is a multi-modal feature set, containing three types of features: principal component features, target features and frequency domain features, specifically, the elements of set M are Z1 (hidden space representation of principal component features), Z2 (hidden space representation of target features) and Z3 (hidden space representation of frequency domain features), and m is the index of multi-modal features;
[0072] The formula fuses multi-modal features into a shared hidden space through element-wise product and feature splicing operation, and further enhances feature expression combined with nonlinear mapping function; at the same time, it captures the interaction and complementary information between features, improves the processing ability and prediction accuracy of the model for complex data, and is especially suitable for multi-band spectrum data analysis;
[0073] Based on the feature data fused into the shared hidden space, a feature data set is generated, and the shared hidden space is used as a decoder to reconstruct the principal component features, target features and frequency domain features, ensuring that the shared hidden space can completely retain the input information;
[0074] The shared hidden space is used to predict the pollutant concentration, minimizing the task error;
[0075] Through distribution alignment, the distribution difference of the principal component features, target features and frequency domain features in the shared hidden space is reduced, ensuring the consistency of the features of each modality in the shared hidden space, and minimizing the alignment error.
[0076] It should be noted that through data alignment, the consistency of multi-band spectral data in time and space is ensured, and the accuracy of feature extraction is improved; principal component analysis effectively reduces the data dimension, retains key information, and improves the calculation efficiency; the partial least squares method extracts features highly correlated with pollutant concentration, enhancing the sensitivity and specificity of prediction; wavelet transform captures frequency domain features, enhancing the ability to identify multiple pollutants in complex water bodies; multi-modal task-driven autoencoder integrates different types of features, improving the robustness and generalization ability of the model, and achieving more accurate pollutant concentration prediction; distribution alignment further reduces the distribution difference of features of each modality, improving overall performance; this step collectively improves the precision, reliability and real-time performance of wastewater treatment effect detection.
[0077] S3, based on the feature data set, an intelligent spectral analysis model is constructed, multi-band feature data is combined, and the pollutant concentration prediction result is output.
[0078] Further, the input is defined as the feature data set, and the output is defined as the prediction result;
[0079] The feature data set includes principal component features, target features and frequency domain features of ultraviolet spectral data, visible spectral data and near-infrared spectral data;
[0080] The single-band feature data of the multi-band feature data is defined as a single feature in the principal component features, target features and frequency domain features of the ultraviolet spectral data, visible spectral data and near-infrared spectral data;
[0081] The double-band feature data of the multi-band feature data is defined as a combination feature in the principal component features, target features and frequency domain features of the ultraviolet spectral data, visible spectral data and near-infrared spectral data;
[0082] The triple-band feature data of the multi-band feature data is defined as all features in the principal component features, target features and frequency domain features of the ultraviolet spectral data, visible spectral data and near-infrared spectral data;
[0083] The feature dataset is divided into training set and test set, usually the ratio is 80% training set and 20% test set, which helps to evaluate the generalization ability of the model;
[0084] Random forest, support vector machine and neural network model are selected as the base model of intelligent spectral analysis model and are trained;
[0085] Set threshold, according to the detection requirement, select the defined multi-band feature data (single feature or combined feature or all features) and the model in the intelligent spectral analysis model for training, output the prediction result;
[0086] Test the performance of intelligent spectral analysis model using cross validation, ensure the generalization ability of intelligent spectral analysis model, common performance indicators include mean square error (MSE), determination coefficient (R 2 ) and so on.
[0087] Cross validation selects K-fold cross validation, which is used to evaluate the performance and generalization ability of machine learning model; By dividing the dataset into K non-overlapping subsets, then training and testing multiple times, the performance of the model on different data subsets can be evaluated more comprehensively.
[0088] S3.1, set threshold, specifically,
[0089] Further, when low precision detection, use single band feature data and random forest model;
[0090] When medium precision detection, use double band feature data and support vector machine model;
[0091] When high precision detection, use three band feature data and neural network model.
[0092] Further explanation:
[0093] For simple test (low precision detection), fast preliminary detection is needed, and high precision detection is not required, then use single band feature data and random forest model;
[0094] For medium precision test (medium precision detection), higher precision is required, but not the highest precision detection requirement, then use double band feature data and support vector machine model;
[0095] For high precision test, such as highest precision, especially in the case of strict supervision and accurate control, then use three band feature data and neural network model.
[0096] According to user demand, select feature set S:
[0097] Single band feature data S={u};
[0098] Dual-band feature data S = {u, v};
[0099] Triple-band feature data S = {u, v, r};
[0100] Train multiple models, each corresponding to a different feature combination and model type;
[0101] Train single-band feature data (Random Forest model), expressed as:
[0102]
[0103] where, is a prediction function trained using the Random Forest model, where u represents single-band feature data, train RF is the training process of the Random Forest model, ∑ i∈{u} D i is the sum of single-band feature data u, D i is the data of the i-th feature, i is the index of the feature;
[0104] Train dual-band feature data (Support Vector Machine model), expressed as:
[0105]
[0106] where, is a prediction function trained using the Support Vector Machine model, where u and v represent dual-band feature data, train SVM is the training process of the Support Vector Machine model, ∑ i∈{u,v} D i is the sum of dual-band feature data u and v, is the sum of element-wise products between band feature data u and v, is the element-wise product of D i and D j ;
[0107] Train triple-band feature data (Neural Network model), expressed as:
[0108]
[0109] where, is a prediction function trained using the Neural Network model, where u, v, and r represent triple-band feature data, train NN is the training process of the Neural Network model, ∑ i∈{u,v,r} D i is the sum of triple-band feature data u, v, and r, represents the sum of element-wise products between triple-band feature data u, v, and r;
[0110] Simple test, using single-band feature data and random forest model, expressed as:
[0111]
[0112] where P is the predicted pollutant concentration result;
[0113] Medium test, using double-band feature data and support vector machine model, expressed as:
[0114]
[0115] High-precision test, using three-band feature data and neural network model, expressed as:
[0116]
[0117] S3.2, select the combination of multi-band feature data and the basic model in intelligent spectral analysis model for training, expressed as,
[0118]
[0119] where P is the predicted pollutant concentration result, f is the basic model (random forest, support vector machine and neural network model), D i is the i-th spectral data, S is the selected feature set, D j is the j-th spectral data, i is the feature index in the feature set, j is another feature index different from i in the feature set, represents the element-wise product of the i-th and j-th spectral data.
[0120] It should be noted that by constructing the intelligent spectral analysis model, multi-band features are extracted and combined from the unified data set, realizing efficient processing of complex data relationships; the model selection includes random forest, support vector machine and neural network, which are suitable for low, medium and high precision detection requirements respectively; through multi-band feature data combination and cross-validation, the model can better adapt to different types of sewage samples, improving the accuracy and robustness of prediction; finally, the output of the pollutant concentration prediction result provides a basis for the evaluation and dynamic adjustment of the sewage treatment effect, significantly improving the efficiency and reliability of the detection.
[0121] S4, based on the predicted results of pollutant concentration, evaluate the sewage treatment effect, and dynamically adjust the treatment parameters.
[0122] Further, according to the prediction results obtained by low-precision detection, medium-precision detection and high-precision detection;
[0123] Define the detection sewage treatment evaluation standard, dynamically adjust the sewage treatment parameters, expressed as:
[0124] ΔX = k1 · sign(P - T1) + k2 · sign(P - T2);
[0125] wherein ΔX is a parameter adjustment amount, such as a chemical dosage, an aeration amount, or a pH value, k1 is an adjustment coefficient for adjusting between low-precision detection and medium-precision detection, k2 is an adjustment coefficient for adjusting between medium-precision detection and high-precision detection, sign is a return function, T1 is a demarcation line between low-precision and medium-precision, and T2 is a demarcation line between medium-precision and high-precision.
[0126] An evaluation criterion is defined, specifically:
[0127] A low-precision detection prediction result is defined as P1, a medium-precision detection prediction result is defined as P2, and a high-precision detection prediction result is defined as P3.
[0128] For low-precision detection, the evaluation criterion is:
[0129] When P1 < T1, the sewage treatment effect is good, and low-precision detection processing is maintained.
[0130] When T1 ≤ P1 < T2, the sewage treatment effect is general, and low-precision detection parameters are fine-tuned.
[0131] When P1 ≥ T2, the sewage treatment effect is poor, and medium-precision detection is entered.
[0132] For medium-precision detection, the evaluation criterion is:
[0133] When P2 < T1, the sewage treatment effect is good, and medium-precision detection processing is maintained.
[0134] When T1 ≤ P2 < T2, the sewage treatment effect is general, and medium-precision detection parameters are fine-tuned.
[0135] When P2 ≥ T2, the sewage treatment effect is poor, and high-precision detection is entered.
[0136] For high-precision detection, the evaluation criterion is:
[0137] When P3 ≥ T2, the sewage treatment effect is good, and high-precision detection processing is maintained.
[0138] When T1 ≤ P3 < T2, the sewage treatment effect is general, and high-precision detection parameters are fine-tuned.
[0139] When P3 < T1, the sewage treatment effect is poor, and high-precision detection parameters are re-adjusted.
[0140] It should be noted that by evaluating the prediction results based on the pollutant concentration, the sewage treatment parameters are dynamically adjusted, the sewage treatment effect is accurately evaluated and real-time adjusted, according to different precision detection results and set threshold values, the advantages and disadvantages of the sewage treatment effect can be identified in time, and corresponding measures are taken, the effectiveness of parameter adjustment is ensured, and the efficiency and stability of sewage treatment are significantly improved.
[0141] The embodiment also provides a computer device suitable for the sewage treatment effect detection method based on spectrum analysis, including a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the sewage treatment effect detection method based on spectrum analysis proposed in the above embodiment.
[0142] The computer device can be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium to run. The communication interface of the computer device is used to communicate with external terminals in a wired or wireless manner. The wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device. In addition, the input device can also be an external keyboard, touchpad or mouse, etc.
[0143] The embodiment also provides a storage medium on which a computer program is stored, the program being executed by a processor to implement the method for detecting sewage treatment effect based on spectrum analysis proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk.
[0144] To sum up, the present application realizes effective processing of complex data relationships by constructing an intelligent spectrum analysis model, extracting spectrum features from the data set and combining multi-band features. Specifically, the model selection includes random forest, support vector machine and neural network, which can capture and process the nonlinear features of multi-band data, improve the accuracy and robustness of prediction. Through multi-band combination and cross-validation, the model can better adapt to different types of sewage samples, ensuring the stability and reliability of the prediction results. Finally, the pollutant concentration prediction results output by the intelligent spectrum analysis model provide a basis for the evaluation and dynamic adjustment of sewage treatment effect, significantly improving the efficiency and effect of sewage treatment.
[0145] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application rather than limit the present application. Although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced equivalently without departing from the spirit and scope of the technical solutions of the present application, and all of them should be covered in the scope of the claims of the present application.
Claims
1. A method for detecting the effectiveness of wastewater treatment based on spectral analysis, characterized in that: include, Collect multi-band spectral data of wastewater and perform preprocessing; Feature extraction is performed on preprocessed multi-band spectral data, and a feature dataset is generated by using a multimodal task to drive autoencoder fusion. Based on the feature dataset, an intelligent spectral analysis model is constructed, multi-band feature data is combined, and pollutant concentration prediction results are output. Based on the predicted pollutant concentrations, the wastewater treatment effect is evaluated, and the treatment parameters are dynamically adjusted. The multi-band spectral data includes ultraviolet spectral data, visible light spectral data, and near-infrared spectral data; The specific steps for feature extraction and fusion using a multimodal task-driven autoencoder are as follows: Align the acquisition time and location of ultraviolet spectral data, visible light spectral data, and near-infrared spectral data; Principal component analysis was used to extract principal component features from ultraviolet, visible, and near-infrared spectral data. Target features of pollutant concentrations were extracted from ultraviolet, visible, and near-infrared spectral data using partial least squares method. Frequency domain features of ultraviolet, visible, and near-infrared spectral data were extracted using wavelet transform. A multimodal task-driven autoencoder is used to encode principal component features, target features, and frequency domain features respectively, and latent space features are extracted. The latent space features of principal component features, target features, and frequency domain features are fused into a shared latent space, expressed as: ; in, It is the ultimate shared hidden space. It is a non-linear mapping function. It is a set The Middle The latent space of each feature It is an element-wise product of features. It is feature splicing. It is a multimodal feature set. It is an index of multimodal features; Based on the feature data fused into the shared latent space, a feature dataset is generated, and the shared latent space is used as a decoder to reconstruct principal component features, target features, and frequency domain features. Predict pollutant concentrations using shared latent space to minimize task error; By aligning the distributions of principal component features, target features, and frequency domain features in the shared latent space, the alignment error is minimized. The specific steps for constructing the intelligent spectral analysis model are as follows: Define the input as the feature dataset and the output as the prediction result; Single-band feature data of multi-band feature data is defined as a single feature among principal component features, target features, and frequency domain features of ultraviolet spectral data, visible light spectral data, and near-infrared spectral data. The dual-band feature data of multi-band feature data is defined as a combination of principal component features, target features, and frequency domain features from ultraviolet spectral data, visible light spectral data, and near-infrared spectral data. The three-band feature data of multi-band feature data are defined as all features among the principal component features, target features, and frequency domain features of ultraviolet spectral data, visible light spectral data, and near-infrared spectral data. The feature dataset is divided into a training set and a test set; Random forest, support vector machine, and neural network models were selected as the basic models for the intelligent spectral analysis model and trained. Set a threshold, select the defined multi-band feature data and the basic model in the intelligent spectral analysis model for training, and output the prediction results; Cross-validation was used to test the performance of the intelligent spectral analysis model. The specific steps for setting the threshold are as follows: When performing low-precision detection, single-band feature data and a random forest model are used. In the high-precision detection, dual-band feature data and support vector machine model are used; For high-precision detection, three-band feature data and neural network models are used; The selected multi-band feature data and the basic model in the intelligent spectral analysis model are used for training, as expressed in the following expression: ; in, These are the predicted pollutant concentrations. It is the basic model. It is the first Spectral data, It is a feature set. It is the first Spectral data, It is the feature index in the feature set. It is different from the feature set Another feature index, Indicates the first species and first Element-wise product of spectral data; The specific steps for evaluating the wastewater treatment effect and dynamically adjusting the treatment parameters are as follows: Based on the prediction results obtained from low-precision detection, medium-precision detection, and high-precision detection; Define wastewater treatment evaluation standards and dynamically adjust wastewater treatment parameters, expressed as: ; in, It is the parameter adjustment amount. It is an adjustment coefficient used to adjust the difference between low-precision and medium-precision detection. It is an adjustment coefficient used to adjust the difference between medium-precision and high-precision detection. It returns a function that matches the given information. It is the dividing line between low precision and medium precision. It is the dividing line between medium precision and high precision.
2. The wastewater treatment effect detection method based on spectral analysis as described in claim 1, characterized in that: The preprocessing includes, Baseline correction, smoothing, and data normalization.
3. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the wastewater treatment effect detection method based on spectral analysis as described in any one of claims 1 to 2.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the wastewater treatment effect detection method based on spectral analysis as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Cross-modal depth forgery detection method based on time-frequency domain visual artifact feature adaptive fusion
CN114898438A
Supervised nonlinear spectrum detection method, system, equipment and medium
CN118332252A
Cited By
Big data-based sewage treatment efficiency evaluation method and system
CN121071537A