A spectral adaptive baseline correction method and system based on local spectral entropy weight
By introducing a local spectral entropy weighting mechanism and constructing a dual weighting fusion mechanism of structure and residual, the problems of weak peak protection and baseline fitting in Raman spectroscopy under low signal-to-noise ratio and complex backgrounds are solved, and efficient baseline correction effect is achieved.
Patent Information
- Application Number
- CN202611544576.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-08
- Publication Date
- 2026-11-03
AI Technical Summary
Existing Raman spectroscopy techniques struggle to effectively balance weak peak protection, baseline fitting accuracy, and algorithm real-time performance in low signal-to-noise ratio and complex fluorescence backgrounds. Traditional methods are prone to misinterpreting weak signals as noise or smoothing out true peak information.
A local spectral entropy weighting mechanism is introduced. By calculating the local spectral entropy and constructing a dual fusion mechanism of structural weight vector and residual weight, the baseline correction process is optimized, and computational efficiency is improved by using FFT and sparse matrix operations.
It significantly improves the ability to retain weak Raman peaks and the accuracy of baseline fitting under complex fluorescence backgrounds and strong noise interference, reduces peak clipping in baseline correction, and is computationally efficient and easy to deploy.
Smart Images

Figure CN123030825A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Raman spectroscopy, and in particular to a spectral adaptive baseline correction method and system based on local spectral entropy weighting. Background Technology
[0002] Raman spectroscopy is a molecular vibrational spectroscopy technique based on the Raman scattering effect, widely used in the analysis and identification of substances in chemistry, biology, medicine, and materials science. However, in actual measurements, Raman signals are often superimposed on a strong broadband fluorescence background and are accompanied by random interferences such as shot noise and readout noise. If the baseline cannot be accurately removed, subsequent peak identification and quantitative analysis will be severely biased. Especially in portable devices or trace substance detection, some effective signals are often submerged in noise, with signal intensity and noise amplitude on the same order of magnitude, which poses a great challenge to baseline correction.
[0003] Penalized Least Squares (PLS) and its improved versions, such as AsLS, airPLS, and arPLS, are widely used in Raman spectroscopy baseline correction. Their core idea is to estimate the baseline through iterative weighted residuals and smoothing constraints. AsLS uses the asymmetric penalty of positive and negative residuals to distinguish peaks from the baseline, but under low signal-to-noise ratio conditions, it easily misclassifies weak Raman peaks as noise, leading to baseline peak crossing or peak attenuation. airPLS enhances the ability to retain weak peaks through adaptive iterative weight optimization, but its weight update still mainly relies on residual statistics, making it prone to residual misjudgment in complex fluorescence backgrounds and failing to adequately protect weak signals. arPLS further improves the weight update strategy, but it may still experience underfitting or noise spikes when dealing with highly nonlinear or strongly noisy baselines. Meanwhile, low-pass filtering methods suppress noise through frequency domain filtering, but they easily smooth out true Raman peak information, especially signals with narrow peaks or weak amplitudes. Hybrid iterative methods, while combining multiple fitting strategies to improve baseline smoothness, still rely on parameter adjustment during iteration. Inappropriate parameter selection can easily lead to overfitting or underfitting, making it difficult to achieve a balance between weak peak protection and complex backgrounds. Polynomial fitting and B-spline fitting methods model the baseline using global or local smoothing functions, which can adapt to complex nonlinear backgrounds to some extent. However, node selection and parameter tuning are highly dependent on experience, and baseline crossing or overfitting is prone to occur at low signal-to-noise ratios. In recent years, some studies have introduced machine learning or adaptive parameter optimization to improve the limitations of traditional methods by predicting weights or parameter combinations. However, these methods usually require training data, and their real-time performance and deployability are relatively limited.
[0004] In summary, although existing algorithms have made significant progress in Raman spectroscopy baseline correction, they still cannot effectively balance weak peak protection, baseline fitting accuracy, and algorithm real-time performance under conditions of low signal-to-noise ratio and complex fluorescence background. Therefore, there is an urgent need for an adaptive baseline correction method that can accurately identify weak Raman peaks, is robust to noise, and is computationally efficient. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this application provides a spectral adaptive baseline correction method and system based on local spectral entropy weighting. This method addresses the technical challenge of traditional baseline correction algorithms' inability to distinguish weak Raman peaks from noise in low signal-to-noise ratio (SNR) environments by pioneering the introduction of information entropy theory into the field of Raman spectral baseline correction. By using spectral entropy as a feature recognition operator, it overcomes the deficiency of traditional PLS (penalized least squares) algorithms, which rely solely on intensity residuals for weight iteration, leading to weak signals being misjudged as part of the baseline and eliminated under low SNR conditions. In summary, this invention significantly improves the retention capability and baseline fitting accuracy of weak Raman characteristic peaks under complex fluorescence backgrounds and strong noise interference, solving the problems of insufficient feature retention and unreasonable weight update mechanisms in traditional PLS algorithms during Raman spectral baseline correction.
[0006] On the one hand, a spectral adaptive baseline correction method based on local spectral entropy weighting is provided, including: The original Raman spectrum signal is acquired, and a sliding window is set on the original Raman spectrum signal to obtain a local window subsequence corresponding to each sampling point; based on each local window subsequence, the local spectral entropy of each sampling point is calculated; based on the local spectral entropy of each sampling point, a local spectral entropy sequence is obtained. Mapping the local spectral entropy sequence yields the structure weight vector; The structural weight vector is incorporated into the objective function, transforming the baseline solution process into minimizing the objective function. During the iterative solution of the linear equations corresponding to the objective function, the structural weight vector is fused with the dynamic residual weight vector to obtain a fused weight vector. The fused weight vector is then transformed, and the transformation result is substituted into the linear equations to obtain the spectral baseline. When the solution result meets the preset conditions, the iterative solution is stopped, and the final output baseline is obtained. The original Raman spectral signal is subtracted from the final output baseline to obtain the corrected spectrum.
[0007] On the other hand, a spectral adaptive baseline correction system based on local spectral entropy weighting is provided, including: The acquisition module is configured to: acquire the raw Raman spectral signal; set a sliding window for the raw Raman spectral signal to obtain a local window subsequence corresponding to each sampling point; calculate the local spectral entropy of each sampling point based on each local window subsequence; and obtain a local spectral entropy sequence based on the local spectral entropy of each sampling point. The mapping module is configured to map the local spectral entropy sequence to obtain the structure weight vector; The solution module is configured to: integrate the structural weight vector into the objective function, transform the baseline solution process into minimizing the objective function, and fuse the structural weight vector with the dynamic residual weight vector during the iterative solution of the linear equations corresponding to the objective function to obtain a fused weight vector. The fused weight vector is then transformed, and the transformation result is substituted into the linear equations to obtain the spectral baseline. When the solution result meets preset conditions, the iterative solution is stopped, and the final output baseline is obtained. The correction module is configured to subtract the original Raman spectral signal from the final output baseline to obtain the corrected spectrum.
[0008] The above technical solution has the following advantages or beneficial effects: 1. Excellent noise resistance and weak peak protection: By introducing local spectral entropy, this invention can keenly identify weak Raman peaks that are submerged by noise under low signal-to-noise ratio conditions, effectively reducing the "peak clipping" phenomenon in baseline correction and significantly improving baseline fitting accuracy.
[0009] 2. Adaptive Dual Weighting Mechanism: This mechanism abandons the traditional PLS approach that relies solely on residual statistics, instead constructing a dual weighting mechanism combining "structure (entropy) + statistics (residuals)". This mechanism eliminates the need for manually setting complex thresholds and adaptively adjusts the fitting strategy based on the characteristics of the Raman signal itself.
[0010] 3. Computationally efficient and easy to deploy: The core algorithm is based on FFT (Fast Fourier Transform) and sparse matrix operations, resulting in low computational complexity and fast convergence. Compared to complex deep learning models or multi-algorithm cascade schemes, this method requires no training data and is more suitable for embedding into various real-time Raman spectroscopy processing systems. Attached Figure Description
[0011] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an undue limitation of this application.
[0012] Figure 1 This is a flowchart of the spectral adaptive baseline correction method based on local spectral entropy weighting according to Embodiment 1 of this application; Figure 2This is a comparison chart of the baseline correction effects of ethanol Raman spectra in Example 1 of this application. Figure 3 This is a magnified view of the baseline correction effect of the ethanol Raman spectrum in Example 1 of this application. Detailed Implementation
[0013] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.
[0014] It should be noted that the terminology used herein is for the purpose of describing particular implementations only and is not intended to limit the exemplary implementations of this application. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0015] Example 1 This embodiment provides a spectral adaptive baseline correction method based on local spectral entropy weighting; like Figure 1 As shown, a spectral adaptive baseline correction method based on local spectral entropy weighting includes: S101: Acquire the original Raman spectrum signal, set a sliding window for the original Raman spectrum signal to obtain a local window subsequence corresponding to each sampling point; calculate the local spectral entropy of each sampling point based on each local window subsequence; obtain a local spectral entropy sequence based on the local spectral entropy of each sampling point. S102: Map the local spectral entropy sequence to obtain the structure weight vector; S103: The structural weight vector is incorporated into the objective function, transforming the baseline solution process into minimizing the objective function. During the iterative solution of the linear equations corresponding to the objective function, the structural weight vector is fused with the dynamic residual weight vector to obtain a fused weight vector. The fused weight vector is then transformed, and the transformation result is substituted into the linear equations to obtain the spectral baseline. When the solution result meets the preset conditions, the iterative solution is stopped, and the final output baseline is obtained. S104: Subtract the original Raman spectral signal from the final output baseline to obtain the corrected spectrum.
[0016] Further, step S101: acquiring the original Raman spectral signal, setting a sliding window for the original Raman spectral signal, and obtaining a local window subsequence corresponding to each sampling point, specifically includes: Let the original Raman spectral signal be ,in, The number of spectral sampling points is denoted as , where For the first One sampling point.
[0017] To extract the local feature structure of the spectrum, a length of is defined. Sliding window ( The recommended value is the full width at half maximum (FWHM) of the narrowest characteristic peak in the spectrum. (and it must be an odd number). For the th in the spectrum sampling points Extract its neighborhood subsequence: ; in, For the first The local window subsequence corresponding to each sampling point; This represents the left endpoint of the local window subsequence, i.e., the value of the first sampling point within the window; This represents the right endpoint of the local window subsequence, i.e., the value of the last sampling point within the window. To eliminate window edge effects, mirror extension processing is performed on both ends of the original spectrum.
[0018] Further, S101: Based on each local window subsequence, calculate the local spectral entropy of each sampling point, specifically including: For each subsequence Calculate its information entropy in the frequency domain to quantify the disorder of the subsequence region; First of all Subtract the mean Then, the power spectral density is calculated using Fast Fourier Transform (FFT). :
[0019] ; in, Indicates the first Local window subsequence corresponding to each sampling point The first in One element, Indicates Fast Fourier Transform; Then, the power spectral density Normalized to a probability distribution sequence : ; According to the definition of Shannon entropy, calculate the first... Local spectral entropy of each sampling point : ; in, This represents the frequency index, corresponding to the discrete frequency point after the FFT.
[0020] The physical meaning of local spectral entropy is as follows: when there is a Raman peak within the window, the energy is concentrated in the low frequency band, the probability distribution is steep, and the entropy value is low; when the window is mainly filled with noise or a slowly varying baseline, the energy distribution is uniform, the probability distribution is gentle, and the entropy value is high.
[0021] Further, S101: Based on the local spectral entropy of each sampling point, a local spectral entropy sequence is obtained, specifically including: By traversing all points to obtain the original entropy sequence, and then normalizing it, we obtain the final local spectral entropy sequence. ,in: ; The structure weight vector used for baseline fitting is composed of a local spectral entropy sequence. The mapping result is that the expected mapping rule is: the weight of the low-entropy region (feature peak) approaches 0, and the weight of the high-entropy region (baseline / noise) approaches 1.
[0022] Further, S102: mapping the local spectral entropy sequence to obtain the structure weight vector specifically includes: The Sigmoid function is used to implement soft thresholding. Compared with hard thresholding, the Sigmoid function can provide a smoother transition and reduce fitting artifacts.
[0023] ; in, To adaptively differentiate thresholds, the mean or median of the entropy sequence is used; It is a sensitivity factor used to control the steepness of the mapping function, and the recommended value range is (10~100). For the first The structural weight values corresponding to each sampling point.
[0024] In addition, to further achieve weak peak protection, the following logic has been added: ; in, The weak peak protection threshold can be preset according to the spectral noise level or structural weight distribution. The recommended value range for the weak peak protection threshold is 0.05~0.15.
[0025] Furthermore, S103: Incorporating the structural weight vector into the objective function, transforming the baseline solution process into a process of minimizing the objective function, specifically includes: The weight vector obtained based on spectral entropy is incorporated into the objective function of the penalized least squares method: ; in, It is the original spectrum. For the baseline vector, For smoothing parameters; This is a diagonal weight matrix, whose diagonal elements consist of structural weight values. constitute: ; for The order difference matrix is taken here. The corresponding second-order difference matrix for: ; This is a fidelity term used to measure the weighted distance between the baseline and the original spectrum; This is a roughness penalty term.
[0026] In the traditional partial least squares (PLS) algorithm, It is initialized as an identity matrix, but in this application, The diagonal weight values are initialized to the structure weight values obtained by mapping the local spectral entropy.
[0027] Further, in S103: during the iterative solution of the linear equations corresponding to the objective function, the structural weight vector and the dynamic residual weight vector are fused to obtain a fused weight vector, specifically including: The process of finding the baseline is the process of minimizing the objective function, which is the process of solving a system of linear equations: ; Set initial baseline The number of iterations is ; Then it enters the iteration loop: First, calculate the residual. : ; Using negative residuals ( Calculate the standard deviation of noise. : ; in, It is the set of negative residuals. Representing the The sampling point at the th sampling point The residual value of the next iteration.
[0028] This is because the baseline estimate is usually located below the effective signal, and the negative residual is more representative of the noise level.
[0029] According to residuals and noise standard deviation Calculate the dynamic residual weight value : ; static structure weight values Combined into a static structure weight vector : ; Dynamic structure weight values Combined dynamic residual weight vector : ; static structure weight vector With dynamic residual weight vector Perform Hadamard product operation This achieves weight fusion, resulting in a fused weight vector. : ; The beneficial effect of the above technical solution is that for a data point to participate in baseline fitting, it must simultaneously satisfy two conditions: high entropy and small or negative residual value. If either condition is not met, such as a peak with low entropy or a spike with high residual, its weight will be reduced.
[0030] Further, step S103: transforming the fusion weight vector, substituting the transformation result into a system of linear equations, and solving to obtain the spectral baseline, specifically includes: Transform the fused weight vector into a diagonal weight matrix, substitute it into the system of linear equations, and solve for the new baseline: ; in, , Construct a diagonal matrix by using each element of the input vector as the main diagonal element, and all other elements as zero; For smoothing parameters, yes The difference matrix of order, take : ; For the first The predicted baseline obtained in the next iteration Represented as: .
[0031] Furthermore, the step of stopping the iterative solution and obtaining the final output baseline when the solution result meets the preset conditions specifically includes: The decision to stop iteration is based on whether the relative change between two consecutive baseline estimations, the change in the fusion weight vector, the relative change in the residual standard deviation, or whether the number of iterations has reached a preset maximum value; among these, the relative change in baseline... for: ; Change in fusion weight vector for: ; The relative change in the standard deviation of the residuals for: ; A positive number introduced to prevent the denominator from being zero.
[0032] When satisfied , or When any of the preset convergence conditions are met, the iterative solution stops. After the iterative solution is completed, the final output baseline is obtained. ; The baseline relative change threshold. To fuse the threshold of the change in the weight vector, The threshold for the relative change in the residual standard deviation is recommended to be set to an initial value of [value missing]. .
[0033] Further, step S104: subtracting the original Raman spectral signal from the final output baseline to obtain the corrected spectrum, specifically includes: The final output baseline Compared with the original Raman spectral signal Subtracting the two spectra yields the corrected spectrum. : ; At this point, the baseline correction work is complete, and the obtained corrected spectrum can be used for subsequent research.
[0034] This invention provides an adaptive baseline correction method for Raman spectroscopy based on local spectral entropy weights. The specific steps are as follows: local spectral entropy calculation; structure weight construction; dual weight fusion and iterative solution; and corrected spectrum output. Specifically, the local spectral entropy and structure weights are mapped using a mapping function to achieve an adaptive weight allocation where "the weight in the low-entropy region (spectral peak) approaches 0, and the weight in the high-entropy region (baseline) approaches 1."
[0035] This invention introduces the concept of spectral entropy from information theory into PLS (Programmable Spectrum Suppression), constructing a physically meaningful structural weight that utilizes the structural complexity of the signal rather than its simple amplitude to identify Raman peaks. From an information theory perspective, Raman peaks are coherent signals caused by molecular vibrations, possessing a specific frequency distribution structure, specifically exhibiting localized high order (low entropy); while baselines and noise exhibit randomly distributed or slowly changing disordered states (high entropy). No matter how weak the signal, as long as it possesses structural characteristics, its spectral entropy value will differ from that of pure noise regions. Based on this, this invention incorporates local spectral entropy into the construction of PLS weights, making the weights no longer merely functions of the residuals, but rather a joint function of the residuals and local spectral entropy. By utilizing "entropy weights" to protect weak signal regions, an adaptive baseline correction method that is robust to noise and sensitive to weak peaks is developed.
[0036] This invention introduces local spectral entropy as a priori weighting factor for Raman spectral baseline correction, thereby quantifying the local disorder of the spectral signal and using it as a criterion to distinguish Raman characteristic peaks (ordered, low entropy) from fluorescence background / noise (disordered, high entropy). A dual-weight fusion mechanism is proposed, fusing static spectral entropy weights and dynamic residual weights through Hadamard product, overcoming the fundamental shortcomings of the traditional PLS algorithm. This achieves both the ability to preserve weak Raman characteristic peaks and the accuracy of baseline fitting under complex fluorescence backgrounds and strong noise interference. Figure 2 This is a comparison chart of the baseline correction effects of ethanol Raman spectra in Example 1 of this application. Figure 3 This is a magnified view of the baseline correction effect of the ethanol Raman spectrum in Example 1 of this application.
[0037] Example 2 This embodiment provides a spectral adaptive baseline correction system based on local spectral entropy weighting, including: The acquisition module is configured to: acquire the raw Raman spectral signal; set a sliding window for the raw Raman spectral signal to obtain a local window subsequence corresponding to each sampling point; calculate the local spectral entropy of each sampling point based on each local window subsequence; and obtain a local spectral entropy sequence based on the local spectral entropy of each sampling point. The mapping module is configured to map the local spectral entropy sequence to obtain the structure weight vector; The solution module is configured to: integrate the structural weight vector into the objective function, transform the baseline solution process into minimizing the objective function, and fuse the structural weight vector with the dynamic residual weight vector during the iterative solution of the linear equations corresponding to the objective function to obtain a fused weight vector. The fused weight vector is then transformed, and the transformation result is substituted into the linear equations to obtain the spectral baseline. When the solution result meets preset conditions, the iterative solution is stopped, and the final output baseline is obtained. The correction module is configured to subtract the original Raman spectral signal from the final output baseline to obtain the corrected spectrum.
[0038] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A spectral adaptive baseline correction method based on local spectral entropy weighting, characterized in that, include: The original Raman spectrum signal is acquired, and a sliding window is set on the original Raman spectrum signal to obtain a local window subsequence corresponding to each sampling point; based on each local window subsequence, the local spectral entropy of each sampling point is calculated; based on the local spectral entropy of each sampling point, a local spectral entropy sequence is obtained. Mapping the local spectral entropy sequence yields the structure weight vector; The structural weight vector is incorporated into the objective function, transforming the baseline solution process into minimizing the objective function. During the iterative solution of the linear equations corresponding to the objective function, the structural weight vector is fused with the dynamic residual weight vector to obtain a fused weight vector. The fused weight vector is then transformed, and the transformation result is substituted into the linear equations to obtain the spectral baseline. When the solution result meets the preset conditions, the iterative solution is stopped, and the final output baseline is obtained. The corrected spectrum is obtained by subtracting the original Raman spectral signal from the final output baseline.
2. The spectral adaptive baseline correction method based on local spectral entropy weighting as described in claim 1, characterized in that, Based on each local window subsequence, the local spectral entropy of each sampling point is calculated, specifically including: for each subsequence Calculate its information entropy in the frequency domain to quantify the disorder of the subsequence region; First of all Subtract the mean Then, the power spectral density is calculated using the fast Fourier transform. : ; in, Indicates the first Local window subsequence corresponding to each sampling point The first in One element, Indicates Fast Fourier Transform; Then, the power spectral density Normalized to a probability distribution sequence : ; According to the definition of Shannon entropy, calculate the first... Local spectral entropy of each sampling point : ; in, This represents the frequency index, corresponding to the discrete frequency point after the FFT.
3. The spectral adaptive baseline correction method based on local spectral entropy weighting as described in claim 2, characterized in that, Based on the local spectral entropy of each sampling point, a local spectral entropy sequence is obtained, specifically including: By traversing all points to obtain the original entropy sequence, and then normalizing it, the final local spectral entropy sequence is obtained. ,in: 。 4. The spectral adaptive baseline correction method based on local spectral entropy weighting as described in claim 3, characterized in that, Mapping the local spectral entropy sequence yields the structure weight vector, which specifically includes: Soft threshold mapping is implemented using the Sigmoid function: ; in, To adaptively differentiate thresholds, the mean or median of the entropy sequence is used; It is a sensitivity factor used to control the steepness of the mapping function. For the first The structural weight values corresponding to each sampling point.
5. The spectral adaptive baseline correction method based on local spectral entropy weighting as described in claim 4, characterized in that, Incorporating the structural weight vector into the objective function transforms the baseline solution process into minimizing the objective function, specifically including: The weight vector obtained based on spectral entropy is incorporated into the objective function of the penalized least squares method: ; in, It is the original spectrum. For the baseline vector, For smoothing parameters; This is a diagonal weight matrix, whose diagonal elements consist of structural weight values. constitute: ; for The order difference matrix is taken here. The corresponding second-order difference matrix for: ; This is a fidelity term used to measure the weighted distance between the baseline and the original spectrum; This is a roughness penalty term.
6. The spectral adaptive baseline correction method based on local spectral entropy weighting as described in claim 5, characterized in that, In the iterative solution of the linear equations corresponding to the objective function, the structural weight vector and the dynamic residual weight vector are fused to obtain the fused weight vector, which specifically includes: The process of finding the baseline is the process of minimizing the objective function, which is the process of solving a system of linear equations: ; Set initial baseline The number of iterations is ; Then it enters the iteration loop: First, calculate the residual. : ; Calculating the noise standard deviation using negative residuals : ; in, It is the set of negative residuals. Representing the The sampling point at the th sampling point The residual value of the next iteration; According to residuals and noise standard deviation Calculate the dynamic residual weight value : ; static structure weight values Combined into a static structure weight vector : ; Dynamic structure weight values Combined dynamic residual weight vector : ; static structure weight vector With dynamic residual weight vector Perform Hadamard product operation This achieves weight fusion, resulting in a fused weight vector. : 。 7. The spectral adaptive baseline correction method based on local spectral entropy weighting as described in claim 6, characterized in that, The fusion weight vector is transformed, and the transformation result is substituted into a system of linear equations to obtain the spectral baseline. Specifically, this includes: Transform the fused weight vector into a diagonal weight matrix, substitute it into the system of linear equations, and solve for the new baseline: ; in, , Construct a diagonal matrix by using each element of the input vector as the main diagonal element, and all other elements as zero; For smoothing parameters, yes The difference matrix of order, take : ; For the first The predicted baseline obtained in the next iteration Represented as: 。 8. The spectral adaptive baseline correction method based on local spectral entropy weight as described in claim 7, characterized in that, The step of stopping iterative solution and obtaining the final output baseline when the solution result meets the preset conditions specifically includes: The decision to stop iteration is based on whether the relative change between two consecutive baseline estimations, the change in the fusion weight vector, the relative change in the residual standard deviation, or whether the number of iterations has reached a preset maximum value; among these, the relative change in baseline... for: ; Change in fusion weight vector for: ; The relative change in the standard deviation of the residuals for: ; Positive numbers are introduced to prevent the denominator from being zero; When satisfied , or When any of the preset convergence conditions are met, the iterative solution stops. After the iterative solution is completed, the final output baseline is obtained. ; The baseline relative change threshold. To fuse the threshold of the change in the weight vector, This is the threshold for the relative change in the residual standard deviation.
9. The spectral adaptive baseline correction method based on local spectral entropy weighting as described in claim 8, characterized in that, The corrected spectrum is obtained by subtracting the original Raman spectral signal from the final output baseline. Specifically, this involves subtracting the final output baseline from the corrected spectrum. Compared with the original Raman spectral signal Subtracting the two, we obtain the corrected spectrum. : 。 10. A spectral adaptive baseline correction system based on local spectral entropy weighting, characterized in that, include: The acquisition module is configured to: acquire the raw Raman spectral signal; set a sliding window for the raw Raman spectral signal to obtain a local window subsequence corresponding to each sampling point; calculate the local spectral entropy of each sampling point based on each local window subsequence; and obtain a local spectral entropy sequence based on the local spectral entropy of each sampling point. The mapping module is configured to map the local spectral entropy sequence to obtain the structure weight vector; The solution module is configured to: integrate the structural weight vector into the objective function, transform the baseline solution process into minimizing the objective function, and fuse the structural weight vector with the dynamic residual weight vector during the iterative solution of the linear equations corresponding to the objective function to obtain a fused weight vector. The fused weight vector is then transformed, and the transformation result is substituted into the linear equations to obtain the spectral baseline. When the solution result meets preset conditions, the iterative solution is stopped, and the final output baseline is obtained. The correction module is configured to subtract the original Raman spectral signal from the final output baseline to obtain the corrected spectrum.
