Environment-adaptive Raman spectrum rapid detection method and related equipment

By constructing a multi-scenario Raman spectral standard fingerprint library and environmental adaptive denoising processing, the problems of multi-component spectral peak overlap and environmental noise interference in transformer oil sample testing were solved, enabling rapid identification and accurate quantitative analysis of oil and gas components, and improving the consistency and stability of the test results.

CN121521838APending Publication Date: 2026-02-13ZHUMADIAN POWER SUPPLY ELECTRIC POWER OFHENAN
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202511760965.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Transformer oil sample testing suffers from overlapping spectral peaks of multiple components, environmental noise interference, and a lack of on-site testing equipment, making it difficult to quickly identify and accurately quantify oil and gas components. Existing methods cannot achieve standard library generalization and quantitative model accuracy in real-world scenarios involving multiple sites, batches, and instruments.

Method used

By acquiring Raman spectral signals of oil samples with scene labels, wavenumber and intensity calibration, background subtraction, and baseline correction are performed to construct a multi-scene Raman spectral standard fingerprint library. Combined with adaptive denoising processing based on environmental parameters, a spectral line unmixing algorithm is used for component identification and quantitative analysis, and the detection model is updated through a closed-loop self-learning mechanism.

Benefits of technology

It significantly improves the consistency and repeatability of test results across sites, instruments, and batches, effectively suppresses baseline drift and noise interference, improves the quantitative accuracy and detection stability of oil and gas components, and is suitable for long-term online adaptive operation in power fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121521838A_ABST
    Figure CN121521838A_ABST
Patent Text Reader

Abstract

The invention discloses an environment-adaptive transformer oil sample Raman spectrum detection method and related equipment, and relates to the field of optical sensing systems. The method comprises the following steps: collecting oil sample Raman spectrums and environmental parameters in multiple operation scenes, and constructing a multi-scene spectrum characteristic model and a standard fingerprint database; pre-processing and denoising parameters are adaptively set based on the environmental perception vector, and baseline correction and joint denoising are carried out on the original spectrum; scene discrimination is carried out by fusing the characteristics of peak position, peak height, peak width, integral area and the like, a scene-related component standard spectrum dictionary is generated, and the concentration and confidence of each target component are obtained by adopting constrained spectral line unmixing and quantitative calibration; and driving the fingerprint database and the model to update in combination with quality control indexes such as spectral shape relevancy and residual errors and a drift detection result. The system is composed of a Raman spectrum acquisition module, an environment monitoring module and a data processing module, and can improve the robustness and quantitative precision of Raman detection of transformer oil in a complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of optical sensing systems, and more specifically to an environment-adaptive rapid Raman spectroscopy detection method and related equipment. Background Technology

[0002] Transformer condition assessment often relies on the detection of dissolved gases (DGAs) and degradation products in oil. Traditional gas chromatography / mass spectrometry methods offer advantages in sensitivity and quantitative accuracy, but suffer from drawbacks such as complex sampling and pretreatment, long detection cycles, and unsuitability for continuous on-site monitoring and rapid response. Raman spectroscopy offers advantages such as in-situ operation, no consumables required, and rapid deployment, making it suitable for power plant site deployment. However, it still faces the following common technical bottlenecks in complex urban and substation environments:

[0003] Spectral instability caused by environmental disturbances: baseline drift, fluorescence background enhancement, and periodic stripe noise caused by temperature, humidity, mechanical vibration, and stray light reduce the signal-to-noise ratio and affect the reproducibility of peak position / shape.

[0004] Multi-component peak overlap and collinear interference: The characteristic peaks of various hydrocarbons and degradation products in oil samples have similar distributions. After the peak position drift and bandwidth changes are superimposed, traditional fixed parameter filtering / fitting is prone to over-smoothing or misallocation.

[0005] Single-scenario models and libraries are difficult to generalize: existing methods are mostly based on laboratory single-scenario data to build standard fingerprints or quantitative models, lacking scenario-based fingerprints and adaptive parameters across operating conditions (normal, overload, overheating, dampness, abnormal gas content, etc.), resulting in insufficient repeatability in the field.

[0006] Lack of closed-loop self-learning and version control: Existing systems generally lack a mechanism to write detection results back to the database and drive continuous optimization of the dictionary, denoising parameters and quantitative models, making it difficult to cope with distribution drift caused by seasonality / site differences and equipment aging. Summary of the Invention

[0007] The technical problem this invention aims to solve is the issues of overlapping multi-component spectral peaks, environmental noise interference, and lack of on-site testing equipment in transformer oil sample testing, which prevent rapid identification and accurate quantitative analysis of oil and gas components. The purpose is to provide an environmentally adaptive rapid Raman spectroscopy detection method and related equipment, which solves the problems of insufficient generalization of standard libraries and inaccurate quantitative models caused by domain shift and scarcity of weakly labeled data in real-world scenarios involving cross-site / cross-batch / cross-instrument applications.

[0008] This invention is achieved through the following technical solution:

[0009] An environmentally adaptive Raman spectroscopy rapid detection method is applied to the rapid on-site detection of dissolved gases and degradation products in transformer oil samples, including:

[0010] Transformer oil samples under different operating scenarios are acquired, and Raman spectral signals of the oil samples with scenario labels are collected. The scenario labels include at least one or more of the following: normal operating conditions, overload operating conditions, overheating operating conditions, moisture-induced operating conditions, and abnormal gas-containing operating conditions. The Raman spectral signals are subjected to wavenumber and intensity calibration, background subtraction, baseline and fluorescence correction, and normalization processing. According to the preset division rules, the spectral range covering the characteristic peaks of the target component is divided into multiple spectral bands of interest. Each spectral band of interest is parameterized by the center wavenumber, wavenumber width, and allowable wavenumber drift range.

[0011] For each spectral band of interest, spectral line features are extracted, and the spectral line features of each spectral band of interest are spliced ​​together to form a sample feature vector. Based on the cluster analysis of multi-scenario samples, a Raman spectral standard fingerprint library corresponding to the running scenario is constructed. The spectral line features include peak position, peak height, full width at half maximum (FWHM), integral area, and characteristic peak intensity ratio.

[0012] Environmental parameters corresponding to the current oil sample are collected. These environmental parameters are used to characterize temperature, light, vibration, electromagnetic interference and / or collection conditions. Preprocessing parameters are adaptively adjusted according to the environmental parameters to perform environmental adaptive denoising on the Raman spectrum of the current oil sample to obtain the denoised target spectrum. The preprocessing parameters include baseline correction, denoising and wavenumber drift correction.

[0013] The denoised target spectrum is converted into a fusion feature vector in each band of interest. The scene is determined based on the matching relationship between the fusion feature vector and the standard fingerprint database of each operating scene. A standard spectrum dictionary of scene-related components is constructed based on the standard fingerprint database corresponding to the determined scene. The target spectrum is unmixed based on a constrained spectral unmixing algorithm to obtain the type and quantitative concentration estimate of each target component in the oil sample. The quality control index is calculated, including fitting residual and characteristic peak ratio consistency.

[0014] When the quality control indicators meet the preset threshold, the corresponding environmental parameters, target spectrum, component type, concentration estimate and quality control indicators are written into the database. The drift of indicators such as spectral distribution and quantitative residual is monitored according to the preset time window. When the drift exceeds the threshold, the standard fingerprint database, scene discrimination model and quantitative calibration model are updated by selecting the samples that have passed the quality control. After performance verification, the data is sent to the on-site Raman detection device.

[0015] Furthermore, the multi-scenario oil sample Raman spectral feature modeling includes:

[0016] For the target components and their concentration ranges, training and validation sets containing different concentration gradients and multiple allocation ratios are constructed to ensure that the concentration distribution of each component covers the lower threshold, typical value, and upper safety value.

[0017] Temperature, humidity and vibration conditions are set by combining temperature control, humidification and / or vibration platform, scene labels are set for each condition, and repeated measurements of multiple batches of oil samples are completed under each scene label.

[0018] According to the preset set of spectral segments of interest, the Raman spectra of the oil sample after wavenumber and intensity calibration, baseline and fluorescence correction, denoising and smoothing, normalization and wavenumber drift fine adjustment are segmented. Within each spectral segment of interest, peak position, peak height, full width at half maximum (FWHM), integral area, and derived features such as intensity ratio and energy ratio composed of peak height and integral area are extracted using peak detection and multi-peak fitting methods to form a spectral segment feature vector.

[0019] The feature vectors of each spectral band of interest are concatenated in a fixed order to form a sample-level feature vector. Based on sparse subspace clustering, cluster analysis is performed on samples from multiple scenarios to obtain the central features and covariance matrix of each running scenario. The statistics of peak position, peak height, half width at half maximum, and integral area are calculated according to the component and concentration levels to construct a component-scenario two-dimensional standard fingerprint database and a corresponding set of similarity evaluation and discrimination thresholds.

[0020] Furthermore, the step of collecting environmental parameters and performing adaptive noise reduction includes:

[0021] The environmental parameters corresponding to the Raman spectroscopy acquisition of the oil sample are constructed into an environmental perception vector. The environmental perception vector includes at least temperature, humidity, vibration intensity, external stray light intensity, electromagnetic interference frequency band, integration time, and laser power, which are used to characterize the current acquisition environment and acquisition conditions.

[0022] Multiple raw Raman spectra of the same sample obtained under multiple exposure conditions are used to form a time series data stack. Combined with the environmental perception vector, noise types such as additive noise, low-frequency baseline and fluorescence background, narrow band stripe noise and single exposure impact noise are decomposed and modeled to estimate the proportion and characteristic frequency band of different noise components.

[0023] Based on standard oil sample data collected under multiple scenarios and multiple environments, environmental perception vectors and original spectra are recorded. Anchor peaks in the spectrum of interest are selected as references. Quality evaluation indicators, including at least peak position drift, peak shape deviation and noise energy, are defined. Based on the quality evaluation indicators, a denoising parameter optimization objective function is constructed with the goal of peak shape fidelity and noise energy suppression.

[0024] By optimizing the objective function of the denoising parameters, the mapping relationship between environmental parameters and denoising parameters is obtained, so as to form an environment-denoising parameter mapping function and / or lookup table configuration, which is used to adaptively set variational mode decomposition parameters, wavelet decomposition layer number, threshold coefficient and baseline correction parameters according to the current environmental perception vector during on-site detection.

[0025] Furthermore, the adaptive noise reduction for the environment also includes:

[0026] For multiple repeated spectra of the same sample, after removing outliers whose intensity is outside the preset upper and lower quantiles at each wavenumber point, the mean is calculated to obtain a robust fused spectrum that suppresses isolated impact points and outliers between exposures.

[0027] Based on robust fusion spectroscopy, baseline and fluorescence correction are performed. On the basis of the asymmetric least squares baseline algorithm, the baseline smoothing parameter and penalty parameter are finely adjusted according to the environment perception vector.

[0028] Variational mode decomposition is performed on the baseline-corrected spectrum, and the initial values ​​of the number of modes, penalty factor and center frequency are adaptively set according to the environmental perception vector. The modes are classified using statistical measures such as spectral flatness and kurtosis. Components identified as noise modes are suppressed, and modes containing Raman information and slowly varying backgrounds are reconstructed to generate the spectrum after frequency domain component stripping.

[0029] Discrete wavelet multiscale decomposition is performed on the spectrum after variational mode decomposition. The number of decomposition layers and threshold amplification are adaptively determined according to the signal length and the environmental perception vector. A soft thresholding strategy based on scale noise estimation is adopted, and a protection window is configured in the spectral band of interest to avoid weakening the true spectral peak.

[0030] For specific narrowband interference caused by electromagnetic interference or mechanical vibration, adaptive band-stop or notch filtering is implemented in the frequency domain based on the electromagnetic interference frequency band information in the environmental perception vector, and a trade-off strategy of weight reduction suppression and mode preservation is adopted in the region overlapping with the spectrum of interest.

[0031] The processed denoised spectrum is compared with the reference peak position, peak height, and full width at half maximum (FWHM) of the anchored peak. When the peak position drift, peak height deviation, and FWHM deviation of any anchored peak exceed the preset fidelity threshold, and / or the spectral shape correlation of the spectral segment of interest before and after denoising is lower than the preset threshold, parameter rollback or downgrade processing is triggered.

[0032] Furthermore, the step of determining the scene based on a multi-scene standard fingerprint database and constructing a scene-related component standard spectrum dictionary includes:

[0033] Based on the denoised and aligned Raman spectra of oil samples, features such as peak position, peak height, full width at half maximum (FWHM), integral area, peak ratio, energy ratio, and spectral shape correlation are extracted from each spectral segment of interest. The feature vectors of each spectral segment of interest are concatenated in a fixed order to form a sample feature vector. The different spectral segments are then normalized according to preset weights to obtain a fused feature vector.

[0034] The fused feature vector is input into the scene discrimination model established in step 1, and the scene confidence corresponding to each running scene is calculated to obtain the confidence vector of each scene. The sum of the components of the confidence vector is 1.

[0035] A scenario spectrum dictionary containing standardized reference spectra of target components is pre-established for each operating scenario. The reference spectra are generated based on the component standard fingerprint statistics under that scenario and normalized to the unit norm.

[0036] The scene spectral dictionaries are weighted and combined according to the scene confidence vector to obtain the scene weighted component standard spectral dictionary, so as to take into account the uncertainty of the scene discrimination result. The scene weighted component standard spectral dictionary is used as the standard spectral dictionary for subsequent spectral unmixing and quantitative analysis.

[0037] Furthermore, the method of unmixing the denoised Raman spectrum based on weighted nonnegative least squares and sparsity constraints to obtain estimates of the relative and absolute concentrations of each target component in the oil sample includes:

[0038] The denoised oil sample Raman spectrum is aligned with the scene weighted component standard spectrum dictionary according to the spectral segments of interest. A weighted error function considering the spectral segment weight and noise variance is constructed. The spectral unmixing is modeled as an optimization problem with the goal of minimizing the weighted fitting residual and the constraints of non-negativity and / or sparsity of the component concentration coefficients. The relative concentration coefficient vector of the target component is obtained by solving the problem.

[0039] In the candidate component generation stage, a comprehensive similarity index is constructed based on the peak position similarity, peak intensity similarity, and spectral shape correlation between the fused feature vector and the standard fingerprint database. The candidate component set is selected according to the comprehensive similarity threshold and / or the top K screening strategy. During spectral unmixing, only the candidate components are solved to reduce the interference of collinear components on the results.

[0040] Using an offline feature-to-relative-concentration mapping model and / or partial least squares regression model, the unmixed relative concentration coefficients are mapped to the relative and absolute concentration estimates of each target component. Component-level confidence and goodness of fit are calculated based on residual statistics, peak ratio consistency, and coverage of the spectral band of interest.

[0041] During the quantitative calibration stage, the absolute concentration estimate is corrected based on environmental parameters such as temperature and humidity, as well as systematic deviations caused by differences in oil sample properties. The results of multi-component qualitative and quantitative detection with confidence level indicators are then output.

[0042] Furthermore, the detection results are written into the database, and the standard fingerprint database, scene dictionary, and quantitative calibration model are updated based on drift detection and self-learning mechanisms, including:

[0043] When the quality control indicators meet the preset threshold, the environmental perception vector, original spectral path, summary information of the processed spectra at each stage, preprocessing parameter configuration, fusion feature vector, identified component type, relative and absolute concentration estimates, component confidence level, and quality label of the corresponding sample are written into the sample record table in the database.

[0044] According to the preset time window and / or rolling evaluation cycle, calculate the distribution distance index for the spectral distribution, environmental parameter distribution and quantitative residual distribution of the latest sample and historical sample in the spectrum of interest, including at least the distribution distance index based on information divergence or binning statistics, in order to identify input distribution drift and / or concept drift.

[0045] Based on the changes in peak position and half-width statistics of the new and old versions of standard fingerprints, as well as the changes in the weighted mean square error of quantitative residuals, fingerprint stability index and quantitative performance index are calculated. When any index exceeds the corresponding drift threshold, the candidate update process is triggered.

[0046] A training set is constructed from samples that meet the quality control conditions. The multi-scenario standard fingerprint library, scene discrimination model parameters, environment-denoising parameter mapping relationship, and feature-to-concentration quantitative calibration model are incrementally updated to generate a new version detection model and parameter configuration with version identification.

[0047] After the new version of the detection model passes the preset performance verification standard, it is sent to the on-site Raman detection device and the version number, update time and performance evaluation results are recorded in the database.

[0048] The drift threshold includes at least a first drift threshold based on spectral distribution distance and a second drift threshold based on the weighted mean square error of quantitative residuals. When the spectral distribution distance of the latest sample in the spectral band of interest exceeds the first drift threshold and / or the weighted mean square error of quantitative residuals exceeds the second drift threshold, incremental updates to the multi-scenario standard fingerprint database, the scene discrimination model, and the feature-to-concentration quantitative calibration model are triggered. The new version of the detection model is only sent to the on-site Raman detection device after it passes the preset performance verification standard.

[0049] This invention also provides an environment-adaptive Raman spectroscopy rapid detection system for implementing the environment-adaptive Raman spectroscopy rapid detection method described above, comprising:

[0050] The Raman spectroscopy acquisition module is used to perform Raman excitation and spectral acquisition on transformer oil samples at preset laser wavelengths and integration times to obtain the original Raman spectral sequence of the oil samples.

[0051] The environmental monitoring module is connected to the Raman spectroscopy acquisition module and is used to collect environmental parameters such as temperature, humidity, vibration intensity, external stray light intensity, electromagnetic interference frequency band, integration time and laser power of the detection environment, and output environmental perception vector.

[0052] An embedded data processing unit, electrically connected to the Raman spectroscopy acquisition module and the environmental monitoring module, is configured to have a built-in processor and memory, and is as follows:

[0053] A multi-scene spectral feature model and a standard fingerprint database were constructed from the original Raman spectral sequences of samples from multiple scenarios.

[0054] Based on the environmental perception vector, environmental adaptive denoising and baseline correction are performed on the original Raman spectrum sequence to obtain a target Raman spectrum with peak shape preservation and improved signal-to-noise ratio.

[0055] The target Raman spectrum is fused with the standard fingerprint database for feature fusion and similarity matching, and the identification results and relative concentration estimates of the target components in the oil sample are output.

[0056] The identification results and corresponding spectral features are written into the database according to the preset quality control rules, and the multi-scene spectral feature model, standard fingerprint library, environment-denoising parameter mapping relationship and quantitative calibration model are updated accordingly.

[0057] The embedded data processing unit works in conjunction with the Raman spectroscopy acquisition module and the environmental monitoring module to complete the acquisition of Raman spectra of transformer oil samples, environmental adaptive signal processing, and component identification under on-site deployment conditions, thereby achieving rapid Raman spectroscopy detection across different scenarios.

[0058] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the environmentally adaptive rapid Raman spectroscopy detection method as described above.

[0059] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the environmentally adaptive rapid Raman spectroscopy detection method as described above.

[0060] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0061] This invention collects Raman spectra of oil samples under various operating scenarios, including normal, overload, overheat, moisture, and abnormal gas content. By combining principal component analysis, subspace clustering, and the construction of a multi-scenario standard fingerprint library, it achieves statistical modeling of the position, shape, and intensity of characteristic peaks under different scenarios. Compared with existing technologies that only establish a standard library in a single laboratory scenario, this invention can significantly reduce the influence of domain shifts across sites, instruments, and batches, and improve the consistency and repeatability of on-site test results.

[0062] This invention establishes a mapping relationship between environmental variables such as temperature, humidity, vibration, stray light, and electromagnetic interference and noise characteristics. Based on this, it combines robust multi-exposure fusion, improved variational mode decomposition (VMD), wavelet multi-scale thresholding, and adaptive notch filtering—a dual-domain joint denoising algorithm—and utilizes quality indicators such as anchored peak drift and peak shape correlation to construct a backoff and degradation mechanism, enabling denoising parameters to adaptively adjust according to the environment. Compared with existing technologies using fixed filtering parameters or single denoising methods, this invention effectively suppresses baseline drift, periodic ripple, and random noise while ensuring peak shape and position fidelity, significantly improving the signal-to-noise ratio and detection stability of the main spectral bands of interest.

[0063] This invention, based on denoising and alignment, integrates multi-dimensional features such as peak position, peak height, full width at half maximum (FWHM), integral area, and key peak intensity ratio to construct a scene-adaptive component standard dictionary. It then employs a weighted non-negative sparse unmixing and multi-component matrix effect correction method to achieve relative and absolute concentration estimation. Simultaneously, it combines indicators such as peak ratio consistency, spectral shape correlation, and residual increment for candidate component screening and confidence assessment. Compared to existing methods that rely solely on single peak intensity or simple regression models for quantification, this invention can effectively distinguish target components from interfering components in multi-component, strongly collinear spectral bands, reducing the probability of false positives and false negatives, and improving the quantitative accuracy of gases and degradation products in oil.

[0064] This invention designs quality criteria such as signal-to-noise ratio, peak position stability, peak height variation coefficient, and spectral shape correlation for the entire process of spectral acquisition, denoising, identification, and modeling. It also establishes a unified data structure and version management mechanism for sample metadata, standard library parameters, denoising parameter mapping functions, and detection results, enabling the system to update models, recalibrate thresholds, and trace abnormal batches based on new data during long-term operation. Compared to traditional detection systems lacking closed-loop self-learning and version management, this invention is more suitable for deployment in power field applications, enabling long-term online, adaptive, and traceable Raman testing of transformer oil samples. Attached Figure Description

[0065] To more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort. In the drawings:

[0066] Figure 1 This is a flowchart of the environmentally adaptive Raman spectroscopy rapid detection method in Example 1. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the embodiments and accompanying drawings. The illustrative embodiments and descriptions of the present invention are only used to explain the present invention and are not intended to limit the present invention.

[0068] Example 1

[0069] An environmentally adaptive Raman spectroscopy rapid detection method is applied to the rapid on-site detection of dissolved gases and degradation products in transformer oil samples, such as... Figure 1 As shown, it includes:

[0070] Transformer oil samples under different operating scenarios are acquired, and Raman spectral signals of the oil samples with scenario labels are collected. The scenario labels include at least one or more of the following: normal operating conditions, overload operating conditions, overheating operating conditions, moisture-induced operating conditions, and abnormal gas-containing operating conditions. The Raman spectral signals are subjected to wavenumber and intensity calibration, background subtraction, baseline and fluorescence correction, and normalization processing. According to the preset division rules, the spectral range covering the characteristic peaks of the target component is divided into multiple spectral bands of interest (in specific implementation, it can be divided according to the characteristic peak intervals of 100-200 cm⁻¹, 500-600 cm⁻¹, etc.). Each spectral band of interest is parameterized by the center wavenumber, wavenumber width, and allowable wavenumber drift range.

[0071] For each spectral band of interest, spectral line features are extracted, and the spectral line features of each spectral band of interest are spliced ​​together to form a sample feature vector. Based on the cluster analysis of multi-scenario samples, a Raman spectral standard fingerprint library corresponding to the running scenario is constructed. The spectral line features include peak position, peak height, full width at half maximum (FWHM), integral area, and characteristic peak intensity ratio.

[0072] Environmental parameters corresponding to the current oil sample are collected. These environmental parameters are used to characterize temperature, light, vibration, electromagnetic interference and / or collection conditions. Preprocessing parameters are adaptively adjusted according to the environmental parameters to perform environmental adaptive denoising on the Raman spectrum of the current oil sample to obtain the denoised target spectrum. The preprocessing parameters include baseline correction, denoising and wavenumber drift correction.

[0073] The denoised target spectrum is converted into a fusion feature vector in each band of interest. The scene is determined based on the matching relationship between the fusion feature vector and the standard fingerprint database of each operating scene. A standard spectrum dictionary of scene-related components is constructed based on the standard fingerprint database corresponding to the determined scene. The target spectrum is unmixed based on a constrained spectral unmixing algorithm to obtain the type and quantitative concentration estimate of each target component in the oil sample. The quality control index is calculated, including fitting residual and characteristic peak ratio consistency.

[0074] When the quality control indicators meet the preset threshold, the corresponding environmental parameters, target spectrum, component type, concentration estimate and quality control indicators are written into the database. The drift of indicators such as spectral distribution and quantitative residual is monitored according to the preset time window. When the drift exceeds the threshold, the standard fingerprint database, scene discrimination model and quantitative calibration model are updated by selecting the samples that have passed the quality control. After performance verification, the data is sent to the on-site Raman detection device.

[0075] In this embodiment, the weighted residual based on the full spectrum or the spectrum of interest is preferably used as the fitting residual index. The fitting residual is controlled within 5% of the total energy, and the deviation of the peak height ratio or integral area ratio of the key peak relative to the standard fingerprint database is controlled within 10% as the threshold value for feature peak ratio consistency. Only when the above quality control indexes simultaneously meet the corresponding threshold values ​​is it determined to be "passed quality control" and used for subsequent model updates and incremental learning of the standard fingerprint database.

[0076] The multi-scenario oil sample Raman spectral feature modeling includes:

[0077] For the target components and their concentration ranges, training and validation sets containing different concentration gradients and multiple allocation ratios are constructed to ensure that the concentration distribution of each component covers the lower threshold, typical value, and upper safety value.

[0078] Temperature, humidity and vibration conditions are set by combining temperature control, humidification and / or vibration platform, scene labels are set for each condition, and repeated measurements of multiple batches of oil samples are completed under each scene label.

[0079] According to the preset set of spectral segments of interest, the Raman spectra of the oil sample after wavenumber and intensity calibration, baseline and fluorescence correction, denoising and smoothing, normalization and wavenumber drift fine adjustment are segmented. Within each spectral segment of interest, peak position, peak height, full width at half maximum (FWHM), integral area, and derived features such as intensity ratio and energy ratio composed of peak height and integral area are extracted using peak detection and multi-peak fitting methods to form a spectral segment feature vector.

[0080] The feature vectors of each spectral band of interest are concatenated in a fixed order to form a sample-level feature vector. Based on sparse subspace clustering, cluster analysis is performed on samples from multiple scenarios to obtain the central features and covariance matrix of each running scenario. The statistics of peak position, peak height, half width at half maximum, and integral area are calculated according to the component and concentration levels to construct a component-scenario two-dimensional standard fingerprint database and a corresponding set of similarity evaluation and discrimination thresholds.

[0081] Sample collection includes:

[0082] a) Select standard oil samples of the target components and construct training and validation sets stratified by concentration. Each component should have at least five concentration gradients, covering the lower threshold, typical value, and upper safety value. Multiple allocation ratios should employ an orthogonal or Latin hypercube strategy to ensure comprehensive coverage of the combinatorial space and avoid severe collinearity.

[0083] b) Simulate typical combinations of temperature, humidity, and vibration conditions using a temperature control station, humidification system, and vibration platform to create scenario labels. Each label must undergo at least three independent batch retests.

[0084] c) Establish a sample metadata table: number, component name, nominal concentration, formulation scheme, preparation time, batch number, scene label, and environmental parameter range. Record the reason for rejection when data is unqualified.

[0085] The spectral preprocessing workflow includes:

[0086] a) An asymmetric least squares baseline algorithm is used for background and fluorescence subtraction, with a smoothing parameter s set to 10. 5 Up to 10 7 The penalty parameter p is set to 0.001 to 0.01. Cubic spline correction with endpoint constraints is applied to the remaining baseline residuals to ensure peak shape fidelity.

[0087] b) Savitzky-Golay smoothing is used, with a window length of 7 to 21 points and a fitting order of 2 or 3; the window is adaptively selected based on the signal-to-noise ratio. Weak frequency domain ripples can be denoised using wavelet soft thresholding, with the threshold determined by the median absolute deviation of the noise estimate.

[0088] c) Use peak area normalization or vector normalization to ensure comparability across batches. If there are overall scaling and slope variations caused by changes in scattering intensity with particle size, use multiple scattering correction (MSC) or standard normal transformation (SNV).

[0089] d) Perform micro-drift alignment using stable anchoring peaks in the oil sample, employing dynamic time warping or quadratic polynomial alignment, with a maximum allowable drift of no more than 3 cm⁻¹.

[0090] The spectral bands of interest include:

[0091] A set of Regions of Interest (ROIs) is established based on component fingerprint information. Each ROI is parameterized by its center wavenumber, width, and allowable drift interval. For each ROI, the background residual, noise variance, and upper limit of the number of peak candidates are recorded as constraints for subsequent unpacking and fitting.

[0092] Then, peak detection and parameter fitting are performed, including...

[0093] a) Peak position detection based on joint second-derivative zero-crossing and continuous wavelet transform; candidate peaks require first-derivative sign switching and peak height exceeding the noise standard deviation. times. The default value is 5.

[0094] b) The peak shape can be Voigt type or pseudo-Voigt type, and the parameters include peak position. Peak height Half height and width Shape factor We use least squares with nonnegativity and sparse regularization to solve the problem. The regularization coefficients are based on minimizing the error on the validation set to prevent overfitting and duplicate peaks.

[0095] c) Feature extraction

[0096] Basic characteristics: Peak position Peak height Half height and width Integral area .

[0097] Derived characteristic: Key peak intensity ratio Energy ratio Component bandwidth ratio Spectral correlation .

[0098] The output is the feature vector of each spectral band. .

[0099] For spectral segments with significant overlap, constrained multimodal decomposition is combined with nonnegative matrix factorization (NMF) for fitting. The NMF constraint ensures nonnegative component loadings and minimizes residual L2.

[0100] A peak position prior window and upper and lower limits for peak width are introduced to prevent drifting beyond the limits.

[0101] In repeated measurements, the peak position standard deviation must be less than 1.5 cm⁻¹, and the peak height coefficient of variation must be less than 10%. Peaks that do not meet these requirements are marked as unstable and removed from or downweighted from the quantitative feature set. The anchoring peak is preferably a spectral line whose peak position and peak shape are stable under repeated measurements in multiple scenarios and batches, such as a characteristic peak from the benzene ring skeleton vibration in transformer oil. In addition to meeting the requirements of a peak position standard deviation of less than 1.5 cm⁻¹ and a peak height coefficient of variation of less than 10%, the spectral line used as the anchoring peak is further required to preferably have a peak height coefficient of variation of less than 3% to ensure its long-term usability for wavenumber micro-drift alignment and noise reduction quality evaluation.

[0102] Scene discrimination includes:

[0103] a) Concatenate the feature vectors of the ROI in a fixed order to form sample-level feature vectors. d is the total feature dimension.

[0104] b) Use Sparse Subspace Clustering (SSC) or Spectral Clustering to naturally cluster samples according to scene. The similarity matrix is ​​constructed using feature cosine similarity or Mahalanobis distance. Output the center features for each scene. With covariance This is used for subsequent scene adaptation and threshold setting.

[0105] c) Align the clustering results with the experimental scenario labels. If the purity is below the threshold... Then refine the clustering or remove abnormal batches. The default value is 0.85.

[0106] Obtain the component standard feature vectors and similarity indices, including:

[0107] a) For each target component and concentration level, calculate robust statistics in each scenario: peak mean. Average peak height Half-width and height mean Mean of integral area , and its standard deviation.

[0108] Constructing a component-scenario two-dimensional standard fingerprint library .

[0109] b) Similarity measurement

[0110] Peak similarity

[0111] Peak intensity similarity

[0112] Spectral Correlation

[0113] Overall similarity The weights satisfy .

[0114] The identification threshold T0 is determined on the validation set through ROC analysis, and an initial value of 0.8 to 0.9 is recommended.

[0115] Pre-modeling of multi-component relative concentration mapping includes:

[0116] a) For multi-component data, a partial least squares regression (PLSR) or a linear model with L1 regularization is used to establish a mapping function from features to relative concentrations. To suppress collinearity and overfitting, the number of principal components is selected through cross-validation, preferably controlled to explain approximately 90% of the total variance.

[0117] b) Employ scenario-based batch cross-validation and report the prediction mean square error and relative bias for each group. If the error is significantly higher in a certain scenario, increase the sample size for that scenario or adjust the ROI selection.

[0118] In this embodiment, the step of collecting environmental parameters and performing adaptive noise reduction includes:

[0119] An environmental sensing vector is constructed from the environmental parameters corresponding to the Raman spectroscopy acquisition of the oil sample. This vector includes at least temperature, humidity, vibration intensity, stray light intensity, electromagnetic interference band, integration time, and laser power, characterizing the current acquisition environment and conditions. Preferably, the temperature sensor in the environmental monitoring module has a detection range of −30℃ to 70℃ to cover both extremely cold and high-temperature outdoor operating conditions. The vibration sensor has a monitoring frequency range of 5Hz to 100Hz, and the vibration intensity can be characterized by the root mean square value of acceleration or velocity within this band. For stray light and electromagnetic interference, the stray light intensity and electromagnetic interference band energy are obtained by integrating within a preset wavelength or frequency band using a photodetector and an electromagnetic interference probe, respectively, and used as input quantities in the environmental sensing vector.

[0120] Multiple raw Raman spectra of the same sample obtained under multiple exposure conditions are used to form a time series data stack. Combined with the environmental perception vector, noise types such as additive noise, low-frequency baseline and fluorescence background, narrow band stripe noise and single exposure impact noise are decomposed and modeled to estimate the proportion and characteristic frequency band of different noise components.

[0121] Based on standard oil sample data collected under multiple scenarios and multiple environments, environmental perception vectors and original spectra are recorded. Anchor peaks in the spectrum of interest are selected as references. Quality evaluation indicators, including at least peak position drift, peak shape deviation and noise energy, are defined. Based on the quality evaluation indicators, a denoising parameter optimization objective function is constructed with the goal of peak shape fidelity and noise energy suppression.

[0122] By optimizing the objective function of the denoising parameters, the mapping relationship between environmental parameters and denoising parameters is obtained, so as to form an environment-denoising parameter mapping function and / or lookup table configuration, which is used to adaptively set variational mode decomposition parameters, wavelet decomposition layer number, threshold coefficient and baseline correction parameters according to the current environmental perception vector during on-site detection.

[0123] The environmental perception vector is represented as follows:

[0124]

[0125] Among them, temperature T, humidity H, and vibration intensity external stray light intensity Electromagnetic interference frequency band Integral Time Laser power .

[0126] A time-series stack is formed from the cumulative spectra collected each time ("average number of times 3-10 times" in this embodiment), and combined with the environmental perception vector. Estimate the proportion and characteristic frequency band of various noise types for subsequent parameter adaptation.

[0127] When organizing training and calibration data, the following should be included:

[0128] Determine the offline calibration set: Collect standard oil samples under various scenarios and environments, and record... Compared with the original spectrum;

[0129] Obtaining labels and metrics: Manually / semi-automatically label and anchor peaks within the ROI, and record peak positions. Peak height Half height and width Reference values; corresponding to the definition of three types of indicators:

[0130] 1. Peak position drift ;

[0131] 2. Peak shape deviation (I,w);

[0132] 3. Noise Energy .

[0133] Objective function: Minimize

[0134]

[0135] in For the denoising parameter set, Set the weights (for the validation set).

[0136] For the same sample Repeating spectra ( The median-mean fusion method is used for segmented data.

[0137] Perform a truncated average at each wavenumber point: remove outliers at each of the upper and lower q quantiles (q is a preset quantile threshold), and then calculate the average.

[0138] The weights of a single exposure that detects the impact point are reset to zero.

[0139] Obtaining a robust fusion spectrum .

[0140] Suppress isolated pulses and exposure outliers without introducing excessive smoothing.

[0141] Based on the previous step, make the penalty parameter and the smoothing parameter follow... Fine-tuning is represented as:

[0142]

[0143] in, For monotone bounded calibration functions (such as piecewise linear / logic functions), the minimum value on the verification set is used. Fitting.

[0144] When temperature / laser power causes fluorescence enhancement, a baseline penalty is automatically added to avoid peak swallowing.

[0145] In this embodiment, the adaptive noise reduction for the environment further includes:

[0146] For multiple repeated spectra of the same sample, after removing outliers whose intensity is outside the preset upper and lower quantiles at each wavenumber point, the mean is calculated to obtain a robust fused spectrum that suppresses isolated impact points and outliers between exposures.

[0147] Based on robust fusion spectroscopy, baseline and fluorescence correction are performed. On the basis of the asymmetric least squares baseline algorithm, the baseline smoothing parameter and penalty parameter are finely adjusted according to the environment perception vector.

[0148] Variational mode decomposition is performed on the baseline-corrected spectrum, and the initial values ​​of the number of modes, penalty factor and center frequency are adaptively set according to the environmental perception vector. The modes are classified using statistical measures such as spectral flatness and kurtosis. Components identified as noise modes are suppressed, and modes containing Raman information and slowly varying backgrounds are reconstructed to generate the spectrum after frequency domain component stripping.

[0149] Discrete wavelet multiscale decomposition is performed on the spectrum after variational mode decomposition. The number of decomposition layers and threshold amplification are adaptively determined according to the signal length and the environmental perception vector. A soft thresholding strategy based on scale noise estimation is adopted, and a protection window is configured in the spectral band of interest to avoid weakening the true spectral peak.

[0150] For specific narrowband interference caused by electromagnetic interference or mechanical vibration, adaptive band-stop or notch filtering is implemented in the frequency domain based on the electromagnetic interference frequency band information in the environmental perception vector, and a trade-off strategy of weight reduction suppression and mode preservation is adopted in the region overlapping with the spectrum of interest.

[0151] The processed denoised spectrum is compared with the reference peak position, peak height, and full width at half maximum (FWHM) of the anchored peak. When the peak position drift, peak height deviation, and FWHM deviation of any anchored peak exceed the preset fidelity threshold, and / or the spectral shape correlation of the spectral segment of interest before and after denoising is lower than the preset threshold, parameter rollback or downgrade processing is triggered.

[0152] Among them, the fusion spectrum VMD is performed with parameters that adapt to the environment:

[0153] For the number of modes :

[0154]

[0155] in For normalized environmental quantities; coefficients K is obtained during offline calibration and is limited to a preset range.

[0156] For penalty factors Increased performance in high vibration / strong EMI scenarios To improve the limiting properties of the component;

[0157] For center frequency initialization: based on the power spectral peak value of the timing stack and... By placing points in the frequency domain, we can ensure that the stripes / ripples have independent modes.

[0158] Mode selection and reconstruction: Noise modes are identified using spectral flatness (SF) and kurtosis; modes identified as noise are band-stopped / suppressed, while other modes (including Raman information and slowly varying background) are preserved; the reconstructed modes are obtained. .

[0159] Noise energy estimation (for) ):

[0160]

[0161] Instead of simply smoothing out narrow band stripes / mechanical ripples / EMI, the process involves structurally stripping them away.

[0162] right Perform discrete wavelet decomposition (the mother wavelet is preferably selected using the db system / homotopy verification method), and determine the number of layers. Follow Adaptive.

[0163] Noise estimation: MAD estimation of detail coefficients at various scales ;

[0164] The threshold is then expressed as:

[0165]

[0166] in The stronger the vibration / stray light, the greater the environmental emission. The larger ( The sample length;

[0167] The threshold strategy is as follows: prioritize soft thresholds, combined with ROI protection (lowering the threshold within the ROI window and shrinking the upper bound of the limiting coefficient).

[0168] Reconstructed denoised spectrum .

[0169] While eliminating random high-frequency noise, ROI protection is used to avoid weakening the true peak and shoulder structure.

[0170] Targeting the clear For mechanical intrinsic frequencies, adaptive notch filtering needs to be applied to a specified bandwidth in the frequency domain (the bandwidth is determined by the validation set or online estimation); at the same time, intrusion into the ROI center frequency band should be avoided (a compromise strategy of "weighted suppression + mode preservation" should be adopted for the ROI overlap area).

[0171] Joint optimization and parameter search consist of two stages, in which,

[0172] Offline phase: To achieve the objective, a hierarchical grid / Bayesian optimization method is employed on representative data. Learning Mapping ;

[0173] Online phase: using the quality indicators (SNR, ...) of the latest batch of samples The ROI correlation is finely adjusted (e.g., RLS / step-limited online gradient) and protected by a backoff mechanism.

[0174] The consistency constraints for the objective function are as follows:

[0175] Anchoring peak constraint: For stable anchoring peaks ,Require:

[0176]

[0177] If the boundary is exceeded, it will revert to the previous set. Or reduce the noise reduction intensity;

[0178] ROI Consistency: Spectral Correlation within ROI before and after denoising It must be no less than the threshold. .

[0179] Explicitly incorporate "peak shape fidelity" into quality control to avoid overfit-based noise reduction.

[0180] The rollback mechanism includes:

[0181] Parameter caching: for recent Establish an LRU cache to reuse the best historical data. ;

[0182] Fine-tuning step size: The magnitude of each update is limited to a preset range to prevent oscillations;

[0183] Rollback strategy: If any quality threshold (SNR, ...) is not met. , Immediately revert to the last qualified parameters and mark this time as "requires manual review" or "automatic downgrade mode";

[0184] Degradation mode: Skip notch filtering / reduce VMD mode number, only perform conservative wavelet thresholding and baseline fine-tuning to ensure real-time performance and availability.

[0185] In this embodiment, the step of scene discrimination based on a multi-scene standard fingerprint database and constructing a scene-related component standard spectrum dictionary includes:

[0186] Based on the denoised and aligned Raman spectra of oil samples, features such as peak position, peak height, full width at half maximum (FWHM), integral area, peak ratio, energy ratio, and spectral shape correlation are extracted from each spectral segment of interest. The feature vectors of each spectral segment of interest are concatenated in a fixed order to form a sample feature vector. The different spectral segments are then normalized according to preset weights to obtain a fused feature vector.

[0187] The fused feature vector is input into the scene discrimination model established in step 1, and the scene confidence corresponding to each running scene is calculated to obtain the confidence vector of each scene. The sum of the components of the confidence vector is 1.

[0188] A scenario spectrum dictionary containing standardized reference spectra of target components is pre-established for each operating scenario. The reference spectra are generated based on the component standard fingerprint statistics under that scenario and normalized to the unit norm.

[0189] The scene spectral dictionaries are weighted and combined according to the scene confidence vector to obtain the scene weighted component standard spectral dictionary, so as to take into account the uncertainty of the scene discrimination result. The scene weighted component standard spectral dictionary is used as the standard spectral dictionary for subsequent spectral unmixing and quantitative analysis.

[0190] In the denoising spectrum Based on this, combined with the standard fingerprint database Based on scene subspace parameters, complete multi-component identification and concentration (relative / absolute) estimation, and provide confidence and quality reports.

[0191] In this step, enter:

[0192] Denoising and Aligned Spectrum (Includes ROI segmentation and anchoring peak alignment information);

[0193] ROI list and weights for each segment (Source step 1);

[0194] Multi-scenario standard fingerprint database (Component-Scene-Concentration Hierarchical Statistics);

[0195] Scene clustering center ( ) and scene tags or confidence levels;

[0196] Environment-Parameter Mapping With quality control thresholds (preferred thresholds for quality control are fit residual <5% and peak ratio consistency error <10%).

[0197] Output:

[0198] The identified set of components and its relative concentration vector With absolute concentration ;

[0199] Component-level overall confidence level Spectral fit goodness and residual statistics;

[0200] Anomaly / conflict markers and manual review prompts;

[0201] Write the database entry for "Sample-Scene-Recognition Result".

[0202] Specifically, it includes:

[0203] Scene selection: Using a scene discriminator to analyze sample features Obtain the scene confidence vector , .

[0204] Scene spectrum dictionary: for each scene Pre-stored component standard spectrum dictionary Each column is in the scene The standard reference spectrum below (including the small peak fine-tuning template).

[0205] The weighted composite dictionary (to avoid scene misjudgment) is represented as:

[0206]

[0207] The column vectors are normalized to their unit norm to ensure numerical stability.

[0208] For each Extract the feature vector defined in step 1 The sample features are obtained by concatenating the ROIs in a fixed order and performing block diagonal standardization. .

[0209] Obtain a similarity metric to the standard library (used in candidate generation), including:

[0210] Peak similarity

[0211] Peak intensity similarity

[0212] Spectral Correlation

[0213] Overall similarity:

[0214]

[0215] Weights ( (This is set by the validation set.)

[0216] The generation of the candidate component set includes:

[0217] Coarse sieving: for all components calculate ,reserve Or take the top score One (e.g.) ).

[0218] Peak ratio consistency check: for key peak intensity ratio With the standard library In comparison, if If a component appears in multiple ROIs, it should be downweighted or removed.

[0219] Obtain candidate set .

[0220] Relative concentration estimation includes:

[0221] The identification is modeled as non-negative sparse unmixing, considering ROI weights and peak shape fidelity constraints:

[0222]

[0223] in A dictionary of candidate components; The ROI segmentation and noise variance weighting matrix: high-reliability ROIs and low-noise regions have larger weights; Controlling sparsity Controlling component-level stability; Prior weights (such as historical frequency, prior operating conditions, etc.).

[0224] The solver prioritizes weighted nonnegative least squares (W-NNLS) with coordinate descent, and introduces nonnegative LASSO when necessary to stabilize collinear cases.

[0225] In this embodiment, the spectral unmixing of the denoised Raman spectrum based on weighted nonnegative least squares and sparsity constraints to obtain the relative and absolute concentration estimates of each target component in the oil sample includes:

[0226] The denoised oil sample Raman spectrum is aligned with the scene weighted component standard spectrum dictionary according to the spectral segments of interest. A weighted error function considering the spectral segment weight and noise variance is constructed. The spectral unmixing is modeled as an optimization problem with the goal of minimizing the weighted fitting residual and the constraints of non-negativity and / or sparsity of the component concentration coefficients. The relative concentration coefficient vector of the target component is obtained by solving the problem.

[0227] In the candidate component generation stage, a comprehensive similarity index is constructed based on the peak position similarity, peak intensity similarity, and spectral shape correlation between the fused feature vector and the standard fingerprint database. The candidate component set is selected according to the comprehensive similarity threshold and / or the top K screening strategy. During spectral unmixing, only the candidate components are solved to reduce the interference of collinear components on the results.

[0228] Using an offline feature-to-relative-concentration mapping model and / or partial least squares regression model, the unmixed relative concentration coefficients are mapped to the relative and absolute concentration estimates of each target component. Component-level confidence and goodness of fit are calculated based on residual statistics, peak ratio consistency, and coverage of the spectral band of interest.

[0229] During the quantitative calibration stage, the absolute concentration estimate is corrected based on environmental parameters such as temperature and humidity, as well as systematic deviations caused by differences in oil sample properties. The results of multi-component qualitative and quantitative detection with confidence level indicators are then output.

[0230] Definition of relative concentration:

[0231]

[0232] And perform minimum support threshold pruning on low confidence / high residual components (e.g.) and (Each term is removed at the time), and then the solution is resubstituted and solved once to eliminate weak interference.

[0233] Absolute concentration calibration includes:

[0234] 1) Single-component calibration model:

[0235] Linear:

[0236] Or segmented / secondary:

[0237] 2) Correction for multi-component matrix effects:

[0238] Partial least squares regression (PLSR) or non-negative multiple response regression can be used. , Features included in the fusion (such as ratios, areas, and correlations);

[0239] Different scenarios in offline calibration storage Online Model blending: .

[0240] 3) Environmental fine-tuning coefficient: For significant temperature / humidity ranges, an additional multiplicative correction is applied. .

[0241] Consistency checks include:

[0242] For each component Calculate the following quantities and combine them into component confidence levels. :

[0243] Fitting residuals: Component marginal contribution (removal) (Residual increment of resolution);

[0244] Similarity: (3.3);

[0245] Peak ratio consistency: The weighted sum;

[0246] ROI Coverage: The percentage of ROI effectively explained by this component. Fusion Rating:

[0247]

[0248] ( For normalized quantities, ).

[0249] Judgment Rules: If and And ROI coverage If the result is positive, it is considered "detected"; otherwise, it is marked as "low confidence" or "not detected".

[0250] When multiple candidate components are strongly collinear in the principal ROI:

[0251] A grouping penalty is adopted (spectral lines of the same family are grouped together) and the information criterion (AICc / BIC) is used to select the solution with the minimum complexity;

[0252] If the criteria for the two solutions differ (e.g., AIC), the solution with a higher prior probability and higher historical frequency should be preferred.

[0253] If necessary, trigger "secondary discrimination ROI" (supplementary lateral / shoulder ROI) to perform another analysis to distinguish them.

[0254] Rollback strategies include:

[0255] Goodness of fit: Full spectrum Weighted RMSE ;

[0256] Anchored Peak Fidelity: , ;

[0257] Consistency failure handling: If any critical threshold is not met, the execution order is as follows:

[0258] 1. Reduce dictionary size (remove low-confidence components) and resolve;

[0259] 2. Relax sparsity and resolve;

[0260] 3. Trigger "downgrade noise reduction" and revert to the last qualified parameters for re-identification;

[0261] 4. If it still fails, mark it as "requires manual review".

[0262] In this embodiment, the detection results are written into a database, and the standard fingerprint database, scene dictionary, and quantitative calibration model are updated based on drift detection and self-learning mechanisms, including:

[0263] When the quality control indicators meet the preset threshold, the environmental perception vector, original spectral path, summary information of the processed spectra at each stage, preprocessing parameter configuration, fusion feature vector, identified component type, relative and absolute concentration estimates, component confidence level, and quality label of the corresponding sample are written into the sample record table in the database. When the vibration intensity or electromagnetic interference frequency band energy in the environmental perception vector exceeds the preset threshold, the number of discrete wavelet decomposition layers is increased from the basic 2 layers to 3-5 layers, and the threshold amplification is increased to enhance the suppression of mechanical ripple and narrowband noise. When the vibration intensity is lower than the threshold, the number of layers and the threshold amplification are reduced to avoid excessive suppression of the true spectral peaks.

[0264] According to the preset time window and / or rolling evaluation cycle, calculate the distribution distance index for the spectral distribution, environmental parameter distribution and quantitative residual distribution of the latest sample and historical sample in the spectrum of interest, including at least the distribution distance index based on information divergence or binning statistics, in order to identify input distribution drift and / or concept drift.

[0265] Based on the changes in peak position and full width at half maximum (FWHM) statistics and the changes in the weighted mean square error of quantitative residuals between the old and new versions of standard fingerprints, fingerprint stability and quantitative performance indicators are calculated. When any indicator exceeds the corresponding drift threshold, the candidate update process is triggered. The drift threshold includes at least a first drift threshold based on spectral distribution distance and a second drift threshold based on the weighted mean square error of quantitative residuals. When the spectral distribution distance of the latest sample in the spectral band of interest exceeds the first drift threshold and / or the weighted mean square error of quantitative residuals exceeds the second drift threshold, incremental updates to the multi-scenario standard fingerprint database, the scene discrimination model, and the feature-to-concentration quantitative calibration model are triggered. The new version of the detection model is only distributed to the on-site Raman detection device after it passes the preset performance verification standard.

[0266] A training set is constructed from samples that meet the quality control conditions. The multi-scenario standard fingerprint library, scene discrimination model parameters, environment-denoising parameter mapping relationship, and feature-to-concentration quantitative calibration model are incrementally updated to generate a new version detection model and parameter configuration with version identification.

[0267] After the new version of the detection model passes the preset performance verification standard, it is sent to the on-site Raman detection device and the version number, update time and performance evaluation results are recorded in the database.

[0268] Example 3

[0269] An environment-adaptive Raman spectroscopy rapid detection system is provided to implement the environment-adaptive Raman spectroscopy rapid detection method as described in Example 1, comprising:

[0270] The Raman spectroscopy acquisition module is used to perform Raman excitation and spectral acquisition on transformer oil samples at preset laser wavelengths and integration times to obtain the original Raman spectral sequence of the oil samples.

[0271] The environmental monitoring module is connected to the Raman spectroscopy acquisition module and is used to collect environmental parameters such as temperature, humidity, vibration intensity, external stray light intensity, electromagnetic interference frequency band, integration time and laser power of the detection environment, and output environmental perception vector.

[0272] An embedded data processing unit, electrically connected to the Raman spectroscopy acquisition module and the environmental monitoring module, is configured to have a built-in processor and memory, and is as follows:

[0273] A multi-scene spectral feature model and a standard fingerprint database were constructed from the original Raman spectral sequences of samples from multiple scenarios.

[0274] Based on the environmental perception vector, environmental adaptive denoising and baseline correction are performed on the original Raman spectrum sequence to obtain a target Raman spectrum with peak shape preservation and improved signal-to-noise ratio.

[0275] The target Raman spectrum is fused with the standard fingerprint database for feature fusion and similarity matching, and the identification results and relative concentration estimates of the target components in the oil sample are output.

[0276] The identification results and corresponding spectral features are written into the database according to the preset quality control rules, and the multi-scene spectral feature model, standard fingerprint library, environment-denoising parameter mapping relationship and quantitative calibration model are updated accordingly.

[0277] The embedded data processing unit works in conjunction with the Raman spectroscopy acquisition module and the environmental monitoring module to complete the acquisition of Raman spectra of transformer oil samples, environmental adaptive signal processing, and component identification under on-site deployment conditions, thereby achieving rapid Raman spectroscopy detection across different scenarios. The embedded data processing unit adopts an industrial-grade embedded computing platform with a central processing unit of at least four cores and is equipped with no less than 8GB of memory to support real-time completion of spectral preprocessing, spectral line demixing, quality control, and incremental updates of the detection model under multiple scenario conditions.

[0278] Example 3

[0279] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the environment-adaptive rapid Raman spectroscopy detection method as described in Example 1.

[0280] Example 4

[0281] A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the environment-adaptive rapid Raman spectroscopy detection method as described in Example 1.

[0282] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0283] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0284] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0285] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0286] Those skilled in the art will understand that all or part of the steps in the above facts and methods can be implemented by a program instructing related hardware. The program or the program described therein can be stored in a computer-readable storage medium. When the program is executed, it includes the following steps: at this time, the corresponding method steps are introduced. The storage medium can be ROM / RAM, magnetic disk, optical disk, etc.

[0287] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An environment-adaptive rapid Raman spectroscopy detection method, characterized in that, It is applied to the rapid on-site detection of dissolved gases and degradation products in transformer oil samples, including: Transformer oil samples under different operating scenarios are acquired, and Raman spectral signals of the oil samples with scenario labels are collected. The scenario labels include at least one or more of the following: normal operating conditions, overload operating conditions, overheating operating conditions, moisture-induced operating conditions, and abnormal gas-containing operating conditions. The Raman spectral signals are subjected to wavenumber and intensity calibration, background subtraction, baseline and fluorescence correction, and normalization processing. According to the preset division rules, the spectral range covering the characteristic peaks of the target component is divided into multiple spectral bands of interest. Each spectral band of interest is parameterized by the center wavenumber, wavenumber width, and allowable wavenumber drift range. For each spectral band of interest, spectral line features are extracted, and the spectral line features of each spectral band of interest are spliced ​​together to form a sample feature vector. Based on the cluster analysis of multi-scenario samples, a Raman spectral standard fingerprint library corresponding to the running scenario is constructed. The spectral line features include peak position, peak height, full width at half maximum (FWHM), integral area, and characteristic peak intensity ratio. Environmental parameters corresponding to the current oil sample are collected. These environmental parameters are used to characterize temperature, light, vibration, electromagnetic interference and / or collection conditions. Preprocessing parameters are adaptively adjusted according to the environmental parameters to perform environmental adaptive denoising on the Raman spectrum of the current oil sample to obtain the denoised target spectrum. The preprocessing parameters include baseline correction, denoising and wavenumber drift correction. The denoised target spectrum is converted into a fusion feature vector in each band of interest. The scene is determined based on the matching relationship between the fusion feature vector and the standard fingerprint database of each operating scene. A standard spectrum dictionary of scene-related components is constructed based on the standard fingerprint database corresponding to the determined scene. The target spectrum is unmixed based on a constrained spectral unmixing algorithm to obtain the type and quantitative concentration estimate of each target component in the oil sample. The quality control index is calculated, including fitting residual and characteristic peak ratio consistency. When the quality control indicators meet the preset threshold, the corresponding environmental parameters, target spectrum, component type, concentration estimate and quality control indicators are written into the database. The drift of indicators such as spectral distribution and quantitative residual is monitored according to the preset time window. When the drift exceeds the threshold, the standard fingerprint database, scene discrimination model and quantitative calibration model are updated by selecting the samples that have passed the quality control. After performance verification, the data is sent to the on-site Raman detection device.

2. The environmentally adaptive Raman spectroscopy rapid detection method according to claim 1, characterized in that, The multi-scenario oil sample Raman spectral feature modeling includes: For the target components and their concentration ranges, training and validation sets containing different concentration gradients and multiple allocation ratios are constructed to ensure that the concentration distribution of each component covers the lower threshold, typical value, and upper safety value. Temperature, humidity and vibration conditions are set by combining temperature control, humidification and / or vibration platform, scene labels are set for each condition, and repeated measurements of multiple batches of oil samples are completed under each scene label. According to the preset set of spectral segments of interest, the Raman spectra of the oil sample after wavenumber and intensity calibration, baseline and fluorescence correction, denoising and smoothing, normalization and wavenumber drift fine adjustment are segmented. Within each spectral segment of interest, peak position, peak height, full width at half maximum (FWHM), integral area, and derived features such as intensity ratio and energy ratio composed of peak height and integral area are extracted using peak detection and multi-peak fitting methods to form a spectral segment feature vector. The feature vectors of each spectral band of interest are concatenated in a fixed order to form a sample-level feature vector. Based on sparse subspace clustering, cluster analysis is performed on samples from multiple scenarios to obtain the central features and covariance matrix of each running scenario. The statistics of peak position, peak height, half width at half maximum, and integral area are calculated according to the component and concentration levels to construct a component-scenario two-dimensional standard fingerprint database and a corresponding set of similarity evaluation and discrimination thresholds.

3. The environmentally adaptive Raman spectroscopy rapid detection method according to claim 1, characterized in that, The steps of collecting environmental parameters and performing adaptive noise reduction include: The environmental parameters corresponding to the Raman spectroscopy acquisition of the oil sample are constructed into an environmental perception vector. The environmental perception vector includes at least temperature, humidity, vibration intensity, external stray light intensity, electromagnetic interference frequency band, integration time, and laser power, which are used to characterize the current acquisition environment and acquisition conditions. Multiple raw Raman spectra of the same sample obtained under multiple exposure conditions are used to form a time series data stack. Combined with the environmental perception vector, noise types such as additive noise, low-frequency baseline and fluorescence background, narrow band stripe noise and single exposure impact noise are decomposed and modeled to estimate the proportion and characteristic frequency band of different noise components. Based on standard oil sample data collected under multiple scenarios and multiple environments, environmental perception vectors and original spectra are recorded. Anchor peaks in the spectrum of interest are selected as references. Quality evaluation indicators, including at least peak position drift, peak shape deviation and noise energy, are defined. Based on the quality evaluation indicators, a denoising parameter optimization objective function is constructed with the goal of peak shape fidelity and noise energy suppression. By optimizing the objective function of the denoising parameters, the mapping relationship between environmental parameters and denoising parameters is obtained, so as to form an environment-denoising parameter mapping function and / or lookup table configuration, which is used to adaptively set variational mode decomposition parameters, wavelet decomposition layer number, threshold coefficient and baseline correction parameters according to the current environmental perception vector during on-site detection.

4. The environmentally adaptive Raman spectroscopy rapid detection method according to claim 3, characterized in that, The adaptive noise reduction for the environment also includes: For multiple repeated spectra of the same sample, after removing outliers whose intensity is outside the preset upper and lower quantiles at each wavenumber point, the mean is calculated to obtain a robust fused spectrum that suppresses isolated impact points and outliers between exposures. Based on robust fusion spectroscopy, baseline and fluorescence correction are performed. On the basis of the asymmetric least squares baseline algorithm, the baseline smoothing parameter and penalty parameter are finely adjusted according to the environment perception vector. Variational mode decomposition is performed on the baseline-corrected spectrum, and the initial values ​​of the number of modes, penalty factor and center frequency are adaptively set according to the environmental perception vector. The modes are classified using statistical measures such as spectral flatness and kurtosis. Components identified as noise modes are suppressed, and modes containing Raman information and slowly varying backgrounds are reconstructed to generate the spectrum after frequency domain component stripping. Discrete wavelet multiscale decomposition is performed on the spectrum after variational mode decomposition. The number of decomposition layers and threshold amplification are adaptively determined according to the signal length and the environmental perception vector. A soft thresholding strategy based on scale noise estimation is adopted, and a protection window is configured in the spectral band of interest to avoid weakening the true spectral peak. For specific narrowband interference caused by electromagnetic interference or mechanical vibration, adaptive band-stop or notch filtering is implemented in the frequency domain based on the electromagnetic interference frequency band information in the environmental perception vector, and a trade-off strategy of weight reduction suppression and mode preservation is adopted in the region overlapping with the spectrum of interest. The processed denoised spectrum is compared with the reference peak position, peak height, and full width at half maximum (FWHM) of the anchored peak. When the peak position drift, peak height deviation, and FWHM deviation of any anchored peak exceed the preset fidelity threshold, and / or the spectral shape correlation of the spectral segment of interest before and after denoising is lower than the preset threshold, parameter rollback or downgrade processing is triggered.

5. The environmentally adaptive Raman spectroscopy rapid detection method according to claim 1, characterized in that, The process of scene discrimination based on a multi-scene standard fingerprint database and the construction of a scene-related component standard spectrum dictionary includes: Based on the denoised and aligned Raman spectra of oil samples, features such as peak position, peak height, full width at half maximum (FWHM), integral area, peak ratio, energy ratio, and spectral shape correlation are extracted from each spectral segment of interest. The feature vectors of each spectral segment of interest are concatenated in a fixed order to form a sample feature vector. The different spectral segments are then normalized according to preset weights to obtain a fused feature vector. The fused feature vector is input into the scene discrimination model established in step 1, and the scene confidence corresponding to each running scene is calculated to obtain the confidence vector of each scene. The sum of the components of the confidence vector is 1. A scenario spectrum dictionary containing standardized reference spectra of target components is pre-established for each operating scenario. The reference spectra are generated based on the component standard fingerprint statistics under that scenario and normalized to the unit norm. The scene-weighted component standard spectrum dictionary is obtained by weighting and combining the scene confidence vectors of each scene spectrum dictionary.

6. The environmentally adaptive Raman spectroscopy rapid detection method according to claim 1, characterized in that, The method of unmixing the denoised Raman spectrum based on weighted nonnegative least squares and sparsity constraints to obtain the relative and absolute concentration estimates of each target component in the oil sample includes: The denoised oil sample Raman spectrum is aligned with the scene weighted component standard spectrum dictionary according to the spectral segments of interest. A weighted error function considering the spectral segment weight and noise variance is constructed. The spectral unmixing is modeled as an optimization problem with the goal of minimizing the weighted fitting residual and the constraints of non-negativity and / or sparsity of the component concentration coefficients. The relative concentration coefficient vector of the target component is obtained by solving the problem. A comprehensive similarity index is constructed based on the peak position similarity, peak intensity similarity, and spectral shape correlation between the fused feature vector and the standard fingerprint database. A candidate component set is selected according to the comprehensive similarity threshold and / or the top K screening strategy. Only the candidate components are solved during spectral unmixing to reduce the interference of collinear components on the results. Using an offline feature-to-relative-concentration mapping model and / or partial least squares regression model, the unmixed relative concentration coefficients are mapped to the relative and absolute concentration estimates of each target component. Component-level confidence and goodness of fit are calculated based on residual statistics, peak ratio consistency, and coverage of the spectral band of interest. Based on environmental parameters such as temperature and humidity, as well as systematic deviations caused by differences in oil sample properties, the absolute concentration estimate is corrected, and multi-component qualitative and quantitative detection results with confidence level indicators are output.

7. The environmentally adaptive Raman spectroscopy rapid detection method according to claim 6, characterized in that, The detection results are written into the database, and the standard fingerprint database, scene dictionary, and quantitative calibration model are updated based on drift detection and self-learning mechanisms, including: When the quality control indicators meet the preset threshold, the environmental perception vector, original spectral path, summary information of the processed spectra at each stage, preprocessing parameter configuration, fusion feature vector, identified component type, relative and absolute concentration estimates, component confidence level, and quality label of the corresponding sample are written into the sample record table in the database. According to the preset time window and / or rolling evaluation cycle, calculate the distribution distance index for the spectral distribution, environmental parameter distribution and quantitative residual distribution of the latest sample and historical sample in the spectrum of interest, including at least the distribution distance index based on information divergence or binning statistics, in order to identify input distribution drift and / or concept drift. Based on the changes in peak position and half-width statistics of the new and old versions of standard fingerprints, as well as the changes in the weighted mean square error of quantitative residuals, fingerprint stability index and quantitative performance index are calculated. When any index exceeds the corresponding drift threshold, the candidate update process is triggered. A training set is constructed from samples that meet the quality control conditions. The multi-scenario standard fingerprint library, scene discrimination model parameters, environment-denoising parameter mapping relationship, and feature-to-concentration quantitative calibration model are incrementally updated to generate a new version detection model and parameter configuration with version identification. After the new version of the detection model passes the preset performance verification standard, it is sent to the on-site Raman detection device and the version number, update time and performance evaluation results are recorded in the database.

8. The environmentally adaptive Raman spectroscopy rapid detection method according to claim 7, characterized in that, The drift threshold includes at least a first drift threshold based on spectral distribution distance and a second drift threshold based on the weighted mean square error of quantitative residuals. When the spectral distribution distance of the latest sample in the spectral band of interest exceeds the first drift threshold and / or the weighted mean square error of quantitative residuals exceeds the second drift threshold, incremental updates to the multi-scenario standard fingerprint database, the scene discrimination model, and the feature-to-concentration quantitative calibration model are triggered. The new version of the detection model is only sent to the on-site Raman detection device after it passes the preset performance verification standard.

9. An environment-adaptive Raman spectroscopy rapid detection system, used to implement the environment-adaptive Raman spectroscopy rapid detection method according to any one of claims 1 to 8, characterized in that, include: The Raman spectroscopy acquisition module is used to perform Raman excitation and spectral acquisition on transformer oil samples at preset laser wavelengths and integration times to obtain the original Raman spectral sequence of the oil samples. The environmental monitoring module is connected to the Raman spectroscopy acquisition module and is used to collect environmental parameters such as temperature, humidity, vibration intensity, external stray light intensity, electromagnetic interference frequency band, integration time and laser power of the detection environment, and output environmental perception vector. An embedded data processing unit, electrically connected to the Raman spectroscopy acquisition module and the environmental monitoring module, is configured to have a built-in processor and memory, and is as follows: A multi-scene spectral feature model and a standard fingerprint database were constructed from the original Raman spectral sequences of samples from multiple scenarios. Based on the environmental perception vector, environmental adaptive denoising and baseline correction are performed on the original Raman spectrum sequence to obtain a target Raman spectrum with peak shape preservation and improved signal-to-noise ratio. The target Raman spectrum is fused with the standard fingerprint database for feature fusion and similarity matching, and the identification results and relative concentration estimates of the target components in the oil sample are output. The identification results and corresponding spectral features are written into the database according to the preset quality control rules, and the multi-scene spectral feature model, standard fingerprint library, environment-denoising parameter mapping relationship and quantitative calibration model are updated accordingly. The embedded data processing unit works in conjunction with the Raman spectroscopy acquisition module and the environmental monitoring module to complete the acquisition of Raman spectra of transformer oil samples, environmental adaptive signal processing, and component identification under on-site deployment conditions, thereby achieving rapid Raman spectroscopy detection across different scenarios.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the environmentally adaptive Raman spectroscopy rapid detection method as described in any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the environmentally adaptive rapid detection method for Raman spectroscopy as described in any one of claims 1 to 8.

Citation Information

Cited By

  • Spectrum detection method and system for drug dissolution rate

    CN121830532A

  • Water quality online analysis method and system in radioactive waste liquid treatment process

    CN121978080A

  • Raman spectrum processing method based on adaptive baseline correction

    CN122084600A

  • Expiratory gas mass spectrum signal dynamic correction method based on environmental reference library

    CN122196351A