Sewage treatment effect detection method based on spectral analysis
Through intelligent spectral analysis method, multi-band spectral data is used for pre-processing and feature extraction, combined with multi-modal task-driven autoencoder fusion, an intelligent spectral analysis model is built, which solves the problem of insufficient accuracy of sewage treatment effect detection in the existing technology, and achieves more efficient and reliable sewage treatment effect detection.
Patent Information
- Application Number
- CN202411820278.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-11
AI Technical Summary
The existing spectral analysis methods have problems such as insufficient accuracy, poor generalization ability and noise sensitivity in the detection of sewage treatment effects, especially in the treatment of complex sewage systems.
An intelligent spectral analysis method based on multi-band spectral data is adopted, and a feature data set is generated through preprocessing, feature extraction and multi-modal task-driven autoencoder fusion is used to generate a feature data set, and an intelligent spectral analysis model is constructed to combine multi-band feature data to output pollutant concentration prediction results.
It improves the accuracy and robustness of sewage treatment effect detection, enhances the model's processing ability of complex data relationships, ensures the stability and reliability of predicted results, and supports dynamic adjustment of sewage treatment parameters.
Smart Images

Figure CN119757251A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of intelligent spectrum analysis, and in particular to a sewage treatment effect detection method based on spectrum analysis. Background Art
[0002] As environmental pollution becomes increasingly serious, the development of sewage treatment technology has become a key issue in the field of environmental protection. Spectral analysis, as a non-invasive detection method, has shown unique advantages in water quality monitoring. In recent years, multi-band spectral analysis technology based on ultraviolet, visible and near-infrared spectral data has been widely studied and applied. Through these spectral information, various pollutant components in water bodies can be effectively identified. However, traditional spectral analysis methods often rely on single-band data processing, which to a certain extent limits its adaptability and accuracy to complex sewage systems. In addition, most of the existing spectral analysis models use simple statistical methods for feature extraction and concentration prediction, lacking effective mining of the intrinsic connections between multimodal data, resulting in insufficient model generalization ability.
[0003] Although some existing studies have attempted to improve detection accuracy through multi-band spectral data, these methods usually lack effective feature extraction and fusion mechanisms; specifically, existing multi-band spectral analysis methods often use simple feature splicing or linear combination, and fail to fully utilize the complementary information between bands; in addition, traditional methods are easily affected by noise and redundant information during the feature extraction process, resulting in poor generalization and robustness of the model; therefore, there is an urgent need for a method that can effectively fuse multi-band spectral data, extract key features and improve prediction accuracy to meet the needs of modern sewage treatment for high precision, real-time and reliability. Summary of the invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a sewage treatment effect detection method based on spectral analysis to solve the problem of accuracy of detection results.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In the first aspect, the present invention provides a sewage treatment effect detection method based on spectral analysis, which includes collecting multi-band spectral data in sewage and performing preprocessing; performing feature extraction based on the preprocessed multi-band spectral data and using multimodal task-driven autoencoder fusion to generate a feature data set; based on the feature data set, constructing an intelligent spectral analysis model, combining multi-band feature data, and outputting pollutant concentration prediction results; based on the pollutant concentration prediction results, evaluating the sewage treatment effect, and dynamically adjusting the treatment parameters.
[0008] As a preferred solution of the sewage treatment effect detection method based on spectral analysis described in the present invention, the multi-band spectral data includes ultraviolet spectral data, visible light spectral data and near-infrared spectral data.
[0009] As a preferred solution of the sewage treatment effect detection method based on spectral analysis described in the present invention, the pretreatment includes baseline correction, smoothing and data normalization.
[0010] As a preferred solution of the sewage treatment effect detection method based on spectral analysis described in the present invention, wherein: the feature extraction and the use of multimodal task driven autoencoder fusion, the specific steps are:
[0011] Aligning the acquisition time and acquisition position of ultraviolet spectrum data, visible spectrum data and near infrared spectrum data;
[0012] The principal component characteristics of ultraviolet spectrum data, visible light spectrum data and near infrared spectrum data were extracted through principal component analysis;
[0013] The target features of pollutant concentrations in ultraviolet spectral data, visible light spectral data and near-infrared spectral data are extracted by partial least squares method;
[0014] The frequency domain features of ultraviolet spectrum data, visible spectrum data and near infrared spectrum data are extracted by wavelet transform;
[0015] Use a multimodal task-driven autoencoder to encode the principal component features, target features, and frequency domain features respectively, and extract latent space features;
[0016] The latent space features of the principal component features, target features, and frequency domain features are fused into the shared latent space, and the expression is:
[0017]
[0018] Among them, Z is the final shared latent space, g is a nonlinear mapping function, and Z m is the latent space of the mth feature in the set M, ⊕ is the element-wise product between the features, is feature concatenation, M is a multimodal feature set, and m is the index of the multimodal feature;
[0019] 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 the principal component features, target features, and frequency domain features;
[0020] Use shared latent space to predict pollutant concentrations and minimize task errors;
[0021] Through distribution alignment, the distribution differences of principal component features, target features and frequency domain features in the shared latent space are reduced and the alignment error is minimized.
[0022] As a preferred solution of the sewage treatment effect detection method based on spectral analysis of the present invention, the specific steps of constructing an intelligent spectral analysis model are as follows:
[0023] Define the input as feature data set and the output as prediction result;
[0024] The single-band feature data of the multi-band feature data is defined as a single feature among the principal component features, target features and frequency domain features of the ultraviolet spectrum data, the visible light spectrum data and the near infrared spectrum data;
[0025] The dual-band feature data of the multi-band feature data are defined as the main component features of the ultraviolet spectrum data, the visible light spectrum data and the near infrared spectrum data, the target features and the combined features of the frequency domain features;
[0026] The three-band feature data of the multi-band feature data are defined as all the features in the main component features, target features and frequency domain features of the ultraviolet spectrum data, the visible light spectrum data and the near infrared spectrum data;
[0027] Divide the feature dataset into training set and test set;
[0028] Select random forest, support vector machine and neural network models as the basic models of intelligent spectrum analysis model and train them;
[0029] Set the threshold, select the multi-band feature data combination and the basic model in the intelligent spectral analysis model for training, and output the prediction results;
[0030] Cross-validation was used to test the performance of the intelligent spectral analysis model.
[0031] As a preferred solution of the sewage treatment effect detection method based on spectral analysis of the present invention, the specific steps of setting the threshold are as follows:
[0032] When low-precision detection is performed, single-band feature data and random forest models are used;
[0033] For medium-precision detection, dual-band feature data and support vector machine models are used;
[0034] When high-precision detection is performed, three-band feature data and a neural network model are used.
[0035] As a preferred solution of the sewage treatment effect detection method based on spectral analysis of the present invention, wherein: the multi-band feature data combination and the basic model in the intelligent spectral analysis model are selected for training, and the expression is,
[0036]
[0037] Among them, P is the predicted pollutant concentration result, f is the basic model, and D i is the i-th spectral data, S is the feature set, D j is the jth 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-by-element product of the i-th and j-th spectral data.
[0038] As a preferred solution of the sewage treatment effect detection method based on spectral analysis of the present invention, the specific steps of evaluating the sewage treatment effect and dynamically adjusting the treatment parameters are as follows:
[0039] Prediction results obtained based on low-precision detection, medium-precision detection, and high-precision detection;
[0040] Define the sewage treatment evaluation standard and dynamically adjust the sewage treatment parameters. The expression is:
[0041] ΔX=k1·sign(P-T1)+k2·sign(P-T2);
[0042] Among them, ΔX is the parameter adjustment amount, k1 is the adjustment coefficient used to adjust between low-precision detection and medium-precision detection, k2 is the adjustment coefficient used to adjust between medium-precision detection and high-precision detection, sign is the return compliance function, T1 is the dividing line between low-precision and medium-precision, and T2 is the dividing line between medium-precision and high-precision.
[0043] In a second aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the sewage treatment effect detection method based on spectral analysis as described in the first aspect of the present invention is implemented.
[0044] In a third aspect, the present invention 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 as described in the first aspect of the present invention.
[0045] The beneficial effects of the present invention are as follows: the present invention constructs an intelligent spectral analysis model, extracts spectral features from a data set and combines multi-band features, thereby realizing effective processing of complex data relationships; specifically, model selection includes random forests, support vector machines, and neural networks, which can capture and process the nonlinear characteristics of multi-band data, thereby improving the accuracy and robustness of predictions; through multi-band combination and cross-validation, the model can better adapt to different types of sewage samples, thereby ensuring the stability and reliability of the prediction results; finally, the pollutant concentration prediction results output by the intelligent spectral analysis model provide a basis for the evaluation and dynamic adjustment of sewage treatment effects, thereby significantly improving the efficiency and effects of sewage treatment. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0047] Figure 1 This is a flow chart of the sewage treatment effect detection method based on spectral analysis in Example 1.
[0048] Figure 2 This is a flow chart for setting the detection threshold in Example 1. DETAILED DESCRIPTION
[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0050] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0051] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.
[0052] Example 1, reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, provides a sewage treatment effect detection method based on spectral analysis, comprising the following steps:
[0053] S1. Collect multi-band spectral data in sewage and perform preprocessing.
[0054] Furthermore, three types of spectrometers are installed at multiple key nodes of sewage treatment; the spectrometer types include ultraviolet spectrometer, near-infrared spectrometer and visible light spectrometer; the wavelength ranges corresponding to each spectrometer are: ultraviolet (200-400nm), visible light (400-800nm) and near-infrared (800-2500nm); these spectrometers collect spectral data in sewage in real time through transparent windows.
[0055] The location where the spectrometer is installed should be selected from key nodes in the sewage treatment process, such as the water inlet, aeration tank, sedimentation tank and outlet, to ensure that the entire sewage treatment process can be covered; the collected spectral data contains the light absorption information of the sewage sample at different wavelengths, and all spectral data are automatically timestamped when collected to ensure the synchronization of subsequent data processing;
[0056] The collection frequency is a fixed time interval. It is recommended to set the collection frequency to once every 10 seconds.
[0057] S1.1, preprocessing, specifically,
[0058] Furthermore, spectral software (including Origin, MATLAB, and Python) was used to perform baseline correction on the data to eliminate background interference; the background signal was fitted by a polynomial, and then the fitted background signal was subtracted from the original spectrum; several points were selected in the low-intensity region of the spectrum, and these points were connected into a curve as the baseline to achieve baseline correction;
[0059] Use smoothing algorithms (such as Savitzky-Golay filtering) to reduce noise and improve data quality;
[0060] The data of different bands were standardized by Z-score to ensure that the data were 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, multi-band spectral data are collected in real time, and baseline correction, smoothing and data normalization preprocessing are performed to eliminate background interference and noise, and improve the quality and stability of the data; standardization ensures that data from different bands are subsequently analyzed at the same scale, providing a reliable foundation for feature extraction and model building, and significantly improving the accuracy and reliability of the detection results.
[0062] S2. Perform feature extraction and fusion based on the preprocessed multi-band spectral data to generate a feature data set.
[0063] Furthermore, the acquisition time of the ultraviolet spectrum data, the visible spectrum data, and the near-infrared spectrum data are aligned;
[0064] Aligning the collection positions of ultraviolet spectrum data, visible light spectrum data and near infrared spectrum data;
[0065] The principal component characteristics of ultraviolet spectrum data, visible light spectrum data and near infrared spectrum data were extracted through principal component analysis;
[0066] Extract the target features (features related to pollutant concentration) of the ultraviolet spectrum data, visible light spectrum data and near infrared spectrum data by partial least squares method;
[0067] The frequency domain features of ultraviolet spectrum data, visible spectrum data and near infrared spectrum data are extracted by wavelet transform;
[0068] Use a multimodal task-driven autoencoder to encode the principal component features, target features, and frequency domain features respectively, and extract latent space features;
[0069] The latent space features of principal component features, target features, and frequency domain features are fused into the shared latent space to capture the correlation and complementarity of multimodal features. The expression is:
[0070]
[0071] Among them, Z is the final shared latent space, which is the comprehensive representation of the fusion of principal component features, target features and frequency domain features. g is a nonlinear mapping function (such as multi-layer perceptron MLP), which is used to perform further nonlinear transformation and information fusion on the concatenated features. m is the latent 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 features of different modalities, It is feature concatenation, which concatenates multiple features along the feature dimension. M is a multimodal feature set, which includes three types of features: principal component features, target features, and frequency domain features. Specifically, the elements of the set M are Z1 (latent space representation of principal component features), Z2 (latent space representation of target features), and Z3 (latent space representation of frequency domain features), and m is the index of the multimodal feature.
[0072] This formula integrates multimodal features into a shared latent space through element-by-element multiplication and feature concatenation operations, and further enhances feature expression by combining nonlinear mapping functions. It also captures the interactive relationship and complementary information between features, improving the model's ability to process complex data and prediction accuracy, and is particularly suitable for multi-band spectral data analysis.
[0073] Based on the feature data fused into the shared latent space, a feature data set is generated, and the shared latent space is used as a decoder to reconstruct the principal component features, target features, and frequency domain features to ensure that the shared latent space can fully retain the input information;
[0074] Use shared latent space to predict pollutant concentrations and minimize task errors;
[0075] Through distribution alignment, the distribution differences among principal component features, target features, and frequency domain features in the shared latent space are reduced, the consistency of each modal feature in the shared latent space is ensured, and the alignment error is minimized.
[0076] It should be noted that data alignment ensures the consistency of multi-band spectral data in time and space, and improves the accuracy of feature extraction; principal component analysis effectively reduces the data dimension, retains key information, and improves computational efficiency; partial least squares method extracts features that are highly correlated with pollutant concentrations, enhancing the sensitivity and specificity of prediction; wavelet transform captures frequency domain features and enhances the ability to identify multiple pollutants in complex water bodies; multimodal task-driven autoencoders fuse different types of features, improve the robustness and generalization ability of the model, and achieve more accurate pollutant concentration prediction; distribution alignment further reduces the distribution differences of each modal feature and improves the overall performance; this step jointly improves the accuracy, reliability and real-time performance of sewage treatment effect detection.
[0077] S3. Based on the characteristic data set, an intelligent spectral analysis model is constructed to combine multi-band characteristic data and output pollutant concentration prediction results.
[0078] Furthermore, the input is defined as a feature data set and the output is a prediction result;
[0079] The feature data set includes principal component features, target features and frequency domain features of ultraviolet spectrum data, visible light spectrum data and near infrared spectrum data;
[0080] The single-band feature data of the multi-band feature data is defined as a single feature among the principal component features, target features and frequency domain features of the ultraviolet spectrum data, the visible light spectrum data and the near infrared spectrum data;
[0081] The dual-band feature data of the multi-band feature data are defined as the main component features of the ultraviolet spectrum data, the visible light spectrum data and the near infrared spectrum data, the target features and the combined features of the frequency domain features;
[0082] The three-band feature data of the multi-band feature data are defined as all the features in the main component features, target features and frequency domain features of the ultraviolet spectrum data, the visible light spectrum data and the near infrared spectrum data;
[0083] Dividing the feature dataset into a training set and a test set, usually with a ratio of 80% training set and 20% test set, helps evaluate the generalization ability of the model;
[0084] Select random forest, support vector machine and neural network models as the basic models of intelligent spectrum analysis model and train them;
[0085] Set the threshold, 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 according to the detection requirements, and output the prediction results;
[0086] Cross-validation is used to test the performance of the intelligent spectral analysis model to ensure its generalization ability. Common performance indicators include mean square error (MSE), determination coefficient (R 2 )wait.
[0087] Cross-validation selects K-fold cross-validation to evaluate the performance and generalization ability of machine learning models. By dividing the dataset into K non-overlapping subsets and then performing multiple training and testing, the performance of the model on different data subsets can be more comprehensively evaluated.
[0088] S3.1. Set the threshold, specifically,
[0089] Furthermore, when low-precision detection is performed, single-band feature data and random forest models are used;
[0090] For medium-precision detection, dual-band feature data and support vector machine models are used;
[0091] When high-precision detection is performed, three-band feature data and a neural network model are used.
[0092] Further explanation:
[0093] For simple tests (low-precision detection), which require quick preliminary detection but do not require high-precision detection, single-band feature data and random forest models are used;
[0094] For medium-precision testing (medium-precision detection), which requires higher accuracy but does not require the highest accuracy detection requirements, dual-band feature data and support vector machine models are used;
[0095] For high-precision testing, where the highest accuracy is required, especially in strictly regulated and precisely controlled inspection situations, three-band signature data and neural network models are used.
[0096] Select feature set S according to user needs:
[0097] Single-band feature data S = {u};
[0098] Dual-band feature data S = {u, v};
[0099] Three-band characteristic data S = {u, v, r};
[0100] Train multiple models, each corresponding to a different combination of features and model types;
[0101] Training single-band feature data (random forest model) is expressed as:
[0102]
[0103] in, is the prediction function obtained by training the random forest model, where u represents the single-band feature data, and train RF is the training process of the random forest model, ∑ i∈{u} D i is the sum of the single-band feature data u, D i The data of the i-th feature, where i is the index of the feature;
[0104] Training dual-band feature data (support vector machine model) is expressed as:
[0105]
[0106] in, is the prediction function obtained by training the support vector machine model, where u and v represent dual-band feature data, and train SVM is the training process of the support vector machine model, ∑ i∈{u,v} D i is the sum of the dual-band feature data u and v, is the sum of the element-by-element products of the band feature data u and v, Yes D i and D j The element-wise product of ;
[0107] Training three-band feature data (neural network model) is expressed as:
[0108]
[0109] in, It represents the prediction function obtained by training the neural network model, where u, v and r represent the three-band feature data, and train NN is the training process of the neural network model, ∑ i∈{u,v,r} D i is the sum of the three-band characteristic data u, v and r, Represents the sum of element-by-element products of the three-band feature data u, v, and r;
[0110] A simple test, using single-band feature data and a random forest model, is expressed as:
[0111]
[0112] Among them, P is the predicted result of pollutant concentration;
[0113] The medium test, using dual-band feature data and support vector machine model, is expressed as:
[0114]
[0115] High-precision testing, using three-band feature data and a neural network model, is expressed as:
[0116]
[0117] S3.2, select the combination of multi-band feature data and the basic model in the intelligent spectral analysis model for training, the expression is,
[0118]
[0119] Among them, 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 ith spectral data, S is the selected feature set, D j is the jth 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-by-element product of the i-th and j-th spectral data.
[0120] It should be noted that by constructing an intelligent spectral analysis model, multi-band features are extracted and combined from a unified data set, thereby achieving efficient processing of complex data relationships; model selection includes random forests, support vector machines, and neural networks, which are suitable for low, medium, and high precision detection needs respectively; through multi-band feature data combination and cross-validation, the model can better adapt to different types of sewage samples and improve the accuracy and robustness of the prediction; ultimately, the output pollutant concentration prediction results provide a basis for the evaluation and dynamic adjustment of sewage treatment effects, significantly improving the efficiency and reliability of detection.
[0121] S4. Evaluate the sewage treatment effect based on the pollutant concentration prediction results and dynamically adjust the treatment parameters.
[0122] Furthermore, according to the prediction results obtained by low-precision detection, medium-precision detection and high-precision detection;
[0123] Define the sewage treatment evaluation standard and dynamically adjust the sewage treatment parameters. The expression is:
[0124] ΔX = k1·sign(P - T1)+k2·sign(P - T2);
[0125] Where ΔX is the parameter adjustment amount, such as chemical agent dosage, aeration rate or pH value; 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 the return sign function; T1 is the dividing line between low-precision and medium-precision; T2 is the dividing line between medium-precision and high-precision.
[0126] Define the evaluation criteria, specifically:
[0127] Define the low-precision detection prediction result as P1, the medium-precision detection prediction result as P2, and the high-precision detection prediction result as P3;
[0128] For low-precision detection, the evaluation criteria are:
[0129] When P1 < T1, the sewage treatment effect is good, and low-precision detection treatment is maintained;
[0130] When T1 ≤ P1 < T2, the sewage treatment effect is average, and the low-precision detection parameters are slightly adjusted;
[0131] When P1 ≥ T2, the sewage treatment effect is poor, and medium-precision detection is entered;
[0132] For medium-precision detection, the evaluation criteria are:
[0133] When P2 < T1, the sewage treatment effect is good, and medium-precision detection treatment is maintained;
[0134] When T1 ≤ P2 < T2, the sewage treatment effect is average, and the medium-precision detection parameters are slightly adjusted;
[0135] When P2 ≥ T2, the sewage treatment effect is poor, and high-precision detection is entered;
[0136] For high-precision detection, the evaluation criteria are:
[0137] When P3 ≥ T2, the sewage treatment effect is good, and high-precision detection treatment is maintained;
[0138] When T1 ≤ P3 < T2, the sewage treatment effect is average, and the high-precision detection parameters are slightly adjusted;
[0139] When P3 < T1, the sewage treatment effect is poor, and the high-precision detection parameters are readjusted.
[0140] It should be noted that by dynamically adjusting sewage treatment parameters based on evaluation criteria based on pollutant concentration prediction results, accurate evaluation and real-time adjustment of sewage treatment effects are achieved; according to different precision detection results and set thresholds, the pros and cons of sewage treatment effects can be identified in a timely manner and corresponding measures can be taken; the effectiveness of parameter adjustment is ensured, which significantly improves the efficiency and stability of sewage treatment.
[0141] This embodiment also provides a computer device, which is suitable for the case of a sewage treatment effect detection method based on spectral analysis, including: a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement the sewage treatment effect detection method based on spectral analysis proposed in the above embodiment.
[0142] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via 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 operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and 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 may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0143] The present embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the method for detecting the sewage treatment effect based on spectral analysis as proposed in the above embodiment is implemented; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0144] In summary, the present invention realizes the effective processing of complex data relationships by constructing an intelligent spectral analysis model, extracting spectral 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 characteristics of multi-band data, and improve the accuracy and robustness of the 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 spectral analysis model provide a basis for the evaluation and dynamic adjustment of sewage treatment effects, and significantly improve 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 invention rather than to limit it. Although the present invention 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 invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for detecting sewage treatment effect based on spectral analysis, characterized in that: include, Collect multi-band spectral data from sewage and perform pre-processing; Feature extraction is performed based on the preprocessed multi-band spectral data and multi-modal task-driven autoencoder fusion is used to generate a feature dataset; According to the characteristic data set, an intelligent spectral analysis model is constructed to combine multi-band characteristic data and output the pollutant concentration prediction results; Based on the pollutant concentration prediction results, the sewage treatment effect is evaluated and the treatment parameters are dynamically adjusted.
2. The method for detecting the effect of sewage treatment based on spectral analysis according to claim 1, characterized in that: The multi-band spectral data includes ultraviolet spectral data, visible light spectral data and near infrared spectral data.
3. The method for detecting the effect of sewage treatment based on spectral analysis according to claim 2, characterized in that: The pretreatment includes: Baseline correction, smoothing, and data normalization.
4. The method for detecting the effect of sewage treatment based on spectral analysis according to claim 3, characterized in that: The feature extraction and multimodal task driven autoencoder fusion are specifically performed as follows: Aligning the acquisition time and acquisition position of ultraviolet spectrum data, visible spectrum data and near infrared spectrum data; The principal component characteristics of ultraviolet spectrum data, visible light spectrum data and near infrared spectrum data were extracted through principal component analysis; The target features of pollutant concentrations in ultraviolet spectral data, visible light spectral data and near-infrared spectral data are extracted by partial least squares method; The frequency domain features of ultraviolet spectrum data, visible spectrum data and near infrared spectrum data are extracted by wavelet transform; Use a multimodal task-driven autoencoder to encode the principal component features, target features, and frequency domain features respectively, and extract latent space features; The latent space features of the principal component features, target features, and frequency domain features are fused into the shared latent space, and the expression is: Among them, Z is the final shared latent space, g is a nonlinear mapping function, and Z m is the latent space of the mth feature in the set M, is the element-wise product between features, is feature concatenation, M is a multimodal feature set, and m is the index of the multimodal feature; 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 the principal component features, target features, and frequency domain features; Use shared latent space to predict pollutant concentrations and minimize task errors; Through distribution alignment, the distribution differences of principal component features, target features and frequency domain features in the shared latent space are reduced and the alignment error is minimized.
5. The method for detecting the effect of sewage treatment based on spectral analysis according to claim 4, characterized in that: The specific steps of constructing the intelligent spectrum analysis model are as follows: Define the input as feature data set and the output as prediction result; The single-band feature data of the multi-band feature data is defined as a single feature among the principal component features, target features and frequency domain features of the ultraviolet spectrum data, the visible light spectrum data and the near infrared spectrum data; The dual-band feature data of the multi-band feature data are defined as the main component features of the ultraviolet spectrum data, the visible light spectrum data and the near infrared spectrum data, the target features and the combined features of the frequency domain features; The three-band feature data of the multi-band feature data are defined as all the features in the main component features, target features and frequency domain features of the ultraviolet spectrum data, the visible light spectrum data and the near infrared spectrum data; Divide the feature dataset into training set and test set; Select random forest, support vector machine and neural network models as the basic models of intelligent spectrum analysis model and train them; Set the 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.
6. The method for detecting the effect of sewage treatment based on spectral analysis according to claim 5, characterized in that: The specific steps of setting the threshold are as follows: When low-precision detection is performed, single-band feature data and random forest models are used; For medium-precision detection, dual-band feature data and support vector machine models are used; When high-precision detection is performed, three-band feature data and a neural network model are used.
7. The method for detecting the effect of sewage treatment based on spectral analysis according to claim 6, characterized in that: The multi-band feature data combination and the basic model in the intelligent spectrum analysis model are selected for training, and the expression is: Among them, P is the predicted pollutant concentration result, f is the basic model, and D i is the i-th spectral data, S is the feature set, D j is the jth 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-by-element product of the i-th and j-th spectral data.
8. The method for detecting the effect of sewage treatment based on spectral analysis according to claim 7, characterized in that: The specific steps of evaluating the sewage treatment effect and dynamically adjusting the treatment parameters are as follows: Prediction results obtained based on low-precision detection, medium-precision detection, and high-precision detection; Define the sewage treatment evaluation standard and dynamically adjust the sewage treatment parameters. The expression is: ΔX=k1·sign(P-T1)+k2·sign(P-T2); Among them, ΔX is the parameter adjustment amount, k1 is the adjustment coefficient used to adjust between low-precision detection and medium-precision detection, k2 is the adjustment coefficient used to adjust between medium-precision detection and high-precision detection, sign is the return compliance function, T1 is the dividing line between low-precision and medium-precision, and T2 is the dividing line between medium-precision and high-precision.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the sewage treatment effect detection method based on spectral analysis according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the sewage treatment effect detection method based on spectral analysis according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Cross-modal depth forgery detection method based on time-frequency domain visual artifact feature adaptive fusion
CN114898438A
Water quality COD (Chemical Oxygen Demand) detection method based on multi-source spectral feature fusion
CN117890312A
Water quality detection method and system adopting hyperspectral analysis
CN118150503A
Supervised nonlinear spectrum detection method, system, equipment and medium
CN118332252A
Feature extraction method for absorption spectrum peak overlapping pollutant detection
CN118585788A
Cited By
Ion concentration analysis method and system
CN119959163A
Biogas slurry multi-parameter water quality detection method based on UV-Vis-NIR feature fusion
CN121027006A
Method for rapidly measuring water quality of sewage based on spectrum method
CN121521783A