Data processing method and classification and identification method based on LIBS and VIT neural network

By setting delay times and normalization processes for multiple samples in laser-induced breakdown spectroscopy, RGB color images are generated, which solves the image data requirement of ViT neural networks and improves the accuracy and efficiency of elemental quantitative analysis.

CN116310540BActive Publication Date: 2026-04-21YANGTZE DEITA GRADUATE SCHOOI OF BEIJING INST OF TECH (JIAXING)
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YANGTZE DEITA GRADUATE SCHOOI OF BEIJING INST OF TECH (JIAXING)
Filing Date
2023-03-13
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing laser-induced breakdown spectroscopy techniques struggle to convert sequence data into image data for quantitative elemental analysis using ViT neural networks.

Method used

By setting multiple sampling delay times, the initial data matrix of the LIBS spectral sequence is obtained. After normalization, an RGB color image is constructed and used as the input to the ViT neural network.

Benefits of technology

This method converts LIBS spectral sequence data into RGB color images, meeting the input requirements of ViT neural networks and improving the accuracy and efficiency of elemental quantitative analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116310540B_ABST
    Figure CN116310540B_ABST
Patent Text Reader

Abstract

This invention discloses a data processing and classification method based on LIBS and ViT neural networks, capable of converting LIBS spectral sequence data into RGB color images and using ViT neural networks from the field of vision to solve sequence data problems. Considering that a color image is a 3-channel matrix, a time variable is introduced. By controlling the sampling time of the spectral data, three sets of data matrices corresponding to different delay times are generated, each corresponding to one of the RGB channels. Repeated sampling at one location yields spectral sequence data at different depths of that location. Sampling at different locations, using a unique data arrangement, assigns the data matrices for delay time 1, delay time 2, and delay time 3 to the RGB channels of the color image, respectively. Finally, a three-dimensional spectral sequence data of the sample in the X, Y, and Z dimensions is obtained. Therefore, this invention can convert LIBS spectral sequence data into RGB color images and use ViT neural networks from the field of vision to solve sequence data problems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of laser spectral analysis technology, specifically to a data processing method and classification and recognition method based on LIBS and VIT neural networks. Background Technology

[0002] Laser-induced breakdown spectroscopy (LIBS) uses pulsed lasers to ablate the sample surface, generating laser-induced plasma. Qualitative and quantitative analysis of the elemental composition of the sample is achieved by detecting the emission spectrum of the plasma. It offers advantages such as requiring no (or minimal) sample pretreatment, simultaneous detection of multiple elements, and high analysis speed. Currently, deep learning is in a period of rapid development and has the advantage of quickly extracting data features.

[0003] Existing methods for quantitative elemental analysis in laser-induced breakdown spectroscopy include LSTM model solutions based on Natural Language Processing (NLP) and traditional Convolutional Neural Networks (CNNs). NLP-based methods are primarily used for text classification and translation, and their process includes: 1. Segmenting the input text into characters or words (character segmentation is more common in Chinese); 2. Converting characters into corresponding IDs based on a pre-trained corpus; 3. Mapping the IDs to corresponding vectors using an embedding mapping table; 4. Inputting the resulting vectors into an LSTM classification model for subsequent classification tasks. Laser-induced breakdown spectroscopy yields wavelength and intensity sequence data. When applying an NLP LSTM model, preprocessing steps such as character segmentation, ID conversion, and embedding mapping are unnecessary; the wavelength and intensity sequence data can be directly input into the LSTM classification model.

[0004] Vision Transformer (VIT) neural networks dominate almost all tasks in natural language processing. Recently, they have also been introduced into computer vision, showing great promise in tasks such as image classification, object detection, and image segmentation. The general idea of ​​VIT is to perform image classification tasks based on a pure Transformer architecture. VIT models pre-trained on large-scale datasets can achieve better performance than CNNs when transferred to classification tasks on small to medium-sized datasets. Currently, combining laser-induced breakdown spectroscopy with deep learning for elemental quantitative analysis is a hot research topic.

[0005] However, ViT neural networks are a solution specifically designed for the field of vision, and the input data is images. To use ViT neural networks in the field of vision, the image data required by the ViT neural network must be prepared. However, the raw data obtained from laser-induced breakdown spectroscopy is a sequence of data, so there is a technical problem of how to convert the sequence data into image data.

[0006] Taking the patent "A Method for Lithological Classification and Major Element Content Detection Based on LIBS and Deep Learning" as an example, this patent belongs to the field of rock detection technology. It combines laser-induced breakdown spectroscopy and deep learning for lithological classification and major element content detection. While the patent innovates on the structure of the CNN model, it does not offer innovative preprocessing methods for the input data.

[0007] The LSTM model solution based on the field of NLP (Natural Language Processing) directly inputs spectral data into the LSTM model and uses the Natural Language Classification (LSTM) model to perform elemental quantitative analysis on the input data. However, this technical solution does not have any innovative preprocessing methods for the input data.

[0008] It is evident that existing technical solutions simply process the spectral sequence data obtained from LIBS and input it into a neural network model for training. However, ViT neural networks are a solution specifically designed for the vision field, and the input data is an image. Therefore, to perform quantitative elemental analysis using ViT neural networks combined with laser-induced breakdown spectral data, a crucial challenge is how to convert the LIBS spectral sequence data into an image. Summary of the Invention

[0009] In view of this, the present invention provides a data processing method and a classification and recognition method based on LIBS and ViT neural networks, which can convert LIBS spectral sequence data into RGB color images, use ViT vision neural networks to solve the sequence data problem, and use the converted RGB color images as input to the ViT neural network to achieve classification and recognition of the samples to be identified.

[0010] To achieve the above objectives, the technical solution of the present invention includes the following steps:

[0011] Step 1: Set a delay time for 3 samplings. At each delay time, obtain the initial data matrix of the LIBS spectral sequence in the following manner.

[0012] Take a sample pressed under a set pressure, determine n sampling points on the sample, perform laser dotting m times at each sampling point, and generate m sets of 2×N initial data matrices at each sampling point, where N is the total number of wavelength data points of the LIBS spectral sequence data. The first row of the initial data matrix is ​​the wavelength, and the second row is the intensity value corresponding to the wavelength. Then, under the same delay time, a total of nm sets of initial data matrices are obtained for one sample.

[0013] Step 2: Normalize the intensity values ​​in all the initial data matrices obtained in Step 1 and map them to the range of 0-255 to obtain normalized intensity data for all intensity values.

[0014] Under the same delay time: each initial data matrix yields N normalized intensity data, and the nm groups of initial data matrices yield a total of N×nm normalized intensity data, based on which an N×nm two-dimensional matrix is ​​constructed.

[0015] Step 3: Take the two-dimensional matrix corresponding to the three delay times, and combine them as the RGB channels of the color image to obtain the color image. The color image is used to display the LIBS spectral characteristics of the sample and is used as the input of the VIT neural network.

[0016] Preferably, the delay times of the three samples form an arithmetic sequence.

[0017] Another embodiment of the present invention provides a classification and recognition method based on LIBS and VIT neural networks, comprising the following steps:

[0018] Step 1: Set different pressure data to obtain multiple known samples compressed under different pressures. Perform the following LIBS to image conversion process to obtain color images for each sample and add them to the training sample set.

[0019] For each known sample, the delay time, sampling point location and number are changed, and the LIBS to image conversion process is repeated to obtain color images of the sample in different dimensions, which are then added to the training sample set.

[0020] The second step is to train the VIT neural network using the training sample set as input and the category of each known sample as output, to obtain a trained VIT neural network.

[0021] Step 3: For the sample to be identified, set the delay time, sampling point location and number, execute the LIBS to image conversion process to obtain a color image of the sample to be identified, input it into the trained VIT neural network, and output the classification and recognition result of the sample to be identified.

[0022] The LIBS to image conversion process is as follows:

[0023] Step 1: Set a delay time for 3 samplings. At each delay time, obtain the initial data matrix of the LIBS spectral sequence in the following manner.

[0024] Take a sample pressed under a set pressure, determine n sampling points on the sample, perform laser dotting m times at each sampling point, and generate m sets of 2×N initial data matrices at each sampling point, where N is the total number of wavelength data points of the LIBS spectral sequence data. The first row of the initial data matrix is ​​the wavelength, and the second row is the intensity value corresponding to the wavelength. Then, under the same delay time, a total of nm sets of initial data matrices are obtained for one sample.

[0025] Step 2: Normalize the intensity values ​​in all the initial data matrices obtained in Step 1 and map them to the range of 0-255 to obtain normalized intensity data for all intensity values.

[0026] Under the same delay time: each initial data matrix yields N normalized intensity data, and the nm groups of initial data matrices yield a total of N×nm normalized intensity data, based on which an N×nm two-dimensional matrix is ​​constructed.

[0027] Step 3: Take the two-dimensional matrix corresponding to the three delay times, and combine them as the RGB channels of the color image to obtain the color image. The color image is used to display the LIBS spectral characteristics of the sample and is used as the input of the VIT neural network.

[0028] Beneficial effects:

[0029] 1. This invention provides a data processing method based on LIBS and ViT neural networks. Considering that a color image is a 3-channel matrix, a time variable is introduced. By controlling the sampling time of the spectral data, three sets of data matrices corresponding to different delay times are generated, corresponding to the R, G, and B channels respectively. Repeated sampling at one location can obtain spectral sequence data at different depths of a sample location. By sampling at different locations and using a unique data arrangement method, the data matrices of delay time 1, delay time 2, and delay time 3 are respectively assigned to the R, G, and B channels of the color image. Finally, a three-dimensional spectral sequence data of the sample in the X, Y, and Z dimensions is obtained. Therefore, this invention can convert LIBS spectral sequence data into RGB color images and use ViT vision-related neural networks to solve the sequence data problem.

[0030] 2. This invention provides a data processing method based on LIBS and ViT neural networks. The X-axis of the final generated image represents the intensity corresponding to different wavelengths, i.e., the X-axis is related to wavelength, while the Y-axis represents the spectral data at different locations and with different sampling times. The data in the X and Y directions of the image have certain physical meaning, which helps to increase the diversity of images from different samples.

[0031] 3. This invention provides a classification and recognition method based on LIBS and ViT neural networks. It utilizes a data processing method based on laser-induced breakdown spectroscopy and ViT neural networks, employing a ViT neural network from the visual domain. The method prepares the image data required by the ViT neural network and uses three different pressures during sample preparation to classify samples into three categories, adding a dimension of sample diversity. By introducing time variables, pressure variables, different sampling positions, and different sampling depths, multi-variable and multi-dimensional data images that meet the requirements of ViT neural networks can be generated, thereby achieving the goal of classification and recognition using ViT neural networks. This leverages the advantages of ViT neural networks to improve the performance of classification and recognition of the target. Attached Figure Description

[0032] Figure 1 A data processing method based on LIBS and VIT neural networks is provided in this embodiment of the invention, with a flowchart.

[0033] Figure 2 This is a wavelength-intensity diagram of a certain ore sample;

[0034] Figure 3 This is a three-channel RGB image;

[0035] Figure 4 Prepare a schematic diagram for spectral data;

[0036] Figure 5 A schematic diagram for arranging image data;

[0037] Figure 6 This is a schematic diagram of the image effect; Detailed Implementation

[0038] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.

[0039] This invention provides a data processing method based on LIBS and VIT neural networks, the flowchart of which is shown below. Figure 1 As shown, it includes the following steps:

[0040] Step 1: Set a delay time for 3 samplings. At each delay time, obtain the initial data matrix of the LIBS spectral sequence in the following manner.

[0041] Take a sample pressed under a set pressure, determine n sampling points on the sample, perform laser dotting m times at each sampling point, and generate m sets of 2×N initial data matrices at each sampling point, where N is the total number of wavelength data points of the LIBS spectral sequence data. The first row of the initial data matrix is ​​the wavelength, and the second row is the intensity value corresponding to the wavelength. Then, under the same delay time, a total of nm sets of initial data matrices are obtained for one sample.

[0042] In this embodiment of the invention, the delay times of the three samples are an arithmetic sequence.

[0043] Step 2: Normalize the intensity values ​​in all the initial data matrices obtained in Step 1 and map them to the range of 0-255 to obtain normalized intensity data for all intensity values.

[0044] Under the same delay time: each initial data matrix yields N normalized intensity data, and the nm groups of initial data matrices yield a total of N×nm normalized intensity data, based on which an N×nm two-dimensional matrix is ​​constructed.

[0045] Step 3: Take the two-dimensional matrix corresponding to the three delay times, and combine them as the RGB channels of the color image to obtain the color image. The color image is used to display the LIBS spectral characteristics of the sample and is used as the input of the VIT neural network.

[0046] This invention also provides a classification and recognition method based on LIBS and VIT neural networks, comprising the following steps:

[0047] Step 1: Set different pressure data to obtain multiple known samples compressed under different pressures. Perform the following LIBS to image conversion process to obtain color images for each sample and add them to the training sample set.

[0048] For each known sample, the delay time, sampling point location and number are changed, and the LIBS to image conversion process is repeated to obtain color images of the sample in different dimensions, which are then added to the training sample set.

[0049] Step 2: Use the training sample set as input and the category of each known sample as output to train the VIT neural network and obtain the trained VIT neural network.

[0050] Step 3: For the sample to be identified, set the delay time, sampling point location and number, execute the LIBS to image conversion process to obtain a color image of the sample to be identified, input it into the trained VIT neural network, and output the classification and recognition result of the sample to be identified.

[0051] The LIBS to image conversion process is as follows:

[0052] Step 1: Set a delay time for 3 samplings. At each delay time, obtain the initial data matrix of the LIBS spectral sequence in the following manner;

[0053] Take a sample pressed under a set pressure, determine n sampling points on the sample, perform laser spotting m times at each sampling point, and generate m sets of 2×N initial data matrices at each sampling point, where N is the total number of wavelength data points of LIBS spectral sequence data. The first row of the initial data matrix is ​​the wavelength, and the second row is the intensity value corresponding to the wavelength. Then, under the same delay time, a total of nm sets of initial data matrices are obtained for one sample.

[0054] Step 2: Normalize the intensity values ​​in all the initial data matrices obtained in Step 1 and map them to the range of 0-255 to obtain normalized intensity data for all intensity values;

[0055] Under the same delay time: each initial data matrix yields N normalized intensity data, and the nm groups of initial data matrices yield a total of N×nm normalized intensity data, based on which an N×nm two-dimensional matrix is ​​constructed;

[0056] Step 3: Take the two-dimensional matrix corresponding to the three delay times, and combine them as the RGB channels of the color image to obtain the color image. The color image is used to display the LIBS spectral characteristics of the sample and is used as the input of the VIT neural network.

[0057] Example:

[0058] This invention provides a data processing method for converting LIBS (laser-induced breakdown spectrum) spectral sequence data into RGB color images.

[0059] The spectral sequence data used in this invention were obtained from five spectral channels: 181-309 nm; 323-427 nm; 395-544 nm; 529-656 nm; and 713-916 nm. A total of 10240 wavelength data points were collected. The wavelength-intensity plot of a certain ore sample is shown below. Figure 2 As shown. Figure 2 The horizontal axis represents 10240 wavelength data points, and the vertical axis represents the intensity value corresponding to each wavelength. The original input sample spectral sequence data is a 2×10240 data matrix.

[0060] The input image data format for the ViT deep learning network is X×Y×W, where X represents the width of the input image, Y represents the height of the input image, and W represents the color channels of the input image. For common color images, W is 3, representing the R, G, and B color channels respectively, with each color channel having a pixel value between 0 and 255. For example... Figure 3 As shown.

[0061] The objective is to convert a 2×10240 data matrix into an X×Y×W color image.

[0062] (1) Preparation of spectral data, such as Figure 4As shown: Figure 4 In the initial sample preparation, multiple samples are made under different pressures to achieve the desired results. Figure 4 For example, three types of samples, pressure 1, pressure 2, and pressure 3, are prepared. Then, using the delay time as a variable, these three types of samples are further divided into three categories: time 1, time 2, and time 3, respectively. In summary, the samples are divided into 9 categories. Twenty sampling points are determined at the same location on each sample. Each sampling point is laser-marked 100 times, generating 100 sets of 2×10²⁴⁰ wavelength-intensity spectral sequence data. That is, each sampling point generates 100 sets, and each sample has 20×100 sets.

[0063] The pressure values ​​of Pressure 1, Pressure 2, and Pressure 3 are randomly set, and can be set as an arithmetic sequence.

[0064] The delay time refers to the sampling time of the signal. When the laser hits the sample, it generates a spectrum. The sampling times of the spectrum signal, time1, time2, and time3, are randomly set and can be set as an arithmetic sequence.

[0065] (2) Normalize the intensity values ​​of the spectral sequence and map them to the range of 0-255. The normalization method formula is as follows:

[0066] y=(x-MinValue) / (MaxValue-MinValue)

[0067] Where x and y are the intensity values ​​of the spectral sequence before and after transformation, respectively, and MaxValue and MinValue are the maximum and minimum values ​​of the spectral sequence data samples before transformation, respectively. The normalized intensity values ​​are between 0 and 1. Each data point is then multiplied by 255 to map the intensity value to the range of 0-255, thus obtaining a 1×10240 list of data, with the data in the list ranging from 0 to 255.

[0068] (3) After processing the data size, it is necessary to design the data arrangement of the input VIT neural network image. As mentioned above, the RGB color image is actually a three-dimensional data matrix of X×Y×W, and the matrix element values ​​are between 0 and 255.

[0069] Image data arrangement as follows: Figure 5As shown: The R, G, and B channels of the color image correspond to the data matrices for delay times 1, 2, and 3, respectively. Taking the data matrix for delay time 1 as an example (the data matrix formats for delay times 2 and 3 are exactly the same as those for delay time 1): the X direction of the data matrix contains 10240 wavelength data points; the Y direction, from top to bottom, contains 100 sets of spectral sequence data corresponding to positions 1-20, resulting in a 10240×2000 data matrix; the data matrix formats for delay times 2 and 3 are exactly the same as those for delay time 1. These three 10240×2000 data matrices are combined as R, G, and B channels respectively to finally obtain a 10240×2000×3 color image.

[0070] (4) Image effect as follows Figure 6 As shown, the bright spots in the image correspond one-to-one with the peak positions in the spectral data, revealing information such as peak position and intensity from the image. This image data is used as input to a VIT neural network for sample classification and recognition.

[0071] Color image data is essentially a 3D X×Y data matrix, which provides a solution and technical possibility for addressing the aforementioned technical problems. Considering that a color image is a 3-channel matrix, a time variable is introduced. By controlling the sampling time of the spectral data, three sets of data matrices corresponding to different delay times are generated, corresponding to the R, G, and B channels respectively. Repeated sampling at one location yields spectral sequence data at different depths of the sample at that location. Sampling at different locations further results in a three-dimensional spectral sequence data of the sample in the X, Y, and Z dimensions. During sample preparation, three different pressures are used to divide the samples into three categories, adding another dimension of sample diversity.

[0072] By introducing time variables, stress variables, different sampling locations, and different sampling depths, we can generate multivariate, multidimensional data images that meet the requirements of VIT neural networks.

[0073] In summary, the above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A data processing method based on LIBS and VIT neural networks, characterized in that, Includes the following steps: Step 1: Set a delay time for 3 samplings. At each delay time, obtain the initial data matrix of the LIBS spectral sequence in the following manner; Take a sample pressed under a set pressure, determine n sampling points on the sample, perform laser spotting m times at each sampling point, and generate m sets of 2×N initial data matrices at each sampling point, where N is the total number of wavelength data points of the LIBS spectral sequence data. The first row of the initial data matrix is ​​the wavelength, and the second row is the intensity value corresponding to the wavelength. Then, under the same delay time, a total of nm sets of initial data matrices are obtained for one sample. Step 2: Normalize the intensity values ​​in all the initial data matrices obtained in Step 1 and map them to the range of 0-255 to obtain normalized intensity data for all intensity values; Under the same delay time: each initial data matrix yields N normalized intensity data, and the nm groups of initial data matrices yield a total of N×nm normalized intensity data, which are used to construct an N×nm two-dimensional matrix; Step 3: Take the two-dimensional matrix corresponding to the three delay times, and combine them as the RGB channels of the color image to obtain a color image. The color image is used to display the LIBS spectral characteristics of the sample and is used as the input of the VIT neural network.

2. The data processing method based on LIBS and VIT neural networks as described in claim 1, characterized in that, The delay times of the three samples form an arithmetic sequence.

3. A classification and recognition method based on LIBS and VIT neural networks, characterized in that, Includes the following steps: Step 1: Set different pressure data to obtain multiple known samples compressed under different pressures. Perform the following LIBS to image conversion process to obtain color images for each sample and add them to the training sample set. For each known sample, the delay time, sampling point location and number are changed, and the LIBS to image conversion process is repeated to obtain color images of the sample in different dimensions, which are then added to the training sample set. Step 2: Using the training sample set as input and the category of each known sample as output, train the VIT neural network to obtain a trained VIT neural network. Step 3: For the sample to be identified, set the delay time, sampling point location and number, execute the LIBS to image conversion process, obtain a color image of the sample to be identified, input it into the trained VIT neural network, and output the classification and recognition result of the sample to be identified. The LIBS to image conversion process is as follows: Step 1: Set a delay time for 3 samples. At each delay time, obtain the initial data matrix of the LIBS spectral sequence in the following manner; Take a sample pressed under a set pressure, determine n sampling points on the sample, perform laser spotting m times at each sampling point, and generate m sets of 2×N initial data matrices at each sampling point, where N is the total number of wavelength data points of the LIBS spectral sequence data. The first row of the initial data matrix is ​​the wavelength, and the second row is the intensity value corresponding to the wavelength. Then, under the same delay time, a total of nm sets of initial data matrices are obtained for one sample. Step 2: Normalize the intensity values ​​in all the initial data matrices obtained in Step 1 and map them to the range of 0-255 to obtain normalized intensity data for all intensity values; Under the same delay time: each initial data matrix yields N normalized intensity data, and the nm groups of initial data matrices yield a total of N×nm normalized intensity data, which are used to construct an N×nm two-dimensional matrix; Step 3: Take the two-dimensional matrix corresponding to the three delay times, and combine them as the RGB channels of the color image to obtain a color image. The color image is used to display the LIBS spectral characteristics of the sample and is used as the input of the VIT neural network.

Citation Information

Patent Citations

  • One-dimensional spectrum classification method and system

    CN113313059A

  • Color-based optical fiber management methods, systems, and electronic devices

    CN114937034A