Laser plasma multi-channel splicing spectrum background deduction method

By constructing an adaptive background estimation framework, which dynamically responds to changes in local spectral complexity, the problem of background interference in multi-channel stitched spectra is solved, achieving high-precision background subtraction and spectral analysis.

CN121901570APending Publication Date: 2026-04-21SOUTH CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTH CHINA NORMAL UNIV
Filing Date
2026-01-04
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively handle background interference in multi-channel spliced ​​spectra, leading to the submergence of weak signal lines and peak distortion, which affects the accuracy of elemental qualitative identification and quantitative analysis.

Method used

An adaptive background estimation framework is constructed by employing methods such as multi-domain autocovariance structural element generation, multi-scale double envelope inversion fusion, spectral line-aware structural element field, physical peak masking weight field, and direction-constrained asymmetric smoothing. This framework dynamically responds to changes in local spectral complexity and achieves steady-state envelope reconstruction and background subtraction.

Benefits of technology

It significantly improves the accuracy and robustness of background subtraction, ensures complete spectral peak shapes and accurate intensity, and enhances the accuracy of elemental qualitative identification and quantitative analysis in multi-channel spliced ​​spectra.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121901570A_ABST
    Figure CN121901570A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of multi-channel spliced spectrum background deduction methods, and particularly relates to a laser plasma multi-channel spliced spectrum background deduction method, which comprises the following steps of: acquiring multi-channel original spectrum data, and performing preprocessing operations of wavelength resampling, noise filtering and abnormal point elimination on the original spectrum data to obtain a background deduction result; obtaining preprocessed spectral data; calculating multi-domain statistical characteristics based on the preprocessed spectral data, and generating a multi-domain auto-covariance structural element length field; the multi-domain statistical characteristics comprise the first-order difference, the second-order difference, the first-order difference variance, the second-order difference variance and the first-order and second-order difference covariance of the spectrum and the neighborhood of the spectrum; and performing multi-scale morphological opening operation on the preprocessed spectral data to obtain multi-scale upper and lower envelopes, determining a fusion weight based on a local amplitude unbalance degree, and fusing the upper and lower envelopes to obtain an initial morphological background envelope.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of multi-channel spliced ​​spectral background subtraction methods, and particularly relates to a multi-channel spliced ​​spectral background subtraction method for laser plasma. Background Technology

[0002] Laser-induced breakdown spectroscopy (LIBS) technology, with its advantages of being fast, non-destructive, and capable of simultaneous multi-element detection, has been widely used in materials analysis, environmental monitoring, and other fields. To cover the spectral detection needs across a wide wavelength range, multi-channel stitching technology is commonly employed. However, the stitched spectrum is susceptible to strong background interference due to factors such as continuous plasma radiation, bremsstrahlung radiation, and scattering by the optical system. This background not only obscures weak signal lines but also distorts the peak shape and intensity information of the spectral lines, severely limiting the accuracy of subsequent qualitative elemental identification and the precision of quantitative analysis. Therefore, background subtraction has become an indispensable and crucial step in multi-channel stitched spectral data processing.

[0003] Existing background subtraction methods, such as polynomial fitting, wavelet transform, and traditional morphological operations, are insufficient to fully adapt to the complex characteristics of laser-plasma spectroscopy. Traditional methods often employ fixed-scale structuring elements or single statistical models, failing to dynamically respond to the local complexity differences between peak and background regions in the spectrum. During multi-channel stitching, systematic errors in each channel can easily lead to baseline shifts and steps between segments, making it difficult for existing cross-segment correction methods to achieve steady-state continuous envelope reconstruction. Furthermore, the lack of targeted directional constraints during smoothing optimization can result in the background arching upwards into strong peak regions or excessive suppression of background details, leading to insufficient background estimation accuracy and failing to meet the stringent requirements of high-resolution spectral analysis. Summary of the Invention

[0004] The purpose of this invention is to address the aforementioned technical problems by providing a method for background subtraction of multi-channel spliced ​​spectra in laser plasma.

[0005] In view of this, the present invention provides a method for background subtraction of multi-channel spliced ​​spectra of laser plasma, comprising the following steps: Step 1: Acquire multi-channel raw spectral data, and perform preprocessing operations such as wavelength resampling, noise filtering, and outlier removal on the raw spectral data to obtain preprocessed spectral data; Step 2: Calculate multi-domain statistical features based on the preprocessed spectral data to generate a multi-domain autocovariance structural element length field; the multi-domain statistical features include the first-order difference, second-order difference, first-order difference variance, second-order difference variance, and first-order and second-order difference covariance of the spectrum and its neighborhood. Step 3: Perform multi-scale morphological opening operation on the preprocessed spectral data to obtain multi-scale upper and lower envelopes. Determine the fusion weight based on the local amplitude imbalance and fuse the upper and lower envelopes to obtain the initial morphological background envelope. Step 4: Automatically find peaks and fit spectral lines to the preprocessed spectral data to obtain the center position and half width at half maximum (WHM) of the spectral lines. Construct a continuous spectral line broadening field through interpolation. Merge the spectral line broadening field with the structural element length field obtained in Step 2 to construct a spectral line sensing structural element field. Step 5: Based on the spectral physical parameters obtained in Step 4, construct peak masking kernels and set weighting coefficients. Superimpose all peak masking kernels and normalize them to obtain the physical peak masking weight field. Step 6: Divide the multi-channel spectrum into multiple channel segments. For each channel segment, obtain the initial background curve based on the results of Steps 3 to 5. Optimize the global background by constructing a cross-segment steady-state objective function to achieve inter-segment steady-state envelope reconstruction and cross-segment offset correction. Step 7: Based on the physical peak masking weight field obtained in Step 5, define the weights of the data items, construct a direction-constrained asymmetric smoothing objective function, and perform smoothing optimization on the global background obtained in Step 6. The objective function penalizes the upward bending of the background much more than the downward bending. Step 8: Based on the final background curve obtained in Step 7, perform background subtraction operation and output the background-free spectrum; the background subtraction rule is: the intensity value of the background-free spectrum is the difference between the intensity value of the preprocessed spectral data and the intensity value of the final background curve, and if the difference is negative, it is taken as 0.

[0006] Preferably, the specific process of generating the multi-domain autocovariance structuring element length field in step two includes: Step S21: Calculate the first-order and second-order differences of the spectrum and its neighborhood. The first-order difference is obtained by dividing the difference of the intensity values ​​of two adjacent wavelength points by twice the wavelength interval. The second-order difference is obtained by subtracting twice the intensity value of the current wavelength point from the sum of the intensity values ​​of two adjacent wavelength points and then dividing by the square of the wavelength interval. Step S22: Calculate the first-order difference variance, second-order difference variance, and first-order and second-order difference covariance within the local window; Step S23: Add the absolute values ​​of the first-order difference variance, the second-order difference variance, and twice the first-order and second-order difference covariance, and then take the square root of the sum to obtain the local complexity index. Step S24: Normalize the complexity index by subtracting the minimum value among all complexity indices from the current complexity index, then dividing by the difference between the maximum and minimum complexity indices plus a small constant to obtain the normalized complexity index, which has a value range between 0 and 1. Step S25: Map the normalized complexity index to the struct length. The mapping method is as follows: add the lower limit of the struct length to the difference between the upper and lower limits of the struct length, multiply by the normalized complexity index, and then adjust the result to the closest odd number that is not less than 3 to obtain the struct length field.

[0007] Preferably, the specific process of multi-scale dual-envelope inversion fusion in step three includes: Step S31: Perform morphological opening operations using structuring element lengths of different scales. Perform this operation on the original spectrum to obtain the lower envelope, and perform this operation on the inverted spectrum and then invert it again to obtain the upper envelope. Step S32: Use weighted average or quantile to summarize the lower and upper envelopes at multiple scales to obtain the global lower envelope and global upper envelope; Step S33: Calculate the local amplitude imbalance by subtracting the intensity value of the global lower envelope at the current wavelength from the spectral intensity value at that wavelength, and then dividing by the difference between the intensity values ​​of the global upper envelope and the global lower envelope at that wavelength, plus a small constant. Step S34: Map the local amplitude imbalance to a fusion weight using a monotonic function with a value between 0 and 1. Based on this fusion weight, perform a weighted summation of the global lower envelope and the global upper envelope to obtain the fusion envelope, which serves as the initial background prior.

[0008] Preferably, the specific process of constructing the spectral line sensing structure element field in step four includes: Step S41: The center position and half width at half maximum (WHM) of each spectral line are obtained through automatic peak finding and fitting. Kernel function is used for interpolation to construct a continuous spectral line broadening field. A smoothing bandwidth is introduced during the interpolation process to ensure the smoothness of the broadening field. At the same time, a small constant is added to avoid the denominator being zero. Step S42: Normalize the spectral broadening field by subtracting the minimum broadening value from the current wavelength point, then dividing by the difference between the maximum and minimum broadening values ​​and adding a small constant to obtain the normalized broadening value, which ranges from 0 to 1. Step S43: Map the normalized expansion value to the struct length. The mapping method is: add the difference between the upper and lower limits of the struct length to the lower limit of the struct length, multiply by the normalized expansion value, and then adjust the result to the closest odd number that is not less than 3. Step S44: The statistical complexity structuring element length obtained in Step 2 is fused with the broadening driving structuring element length obtained in this step. The fusion method is to multiply the two by their respective fusion weights and then sum them to obtain the spectral sensing structuring element field.

[0009] Preferably, the specific process of constructing the physical peak masking weight field in step five includes: Step S51: For each spectral line, construct a peak masking kernel based on its center position, peak height, and full width at half maximum (FWHM). The peak masking kernel is constructed using an exponential function, where the exponential part is the square of the difference between the negative wavelength point and the center position of the spectral line, divided by the square of twice the parameter proportional to the FWHM of the spectral line, where the proportional parameter is the result of dividing the FWHM of the spectral line by twice the natural logarithm 2. Step S52: Set a weighting coefficient based on the peak height. This coefficient is the current spectral line's peak height divided by the maximum value of all spectral line peak heights plus a small constant. Step S53: Multiply the peak masking kernels of all spectral lines by their corresponding weighting coefficients and then superimpose them. Then restrict the superposition result to the range of 0 to 1 to obtain the physical peak masking weight field.

[0010] Preferably, the specific process of inter-segment steady-state envelope reconstruction and cross-segment offset correction in step six includes: Step S61: Divide the multi-channel spectrum into multiple channel segments, determine the sampling index set for each channel segment, and obtain the initial background curve for each channel segment based on the results of step S61. Step S62: Construct a cross-segment steady-state objective function, which includes two parts: the first part is the sum of squares of the difference between the global background in each channel segment and the initial background curve of the channel segment; the second part is the sum of squares of the difference between the global background at the current channel wavelength point and the global background at the corresponding wavelength point of the adjacent channel in the boundary region at the junction of adjacent channels, multiplied by the inter-segment coupling weight. Step S63: By minimizing the cross-segment steady-state objective function, a consistent steady-state background is obtained across multiple channels, ensuring that the background between each channel segment is continuous without obvious steps.

[0011] Preferably, the specific process of direction-constrained asymmetric smoothing in step seven includes: Step S71: Define a second-order difference operator, which is calculated using the background value of the next adjacent wavelength point, twice the background value of the current wavelength point, and the background value of the previous adjacent wavelength point. The second-order difference result is split into positive and negative components according to the sign. Step S72: Define the weight of the data item based on the physical peak masking weight field. The weight is 1 minus the value of the physical peak masking weight field plus a small constant that ensures non-zero weight. Step S73: Construct a directionally constrained asymmetric smoothing objective function, which consists of three parts: the first part is the sum of the products of the data item weights and the squares of the differences between the spectral intensity values ​​and the background values; the second part is the product of the upward bending penalty coefficient and the sum of the squares of the positive direction components of the second-order difference; and the third part is the product of the downward bending penalty coefficient and the sum of the squares of the negative direction components of the second-order difference, wherein the upward bending penalty coefficient is much larger than the downward bending penalty coefficient. Step S74: Minimize the objective function using the iterative weighted least squares method to obtain the final background curve.

[0012] The beneficial effects of this invention are: By leveraging the synergistic effect of statistical and spectral line physical features, a fully adaptive background estimation framework was constructed, significantly improving the accuracy and robustness of background subtraction. The multi-domain autocovariance structuring element length field dynamically responds to changes in local spectral complexity, while the spectral line-aware structuring element field, combined with spectral line broadening characteristics, achieves intelligent adaptation of structuring element scale. This allows morphological operations to automatically shorten structuring elements in peak regions and lengthen them in background regions, effectively avoiding the peak shape destruction or insufficient background estimation problems associated with traditional fixed-scale methods. The physical peak masking weight field constructs targeted masking kernels based on spectral line center position, peak height, and full width at half maximum (FWHM), significantly reducing the interference of strong peaks on background estimation. Furthermore, multi-scale dual-envelope inversion fusion fully utilizes background information at different scales, providing a high-precision initial background prior for subsequent optimization and ensuring that weak signal spectral lines are not excessively suppressed by the background.

[0013] Addressing the core challenges of multi-channel splicing, inter-segment steady-state envelope reconstruction achieves seamless, stepless background transitions between channel segments through a cross-segment steady-state objective function, completely resolving the inter-segment offset problem inherent in traditional spliced ​​spectra. Direction-constrained asymmetric smoothing effectively suppresses the upward arching of the background into the peak by differentially penalizing the vertical curvature of the background, while allowing the background in non-peak regions to moderately dip to align with the true baseline. The resulting de-background spectrum not only boasts complete peak shapes and accurate intensity but also exhibits excellent multi-channel consistency. This method requires no manual parameter adjustment, adapts to the complex background characteristics of laser-plasma spectroscopy, and significantly improves the accuracy of subsequent elemental qualitative identification and quantitative analysis, providing reliable technical support for wide-wavelength range spectral detection. Attached Figure Description

[0014] The accompanying figure is a schematic diagram illustrating the overall technical concept of a multi-channel spliced ​​spectrum background subtraction method for laser plasma according to the present invention, which is used to summarize and demonstrate the background subtraction process based on the combination of multi-domain statistical features and spectral line physical features.

[0015] Figure 1 This is a schematic diagram of the overall structure of a multi-channel spliced ​​spectral background subtraction method for laser plasma according to the present invention. It includes a spectral preprocessing module, a multi-domain autocovariance structural element generation module, a multi-scale double envelope inversion and fusion module, a spectral line sensing structural element field construction module, a physical peak masking weight field construction module, an inter-segment steady-state envelope reconstruction module, and a direction-constrained asymmetric smoothing module.

[0016] Figure 2This is a flowchart illustrating the method of the present invention, showing the overall steps from spectral data acquisition, statistical feature calculation, morphological background estimation, introduction of spectral line physical features, multi-channel steady-state correction to final background subtraction.

[0017] Figure 3 This is a schematic diagram of the original spectrum. The horizontal axis represents wavelength, and the vertical axis represents spectral intensity. The curves in the figure are the original spectral data after multi-channel splicing, used to show the overall shape of the spectrum without background subtraction and the continuous background and spectral line peak features contained therein.

[0018] Figure 4 This is a schematic diagram of the background estimation process, including the original spectral curve, the rough background curve obtained through multi-scale morphological processing, and the mixed background curve obtained by further fusion and optimization based on the rough background, which is used to illustrate the relationship between the changes of the background curves at different stages in the background estimation process of the present invention.

[0019] Figure 5 This is a schematic diagram of the background subtraction result, showing the background-removed spectrum obtained after background subtraction of the original spectrum. In the background-removed spectrum, continuous background is effectively suppressed and spectral peak shapes are preserved, which is used to demonstrate the effect of the background subtraction method of the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0021] This invention proposes an adaptive background estimation framework driven by both statistical and physical characteristics (spectral line broadening, peak intensity), comprising the following key modules: Multi-domain Self-Covariance Structuring-element Generation (MS-CSG). Dual-scale Inversion Envelope Fusion (DS-IEF). Width-Linked Structuring-element Field (WL-SEF) driven by spectral broadening. Peak masking weight field based on peak physical properties (PM-Mask, Physical Masking Mask). Segment-wise Envelope Reconstruction and Segment-wise Misalignment Correction (SER). Directional Constrained Penalized LeastSquares (DC-PLS).

[0022] Finally, the background curve is obtained. And output the background-removed spectrum: ; in: This represents the i-th wavelength acquisition point; This represents the spectrum of the i-th wavelength.

[0023] The process or method specifically describes the actions or steps necessary for the method, including the manner, tools, equipment, materials, process parameters, etc.

[0024] This invention can be implemented through software or a combination of software and hardware, and its device structure is shown in the attached figure. Figure 1 As shown, it mainly includes: Spectral acquisition module 101: Connects to a LIBS spectrometer to acquire multi-channel raw spectral data; Preprocessing module 102: performs wavelength resampling, noise filtering, outlier removal, etc. Multi-domain adaptive morphological background estimation module 103: Multi-domain autocovariance structural element generation submodule 1031; Multi-scale dual-envelope inversion fusion submodule 1032; Spectral line broadening driven spectral line sensing structure element field submodule 1033; Physical peak masking weighted field submodule 1034; Inter-segment steady-state envelope reconstruction module 104: handles the problem of multi-channel inter-segment baseline discontinuity; Direction-constrained asymmetric smoothing module 105: Optimizes background smoothing under multiple constraints; Background subtraction and result output module 106: Outputs background-removed spectral data and visualization results.

[0025] The overall method flow is shown in the attached figure. Figure 2 As shown, the main steps are as follows: S1: Acquire and preprocess spectral data; S2: Calculate multi-domain statistical features and generate multi-domain autocovariance structural element length field (MS-CSG). S3: Perform multi-scale dual-envelope inversion and fusion to obtain the initial morphological background envelope (DS-IEF). S4: Automatically find peaks and fit spectral lines to construct spectral broadening field and spectral line sensing structure element field (WL-SEF). S5: Construct a physical peak masking weight field (PM-Mask) based on peak physical parameters; S6: Perform inter-segment steady-state envelope reconstruction and cross-segment offset correction (SER) on multi-channel spectra. S7: Perform directional constraint-type asymmetric smoothing (DC-PLS) under envelope and peak masking constraints. S8: Perform background subtraction and output the background-free spectrum.

[0026] Multi-domain autocovariance structural element (ESI) generation of MS-CSG, and baseline candidates generated by multi-scale morphological opening operations include: The horizontal axis represents wavelength. The vertical axis represents strength. ; One curve represents the original spectrum; Several curves represent different structural element lengths. The baseline candidates are obtained by performing morphological opening operations.

[0027] Multi-domain statistical feature calculation, for the spectrum and its neighborhood calculate: First-order difference (approximate derivative): ; Second-order difference (approximate second-order derivative): ; in: Represents the spectrum of the i-th wavelength; This represents the spectrum of the (i-1)th wavelength; This represents the spectrum of the (i+1)th wavelength; This indicates the wavelength interval between adjacent wavelength sampling points.

[0028] In local window Internal statistics: First difference variance ; Second-order difference variance ; First-order and second-order difference covariance .

[0029] The complexity index is mapped to the length of the structuring element, combining multi-domain statistical features into a local "complexity index". ,For example: ; Then, Mapped to struct length : Normalized complexity: ; Mapped to length (and forced to be odd and not less than 3): ; in: These are the upper and lower limits of the structural element length; This means adjusting the value to the nearest odd number, and not less than 3.

[0030] This creates a structural element length field that adapts to wavelength. , used for subsequent morphological operations.

[0031] Multi-scale dual-envelope inversion fusion DS-IEF, including upper and lower envelopes and fusion: Original spectrum: curve; Lower envelope: for Performing morphological opening operation yields ; Upper envelope: for inverted spectra After opening and then reversing, we get... ; Fusion envelope: .

[0032] 3.2.3.1 Multiscale Morphological Opening Operation and Upper / Lower Envelope Morphological opening operation is denoted as Using the length of the structural element : For the original spectrum: ; For inverted spectra: ; For multiple scales The results are then summarized, and multi-scale upper and lower envelopes can be obtained by weighted averaging or taking quantiles. ; ; Based on envelope fusion of amplitude imbalance, local amplitude imbalance is constructed: ; according to Determine the upper and lower envelope fusion weights ,For example: ; The final fused envelope is obtained: ; This serves as the initial background prior for subsequent steady-state envelope reconstruction and smoothing optimization.

[0033] Spectral line broadening-driven spectral line sensing structure element field WL-SEF, the spectral line broadening field and structure element field include: Curve of spectral line half-width at half-maximum (FWHM) as a function of wavelength ; Depend on The structural element length field obtained by mapping .

[0034] Spectral line broadening field construction, obtained by automatic peak finding and fitting. The center position of the spectral lines Half-width at half-height (FWHM) Discrete Interpolation is a continuous expansion field ,For example: ; in For kernel functions (such as Gaussian kernels) To smooth bandwidth.

[0035] The mapping from the broadened field to the length of the structuring element, for Normalization: ; Then map to a length range: ; Length of statistical complexity structuring element With the extension of drive length By fusing the spectral lines, we obtain the spectral line-sensing structure element field: ; in This is to incorporate weighting. In regions with narrow and complex spectral lines, structuring elements are automatically shortened; in regions with smooth backgrounds, structuring elements are automatically lengthened.

[0036] Physical peak masking weight field PM-Mask, the peak masking weight field includes: The principal coordinates display the original spectrum. ; Sub-coordinates display peak masking weights It approaches 1 near the spectral peak and approaches 0 in the background region.

[0037] Peak core construction, for each spectral peak Known center Peak height Expand Constructing peak-masking cores: ; in and Proportional (e.g.) ).

[0038] Then based on peak height Set weight coefficients , can be: ; Peak masking weight field superposition and normalization: Superimposing all peak kernels yields the peak masking weight field. ; in Indicates truncation at Interval.

[0039] It has a dual function in the following process: During the morphological operation stage, the influence of peak regions on structural element adjustment and envelope construction is reduced; During the smoothing optimization phase, the weights of the data items are used to reduce the fitting constraints in the peak regions.

[0040] Inter-segment steady-state envelope reconstruction and multi-channel offset correction (SER), multi-channel stitching and steady-state correction include: The unprocessed multichannel spectrum shows obvious steps and shifts at the boundaries between channels; The spectrum after SER processing has a continuous baseline without obvious steps.

[0041] Assuming the spectrum is divided into There are 1 channel segment, and the sampling index set for each segment is 1. .

[0042] Channel segmentation and initial background estimation: For each channel segment, an initial background curve is obtained within the aforementioned DS-IEF+WL-SEF+PM-Mask framework. .

[0043] Inter-segment steady-state optimization model, constructing a cross-segment steady-state objective function, considering the global background. Optimize: ; in: Indicates channel and A small section of the boundary area near the border; This indicates the wavelength point at the corresponding position in the adjacent channel; The first condition ensures that each background segment fits its initial estimate. The second constraint ensures background continuity between adjacent channels in the boundary region, improving inter-segment stability. This refers to the inter-segment coupling weight.

[0044] Through the Minimizing this value yields a consistent steady-state background across multiple channels. .

[0045] Direction-constrained asymmetric smoothing DC-PLS, with a comparison between direction-constrained smoothing and ordinary smoothing, includes: The "original spectral fragment" displays a spectrum containing strong peaks; "Ordinary smoothed baseline" refers to the baseline obtained by traditional symmetric penalized least squares, which tends to arch upwards into the peak. "Directional constraint smoothing baseline" means that the baseline obtained by DC-PLS does not arch upward near the peak, and is closer to the real background.

[0046] Let the smoothed background be Construct a second-order difference operator: ; Curvature is decomposed into positive and negative directions according to its sign: ; Combined with peak masking weight field Define the weights of the data items: ; in To ensure that the small constant is non-zero.

[0047] Construct a direction-constrained asymmetric smoothing objective function: ; in: This means that the penalty for upward bending (convex) is much greater than that for downward bending (concave), thus suppressing the background from arching upward into the peak. The smaller size allows the background to dip moderately in non-peak areas, better fitting the bottom.

[0048] By using methods such as iterative weighted least squares (IRLS) to... Find the minimum value to obtain the final background: ; Background subtraction and result output: Finally, background subtraction is performed to obtain the background-free spectrum. ; in: This represents the i-th wavelength acquisition point; This represents the spectrum of the i-th wavelength.

[0049] The embodiments of this application have been described above with reference to the accompanying drawings. Unless otherwise specified, the embodiments and features in the embodiments of this application can be combined with each other. This application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A method for background subtraction of multi-channel spliced ​​spectra in laser plasma, characterized in that: Includes the following steps: Step 1: Acquire multi-channel raw spectral data, and perform preprocessing operations such as wavelength resampling, noise filtering, and outlier removal on the raw spectral data to obtain preprocessed spectral data; Step 2: Calculate multi-domain statistical features based on the preprocessed spectral data to generate a multi-domain autocovariance structural element length field; the multi-domain statistical features include the first-order difference, second-order difference, first-order difference variance, second-order difference variance, and first-order and second-order difference covariance of the spectrum and its neighborhood. Step 3: Perform multi-scale morphological opening operation on the preprocessed spectral data to obtain multi-scale upper and lower envelopes. Determine the fusion weight based on the local amplitude imbalance and fuse the upper and lower envelopes to obtain the initial morphological background envelope. Step 4: Automatically find peaks and fit spectral lines to the preprocessed spectral data to obtain the center position and half width at half maximum (WHM) of the spectral lines. Construct a continuous spectral line broadening field through interpolation. Merge the spectral line broadening field with the structural element length field obtained in Step 2 to construct a spectral line sensing structural element field. Step 5: Based on the spectral physical parameters obtained in Step 4, construct peak masking kernels and set weighting coefficients. Superimpose all peak masking kernels and normalize them to obtain the physical peak masking weight field. Step 6: Divide the multi-channel spectrum into multiple channel segments. For each channel segment, obtain the initial background curve based on the results of Steps 3 to 5. Optimize the global background by constructing a cross-segment steady-state objective function to achieve inter-segment steady-state envelope reconstruction and cross-segment offset correction. Step 7: Based on the physical peak masking weight field obtained in Step 5, define the weights of the data items, construct a direction-constrained asymmetric smoothing objective function, and perform smoothing optimization on the global background obtained in Step 6. The objective function penalizes the upward bending of the background much more than the downward bending. Step 8: Based on the final background curve obtained in Step 7, perform background subtraction operation and output the background-removed spectrum; the background subtraction rule is: the intensity value of the background-removed spectrum is the difference between the intensity value of the preprocessed spectral data and the intensity value of the final background curve, and if the difference is negative, it is taken as 0.

2. The method for background subtraction of multi-channel spliced ​​spectra in laser plasma according to claim 1, characterized in that: The specific process of generating the length field of the multi-domain autocovariance structuring element in step two includes: Step S21: Calculate the first-order and second-order differences of the spectrum and its neighborhood. The first-order difference is obtained by dividing the difference of the intensity values ​​of two adjacent wavelength points by twice the wavelength interval. The second-order difference is obtained by subtracting twice the intensity value of the current wavelength point from the sum of the intensity values ​​of two adjacent wavelength points and then dividing by the square of the wavelength interval. Step S22: Calculate the first-order difference variance, second-order difference variance, and first-order and second-order difference covariance within the local window; Step S23: Add the absolute values ​​of the first-order difference variance, the second-order difference variance, and twice the first-order and second-order difference covariance, and then take the square root of the sum to obtain the local complexity index. Step S24: Normalize the complexity index by subtracting the minimum value among all complexity indices from the current complexity index, then dividing by the difference between the maximum and minimum complexity indices and adding a small constant to obtain the normalized complexity index, which has a value range between 0 and 1. Step S25: Map the normalized complexity index to the struct length. The mapping method is as follows: add the lower limit of the struct length to the difference between the upper and lower limits of the struct length, multiply by the normalized complexity index, and then adjust the result to the closest odd number that is not less than 3 to obtain the struct length field.

3. The method for background subtraction of multi-channel spliced ​​spectra in laser plasma according to claim 1, characterized in that: The specific process of multi-scale dual-envelope inversion fusion in step three includes: Step S31: Perform morphological opening operations using structuring element lengths of different scales. Perform this operation on the original spectrum to obtain the lower envelope, and perform this operation on the inverted spectrum and then invert it again to obtain the upper envelope. Step S32: Use weighted average or quantile to summarize the lower and upper envelopes at multiple scales to obtain the global lower envelope and global upper envelope; Step S33: Calculate the local amplitude imbalance by subtracting the intensity value of the global lower envelope at the current wavelength from the spectral intensity value at that wavelength, and then dividing by the difference between the intensity values ​​of the global upper envelope and the global lower envelope at that wavelength, plus a small constant. Step S34: Map the local amplitude imbalance to a fusion weight using a monotonic function with a value between 0 and 1. Based on this fusion weight, perform a weighted summation of the global lower envelope and the global upper envelope to obtain the fusion envelope, which serves as the initial background prior.

4. The method for background subtraction of multi-channel spliced ​​spectra in laser plasma according to claim 1, characterized in that: The specific process of constructing the spectral line sensing structure element field in step four includes: Step S41: The center position and half width at half maximum (WHM) of each spectral line are obtained through automatic peak finding and fitting. Kernel function is used for interpolation to construct a continuous spectral line broadening field. A smoothing bandwidth is introduced during the interpolation process to ensure the smoothness of the broadening field. At the same time, a small constant is added to avoid the denominator being zero. Step S42: Normalize the spectral broadening field by subtracting the minimum broadening value from the current wavelength point, then dividing by the difference between the maximum and minimum broadening values ​​and adding a small constant to obtain the normalized broadening value, which ranges from 0 to 1. Step S43: Map the normalized expansion value to the struct length. The mapping method is: add the difference between the upper and lower limits of the struct length to the lower limit of the struct length, multiply by the normalized expansion value, and then adjust the result to the closest odd number that is not less than 3. Step S44: The statistical complexity structuring element length obtained in Step 2 is fused with the broadening driving structuring element length obtained in this step. The fusion method is to multiply the two by their respective fusion weights and then sum them to obtain the spectral sensing structuring element field.

5. The method for background subtraction of multi-channel spliced ​​spectra in laser plasma according to claim 1, characterized in that: The specific process of constructing the physical peak masking weight field in step five includes: Step S51: For each spectral line, construct a peak masking kernel based on its center position, peak height, and full width at half maximum (FWHM). The peak masking kernel is constructed using an exponential function, where the exponential part is the square of the difference between the negative wavelength point and the center position of the spectral line, divided by the square of twice the parameter proportional to the FWHM of the spectral line, where the proportional parameter is the result of dividing the FWHM of the spectral line by twice the natural logarithm 2. Step S52: Set a weighting coefficient based on the peak height. This coefficient is the current spectral line's peak height divided by the maximum value of all spectral line peak heights plus a small constant. Step S53: Multiply the peak masking kernels of all spectral lines by their corresponding weighting coefficients and then superimpose them. Then restrict the superposition result to the range of 0 to 1 to obtain the physical peak masking weight field.

6. The method for background subtraction of multi-channel spliced ​​spectra in laser plasma according to claim 1, characterized in that: The specific process of inter-segment steady-state envelope reconstruction and cross-segment offset correction in step six includes: Step S61: Divide the multi-channel spectrum into multiple channel segments, determine the sampling index set for each channel segment, and obtain the initial background curve for each channel segment based on the results of step S61. Step S62: Construct a cross-segment steady-state objective function, which includes two parts: the first part is the sum of squares of the difference between the global background in each channel segment and the initial background curve of the channel segment; the second part is the sum of squares of the difference between the global background at the current channel wavelength point and the global background at the corresponding wavelength point of the adjacent channel in the boundary region at the junction of adjacent channels, multiplied by the inter-segment coupling weight. Step S63: By minimizing the cross-segment steady-state objective function, a consistent steady-state background is obtained across multiple channels, ensuring that the background between each channel segment is continuous without obvious steps.

7. The method for background subtraction of multi-channel spliced ​​spectra in laser plasma according to claim 1, characterized in that: The specific process of direction-constrained asymmetric smoothing in step seven includes: Step S71: Define a second-order difference operator, which is calculated using the background value of the next adjacent wavelength point, twice the background value of the current wavelength point, and the background value of the previous adjacent wavelength point. The second-order difference result is split into positive and negative components according to the sign. Step S72: Define the weight of the data item based on the physical peak masking weight field. The weight is 1 minus the value of the physical peak masking weight field plus a small constant that ensures non-zero weight. Step S73: Construct a directionally constrained asymmetric smoothing objective function, which consists of three parts: the first part is the sum of the products of the data item weights and the squares of the differences between the spectral intensity values ​​and the background values; the second part is the product of the upward bending penalty coefficient and the sum of the squares of the positive direction components of the second-order difference; and the third part is the product of the downward bending penalty coefficient and the sum of the squares of the negative direction components of the second-order difference, wherein the upward bending penalty coefficient is much larger than the downward bending penalty coefficient. Step S74: Minimize the objective function using the iterative weighted least squares method to obtain the final background curve.

8. The method for background subtraction of multi-channel spliced ​​spectra in laser plasma according to claim 1, characterized in that: This includes a laser-plasma multi-channel splicing spectral background subtraction device for implementing the method, the device comprising: Spectral acquisition module (101): Connected to the LIBS spectrometer, used to acquire multi-channel raw spectral data; Preprocessing module (102): Connected to the spectral acquisition module (101), used to perform preprocessing operations such as wavelength resampling, noise filtering, and outlier removal on the raw spectral data; Multi-domain adaptive morphological background estimation module (103): Connected to the preprocessing module (102), including a multi-domain autocovariance structural element generation submodule (1031), a multi-scale dual-envelope inversion fusion submodule (1032), a spectral line broadening-driven spectral line sensing structural element field submodule (1033), and a physical peak masking weight field submodule (1034), respectively used to perform steps S2-S5 in claim 1. Operation; Inter-segment steady-state envelope reconstruction module (104): connected to the multi-domain adaptive morphological background estimation module (103), used to perform the inter-segment steady-state envelope reconstruction and cross-segment offset correction operation in step S6 of claim 1; Direction-constrained asymmetric smoothing module (105): connected to the inter-segment steady-state envelope reconstruction module (104) and the multi-domain adaptive morphological background estimation module (103), used to perform the direction-constrained asymmetric smoothing operation in step S7 of claim 1; Background subtraction and result output module (106): connected to the direction-constrained asymmetric smoothing module (105), used to perform the background subtraction operation in step S8 of claim 1, and output background-free spectral data and visualization results.