Portable LIBS alloy material component detection device and method based on large model dynamic correction

CN122651683APending Publication Date: 2026-08-28BEIJING OPTICAL FUNCTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611149357.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-31
Publication Date
2026-08-28

AI Technical Summary

Technical Problem

[0006]本发明的目的在于提供一种基于大模型动态校正的便携式LIBS合金材料成分检测装置及方法,通过多点激光激发、等离子体图像辅助校正、光谱智能预处理、大模型动态补偿以及云端大数据训练等技术,以解决现有LIBS设备在合金材料检测过程中存在的光谱波动大、检测稳定性差、基体效应明显以及复杂现场环境下定量精度不足的问题

Benefits of technology

[0023] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: Based on the LIBS detection device, the present invention solves the problems of large spectral fluctuations, poor detection stability, obvious matrix effects, and insufficient quantitative accuracy in complex field environments of existing LIBS equipment in the detection of alloy materials by using technologies such as multi-point laser excitation, plasma image-assisted correction, intelligent spectral preprocessing, large model dynamic compensation, and cloud big data training. It improves the detection stability, quantitative analysis accuracy, model generalization ability, and adaptive detection capability in complex industrial field environments of alloy materials.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122651683A_ABST
    Figure CN122651683A_ABST
Patent Text Reader

Abstract

The application discloses a portable LIBS alloy material component detection device and method based on large model dynamic correction. It relates to the technical field of laser spectrum detection. The detection method comprises the following steps: obtaining original spectrum data and plasma plume image, extracting image brightness, area, roundness and edge diffusion characteristics, and performing dynamic correction. The original spectrum data is preprocessed. Then, a large spectrum model based on big data training is introduced to dynamically compensate and enhance the characteristics of the current spectrum. Then, the nonlinear mapping relationship between the LIBS spectrum characteristics and the element content is used to predict the element content. Through the establishment of a global material spectrum database, online incremental training and dynamic optimization of the machine learning model are carried out. Finally, the root mean square error is used to evaluate the prediction error of the machine learning model. The application improves the quantitative analysis precision of the alloy material element composition, the model generalization ability and the self-adaptive detection ability in the complex industrial field environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of laser spectroscopy detection technology, specifically to a rapid quantitative detection method for the composition of alloy materials using laser-induced breakdown spectroscopy (LIBS). Background Technology

[0002] The content of elements such as carbon (C), silicon (Si), manganese (Mn), chromium (Cr), nickel (Ni), and molybdenum (Mo) in alloys directly affects the material's strength, hardness, corrosion resistance, and weldability. Laser-induced breakdown spectroscopy (LIBS) is a detection technique based on high-energy pulsed laser excitation of a sample surface to form plasma, which is then analyzed to achieve qualitative and quantitative elemental analysis. It has advantages such as requiring no complex sample preparation, fast detection speed, ability to perform simultaneous multi-element analysis, suitability for complex environments, and ease of miniaturization and portability. However, existing LIBS technology still faces the following technical challenges in the quantitative analysis of alloy materials: (1) Due to the limited size of the equipment, its internal optical path structure, laser focusing stability and detector arrangement space are all subject to certain constraints. In actual field testing, factors such as operator movement, changes in measurement distance and uneven sample surface can easily lead to laser focus shift, unstable excitation energy and decreased plasma collection efficiency, resulting in fluctuations in test results and affecting measurement repeatability and stability.

[0003] (2) Most existing LIBS equipment uses single-point excitation for detection. However, the material surface usually has oxide layer, rust, processing texture and local uneven structure. Single-point detection is easily affected by the local area condition, resulting in strong randomness of the detection results and difficulty in accurately reflecting the overall composition information of the material.

[0004] (3) LIBS spectra are typically characterized by dense spectral lines, strong continuous background radiation, high noise, and significant spectral line overlap. During on-site detection, they are also easily affected by factors such as ambient temperature, ambient light, laser energy fluctuations, and changes in sample state, leading to spectral background drift and abnormal peaks. Without effective spectral preprocessing, abnormal spectral identification, and multi-source feature fusion methods, the stability of the model and the accuracy of prediction will be severely affected.

[0005] (4) Existing quantitative analysis methods for LIBS mainly rely on traditional machine learning models or simple linear models, which have poor adaptability to data from different samples, environmental conditions, and equipment states, and have limited model generalization performance. At the same time, existing technologies in LIBS equipment scenarios are still insufficient in terms of plasma image-assisted correction, multi-point scanning fusion, dynamic error compensation, cloud-based online training, and large-scale intelligent analysis based on big data, making it difficult to meet the long-term stable and high-precision detection requirements in complex industrial environments. Summary of the Invention

[0006] The purpose of this invention is to provide a portable LIBS alloy material composition detection device and method based on large model dynamic correction. By using technologies such as multi-point laser excitation, plasma image-assisted correction, intelligent spectral preprocessing, large model dynamic compensation, and cloud big data training, this invention addresses the problems of large spectral fluctuations, poor detection stability, significant matrix effects, and insufficient quantitative accuracy in complex field environments that exist in existing LIBS equipment during alloy material detection.

[0007] The specific technical solution provided by this invention is as follows: A portable LIBS alloy material composition detection device based on large model dynamic correction, comprising: a device housing, a laser excitation module, a servo motor scanning module, a spectrum acquisition module, a high-speed image acquisition module, an embedded processing platform, a display unit, a trigger module, a power supply module, and a data communication module; Preferably, the device housing is used to install, fix, and protect the various functional modules; the laser excitation module is used to apply a high-energy pulsed laser to the surface of the sample to be tested, forming a high-temperature plasma; the servo scanning module is used to drive the laser excitation module to perform multi-point scanning excitation along a preset trajectory; the spectral acquisition module is used to receive the plasma emission spectrum generated after the laser excites the sample; the high-speed image acquisition module is used to acquire the plasma plume image formed during the laser excitation process in real time; the embedded processing platform is used to receive spectral data and image data, and complete LIBS spectral processing, elemental quantitative analysis, and device control; the display unit is used to display the device operating status, real-time spectral curves, and alloy element detection results; the trigger module is used to trigger the element detection process; the power supply module is used to provide working power for the laser, spectral acquisition module, embedded processing platform, and display unit; and the data communication module is used to realize the storage, transmission, and remote model update of detection data.

[0008] On the other hand, the present invention provides a portable LIBS alloy material composition detection method based on large model dynamic correction, which is executed by a portable LIBS alloy material composition detection device based on large model dynamic correction, and includes the following steps: Step S1: The laser performs multi-point scanning excitation along a preset trajectory to acquire raw spectral data.

[0009] Preferably, the laser continuously acquires LIBS spectral information at three or more detection points along the vertical direction of the sample surface.

[0010] Step S2: Simultaneously acquire plasma plume images, extract image brightness, area, roundness and edge diffusion features, and dynamically correct the plasma images.

[0011] Preferably, extracting image brightness, area, roundness, and edge diffusion features includes: traversing all pixels within the plasma region, reading the grayscale value of each pixel, and representing the plasma image brightness feature using the average plasma brightness. Determining the boundary of the plasma region based on the brightness threshold segmentation result, counting the total number of pixels marked "1" in the binarized image, and representing the plasma area feature with this total number of pixels. Performing edge detection on the binarized plasma region to obtain the pixel coordinates of the region contour, and then calculating the contour perimeter and plasma area based on the contour coordinates. Quantifying the degree to which the plasma morphology approximates a circle through the relationship between the contour perimeter and area, thus obtaining the roundness feature. Within the plasma contour, selecting the edge transition zone as the edge diffusion analysis region, performing gradient analysis on the grayscale values ​​of the pixels in the edge transition zone, and representing the edge diffusion feature with the standard deviation of the grayscale gradient in the edge region.

[0012] Preferably, dynamic correction of the plasma image includes: using an embedded processing platform to determine the current excitation state in real time based on image features, and automatically adjusting the servo position or laser focal length when abnormal plasma brightness, morphological diffusion, or focal shift is detected.

[0013] Step S3: Preprocess the raw spectral data.

[0014] Preferably, the preprocessing of the original spectral data includes: performing polynomial fitting on the wavelength range without characteristic spectral lines using a polynomial fitting method, obtaining a background curve, and then subtracting it from the original spectrum; performing baseline correction using a combination of linear and nonlinear correction methods; performing spectral smoothing by convolving the spectrum with a Gaussian function; calculating the peak area of ​​the characteristic spectral lines of the internal standard element, dividing all spectral line intensities by the peak area to achieve a uniform intensity order, normalizing the maximum intensity value in the spectrum to 1, scaling other intensities proportionally, and finally calculating the integrated intensity of the entire spectrum and dividing the intensity of each wavelength by the integrated value. Through multi-dimensional collaborative judgment combining plasma image features and spectral data, outliers are identified and eliminated.

[0015] Step S4: Introduce a large spectral model trained on big data to dynamically compensate and enhance the current spectrum; the large spectral model trained on big data integrates the input data through multimodal feature splicing and cross-attention fusion.

[0016] Preferably, the integration of input data by the large spectral model trained on big data includes: constructing feature vectors comprising LIBS spectral features, plasma image features, environmental temperature and humidity parameters, and historical detection features. The feature vectors are concatenated sequentially to form the original fused features, and a fully connected layer maps the concatenated features to a unified dimension. A multi-head attention mechanism is then introduced to learn the weights of different modal features. The features from each modality are weighted and fused to output the final fused feature vector.

[0017] Preferably, dynamic compensation and feature enhancement of the current spectrum includes: predicting the sources and extent of error in the current spectrum through a sub-network based on the final fused feature vector; performing multi-dimensional correction on the LIBS spectral features; dynamically adjusting the weights of each compensation term through a gating mechanism; and using the final fused feature vector to determine whether dynamic compensation should be performed.

[0018] Step S5: Element content is predicted by utilizing the nonlinear mapping relationship between LIBS spectral characteristics and element content.

[0019] Preferably, elemental content prediction includes: establishing a nonlinear mapping relationship between LIBS spectral features and elemental content using a machine learning algorithm; then inputting the corrected features into a trained machine learning model; and finally outputting the predicted elemental content value.

[0020] Step S6: Establish a global material spectral database and perform online incremental training and dynamic optimization of the machine learning model.

[0021] Preferably, online incremental training and dynamic optimization of the machine learning model includes: employing incremental learning strategies such as mini-batch gradient descent or model fine-tuning; updating model parameters only with new data; and dynamically adjusting training weights based on the prediction error of different elements, using root mean square error as the optimization metric, to achieve dynamic optimization.

[0022] Step S7: Use root mean square error to evaluate the accuracy of the prediction error of the machine learning model and output the result.

[0023] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: Based on the LIBS detection device, the present invention solves the problems of large spectral fluctuations, poor detection stability, obvious matrix effects, and insufficient quantitative accuracy in complex field environments of existing LIBS equipment in the detection of alloy materials by using technologies such as multi-point laser excitation, plasma image-assisted correction, intelligent spectral preprocessing, large model dynamic compensation, and cloud big data training. It improves the detection stability, quantitative analysis accuracy, model generalization ability, and adaptive detection capability in complex industrial field environments of alloy materials. Attached Figure Description

[0024] Figure 1 This is a schematic diagram of the portable LIBS alloy material composition detection device provided in an embodiment of the present invention; Figure 2 This is a flowchart of a portable LIBS alloy material composition detection method provided in an embodiment of the present invention. Detailed Implementation

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

[0026] Example 1: like Figure 1 As shown, this embodiment discloses a portable LIBS alloy material composition detection device based on large model dynamic correction, including: device housing, laser excitation module, servo scanning module, spectrum acquisition module, high-speed image acquisition module, embedded processing platform, display unit, trigger module, power supply module, and data communication module.

[0027] In this embodiment, the device housing is used to install, fix, and protect the various functional modules. A laser emission and spectral acquisition window is located at the front of the housing for laser excitation and plasma spectral acquisition. An internal shock-absorbing and fixing structure is installed within the housing to reduce the impact of on-site vibration and hand-held shaking on the stability of the internal optical system. The housing includes optical components, circuit modules, a laser module, and a data processing module. The optical components are used for laser transmission, focusing, and spectral signal acquisition; the circuit modules provide power distribution, signal transmission, and module coordination control; the laser module generates high-energy lasers to excite the sample to form plasma; and the data processing module performs data processing, analysis, and device control. The portable LIBS alloy material composition detection device of this invention adopts a portable handheld design to meet the needs of mobile testing in industrial settings.

[0028] Laser excitation module: This module applies high-energy pulsed laser light generated by a laser to the surface of the sample under test, causing a localized temperature rise and forming a high-temperature plasma. In this invention, a pulsed solid-state laser can be used, whose output laser light is focused to form a high-energy-density laser spot, thereby improving the excitation efficiency and plasma stability of the sample surface.

[0029] Servo scanning module: Used to drive the laser excitation module to perform multi-point scanning excitation along a preset trajectory. During the measurement process, the servo controls the laser to sequentially excite multiple positions on the surface of the sample under test, and simultaneously acquires LIBS spectral data at the corresponding positions. Preferably, the laser continuously acquires spectral information from multiple detection points along the vertical direction of the sample surface, for example, continuously acquiring the LIBS spectra of three detection points, and then fusing and analyzing the spectral results from multiple detection points. In this invention, the multi-point scanning measurement method can effectively reduce measurement errors caused by sample surface oxide layers, local defects, surface roughness, and hand-held shaking, thereby improving detection stability, repeatability, and result reliability.

[0030] Spectral acquisition module: Used to receive the plasma emission spectrum generated after laser excitation of the sample. In this embodiment, the spectral acquisition module may include a focusing lens, optical fiber, and a miniature spectrometer for transmitting the plasma radiation light to the spectral analysis unit. To reduce ambient light interference, a light-shielding structure or a filter structure may be set around the spectral acquisition area to improve the signal-to-noise ratio and detection stability of the spectral acquisition.

[0031] High-speed image acquisition module: Used to acquire images of the plasma plume formed during laser excitation in real time. In this embodiment, the high-speed image acquisition module uses a miniature image sensor to acquire the plasma brightness, area, morphological features, and edge distribution in real time.

[0032] Embedded processing platform: Used to receive spectral and image data, and perform functions such as real-time LIBS spectral processing, elemental quantitative analysis, and equipment control. In this embodiment, the embedded processing platform can adopt an embedded computing module based on the ARM architecture, which includes a data acquisition unit, a storage unit, a computing unit, and a control unit, etc., to realize: spectral preprocessing, abnormal spectrum removal, feature spectral line extraction, multi-point spectral fusion, machine learning predictive analysis, equipment control, and status monitoring.

[0033] Meanwhile, the embedded processing platform also includes an intelligent spectral analysis module based on a large model. This module utilizes a large model trained on extensive historical LIBS spectral data, environmental parameter data, and standard elemental composition data to learn the spectral variation patterns of different alloy samples, under different environmental conditions, and with different equipment. During on-site testing, the large model can dynamically correct the current spectrum, compensate for errors, and identify abnormal states by combining the currently acquired spectrum, ambient temperature, laser energy, plasma image features, and historical testing data. This improves the stability of testing in complex industrial environments and enhances the model's generalization ability.

[0034] In this embodiment, the embedded processing platform also analyzes the current laser focusing state, excitation stability, and acquisition distance based on plasma image characteristics, and dynamically adjusts the laser focal length, servo position, or laser parameters. By performing real-time feedback control on the plasma image, this invention can reduce excitation instability caused by hand-held shaking, changes in measurement distance, and uneven sample surfaces, thereby improving detection consistency in complex industrial environments.

[0035] Display unit: Used to display information such as equipment operating status, real-time spectral curves, and alloy element detection results. In this embodiment, the display unit can be an LCD screen or a touch screen, allowing operators to view the measurement process and elemental analysis results in real time.

[0036] Trigger Module: Used to trigger an element detection process. When the operator presses the trigger switch, the embedded processing platform controls the laser to emit pulsed laser light and simultaneously controls the servo motor to complete multi-point scanning measurement. At the same time, the spectral acquisition module is activated to collect and analyze spectral data.

[0037] Power module: Provides power to the laser, spectral acquisition module, embedded processing platform, and display unit. The power module can be powered by a rechargeable lithium battery to meet the portable on-site testing requirements of the equipment.

[0038] The data communication module is used to store, transmit, and remotely update detection data. In this embodiment, this module can communicate with external terminals via USB, WiFi, or mobile network to upload detection results, manage remote data, and maintain equipment. It also uploads on-site detection spectra, environmental parameters, and plasma images to a cloud database. The cloud server establishes a global spectral database based on large-scale LIBS data from different regions, alloys, and environmental conditions, and performs online training and dynamic optimization of machine learning models and large models. Furthermore, the embedded processing platform in this invention can periodically download optimized model parameters, thereby improving the equipment's adaptability and prediction accuracy in different alloy materials and complex on-site environments.

[0039] Example 2: like Figure 2 As shown in the figure, this invention discloses a portable LIBS alloy material composition detection method based on large model dynamic correction. Executed using the portable LIBS alloy material composition detection device described in Example 1, this method utilizes technologies such as multi-point laser excitation, plasma image-assisted correction, intelligent spectral preprocessing, large model dynamic compensation, and cloud-based big data training to achieve high-stability and high-precision on-site detection of the alloy material's elemental composition.

[0040] In this embodiment, the method of the present invention includes the following operational steps: Step S1: Obtain the raw spectral data.

[0041] In this embodiment, a portable LIBS alloy material composition detection device is used to laser-excite the surface of the alloy sample under test. A pulsed laser acts on the sample surface to form a high-temperature plasma, generating characteristic emission spectra of the corresponding elements. During the measurement process, a servo control module drives the laser to perform multi-point scanning excitation along a preset trajectory. The laser continuously acquires LIBS spectral information from three or more detection points along the vertical direction of the sample surface to reduce the influence of oxide layers, local defects, surface roughness, and hand-held shaking on the single-point detection results.

[0042] Step S2: Dynamic correction of plasma image.

[0043] In this embodiment, since the portable LIBS alloy material composition detection device is easily affected by factors such as changes in measurement distance, equipment vibration and uneven sample surface during on-site detection, the present invention acquires plasma plume images in real time through a high-speed image acquisition module and extracts image brightness, area, roundness and edge diffusion features.

[0044] Specifically, in this invention, the grayscale value of each pixel is read by traversing all pixels within the plasma region. ( (where the coordinates are pixels). The brightness characteristics of a plasma image can be represented as:

[0045] in: The average brightness of the plasma; For pixels within the plasma region grayscale value; This refers to the image size.

[0046] The boundaries of the plasma region are then determined based on the brightness threshold segmentation results (by binarizing the image, the plasma region is marked as 1 and the background as 0). The total number of pixels marked as "1" in the binarized image is counted; this number represents the area of ​​the plasma region (pixel level), i.e., the area feature is expressed as: =count( >threshold), where This refers to the plasma area (unit: pixels). Furthermore, if it needs to be converted to actual physical area, this embodiment can calculate it in conjunction with image resolution (e.g., pixels / mm): .

[0047] Next, edge detection (such as using the Canny operator) is performed on the binarized plasma region to obtain the pixel coordinates of the region's contour. Then, the perimeter of the plasma region's contour is calculated based on these contour coordinates. (The sum of Euclidean distances between contour pixels) and plasma area A. Finally, the degree to which the plasma morphology approximates a circle is quantified by the relationship between the perimeter and area of ​​the contour. The roundness feature is represented as: ,in, The value represents the roundness (ranging from 0 to 1). The closer the roundness is to 1, the more regular the plasma morphology (close to a circle); the smaller the value, the more irregular the morphology (such as diffusion or stretching).

[0048] Finally, within the plasma contour, an edge transition zone (such as a ring-shaped area 5-10 pixels inward from the contour) is selected as the edge diffusion analysis area. Gradient analysis is performed on the grayscale values ​​of the pixels in the edge transition zone (e.g., using the Sobel operator to calculate the horizontal / vertical gradient) to obtain the grayscale change rate. The standard deviation or average gradient value of the grayscale gradient in the edge region reflects the degree of edge blurring (a larger standard deviation indicates more severe edge diffusion). The edge diffusion characteristics are represented by the standard deviation of the grayscale gradient in the edge region.

[0049] in, It is a feature of edge diffusion. D represents the grayscale gradient value of the edge pixels; a larger D indicates more pronounced edge diffusion. In this invention, it can also be represented by the edge half-width (FWHM), which is the width at which the edge grayscale drops from its peak to half its original value; a larger width indicates more severe diffusion.

[0050] This invention's embedded processing platform determines the current excitation state in real time based on image features. When abnormal plasma brightness, morphological diffusion, or focus shift is detected, it automatically adjusts the servo motor position or laser focal length, thereby improving laser excitation stability and plasma consistency. This method effectively reduces excitation fluctuations caused by handheld shaking and changes in measurement distance.

[0051] Step S3: Further preprocess the original spectrum.

[0052] In this embodiment, since the on-site detection process is easily affected by oxide layers, ambient light, temperature changes, and laser energy fluctuations, the present invention first preprocesses the original spectrum. The preprocessing process includes: Background subtraction: In LIBS spectra, the continuous background typically changes slowly with wavelength. In this embodiment, a polynomial fitting method is used to fit a polynomial (e.g., a 3rd-5th degree polynomial) to the wavelength range without characteristic spectral lines, and the resulting background curve is then subtracted from the original spectrum. Alternatively, wavelet transform can be used to separate the spectrum into high-frequency (characteristic spectral lines) and low-frequency (background) components through wavelet decomposition, and the low-frequency components are removed to achieve background subtraction. An adaptive smoothing method can also be used to locally smooth the spectrum, and the smoothed result is used as the background estimate for subtraction. After background subtraction, the signal-to-noise ratio of characteristic spectral lines can be significantly improved, background interference caused by continuous plasma radiation, ambient light, and instrument noise can be eliminated, and elemental characteristic spectral lines can be highlighted.

[0053] Baseline correction: In alloy testing, different matrices (such as iron-based and aluminum-based) may lead to differences in baseline morphology. This embodiment uses linear correction to linearly fit the spectral baseline (suitable for scenarios with slight baseline tilt), and then translates or rotates the baseline to a horizontal position. Combined with nonlinear correction, i.e., using piecewise polynomial fitting (such as piecewise cubic splines) or iterative weighted least squares, complex baseline curvature (such as baseline drift caused by sample oxide layers) is addressed. Baseline correction can unify the spectral line intensity benchmark, compensate for spectral baseline tilt or curvature caused by laser energy fluctuations, sample matrix effects, or instrument drift, and ensure the accuracy of spectral line intensity.

[0054] Spectral smoothing: LIBS spectral noise is mainly manifested as high-frequency fluctuations. In this embodiment, a Gaussian function is used to perform convolution operations on the spectrum, with the weight decreasing as the distance from the center wavelength increases, balancing smoothing effect with peak shape preservation. After smoothing, noise can be avoided from interfering with subsequent feature extraction (such as peak area and peak height), random noise (such as detector dark current and environmental electromagnetic interference) can be suppressed, spectral fluctuations can be reduced, and the stability of feature line extraction can be improved.

[0055] Spectral normalization: In multi-point scanning detection, normalization can effectively compensate for differences in excitation energy at different detection points, ensuring the consistency of spectral data. In this embodiment, a stable internal standard element characteristic spectral line (such as the matrix elements Fe and Al in an alloy) is selected, its peak area is calculated, and the intensity of all spectral lines is divided by this area to unify the intensity magnitude. Then, the maximum intensity value in the spectrum is normalized to 1, and other intensities are scaled proportionally (suitable for scenarios without a stable internal standard element). Finally, the integrated intensity of the entire spectrum is calculated, and the intensity of each wavelength is divided by the integrated value to eliminate the overall variation in spectral intensity caused by laser energy fluctuations and differences in sample excitation efficiency (such as surface roughness and focusing deviation), achieving spectral comparability between different detection points or samples.

[0056] Abnormal spectrum removal: In this embodiment, plasma image features (such as abnormal brightness, excessively large / small area, and roundness deviating from the normal range) are combined with spectral data for collaborative judgment. For example: If the average brightness of the plasma If the intensity is less than the set threshold, the corresponding spectral intensity may be too low and is judged as abnormal. If the plasma roundness C is less than the set threshold, it indicates that the shape is irregular and the corresponding spectrum may have matrix effect interference, which is judged as abnormal.

[0057] By using multi-dimensional (spectral + image) anomaly identification, abnormal spectra caused by sample surface anomalies (such as oxide layers, corrosion), excitation instability (such as laser focus shift), or environmental interference (such as strong light irradiation) are eliminated, thus avoiding their impact on the quantitative model. This improves the anomaly spectrum elimination rate, significantly enhances the stability of subsequent quantitative analysis, and ultimately yields high-quality characteristic spectral data.

[0058] Step S4: Introduce a large spectral model trained on big data to dynamically compensate and enhance the features of the current spectrum.

[0059] In this embodiment, after completing the spectral preprocessing, the present invention further introduces a large-scale spectral model trained on big data to dynamically compensate and enhance the current spectrum. This large-scale spectral model is jointly trained based on a large amount of historical sample LIBS spectral data, ambient temperature data, laser energy data, plasma image data, and elemental data of standard alloy samples to learn the spectral variation patterns of different materials and under complex environments.

[0060] Specifically, the large spectral model integrates input data through multimodal feature concatenation and cross-attention fusion, first constructing feature vectors: LIBS spectral characteristics ( ): Feature extraction is performed on the preprocessed LIBS spectrum, including characteristic peak intensity, peak area, and full width at half maximum (FWHM), forming a dimension of . vectors (such as) ).

[0061] Plasma image features ( ): Features such as brightness (L), area (A), roundness (C), and edge diffusion (D) are extracted from plasma images to form a dimension of vectors (such as) ).

[0062] Ambient temperature and humidity parameters ( ): Includes ambient temperature (T), humidity (H), laser energy (E), etc., which, after standardization, form a dimension of vectors ( ).

[0063] Historical detection features ( ): Select the elemental content prediction results or spectral feature statistics from the most recent k detections to form a dimension of vectors (such as) ).

[0064] The above feature vectors are concatenated in order to form the original fused features. The concatenated features are mapped to a unified dimension through a fully connected layer:

[0065] in, The projected feature vector is the intermediate feature mapped to a uniform dimension through a fully connected layer. . This is the weight matrix of the fully connected layer, used to map the original concatenated features to the target dimension. This is the bias vector of the fully connected layer, used to adjust the feature offset after linear transformation.

[0066] Then, a multi-head attention mechanism is introduced to learn the weights of different modal features, that is, by calculating the attention weights of spectral features and other modal features (such as the influence weight of image features on spectral features). :

[0067] The features of each modality are weighted and fused to output the final fused feature vector. :

[0068] in, It is a multi-head attention function that learns the dependencies between different modal features (spectral, image, environment, etc.) by computing multiple attention heads in parallel, and achieves weighted fusion of features. Represents the final fused feature vector belong 3D real space, i.e. It is a vector of length d.

[0069] Finally, the large spectral model performs dynamic error compensation on the current spectrum based on the final fused feature vector, specifically including: Error factor identification: based on the final fused feature vector The subnetwork is used to predict the sources and extent of errors in the current spectrum, including: Environmental interference error ( ): Spectral drift caused by temperature and humidity changes. The output is learned by the model based on the fused feature F and is used to adjust the weights of environmental factors (temperature, humidity, etc.) on the spectrum as an environmental interference error compensation coefficient. ; Excitation stability error ( ): The intensity deviation caused by laser energy fluctuations and focus shift, output stability error compensation coefficient. ; Matrix effect error ( ): Spectral line interference caused by differences in sample composition; outputs a matrix effect correction matrix learned from historical data. .

[0070] Residual compensation calculation: for the original LIBS spectral characteristics ( Perform multi-dimensional correction:

[0071] in, The corrected spectral eigenvectors, and The model generates an error residual vector based on the fusion feature F. Finally, according to the real-time detection scenario (such as different alloy types and environmental conditions), the weights of each compensation term are dynamically adjusted through a gating mechanism. The necessity of compensation in the current scenario is determined by the fusion feature F; for example, the compensation effect is enhanced when the gating function is approximately 1 in a high-noise environment. This improves the model's generalization ability in complex industrial environments.

[0072] Step S5: Element content is predicted by utilizing the nonlinear mapping relationship between LIBS spectral characteristics and element content.

[0073] In this embodiment, after feature extraction, the present invention uses a machine learning algorithm to establish a nonlinear mapping relationship between LIBS spectral features and elemental content. , where input For fusion features Output These are predicted values ​​for elemental content (C, Si, Mn, etc.). This is a machine learning regression model.

[0074] Then the corrected features Input the trained machine learning regression model:

[0075] Output the final predicted elemental content:

[0076] in, The prediction results for the elements.

[0077] This invention employs algorithms such as Support Vector Regression (SVR), Random Forest (RF), XGBoost, LightGBM, and deep neural networks to predict and analyze elements such as carbon, silicon, manganese, chromium, nickel, and molybdenum in alloys. Specifically, the algorithm is selected based on the complexity of the spectral characteristics of different elements (e.g., deep neural networks can be used to handle spectral line overlap for the light element C, while XGBoost can improve prediction efficiency for Si and Mn). The algorithms then construct a nonlinear relationship between feature vectors and elemental content; for example, deep neural networks learn complex spectral-composition mappings through multiple hidden layers, while XGBoost reduces overfitting risk through decision tree ensemble. Finally, the prediction results from multiple algorithms are weighted and fused (the weights are dynamically adjusted based on the prediction accuracy of each algorithm in historical data), ultimately outputting a comprehensive predicted value of elemental content, thus improving the reliability of the results.

[0078] Meanwhile, the machine learning model updates its parameters in real time based on the cloud-based big data platform, enabling the equipment to adapt to different materials and different on-site environments.

[0079] Step S6: Online training using big data in the cloud.

[0080] In this embodiment, the data communication module is used to upload the on-site detection spectrum, environmental parameters, and detection results to the cloud database. In this invention, the cloud server establishes a global material spectral database based on large-scale LIBS data from different regions, alloys, and operating conditions. An incremental learning strategy using mini-batch gradient descent (Mini-batch SGD) or fine-tuning is employed on the machine learning model, updating model parameters (such as neural network weights and XGBoost tree structures) only with new data, avoiding full data retraining and reducing computational costs. Furthermore, using the root mean square error (RMSE) as the optimization metric, the training weights are dynamically adjusted based on the prediction error of different elements (e.g., prioritizing the prediction accuracy of low-content elements Cr and Mo), achieving dynamic optimization.

[0081] The embedded processing platform periodically (e.g., daily / weekly) downloads optimized model parameters (such as algorithm weight matrices and decision tree structures) from the cloud via the data communication module, replacing the old local parameters and enabling online upgrades of the machine learning model. A "dual-caching mechanism" is employed during the update process to ensure that the detection task is not interrupted during parameter updates, guaranteeing the continuity of on-site detection. Through this mechanism, the present invention can adapt to different material compositions, environmental interference, and changes in equipment status, improving the detection accuracy and environmental adaptability of the equipment during long-term operation.

[0082] Step S7: Use root mean square error to evaluate the prediction error of the model.

[0083] In this embodiment, the present invention uses root mean square error (RMSE) to evaluate accuracy:

[0084] in: For the first The true value of a sample (i.e., the elemental content of a standard alloy sample, such as the standard percentage of elements like carbon and silicon). For the first The model prediction values ​​for each sample (the element content prediction results output by algorithms such as SVR and XGBoost). The number of samples (the total number of detected samples involved in error calculation). The smaller the RMSE value, the smaller the overall deviation between the predicted value and the true value, and the higher the model accuracy.

[0085] This invention calculates the RMSE (Real-Time Sequence) independently for different elements in alloys, such as carbon (C), silicon (Si), and manganese (Mn). For example, the true and predicted values ​​of all samples for carbon are extracted separately, and the RMSE_C is calculated according to the above steps; the RMSE_Si is calculated for silicon, and so on. This allows for targeted evaluation of the model's prediction accuracy for different elements (e.g., the RMSE of the light element C is usually higher than that of elements such as Si and Mn, requiring focused optimization). By analyzing the differences in RMSE under different elements and operating conditions, model weaknesses can be identified (e.g., the RMSE of Ni in an alloy from a certain region is too high, requiring supplementary sample data for that region). Finally, RMSE is used as the core monitoring indicator for model performance: when the RMSE of a certain element exceeds a preset threshold (e.g., RMSE > 0.1%), an incremental cloud training process is automatically triggered to optimize model parameters by adding new sample data; during training, the model weights (e.g., connection weights of neural networks, tree structure parameters of XGBoost) are adjusted using gradient descent and other optimization algorithms with "minimizing RMSE" as the objective function. The RMSE value of each element is displayed in real time in the display unit (such as in the form of a table or line chart) and compared with the historical RMSE to intuitively reflect the model optimization effect (such as "Current Cr element RMSE=0.03%, a decrease of 0.02% compared with last week").

[0086] It should be noted that, in this invention, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0087] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A portable LIBS alloy material composition detection device based on large model dynamic correction, characterized in that: It includes a device housing, a laser excitation module, a servo scanning module, a spectrum acquisition module, a high-speed image acquisition module, an embedded processing platform, a display unit, a trigger module, a power supply module, and a data communication module; The equipment housing is used to install, fix, and protect the various functional modules; The laser excitation module is used to apply a high-energy pulsed laser to the surface of the sample under test to form a high-temperature plasma. The servo scanning module is used to drive the laser excitation module to perform multi-point scanning excitation along a preset trajectory. The spectral acquisition module is used to receive the plasma emission spectrum generated after the sample is excited by laser. The high-speed image acquisition module is used to acquire images of plasma plumes formed during laser excitation in real time. The embedded processing platform is used to receive spectral data and image data, and to perform real-time LIBS spectral processing, elemental quantitative analysis, and equipment control. The display unit is used to display information such as the device's operating status, real-time spectral curves, and alloy element detection results. The triggering module is used to trigger the element detection process. The power module is used to provide operating power to the laser, the spectrum acquisition module, the embedded processing platform, and the display unit. The data communication module is used to store and transmit detection data and to update the model remotely.

2. A portable LIBS alloy material composition detection method based on large model dynamic correction, executed by the portable LIBS alloy material composition detection device based on large model dynamic correction as described in claim 1, characterized in that: The method includes the following steps: Step S1: The laser performs multi-point scanning excitation along a preset trajectory to acquire raw spectral data; Step S2: Simultaneously acquire plasma plume images, extract image brightness, area, roundness and edge diffusion features, and dynamically correct the plasma images; Step S3: Preprocess the raw spectral data; Step S4: Introduce a large spectral model trained on big data to dynamically compensate and enhance the current spectrum; the large spectral model trained on big data integrates the input data through multimodal feature splicing and cross-attention fusion. Step S5: Element content prediction is performed using the nonlinear mapping relationship between LIBS spectral characteristics and element content; Step S6: Establish a global material spectral database and perform online incremental training and dynamic optimization of the machine learning model; Step S7: Use root mean square error to evaluate the accuracy of the prediction error of the machine learning model and output the result.

3. The portable LIBS alloy material composition detection method based on large model dynamic correction according to claim 2, characterized in that: The laser performs multi-point scanning excitation along a preset trajectory, which includes: continuously acquiring LIBS spectral information at three or more detection points along the vertical direction of the sample surface.

4. The portable LIBS alloy material composition detection method based on large model dynamic correction according to claim 3, characterized in that: The extracted image brightness, area, roundness, and edge diffusion features include: Traverse all pixels within the plasma region, read the grayscale value of each pixel, and represent the brightness characteristics of the plasma image by the average plasma brightness; The boundary of the plasma region is determined based on the brightness threshold segmentation results. The total number of pixels marked as "1" in the binarized image is counted, and the total number of pixels represents the plasma area feature. By performing edge detection on the binarized plasma region, the pixel coordinates of the region contour are obtained. Then, the contour perimeter and plasma area of ​​the plasma region are calculated based on the contour coordinates. By the relationship between the contour perimeter and area, the degree to which the plasma shape is close to a circle is quantified, and the roundness feature is obtained. Within the plasma profile, the edge transition zone is selected as the edge diffusion analysis area. Gradient analysis is performed on the gray values ​​of the pixels in the edge transition zone, and the standard deviation of the gray gradient in the edge region is used to represent the edge diffusion characteristics.

5. The portable LIBS alloy material composition detection method based on large model dynamic correction according to claim 4, characterized in that: The dynamic correction of the plasma image includes: using an embedded processing platform to determine the current excitation state in real time based on image features, and automatically adjusting the servo position or laser focal length when abnormal plasma brightness, morphological diffusion or focal shift is detected.

6. The portable LIBS alloy material composition detection method based on large model dynamic correction according to claim 5, characterized in that: The preprocessing of the raw spectral data includes: Polynomial fitting is used to fit the wavelength range without characteristic spectral lines, and the background curve is then subtracted from the original spectrum. Baseline correction is performed using a combination of linear and nonlinear correction methods; Spectral smoothing is achieved by convolving the spectrum with a Gaussian function; The peak area is calculated by selecting the characteristic spectral lines of the internal standard element. All spectral intensities are divided by the peak area to obtain a uniform intensity order. The maximum intensity value in the spectrum is then normalized to 1, and other intensities are scaled proportionally. Finally, the integrated intensity of the entire spectrum is calculated, and the intensity of each wavelength is divided by the integrated value. By combining plasma image features and spectral data for multi-dimensional collaborative judgment, outliers are identified and eliminated.

7. The portable LIBS alloy material composition detection method based on large model dynamic correction according to claim 6, characterized in that: The large spectral model trained on big data integrates the input data, including: Construct a feature vector that includes LIBS spectral features, plasma image features, environmental temperature and humidity parameters, and historical detection features; The feature vectors are concatenated in order to form the original fused features, and the concatenated features are mapped to a unified dimension through a fully connected layer. Then, a multi-head attention mechanism is introduced to learn the weights of features from different modalities; The features of each modality are weighted and fused to output the final fused feature vector.

8. The portable LIBS alloy material composition detection method based on large model dynamic correction according to claim 7, characterized in that: The dynamic compensation and feature enhancement of the current spectrum includes: Based on the final fused feature vector, the error sources and impact of the current spectrum are predicted through sub-networks; Multidimensional correction of LIBS spectral characteristics; The weights of each compensation item are then dynamically adjusted through a gating mechanism, and the final fused feature vector is used to determine whether dynamic compensation should be performed.

9. The portable LIBS alloy material composition detection method based on large model dynamic correction according to claim 8, characterized in that: The elemental content prediction includes: A machine learning algorithm was used to establish a nonlinear mapping relationship between LIBS spectral features and elemental content. Then input the corrected features into the trained machine learning model; Output the final predicted element content values.

10. The portable LIBS alloy material composition detection method based on large model dynamic correction according to claim 9, characterized in that: The online incremental training and dynamic optimization of the machine learning model includes: Incremental learning strategies such as mini-batch gradient descent or model fine-tuning are employed. Update model parameters only with new data; Using root mean square error as the optimization metric, the training weights are dynamically adjusted based on the prediction error of different elements to achieve dynamic optimization.