Element quantitative analysis method, system, equipment and medium

By preprocessing LIBS spectral data and screening characteristic spectral lines, combined with the Boltzmann plane graph method and elastic network, the problems of low detection efficiency and insufficient precision in LIBS analysis were solved, and high-precision quantitative analysis of stainless steel elements was achieved.

CN120668639APending Publication Date: 2025-09-19SUZHOU NUCLEAR POWER RES INST CO LTD +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510754436.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

The existing LIBS analysis method has problems in the quantitative analysis of stainless steel elements, such as low detection efficiency, matrix effect, difficulty in selecting characteristic spectral lines, high model complexity, and overfitting, resulting in insufficient quantitative analysis accuracy and model interpretability.

Method used

By obtaining LIBS spectral data for preprocessing, combining the element spectral line standard library and the Boltzmann plane diagram method, the element plasma temperature is calculated and analyzed, and the characteristic spectral lines are screened using feature extraction rules and elastic networks, and input into the element quantitative analysis model to predict the content.

Benefits of technology

It improves the quantitative analysis accuracy and efficiency of LIBS technology, simplifies the operation process, makes it suitable for real-time detection in industrial sites, and enhances the interpretability and applicability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120668639A_ABST
    Figure CN120668639A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of spectrum detection, in particular to an element quantitative analysis method, system and equipment and a medium. The method comprises the following steps: acquiring LIBS spectral data of a sample; preprocessing the LIBS spectral data to obtain target spectral data; according to the target spectral data, on the basis of an element spectral line standard library, the analysis element and the matrix element are calibrated, and a calibrated analysis element spectral line and a calibrated matrix element spectral line are obtained; according to the spectral line of the analysis element and the spectral line of the matrix element, calculating to obtain the plasma temperature of the analysis element by using a Boltzmann planar graph method; and inputting the analysis element plasma temperature and the analysis element spectral line into the element quantitative analysis model to obtain the predicted content of the analysis element. The method effectively solves the problems of low detection efficiency, complex operation, sensitive matrix effect and the like in the prior art, and is suitable for rapid and accurate quantitative analysis of stainless steel elements on an industrial site.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of spectral detection technology, and in particular to a method, system, equipment and medium for element quantitative analysis. Background Art

[0002] Stainless steel is widely used in numerous industrial fields due to its excellent corrosion resistance, high-temperature resistance, and processability. Quantitative material analysis is a core technical approach to supporting product development and manufacturing. Traditional analytical methods, such as grinding machines and chemical solutions, suffer from low detection efficiency, complex operation, and high skill requirements, making them difficult to meet the needs of large-scale, rapid, and accurate quantitative analysis. In recent years, LIBS (Laser-induced breakdown spectroscopy), an emerging spectral analysis method, has been gradually applied to the quantitative analysis of stainless steel materials due to its advantages of requiring no sample pretreatment, non-contact detection, rapidity, and ability to simultaneously analyze multiple elements. However, existing LIBS analysis methods often rely on single-variable calibration curves or multivariable regression models, which are subject to problems such as matrix effects, difficulty in selecting characteristic spectral lines, high model complexity, and overfitting. Furthermore, they lack consideration of the physical state of the plasma, resulting in insufficient quantitative analysis accuracy and model interpretability. Therefore, an artificial neural network method that incorporates physical information constraints is needed to improve the accuracy and efficiency of LIBS stainless steel element quantitative analysis and meet the needs of real-time industrial on-site detection. Summary of the Invention

[0003] In view of the above-mentioned shortcomings of the prior art, the object of the present invention is to provide an element quantitative analysis method, system, equipment and medium for solving the problem of low detection efficiency in the prior art stainless steel element quantitative analysis technology.

[0004] To achieve the above-mentioned and other related objectives, the present invention provides an element quantitative analysis method, system, device, and medium, which are applied to the field of spectral detection technology. The method comprises: obtaining LIBS spectral data of a sample; preprocessing the LIBS spectral data to obtain target spectral data; calibrating the analytical element and the matrix element based on the target spectral data and an element spectral line standard library to obtain calibrated analytical element spectral lines and matrix element spectral lines; calculating the analytical element plasma temperature based on the analytical element spectral lines and the matrix element spectral lines using the Boltzmann plane diagram method; and inputting the analytical element plasma temperature and the analytical element spectral lines into an element quantitative analysis model to obtain a predicted content of the analytical element.

[0005] In one embodiment of the present invention, the step of preprocessing the LIBS spectral data to obtain target spectral data includes: splicing the LIBS spectral data of multiple channels in wavelength order to obtain continuous spectral data; performing noise reduction on the continuous spectral data to obtain denoised data; performing baseline correction on the denoised data to obtain baseline-corrected data; and normalizing the baseline-corrected data to obtain target spectral data.

[0006] In one embodiment of the present invention, the step of performing denoising based on the continuous spectral data to obtain denoised data includes: determining the optimal wavelet basis and the number of decomposition layers based on the continuous spectral data through cross-validation or grid search with the goal of maximizing the signal-to-noise ratio; performing wavelet decomposition based on the optimal wavelet basis and the number of decomposition layers to obtain approximate coefficients and detail coefficients, and determining the optimal threshold of the detail coefficients of each layer using an adaptive SUREShrink threshold; filtering the detail coefficients of each layer using a soft threshold function based on the optimal threshold, and performing an inverse wavelet transform on the filtered approximate coefficients and the detail coefficients to obtain the denoised data.

[0007] In one embodiment of the present invention, the step of calibrating the analytical element and the matrix element according to the target spectral data based on the element spectral line standard library to obtain calibrated analytical element spectral lines and matrix element spectral lines includes: determining the theoretical characteristic peak positions and theoretical spectral parameters corresponding to the analytical element and the matrix element respectively by comparing with the element spectral line standard library; based on the target spectral data, with the theoretical characteristic peak position as the center, selecting 7 consecutive data points within a preset wavelength error range, and calculating the spectral intensity value corresponding to each point; screening out the maximum point of the spectral intensity value among the 7 data points, and using it as the actual characteristic peak position of the analytical element or the matrix element; determining the actual spectral line of the analytical element according to the element spectral line standard library based on the actual characteristic peak position of the analytical element, and merging it with the theoretical spectrum of the analytical element to obtain a plurality of analytical element spectral lines; determining the actual spectral line of the matrix element according to the element spectral line standard library based on the actual characteristic peak position of the matrix element, and merging it with the theoretical spectrum of the matrix element to obtain a plurality of matrix element spectral lines.

[0008] In one embodiment of the present invention, the step of inputting the plasma temperature of the analytical element and the spectral line of the analytical element into the element quantitative analysis model to obtain the predicted content of the analytical element includes: extracting the characteristic wavelength of the analytical element based on the spectral line of the analytical element based on a preset feature extraction rule; determining the characteristic spectral line corresponding to the analytical element based on the characteristic wavelength; matching the characteristic spectral line with the plasma temperature of the analytical element to obtain the target feature; and inputting the target feature into the element quantitative analysis model to obtain the predicted content of the analytical element.

[0009] In one embodiment of the present invention, the feature extraction rules are pre-set using a pre-trained elastic network: for each analytical element: the actual content of the analytical element and the mutual information of the analytical element's spectral lines are calculated respectively, and the intermediate spectral lines of the analytical element are screened out based on the mutual information; the intermediate spectra of the analytical elements are input into the elastic network to obtain the weights corresponding to the intermediate spectral lines of the analytical elements, and characteristic spectral lines are screened out based on the weights; and the characteristic wavelength corresponding to the analytical element is determined based on the characteristic spectral lines.

[0010] In one embodiment of the present invention, the element quantitative analysis model is obtained through training, and the loss function is as follows:

[0011] The total loss of the element quantitative analysis model, λ is the intensity consistency weight, N is the number of spectral lines of the analyzed element calibrated according to the target spectrum data, i is the sequence number of the wavelength, k i is the proportional constant, c i is the predicted content, g i is the energy level degeneracy on the spectrum line corresponding to the i-th wavelength, E i is the energy level on the spectrum line corresponding to the i-th wavelength, k B is the Boltzmann constant, T is the plasma temperature, I measured is the measured spectral intensity of the spectral line at the i-th wavelength.

[0012] In one embodiment of the present invention, a system for quantitative element analysis is further provided, comprising: a spectral information acquisition module for acquiring LIBS spectral data of a sample; a preprocessing module for preprocessing the LIBS spectral data to obtain target spectral data; a calibration module for calibrating the analytical element and the matrix element based on the target spectral data and an element spectral line standard library to obtain calibrated analytical element spectral lines and matrix element spectral lines; a plasma temperature calculation module for calculating the analytical element plasma temperature based on the analytical element spectral lines and the matrix element spectral lines using the Boltzmann plane diagram method; and a content prediction module for inputting the analytical element plasma temperature and the analytical element spectral lines into an element quantitative analysis model to obtain a predicted content of the analytical element.

[0013] In one embodiment of the present invention, an electronic device is also provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the electronic device implements any of the above-mentioned element quantitative analysis methods.

[0014] In one embodiment of the present invention, a computer-readable storage medium is further provided, on which a computer program is stored. When the computer program is executed by a processor of a computer, the computer is caused to execute any of the above-mentioned element quantitative analysis methods.

[0015] As described above, the present invention provides a method, system, device, and medium for quantitative elemental analysis, which have the following beneficial effects: By preprocessing the sample's LIBS spectral data, the analyte and matrix elements are precisely calibrated based on a standard library of elemental spectral lines, ensuring accurate spectral line identification. The Boltzmann plane plot method is used to calculate the plasma temperature of the analyte element, and combined with an elemental quantitative analysis model, a high-precision prediction of the analyte element content is achieved. This invention significantly improves the reliability of quantitative analysis using LIBS technology, offering advantages such as ease of operation, rapid analysis speed, and wide applicability. It provides an efficient means of elemental quantitative analysis for industrial testing, environmental monitoring, and other fields. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 A schematic diagram of a process for elemental quantitative analysis provided by an embodiment of the present invention;

[0017] Figure 2 Shown is a schematic diagram of Fe element spectrum calibration provided by one embodiment of the present invention;

[0018] Figure 3 A schematic diagram showing the target characteristics obtained by matching characteristic spectral lines with the plasma temperature of the analyzed element according to an embodiment of the present invention;

[0019] Figure 4 Shown is a structural block diagram of an element quantitative analysis system provided by an embodiment of the present invention;

[0020] Figure 5 Shown is a structural schematic diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] The following describes the embodiments of the present invention through specific examples. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments. The details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other unless they conflict.

[0022] It should be noted that the illustrations provided in the following embodiments are merely schematic illustrations of the basic concept of the present invention. Therefore, the illustrations only show components related to the present invention and are not drawn according to the number, shape, and size of components in actual implementation. In actual implementation, the type, quantity, and proportion of each component may be changed arbitrarily, and the component layout may also be more complex.

[0023] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it will be apparent to those skilled in the art that the embodiments of the present invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring the embodiments of the present invention.

[0024] The present invention provides a LIBS stainless steel element quantitative analysis method, which obtains the LIBS spectral signal and spectral graph of the sample, performs channel splicing, noise reduction, baseline correction and normalization preprocessing on the LIBS spectral signal to obtain target data, and calibrates the preset analytical elements and preset collective elements in the spectral graph according to the preset analytical elements and preset matrix elements with reference to the element spectrum standard library to obtain calibration characteristic spectral lines. According to the calibration characteristic spectral lines, the target features are extracted using mutual information and elastic network. According to the spectral line information, the plasma temperature corresponding to the preset matrix element is calculated by comparing the Boltzmann plane diagram and matched with the target features to obtain a feature matrix. The feature matrix is ​​input into the LIBS stainless steel element quantitative analysis system to obtain the predicted content of the preset analytical elements; wherein, the LIBS stainless steel element quantitative analysis system is a lightweight system obtained by a trained fully connected layer network multilayer perceptron (MLP) through knowledge distillation technology, has only one hidden layer, is convenient for deployment in actual operation, and has stronger applicability. At the same time, the LIBS stainless steel element quantitative analysis system adds the Bohr-Boltzmann distribution rate as a constraint term to the loss function, effectively improving the prediction accuracy of the system while also improving the interpretability of the system.

[0025] See Figure 1 , which shows a flow chart of an element quantitative analysis method in an exemplary embodiment of the present application, comprising the following steps:

[0026] S1, obtain LIBS spectrum data of the sample.

[0027] LIBS spectra of the samples were collected using a laser-induced breakdown spectroscopy (LIBS) instrument. In a preferred embodiment of the present invention, LIBS spectra of stainless steel samples were collected within a range of 100-500 nm. The laser used was a pulsed Nd:YAG laser with a wavelength of 1064 nm and a power setting between 20 and 100 mJ. A spectrometer was used to collect the plasma emission spectrum. Twenty ablations were performed on each stainless steel sample, and the corresponding LIBS data were obtained.

[0028] S2, preprocessing the LIBS spectrum data to obtain target spectrum data.

[0029] Specifically, in one embodiment of the present invention, the step of preprocessing the LIBS spectral data to obtain target spectral data includes:

[0030] (1) The LIBS spectral data of multiple channels are spliced ​​in wavelength order to obtain continuous spectral data.

[0031] In a preferred embodiment of the present invention, according to the setting of the spectrometer, the spectral data of multiple channels are spliced ​​together in the order of wavelength to form a continuous spectral curve, that is, a continuous spectral signal is obtained.

[0032] (2) Denoise the continuous spectral data to obtain denoised data.

[0033] First, based on the continuous spectral data, the optimal wavelet basis and number of decomposition layers are determined through cross-validation or grid search with the goal of maximizing the signal-to-noise ratio.

[0034] Secondly, wavelet decomposition is performed according to the optimal wavelet basis and the number of decomposition levels to obtain approximate coefficients and detail coefficients, and the optimal threshold of the detail coefficient of each layer is determined using an adaptive SUREShrink (Stein's Unbiased Risk Estimation Shrinkage) threshold.

[0035] Finally, the detail coefficients of each layer are filtered using a soft threshold function according to the optimal threshold, and the filtered approximate coefficients and the detail coefficients are subjected to an inverse wavelet transform to obtain the denoised data.

[0036] In a preferred embodiment of the present invention, discrete wavelet transform is used to perform wavelet decomposition on the continuous spectral signal, and a wavelet basis function is selected, such as the db4 wavelet basis function; and a decomposition level is selected, such as 3 levels. Furthermore, a method for determining a threshold based on SUREShrink requires determining the optimal threshold layer by layer. SUREShrink is an adaptive method based on the SURE (Stein's Unbiased Risk Estimation) criterion, that is, the optimal threshold is determined by an adaptive method based on the SURE (Stein's Unbiased Risk Estimation) criterion, and the calculation process is as follows:

[0037] ① Take the minimum to maximum absolute values ​​of the current layer detail coefficient as the candidate threshold range to generate the candidate threshold range.

[0038] ② According to the SURE formula, calculate the SURE value of each candidate threshold λ.

[0039] When applying the soft threshold function, the SURE formula can be specifically expressed as:

[0040] Among them, y i (i=1, 2, ..., n) is the detail coefficient of the noisy signal, n is the number of detail coefficients, λ is the preset threshold, and T is the number of coefficients whose absolute value exceeds the preset threshold λ (i.e., the number of coefficients retained as non-zero); The noise variance is estimated by using the median absolute value of the highest frequency wavelet subband coefficients D J is the wavelet coefficient of the highest frequency subband, g λ (y i ) is the soft threshold function, and the soft threshold function expression is:

[0041] Among them, w is the original wavelet coefficient, that is, the approximate coefficient or detail coefficient.

[0042] ③ Select the λ that minimizes the SURE value as the optimal threshold for the current layer.

[0043] ④ Process the wavelet coefficients according to the threshold value and perform inverse wavelet transform to obtain denoised data.

[0044] (3) performing baseline correction based on the denoised data to obtain baseline-corrected data;

[0045] In a preferred embodiment of the present invention, the baseline correction algorithm uses a piecewise cubic Hermit interpolation method. The specific steps are as follows:

[0046] First, extract the minimum points of the spectral signal after wavelet denoising. To ensure smoothness of the baseline signal, calculate the average signal strength of the minimum points. Only the minimum points below the average are retained to form the baseline point set. The first and last data points of the original signal and the first and last data points of the extracted minimum points are added to this point set. The final extracted point set is grouped into groups of four data points, sharing the first and last data points between groups to ensure continuity of the baseline signal. If the last group has fewer than four points, the last point value is used to complete the group.

[0047] Secondly, because the piecewise cubic Hermit interpolation method requires the first-order derivative of the interpolation point to be continuous, and the LIBS spectral signal is a discrete signal with non-uniform spacing, it is impossible to obtain the derivative. Therefore, it is necessary to define the interpolation condition, with one of the signals y = f(x i ) as an example:

[0048] The first derivative at the starting point is: The first derivative at the midpoint is: The first derivative at the end point is: Among them, x i is the i-th spectral signal point.

[0049] ③ Based on the defined interpolation conditions, a piecewise Hermit cubic interpolation polynomial is obtained. Substituting the baseline point set into the signal, a cubic Hermit interpolation is performed on each signal group to obtain the baseline signal for each group. Each baseline signal group is concatenated to form a full-band baseline signal. The corrected signal is obtained by subtracting the baseline signal from the original signal.

[0050] (4) Normalizing the baseline correction data to obtain target spectrum data.

[0051] In a preferred embodiment of the present invention, the normalization adopts the total area normalization algorithm. The calculation formula is defined as: Among them, I norm,i is the normalized intensity value of the i-th characteristic peak, I i is the intensity value of the i-th characteristic peak; It is the sum of the intensities of all peaks in the entire spectrum or selected region.

[0052] S3, calibrating the analytical elements and matrix elements according to the target spectrum data and based on an element spectrum line standard library to obtain calibrated analytical element spectrum lines and matrix element spectrum lines.

[0053] The target spectrum data is obtained after LIBS spectrum data is preprocessed. However, at this time, we cannot know the characteristic peak position corresponding to the analyzed element in the spectrum graph, so calibration is required.

[0054] Specifically, in one embodiment of the present invention, the steps of calibrating the analytical element and the matrix element based on the target spectral data and the element spectral line standard library to obtain the calibrated analytical element spectral line and the matrix element spectral line include:

[0055] First, the theoretical characteristic peak positions and theoretical spectral parameters corresponding to the analysis element and the matrix element are determined by comparing the element spectral line standard library.

[0056] Secondly, based on the target spectrum data, with the theoretical characteristic peak position as the center, 7 consecutive data points are selected within the preset wavelength error range, and the spectral intensity value corresponding to each point is calculated.

[0057] Then, the point with the maximum spectral intensity value among the 7 data points is screened out and used as the actual characteristic peak position of the analysis element or the matrix element.

[0058] Then, based on the actual characteristic peak position of the analyzed element, the actual spectral line of the analyzed element is determined according to the element spectral line standard library, and is combined with the theoretical spectrum of the analyzed element to obtain a plurality of the analyzed element spectral lines.

[0059] Finally, the actual spectrum lines of the matrix elements are determined based on the actual characteristic peak positions of the matrix elements according to the element spectrum line standard library, and are combined with the theoretical spectrum of the matrix elements to obtain a plurality of the matrix element spectrum lines.

[0060] The characteristic peak position corresponding to the element is determined in theory, so the theoretical characteristic peak position of the analyzed element can be determined by comparing the element spectrum standard library, and the position of the theoretical characteristic peak is usually referred to as a characteristic spectrum line. One analyzed element corresponds to multiple characteristic peak positions, and each characteristic spectrum line corresponds to a characteristic wavelength, that is, one element corresponds to multiple characteristic spectrum lines and characteristic wavelengths, and one element corresponds to the energy level degeneracy, the energy of the upper energy level, and the transition probability between the upper and lower energy levels of the spectrum line at the wavelength. Due to the various uncontrollable factors that may cause errors in the measured data during the actual measurement process, it is necessary to determine the position of the actual characteristic peak based on the theoretical characteristic peak position. In a preferred embodiment of the present invention, the actual characteristic peak position in the target spectrum data is found by a 7-point peak-finding method, with each theoretical characteristic peak position as the center, and 7 consecutive data points are selected within the error range of the preset wavelength. In a preferred embodiment of the present invention, 0.3nm is selected as the error range, and the resolution of the spectrometer is usually selected for the error range to calculate the spectral intensity value corresponding to each point. The point with the maximum spectral intensity value among the seven data points is selected and used as the actual characteristic peak position of the analyzed element or the matrix element, i.e., the actual spectral line. In summary, the target spectral data can be used to obtain multiple actual spectral lines of the analyzed element and their corresponding energy level degeneracy on the spectral line, the energy of the upper energy level, and the transition probability between the upper and lower energy levels of the spectral line; and multiple actual spectral lines of the matrix element and their corresponding energy level degeneracy on the spectral line, the energy of the upper energy level, and the transition probability between the upper and lower energy levels of the spectral line.

[0061] Further, such as Figure 2 As shown, a calibration spectrum of the Fe element is provided in a preferred embodiment of the present invention, in which the horizontal axis is the wavelength (unit: nm) and the vertical axis is the spectral intensity value. The identifier of the Fe element marked in the figure, such as: Fe I 302.06, Fe represents the iron element, I represents a neutral particle, and 302.06 indicates that the characteristic wavelength position corresponding to the characteristic peak is 302.06nm. The Fe element can correspond to multiple actual characteristic peaks in the same spectrum, that is, the same analytical element corresponds to multiple characteristic wavelengths in the spectrum. Each actual characteristic peak corresponds to a certain energy level degeneracy on the spectrum line, the energy of the upper energy level, and the transition probability between the upper and lower energy levels of the spectrum line.

[0062] S4, calculating the plasma temperature of the analyzed element according to the analyzed element spectrum line and the matrix element spectrum line using the Boltzmann plane diagram method.

[0063] Assuming that the plasma is homogeneous and in local thermodynamic equilibrium during spectrum acquisition, the plasma temperature of the analyzed element is calculated using the Boltzmann plane method based on the spectral lines of the analyzed element and the matrix element.

[0064] S5, inputting the plasma temperature of the analyzed element and the spectral line of the analyzed element into an element quantitative analysis model to obtain a predicted content of the analyzed element.

[0065] Specifically, in one embodiment of the present invention, the step of inputting the plasma temperature of the analyzed element and the spectral line of the analyzed element into the element quantitative analysis model to obtain the predicted content of the analyzed element includes:

[0066] (1) According to the spectral lines of the analyzed elements, the characteristic wavelengths of the analyzed elements are extracted based on preset feature extraction rules.

[0067] Furthermore, the feature extraction rules are pre-set using a pre-trained elastic network.

[0068] Before applying the model, pre-set feature extraction rules based on the actual content of the analyzed elements and the calibrated spectral lines. The steps are as follows:

[0069] First, for each analysis element:

[0070] Calculate the actual content of the analyzed elements and the mutual information of the analyzed element spectral lines respectively, and screen out the intermediate spectral lines of the analyzed elements based on the mutual information;

[0071] Calculate the mutual information between each spectral line of the analyzed element and the actual content of the analyzed element. The mutual information calculation formula is: Among them, X i For each spectral line of the analyzed element, Y is the target variable, I(X i ; Y) is the mutual information value between the spectrum line of the i-th analyzed element and the actual content of the analyzed element, p(x i ,y) refers to X i The joint probability distribution of and Y, p(x i ) and p(y) are X i and the marginal probability distribution of Y. The spectral lines of all analyzed elements are sorted according to the mutual information value, and the spectral lines exceeding the preset threshold are retained or a preset number of spectral lines are selected from large to small. The screened spectral lines are sorted into the intermediate spectra of the analyzed elements, that is, the spectral lines with the strongest correlation with the target variable.

[0072] Secondly, the intermediate spectra of the analyzed elements are input into the elastic network to obtain the weights corresponding to the intermediate spectral lines of each analyzed element, and the characteristic spectral lines are screened out according to the weights.

[0073] The intermediate spectrum of the analyzed element is input into the elastic network training, and the characteristic spectrum line is selected according to the characteristic coefficient output by the elastic network. The loss function expression of the elastic network is:

[0074] Among them, X i is the intermediate spectrum of the analyzed element, y i To predict the content of the analyzed elements, in the present invention, the elastic network is only used to screen the characteristic spectral lines of the analyzed elements. Therefore, the output of the elastic network and the measured content are not used for subsequent predictions. λ is the regularization strength, which controls the influence of the regularization term. α is the mixed ratio of L1 and L2 regularization. When α = 1, only L1 regularization is used, which is a pure Lasso regression. When α = 0, only L2 regularization is used, which is a pure Ridge regression. In a preferred embodiment of the present invention, α and λ are the optimal values ​​selected by the elastic network using cross-validation, and n is the number of spectral lines in the intermediate spectrum of the analyzed elements. β is the characteristic coefficient of the model, that is, the weight corresponding to each spectral line in the intermediate spectrum. Each spectral line in the intermediate spectrum is sorted according to the weight value, and spectral lines exceeding a preset weight threshold are screened or a set number of spectral lines are selected from large to small as the characteristic spectral lines corresponding to the analyzed elements. In a preferred embodiment of the present invention, the preset weight threshold is set to 0, that is, only spectral lines with weights exceeding 0 are retained as the characteristic spectral lines corresponding to the analyzed elements.

[0075] Finally, the characteristic wavelength corresponding to the analyzed element is determined based on the characteristic spectral line.

[0076] Each characteristic spectral line has a unique corresponding characteristic wavelength. The characteristic spectral line corresponding to the analytical element selected by the above rules has the corresponding wavelength as the characteristic wavelength of the analytical element. When the model is applied, the characteristic wavelength determined according to the rule can be used to determine the characteristic wavelength of the analytical element in the spectrum graph of the target spectral data when the model is applied. That is, the characteristic spectral line and characteristic spectral line corresponding to the analytical element can be directly determined from the target spectral data.

[0077] (2) Determine the characteristic spectral line corresponding to the analyzed element based on the characteristic wavelength.

[0078] The characteristic wavelength is used to determine the characteristic spectral line corresponding to the analyzed element in the target spectral data, and the upper and lower energy level degeneracy, upper and lower energy level energies and transition probability corresponding to the analyzed element at this wavelength are also determined.

[0079] (3) Matching the characteristic spectral line with the plasma temperature of the analyzed element to obtain the target feature.

[0080] like Figure 3 As shown, the calibrated element spectrum table contains: material number, i.e., Material 1, Material 2, Material 3, ...; two sets of measurement data for each material are distinguished by the grade, i.e., Grade 1, Grade 2, Grade 3, ...; the wavelength corresponding to the analyzed element spectrum line, i.e., Wavelength 1, Wavelength 2, ... Wavelength N, and the spectral intensity value measured at the characteristic wavelength for each grade. The relevant parameter table shows: at each characteristic wavelength, the upper energy level degeneracy g corresponding to the spectrum line k , i.e.: g1, g2...; upper energy level energy E k , that is: E1, E2...; transition probability A k The table of spectral intensity values ​​corresponding to characteristic wavelengths is constructed based on the calibrated elemental spectra. Based on the feature extraction rules, the K most highly correlated characteristic spectral lines are selected from N calibrated elemental spectra. This results in the characteristic wavelengths corresponding to these characteristic spectral lines. Accordingly, the spectral intensity values ​​in the table are modified to represent the spectral intensity values ​​corresponding to each brand at these characteristic wavelengths. The plasma temperature corresponding to each brand at each wavelength is calculated based on the relevant parameters of the analyzed element. The table of spectral intensity values ​​corresponding to characteristic wavelengths is then matched with the plasma temperature table to produce the final target characteristic table, which includes the spectral intensity corresponding to each brand at each characteristic wavelength, as well as the plasma temperature corresponding to each brand.

[0081] (4) Inputting the target characteristics into the element quantitative analysis model to obtain the predicted content of the analyzed elements.

[0082] The target features are input into the element quantitative analysis model, and the element quantitative analysis outputs the predicted content of the analyzed elements, wherein the element quantitative analysis is a multi-layer perceptron model with three hidden layers.

[0083] Specifically, in one embodiment of the present invention, the element quantitative analysis model is obtained through training, and the loss function is as follows:

[0084] Wherein, L is the total loss of the element quantitative analysis model, λ is the intensity consistency weight, N is the number of spectral lines of the analyzed element calibrated according to the target spectrum data, i is the sequence number of the wavelength, k is the wavelength of the element, and i is the proportional constant, which is calibrated by the spectrum of the matrix elements. In the same LIBS system, the k of each spectrum of the same sample is i Approximately, the spectrum of the matrix element can be used to calibrate k iAnd take the average and apply it to all analysis spectral lines: that is, according to this formula, under the condition that other parameters are determined, the matrix element spectral line information is used to calculate the k of each corresponding spectral line i And take the average and apply it to all the analysis target lines of the same sample. i is the predicted content, g i is the energy level degeneracy on the spectrum line corresponding to the i-th wavelength, E i is the energy level on the spectrum line corresponding to the i-th wavelength, g i and E i It can be checked in the element spectral line standard library and has been calibrated during the spectral line calibration process. B is the Boltzmann constant, T is the plasma temperature, I measured is the measured spectral intensity of the spectral line at the i-th wavelength.

[0085] Furthermore, to ensure real-time performance in industrial applications, the present invention uses knowledge distillation technology to lightweight and improve the element quantitative analysis model with three hidden layers, ultimately obtaining a multi-layer perceptron model with only one hidden layer. The element quantitative analysis model is set as the teacher model, and the neural network model with only one hidden layer is set as the student model. The steps for training the student model are as follows:

[0086] Obtain LIBS spectral data of multiple samples, pre-process and calibrate each sample to obtain calibrated analytical element spectral lines and matrix element spectral lines;

[0087] According to the spectral lines of the analyzed elements, characteristic spectral lines of the analyzed elements are obtained by screening using characteristic extraction rules;

[0088] According to the spectral lines of the analyzed elements and the spectral lines of the matrix elements, the Boltzmann plane diagram method is used to calculate the plasma temperature of the analyzed elements, and the target characteristics are obtained by matching with the characteristic spectral lines of the analyzed elements;

[0089] Input the target features into the trained teacher model to generate pseudo element content values;

[0090] The target characteristics and the actual content values ​​of the analyzed elements obtained in advance are input into the student model to obtain the predicted content;

[0091] Calculate the distillation loss between pseudo-element content and predicted content;

[0092] Calculate the student loss between the actual and predicted contents of the analyzed elements;

[0093] The total loss is calculated based on the distillation loss and the student loss, and the parameters of the student model are updated based on the total loss to obtain the trained student model, which is used as a lightweight element quantitative analysis model.

[0094] Among them, the knowledge distillation composite loss function used in student model training is the weighted sum of distillation loss and student loss, expressed as follows:

[0095] L total =α·L distill +(1-α)L student Among them, L total is the total loss of knowledge distillation, α is the weight of distillation loss, L distill is the distillation loss, which is calculated as follows: is the predicted content of the teacher model for the i-th sample, L is the predicted content of the student model for the i-th sample; N is the number of samples. student is the student loss, and its calculation formula is: L student =(1-β)L data +β·L intensity ;L data is the mean square error of the predicted element content, L intensity is a physical constraint term, and its constraint formula is as follows: k i is the proportional constant, c i is the predicted content, g i is the energy level degeneracy on the spectrum line corresponding to the i-th wavelength, E i is the energy level on the spectrum line corresponding to the i-th wavelength, k B is the Boltzmann constant, T is the plasma temperature, I measured is the measured spectral intensity of the spectral line at the i-th wavelength.

[0096] like Figure 4 As shown, the element quantitative analysis system 200 includes: a spectral information acquisition module 210, a preprocessing module 220, a calibration module 230, a plasma temperature calculation module 240, and a content prediction module 250, wherein the spectral information acquisition module 210 is used to obtain LIBS spectral data of the sample; the preprocessing module 220 is used to preprocess the LIBS spectral data to obtain target spectral data; the calibration module 230 is used to calibrate the analytical elements and matrix elements based on the target spectral data and the element spectral line standard library to obtain calibrated analytical element spectral lines and matrix element spectral lines; the plasma temperature calculation module 240 is used to calculate the analytical element plasma temperature based on the analytical element spectral lines and the matrix element spectral lines using the Boltzmann plane diagram method; the content prediction module 250 is used to input the analytical element plasma temperature and the analytical element spectral lines into the element quantitative analysis model to obtain the predicted content of the analytical element.

[0097] The specific definition of the element quantitative analysis system can be found in the definition of the element quantitative analysis method above, which will not be repeated here. Each module in the above element quantitative analysis system can be implemented in whole or in part by software, hardware or a combination thereof.

[0098] The above modules may be embedded in or independent of the processor in the computer device in hardware format, or may be stored in the memory of the computer device in software format, so that the processor can call the corresponding operations of the above modules.

[0099] It should be noted that, in order to highlight the innovative part of the present invention, this embodiment does not introduce modules that are not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other modules in this embodiment.

[0100] like Figure 5 As shown, the electronic device 1 may include a memory 11, a processor 12 and a bus, and may also include a computer program stored in the memory 11 and executable on the processor 12, such as an analytical element plasma temperature calculation program.

[0101] Among them, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Furthermore, the memory 11 can also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the optimization parameters of the element quantitative analysis model, etc., but can also be used to temporarily store data that has been output or is to be output.

[0102] In some embodiments, the processor 12 may be comprised of an integrated circuit, such as a single packaged integrated circuit or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and a combination of various control chips. The processor 12 is the control core (Control Unit) of the electronic device 1, connecting the various components of the entire electronic device 1 using various interfaces and circuits. It executes or runs programs or modules stored in the memory 11 (e.g., correction functions for elemental quantitative analysis models) and calls data stored in the memory 11 to perform various functions of the electronic device 1 and process data.

[0103] The processor 12 executes the operating system and various installed application programs of the electronic device 1. The processor 12 executes the application programs to implement the steps in the above-mentioned element quantitative analysis method.

[0104] Exemplarily, the computer program may be divided into one or more modules, which are stored in the memory 11 and executed by the processor 12 to complete the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device 1.

[0105] The above-mentioned integrated unit implemented in the form of a software functional module can be stored in a computer-readable storage medium, which can be non-volatile or volatile. The above-mentioned software functional module is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, computer equipment, or network equipment, etc.) or a processor to perform part of the functions of the element quantitative analysis method described in various embodiments of the present application.

[0106] In summary, the present invention discloses a method, system, device, and medium for quantitative element analysis, which combines two feature screening algorithms, nonlinear mutual information and linear elastic network. After preliminary screening by mutual information, the elastic network is further refined to remove redundant features while retaining effective features as much as possible, thereby reducing the input dimension of the artificial neural network. By diagnosing the plasma, the plasma temperature of the matrix element is obtained, and the plasma temperature of the analyzed element is matched with the characteristic spectral line after screening and used as the input of the quantitative model. Compared with the traditional multivariate quantitative model, the physical state of the plasma is considered in the input dimension. The artificial neural network is optimized only from the perspective of the prediction target, and a physical information constraint part based on spectral line intensity information is added. That is, while calculating the mean square error between the predicted element content and the actual element content, the mean square error between the predicted theoretical spectral line intensity and the actual spectral line intensity is calculated, and the weights of the two are combined as a total loss function to optimize the quantitative model structure and hyperparameters. Incorporating domain prior physical knowledge into the loss function of the artificial neural network as a constraint term improves the accuracy of the model prediction, increases the physical interpretability of the model, and avoids overfitting. Therefore, the present invention effectively overcomes various shortcomings of the prior art and has high industrial utilization value.

[0107] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the present invention. Anyone skilled in the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by one of ordinary skill in the art without departing from the spirit and technical principles disclosed herein are intended to be covered by the claims of the present invention.

Claims

1. A method for quantitative element analysis, characterized in that: The method comprises: Obtain LIBS spectrum data of the sample; Preprocessing the LIBS spectrum data to obtain target spectrum data; According to the target spectrum data, based on the element spectrum line standard library, the analytical element and the matrix element are calibrated to obtain calibrated analytical element spectrum lines and matrix element spectrum lines; The plasma temperature of the analytical element is calculated by using the Boltzmann plane diagram method according to the analytical element spectral line and the matrix element spectral line; The plasma temperature of the analyzed element and the spectral line of the analyzed element are input into an element quantitative analysis model to obtain a predicted content of the analyzed element.

2. The element quantitative analysis method according to claim 1, characterized in that The step of preprocessing the LIBS spectrum data to obtain target spectrum data includes: splicing the LIBS spectral data of multiple channels in order of wavelength to obtain continuous spectral data; Performing noise reduction on the continuous spectral data to obtain denoised data; Performing baseline correction based on the denoised data to obtain baseline-corrected data; The baseline correction data is normalized to obtain target spectrum data.

3. The element quantitative analysis method according to claim 2, characterized in that The step of performing noise reduction on the continuous spectral data to obtain denoised data comprises: Based on the continuous spectral data, the optimal wavelet basis and decomposition layer number are determined by cross validation or grid search with the goal of maximizing the signal-to-noise ratio; Performing wavelet decomposition according to the optimal wavelet basis and the number of decomposition layers to obtain approximate coefficients and detail coefficients, and determining the optimal threshold of each layer's detail coefficient using an adaptive SUREShrink threshold; The detail coefficients of each layer are filtered using a soft threshold function according to the optimal threshold, and the filtered approximate coefficients and the detail coefficients are subjected to inverse wavelet transformation to obtain the denoised data.

4. The element quantitative analysis method according to claim 1, characterized in that The step of calibrating the analytical element and the matrix element according to the target spectrum data and based on the element spectrum line standard library to obtain the calibrated analytical element spectrum line and the matrix element spectrum line comprises: Determine the theoretical characteristic peak positions and theoretical spectral parameters corresponding to the analysis element and the matrix element respectively by comparing the element spectral line standard library; Based on the target spectrum data, with the theoretical characteristic peak position as the center, within the preset wavelength error range, 7 consecutive data points are selected, and the spectral intensity value corresponding to each point is calculated; Screening out the maximum point of the spectral intensity value among the 7 data points, and using it as the actual characteristic peak position of the analyzed element or the matrix element; Determine the actual spectral line of the analyzed element based on the actual characteristic peak position of the analyzed element according to the element spectral line standard library, and combine it with the theoretical spectrum of the analyzed element to obtain a plurality of spectral lines of the analyzed element; Based on the actual characteristic peak position of the matrix element, the actual spectrum line of the matrix element is determined according to the element spectrum line standard library, and is combined with the theoretical spectrum of the matrix element to obtain a plurality of the matrix element spectrum lines.

5. The element quantitative analysis method according to claim 1, characterized in that The step of inputting the plasma temperature of the analyzed element and the spectral line of the analyzed element into the element quantitative analysis model to obtain the predicted content of the analyzed element includes: Extracting the characteristic wavelength of the analyzed element based on the preset feature extraction rules according to the spectral line of the analyzed element; Determining the characteristic spectral line corresponding to the analyzed element according to the characteristic wavelength; The characteristic spectral line is matched with the plasma temperature of the analyzed element to obtain the target feature; the target feature is input into the element quantitative analysis model to obtain the predicted content of the analyzed element.

6. The element quantitative analysis method according to claim 5, characterized in that: The feature extraction rules are pre-set using a pre-trained elastic network: For each analysis element: Calculate the actual content of the analyzed elements and the mutual information of the analyzed element spectral lines respectively, and screen out the intermediate spectral lines of the analyzed elements based on the mutual information; Input the intermediate spectra of the analyzed elements into the elastic network to obtain the weights corresponding to the intermediate spectral lines of each analyzed element, and filter out the characteristic spectral lines based on the weights; The characteristic wavelength corresponding to the analyzed element is determined based on the characteristic spectral line.

7. The element quantitative analysis method according to claim 1, characterized in that The element quantitative analysis model is obtained through training, and the loss function is as follows: Wherein, L is the total loss of the element quantitative analysis model, λ is the intensity consistency weight, N is the number of spectral lines of the analyzed element calibrated according to the target spectrum data, i is the sequence number of the wavelength, k is the wavelength of the element, and i is the proportional constant, c i is the predicted content, g i is the energy level degeneracy on the spectrum line corresponding to the i-th wavelength, E i is the energy level on the spectrum line corresponding to the i-th wavelength, k B is the Boltzmann constant, T is the plasma temperature, I measured is the measured spectral intensity of the spectral line at the i-th wavelength.

8. An element quantitative analysis system, characterized in that: The system comprises: Spectral information acquisition module, used to obtain LIBS spectral data of samples; A preprocessing module, used for preprocessing the LIBS spectrum data to obtain target spectrum data; A calibration module is used to calibrate the analytical elements and matrix elements according to the target spectrum data and based on the element spectrum line standard library to obtain calibrated analytical element spectrum lines and matrix element spectrum lines; a plasma temperature calculation module, configured to calculate the plasma temperature of the analytical element using the Boltzmann plane diagram method according to the analytical element spectral line and the matrix element spectral line; The content prediction module is used to input the plasma temperature of the analyzed element and the spectral line of the analyzed element into the element quantitative analysis model to obtain the predicted content of the analyzed element.

9. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, enables the electronic device to implement the element quantitative analysis method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the element quantitative analysis method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Spectrum-based high manganese steel multi-element quantitative analysis method

    CN121090503A

  • Physical and data hybrid driven LIBS trace element detection method and system

    CN121141624A

  • Construction method, medium and system for rapid LIBS classification and recognition model of controlled chemicals

    CN122310239A