CN117828400A - Spectral analysis method and system based on parallel convolution neural network - Google Patents

Spectral analysis method and system based on parallel convolution neural network Download PDF

Info

Publication number
CN117828400A
CN117828400A CN202311850964.0A CN202311850964A CN117828400A CN 117828400 A CN117828400 A CN 117828400A CN 202311850964 A CN202311850964 A CN 202311850964A CN 117828400 A CN117828400 A CN 117828400A
Authority
CN
China
Prior art keywords
spectrum
sample
content
prediction module
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311850964.0A
Other languages
Chinese (zh)
Inventor
郭连波
石胜群
皮灵玲
陈锋
马洪华
侯泽海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN202311850964.0A priority Critical patent/CN117828400A/en
Publication of CN117828400A publication Critical patent/CN117828400A/en
Pending legal-status Critical Current

Links

Landscapes

  • Investigating Or Analysing Materials By Optical Means (AREA)

Abstract

The invention discloses a spectrum analysis method and a system based on a parallel convolution neural network, which belong to the technical field of LIBS substance component detection and comprise the following steps: constructing a convolution neural network with three modules of spectrum pretreatment, category prediction and content prediction connected in parallel; training the network by adopting a data set, wherein a training sample is LIBS spectrum of a sample to be tested, and a label is the pretreated spectrum, the category and the content of the sample to be tested; during training, the information representation of the preprocessing module is shared to the category prediction module and the content prediction module through forward propagation, and the category prediction module and the content prediction module lose joint updating of network parameters through backward propagation until training is completed. In practical application, the original spectrum of the unknown sample is directly input into a trained network, and the pretreated spectrum, the type of the sample and the content of the sample can be obtained. The invention can improve the accuracy of the predicted category and content and the analysis efficiency.

Description

Spectral analysis method and system based on parallel convolution neural network
Technical Field
The invention belongs to the technical field of LIBS substance component detection, and particularly relates to a spectrum analysis method and system based on a parallel convolutional neural network.
Background
Laser-induced breakdown spectroscopy (Laser-Induced Breakdown Spectroscopy, LIBS), also known as "Laser probe", is an atomic emission spectroscopy technique. The technical principle is that a beam of ultra-short pulse laser is focused on the surface of a sample to instantly ablate to generate plasma, and the element types and the element contents of the sample to be detected are deduced according to the characteristic wavelength and the intensity of a plasma emission spectrum. Compared with the traditional element analysis technology, the LIBS is widely applied to the fields of spark detection, deep sea detection, alloy smelting, environment, biomedicine and the like by virtue of the advantages of rapidness, remoteness, in-situ, micro loss and full element analysis.
The uncertainty caused by the fluctuation of the LIBS spectrum signal brings challenges to accurate qualitative and quantitative analysis of the sample by the LIBS. In the prior art, an original spectrum signal of a sample to be detected is generally preprocessed by combining a chemometric method to reduce or inhibit the uncertainty of LIBS spectrum, and then sample classification and quantitative analysis are respectively performed based on the preprocessed spectrum information.
According to the method, when the type and content information of an unknown sample is predicted, data are required to be respectively imported into a preprocessing model, preprocessed spectrum information is respectively imported into the type prediction model and the content prediction model, different models are required to be trained for different tasks, the process is complex, and the analysis efficiency is low. It should be noted that, in this manner of predicting the class and content information of the sample based on the preprocessed spectrum information, since implicit information in the preprocessing process cannot be fully utilized, some characteristic information of the original spectrum signal is usually lost in the process of preprocessing the LIBS original spectrum signal, and the class and content of the LIBS prediction are inaccurate because the characteristic information of the original spectrum cannot be utilized in the subsequent prediction based on the preprocessed spectrum information. After the model is built, when the model is transplanted to LIBS equipment for application, different fine tuning optimization needs to be performed on the preprocessing model, the category prediction model and the content prediction model, so that not only is a new uncertain factor introduced, but also the accuracy of LIBS prediction is reduced.
Disclosure of Invention
Aiming at the defects and improvement demands of the prior art, the invention provides a spectrum analysis method and a system based on a parallel convolution neural network, which aim to improve the accuracy of the type and content of prediction and the analysis efficiency.
To achieve the above object, according to a first aspect of the present invention, there is provided a spectral analysis method based on a parallel convolutional neural network, including:
training phase: training a parallel spectrum convolutional neural network by adopting a data set, wherein a training sample in the data set is LIBS spectrum of a sample to be tested, and a label is LIBS spectrum after pretreatment, and the type and content of the sample to be tested; the parallel spectrum convolutional neural network comprises a parallel spectrum preprocessing module, a category prediction module and a content prediction module, wherein the category prediction module and the content prediction module are connected with a characteristic extraction layer of the spectrum preprocessing module;
in the training process, taking the minimization of the characteristic loss between the sample type and the type label predicted by the type prediction module and the characteristic loss between the sample content and the content label predicted by the content prediction module as targets, reversely adjusting the network parameters of the spectrum preprocessing module until the loss converges or reaches a set training round to obtain a trained parallel spectrum convolutional neural network;
the application stage comprises the following steps: inputting an unknown sample to be detected into a trained parallel spectrum convolutional neural network to obtain a preprocessed spectrum, a category of the sample and a content of the sample.
Further, in the label, the preprocessed LIBS spectrum is a LIBS spectrum obtained after at least one of preprocessing of spectrum averaging, spectrum noise removal, spectrum smoothing and spectrum background subtraction is performed on the LIBS spectrum of the sample to be detected.
Further, the multiple spectra are averaged into one spectrum so as to carry out spectrum averaging on the LIBS spectrum of the sample to be detected;
spectral noise removal is carried out on LIBS spectra of the sample to be detected by adopting wavelet transformation;
performing spectral line smoothing on the LIBS spectrum of the sample to be detected by adopting a Savitzky-Golay algorithm;
and carrying out spectrum background baseline subtraction on the LIBS spectrum of the sample to be detected by adopting a self-adaptive iterative re-weighting punishment least square method.
Further, the spectrum preprocessing module comprises: the one-dimensional convolution layer, the activation function layer and the group normalization layer are sequentially connected.
Further, the category prediction module or the content prediction module includes: a one-dimensional convolution layer, an activation function layer and a full connection layer.
Further, a mean square error function is adopted as a loss function of the spectrum preprocessing module and the content prediction module;
and adopting a cross entropy function as a loss function of the category prediction module.
Further, in the training process, training samples in the data set are input into the parallel spectrum convolutional neural network in batches in a Mini-batch mode.
Further, before the application stage, the method further comprises:
measuring LIBS spectrum fluctuation output by the spectrum preprocessing module by adopting relative standard deviation;
measuring the accuracy of the sample category predicted by the category prediction module by adopting accuracy and a confusion matrix;
and measuring the deviation of the sample content predicted by the content prediction module by adopting an average absolute error, a root mean square error and a determination coefficient.
According to a second aspect of the present invention, there is provided a parallel convolutional neural network-based spectroscopic analysis system comprising a computer readable storage medium and a processor;
the computer-readable storage medium is for storing executable instructions;
the processor is configured to read executable instructions stored in the computer readable storage medium to perform the method of any one of the first aspects.
According to a third aspect of the present invention there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method according to any of the first aspects.
In general, through the above technical solutions conceived by the present invention, the following beneficial effects can be obtained:
(1) According to the spectrum analysis method based on the parallel spectrum convolutional neural network, the parallel spectrum convolutional neural network is designed, the parallel spectrum convolutional neural network comprises a parallel spectrum preprocessing module, a category prediction module and a content prediction module, the category prediction module and the content prediction module are connected with a feature extraction layer of the spectrum preprocessing module, so that the category prediction module and the content prediction module share the spectrum features extracted by the spectrum preprocessing module, and the effective information label learned by the preprocessing module can provide forward gain for the category prediction module and the content prediction module; in the training process, the network parameters of the spectrum preprocessing module are updated through the combination of the loss functions of the class prediction module and the content prediction module, so that the information of the preprocessing module and the content prediction module can be utilized when the class of the sample to be detected is predicted, the information of the preprocessing module and the class prediction module can be utilized when the content of the sample to be detected is predicted, the information representation of the sample is utilized to the maximum extent, and the accuracy of the predicted class and content is improved.
The parallel spectrum convolutional neural network constructed by the invention is a completely end-to-end multitasking parallel neural network, when the parallel spectrum convolutional neural network is applied, the spectrum of the sample to be tested is directly input into the trained parallel spectrum convolutional neural network without preprocessing the sample to be tested, the preprocessed spectrum, the category of the sample and the content of the sample can be obtained, the analysis efficiency of a model is improved, and the complexity of model migration can be reduced.
(2) Further, the collected spectrum is subjected to spectrum averaging, spectrum noise removal, spectrum smoothing and spectrum background baseline deduction pretreatment, and in the process of obtaining a high-quality clean spectrum, the category prediction module and the content prediction module can learn more characteristic information to represent, so that the accuracy of the predicted category and content is improved.
(3) Furthermore, the group normalization layer arranged in the spectrum preprocessing module can prevent the model from being over-fitted, and improves the generalization capability of the model.
(4) Further, in the training process, the model is trained according to a batch input mode, so that the training memory consumption is reduced.
(5) Furthermore, before the application stage, the output result of each module is comprehensively evaluated according to a plurality of indexes, so that a stable, reliable and accurate LIBS spectrum analysis model can be realized, and the method is suitable for practical applications such as complex industrial environments, medical detection and the like needing qualitative and quantitative detection.
According to the method provided by the invention, an additional physical device is not required on the basis of the traditional LIBS, the whole device is simple and easy to operate, only sample LIBS spectrum data and model training are required to be acquired, the method is simple and easy to realize, a complex sample pretreatment process is not required, and the accuracy of the predicted category and content and the analysis efficiency can be improved.
Drawings
Fig. 1 is a flowchart of a spectrum analysis method based on a parallel convolutional neural network in an embodiment of the present invention.
Fig. 2 is a diagram of a LIBS spectrum acquisition system employed in an embodiment of the invention.
Fig. 3 is a schematic diagram of a moving path process of mapping an acquired spectrum of a sample to be measured (black dots are ablation positions) in an embodiment of the present invention.
FIG. 4 is a LIBS original spectrum of a national standard alloy used in an example of the present invention.
Fig. 5 is a diagram of the overall architecture of a parallel spectrum convolutional neural network constructed in an embodiment of the present invention.
FIG. 6 is a graph showing the comparison of the original LIBS spectrum and the pre-treatment effect of the spectrum predicted by PSCNN in the embodiment of the invention.
Fig. 7 is a confusion matrix chart for evaluating qualitative performance of PSCNN in an embodiment of the present invention.
Fig. 8 is a graph of quantitative curve fit for evaluation of PSCNN quantitative performance element in an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention. In addition, the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
As shown in fig. 1, the spectrum analysis method based on the parallel convolutional neural network of the present invention includes: training phase and application phase.
The training phase comprises the following steps: training a parallel spectrum convolutional neural network by adopting a data set, wherein a training sample in the data set is LIBS spectrum of a sample to be tested, and a label is LIBS spectrum after pretreatment, and the type and content of the sample to be tested; the parallel spectrum convolution neural network comprises a parallel spectrum preprocessing module, a category prediction module and a content prediction module, wherein the category prediction module and the content prediction module are connected with a characteristic extraction layer of the spectrum preprocessing module, so that the category prediction module and the content prediction module share the spectrum characteristics extracted by the spectrum preprocessing module; in the embodiment of the invention, the spectrum preprocessing module, the category prediction module and the content prediction module are all convolutional neural networks;
the spectrum preprocessing module is used for extracting LIBS spectrum characteristics in the training sample to obtain a preprocessed LIBS spectrum;
the category prediction module is used for predicting the category of the sample according to the LIBS spectral characteristics extracted by the spectral preprocessing module;
the content prediction module is used for predicting the content of the sample according to the LIBS spectral characteristics extracted by the spectral preprocessing module;
in the training process, the network parameters of the class prediction module, the network parameters of the content prediction module and the network parameters of the spectrum preprocessing module are reversely adjusted by taking the minimization of the characteristic loss between the class of the sample and the class label predicted by the class prediction module and the characteristic loss between the content of the sample and the content label predicted by the content prediction module as targets until the loss converges or reaches a set training round, and a trained parallel spectrum convolutional neural network is obtained.
Specifically, in the data set construction process, LIBS spectrum of a sample to be detected is collected by determining parameters of a spectrum collection system of the sample to be detected; in the embodiment of the invention, LIBS spectra of a sample to be detected are collected at each ablation position in a mode of collecting frequency surface scanning (mapping) at 1 Hz.
In the embodiment of the invention, the data set is divided into the training set D according to the proportion of 7:3 by a random division mode train ={X train ,y train },And test set D test ={X test ,y test },Wherein X is a feature vector of an input sample, y is a label vector, n is the number of samples, l is the spectrum length, 1 is the class label length, and c represents the number of elements to be detected. Different from the traditional data division, the data tag in the embodiment of the invention comprises three parts, namely a LIBS spectrum after pretreatment and a data tag to be detectedThe class and content of the sample, and therefore, in this dataset, the dimensions of the tag dataset are larger than the feature dataset.
Specifically, in the data tag, the preprocessed LIBS spectrum is a LIBS spectrum obtained after at least one of spectrum averaging, spectrum noise removal, spectrum smoothing and spectrum background subtraction is performed on an original LIBS spectrum of the sample to be tested.
Specifically, in the case of spectrum acquisition using LIBS, errors may occur in the analysis result due to non-uniformity of the surface of the sample to be measured. Therefore, to ensure that the acquired spectral data is more accurate and consistent, after the LIBS spectrum is acquired, the multiple spectra are averaged into one for processing on average.
Preferably, the spectral noise is removed using wavelet transform. The wavelet denoising mainly comprises three parts of wavelet decomposition, thresholding and wavelet reconstruction; in the embodiment of the invention, daubechies 8, db8 for short, is selected in LIBS signal analysis and is used as a wavelet basis function for spectral noise removal. And determining a threshold value by calculating a median absolute deviation MAD, so as to obtain the LIBS spectrum signal after noise removal.
Specifically, after the spectral denoising is completed, the high-frequency fluctuation needs to be further removed, so that the high-frequency fluctuation is smoother, the main characteristics and the trend of the spectrum are displayed more clearly, and the process of improving the spectrum readability and the spectrum interpretation is required. In the embodiment of the invention, spectral line smoothing is carried out on the LIBS spectrum signal after noise removal by adopting a Savitzky-Golay (S-G) algorithm, so that a smooth LIBS spectrum is obtained.
In particular, since the spectral data also contains a background baseline caused by the instrument, sample, or other external factors, the background baseline may mask or distort the true spectral features, affecting the accuracy of the analysis. Thus, the pretreatment process also includes a background baseline subtraction process, i.e., identifying and removing background deviations, to ensure that the spectrum analyzed is representative of the characteristics of the sample itself only, and not of any external or instrumental disturbances. In the embodiment of the invention, a self-adaptive iterative weighted punishment least square method (airPLS) is adopted, and background baselines are gradually identified and removed through iterative weighted least square fitting, so that main features in data are ensured not to be interfered.
In the training process, the loss function of the spectrum preprocessing module is the characteristic loss between the predicted preprocessed LIBS spectrum and the preprocessed LIBS spectrum label. In the embodiment of the invention, a mean square error function (MSELoss) is adopted as a loss function of the spectrum preprocessing module. A mean square error function (MSELoss) is used as the loss function of the content prediction module. A cross entropy function (cross entropyloss) is used as the loss function for the class prediction module. Wherein, the content is predicted as a quantitative task and the category is predicted as a qualitative task.
In the embodiment of the invention, adam (Adaptive Moment Estimation) is adopted as a parameter optimizer, and Adam optimizes the magnitude and direction of the gradient at the same time to determine how to update the parameters of the model so as to improve the performance of the model.
In the embodiment of the invention, the spectrum preprocessing module comprises a one-dimensional convolution layer (Conv-1 d), an activation function layer (modified linear unit ReLU) and a group normalization layer (GroupNorm); the category prediction module and the content prediction module both comprise: one-dimensional convolution layer (Conv-1 d) and activation function layer and full connection layer.
The one-dimensional convolution layer is used for extracting LIBS spectrum characteristics;
the activation function layer is used for increasing the nonlinear property of the corresponding neural network, helping the neural network form a decision boundary, and analyzing the data efficiently, so that the neural network can learn more complex characteristic representation.
The group normalization layer (GroupNorm) in the spectrum preprocessing module can improve the stability and generalization capability of the network and improve the influence of dimension on feature learning; the group normalization layer groups the channels into different groups and independently normalizes the features of each group such that the normalized statistics are not entirely dependent on the batch dimension nor the channel dimension.
The full connection layer is used for realizing combination and conversion of the features and establishing a mapping relation between the distributed feature representation and the tag space. And the content prediction module is used for establishing the mapping relation between the feature space and the element content label space.
Based on the parallel spectrum convolutional neural network constructed by the invention, the parallel spectrum convolutional neural network is initialized by an Xavier method, and initial values are given to weights and bias items in the neural network so as to accelerate the training of a model and enhance the stability of the model. In order to further improve the calculation efficiency and generalization capability, training sets are input in batches according to a Mini-batch mode, the training memory consumption is reduced, small batches of data are randomly selected from the training sets, data difference distribution representation can be learned in the same round of training, and then the training sets are input into a neural network for training.
Before the model is applied, the performance of each module needs to be comprehensively evaluated, so that the performance of the model for completing pretreatment, qualitative and quantitative tasks is ensured to be perfect. Aiming at the prediction effect of the spectrum preprocessing module, selecting a Relative Standard Deviation (RSD) as an evaluation index for measuring the spectrum fluctuation of the spectrum after the spectrum is processed by the Parallel Spectrum Convolutional Neural Network (PSCNN), wherein the mathematical definition of the RSD is shown in a formula (1); aiming at qualitative tasks (the prediction effect of the category prediction module), selecting an Accuracy Accuracy and a confusion matrix as shown in a formula (2) as evaluation indexes; for the quantitative task (the prediction effect of the content prediction module), absolute index and relative index are used, respectively, including mean absolute error MAE shown in formula (3), root mean square error RMSE shown in formula (4), and determination coefficient R shown in formula (5) 2
Where SD denotes the standard deviation of the spectral intensity,mean value of spectrum intensity; delta i 1 when the sample classification is correct, otherwise 0, n represents the number of samples; y is i Observations (tags) representing the ith sample, and>marking the predictive value of the ith sample, +.>The average of all sample observations is shown.
And inputting the test set into the trained parallel spectrum convolutional neural network, evaluating the performance of the test set through the indexes, and visualizing the index result. If the index meets the detection requirement, the parallel spectrum convolutional neural network simultaneously learns three task representations of spectrum preprocessing, qualitative and quantitative.
The application stage comprises the following steps: inputting an unknown sample to be detected into a trained parallel spectrum convolutional neural network to obtain a preprocessed spectrum, a category of the sample and a content of the sample.
The effect of the spectral analysis method based on the end-to-end parallel spectral convolution neural network of the present invention will be described in specific examples.
The LIBS spectrum acquisition system device shown in fig. 2 is adopted to start acquiring the spectrum of the sample to be detected according to the sample moving mapping process shown in fig. 3, and in order to verify the effectiveness of the method, a national standard micro alloy steel sample GSB 03-2453-2008 is selected. The original spectrum of the microalloyed steel is shown in fig. 4, the sample contains 7 categories and 5 concentrations of the elements to be measured, and the LIBS spectrum length is 24564, as shown in table 1.
Table 1 sample measured element concentration meter (wt.%)
MSELOS and CrossEntropyLoss are defined as loss functions for the neural network, using the Adam algorithm as an optimizer for the model. According to the above method, a Parallel Spectrum Convolutional Neural Network (PSCNN) is built, as shown in fig. 5, where the spectrum preprocessing module, the class prediction module, and the content prediction module respectively include several different Sequential elements, and table 2 lists the layer structure specifically included in each Sequential element. The preprocessed output spectrum length is 24564 consistent with the original input spectrum length, the qualitative and classified output lengths are 7 and 5 respectively, and the quantity of the corresponding categories and the quantity of the elements to be detected are corresponding. Setting the hyper-parameters of the model and the hyper-parameters of the training process, including batch size, training round and the like.
TABLE 2 neural network internal architecture
The processed dataset was randomly divided into training (70%) and testing (30%) sets and converted into tensor form. The label here contains three parts, a pretreatment module, qualitative and quantitative, and thus is 24570 in length. And loading the training set into the neural network model according to batches by using the DataLoader function interface, and updating model parameters through repeated back propagation iteration to complete model training. And testing with a test set.
In the examples of the present invention, 5 different spectral lines as shown in Table 3 were selected to evaluate spectral volatility. The results in Table 3 show that the RSD of all the spectral lines except Cu 324.8nm in the samples of class 1 and class 3 is smaller in the original spectrum, and the RSD of all the spectral lines in the original spectrum is larger than that of the predicted spectrum, so that the PSCNN can effectively reduce the fluctuation of the spectrum. Further visualization of the original spectrum and the predicted spectrum calculated from the PSCNN is shown in fig. 6, where it can be seen that the spectrum output by the spectral preprocessing module has less fluctuation with the PSCNN of the present invention.
TABLE 3 RSD (%)
Wherein PSCNN in the table represents the parallel spectral convolutional neural network of the present invention.
Then, accuracy of qualitative classification is evaluated by using Accuracy Accuracy and confusion matrix, on a training set and a test set, classification Accuracy of the standard sample 7 class is 100%, and the confusion matrix is shown in fig. 7, so that PSCNN of the invention shows excellent performance in qualitative classification task.
Finally, MAE, RMSE and R are used 2 The quantitative effect of the PSCNN of the present invention on five elements Mn, cr, ni, cu, ti was evaluated, and the results are shown in tables 4 and 5, where the quantitative effect of the PSCNN on elements of the partial least squares regression PLSR model and the conventional CNN model were compared. It can be seen that the MAE and RMSE of the PSCNN of the invention are smaller, R 2 Larger, the quantitative prediction effect is better.
TABLE 4 quantitative absolute average error and root mean square error of elements
TABLE 5 quantitative determination coefficient of elements
In addition, fig. 8 shows a quantitatively-fitted curve of PSCNN of the present invention at higher average Mn content and lower average Ti content in the samples. It can be seen that the predicted line and the fitted line are highly coincident. The comprehensive results of a plurality of indexes show that the method has the same advantages in the quantitative element prediction task.
According to the spectrum analysis method based on the parallel spectrum convolutional neural network, the parallel spectrum convolutional neural network is designed, the parallel spectrum convolutional neural network comprises a parallel spectrum preprocessing module, a category prediction module and a content prediction module, the category prediction module and the content prediction module are connected with a feature extraction layer of the spectrum preprocessing module, so that the category prediction module and the content prediction module share spectrum features extracted by the spectrum preprocessing module, and effective information learned by the preprocessing module is marked to provide forward gain for the category prediction module and the content prediction module; in the training process, network parameters of the spectrum preprocessing module are updated through the combination of the loss functions of the class prediction module and the content prediction module, so that information of the content prediction module can be utilized when the class of the sample to be detected is predicted, information of the class prediction module can be utilized when the content of the sample to be detected is predicted, information representation of the sample is utilized to the maximum extent, and accuracy of the predicted class and content is improved.
The parallel spectrum convolutional neural network constructed by the invention is a completely end-to-end multitasking parallel neural network, when the parallel spectrum convolutional neural network is applied, a sample to be tested is not required to be preprocessed, but is directly input into the trained parallel spectrum convolutional neural network, the preprocessed spectrum, the category of the sample and the content of the sample can be obtained, and the analysis efficiency of a model is improved; and the complexity of model migration can be reduced.
The group normalization layer arranged in the spectrum preprocessing module can prevent the model from being fitted excessively, and improves the generalization capability of the model.
In the training process, the model is trained according to a batch input mode, so that the training memory consumption is reduced.
The method provided by the invention is simple in whole device and easy to operate, and is simple and easy to realize and does not need a complex sample pretreatment process, and the method is simple and easy to realize on the basis of the traditional LIBS, and only needs to collect the sample LIBS spectrum data and train the model. According to the method, the performance is comprehensively evaluated according to a plurality of indexes, a stable, reliable and accurate LIBS spectrum analysis model can be realized, and the method is more suitable for practical applications such as complex industrial environments, medical detection and the like needing qualitative and quantitative analysis.
The invention also provides a spectrum analysis system based on the parallel convolution neural network, which comprises a computer readable storage medium and a processor;
the computer-readable storage medium is for storing executable instructions;
the processor is configured to read executable instructions stored in the computer readable storage medium to perform the parallel convolutional neural network based spectral analysis method of the above embodiments.
The present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a parallel convolutional neural network-based spectroscopic analysis method as in the above embodiments.
It will be readily appreciated by those skilled in the art that the foregoing description is merely a preferred embodiment of the invention and is not intended to limit the invention, but any modifications, equivalents, improvements or alternatives falling within the spirit and principles of the invention are intended to be included within the scope of the invention.

Claims (10)

1. A spectral analysis method based on a parallel convolutional neural network, comprising:
training phase: training a parallel spectrum convolutional neural network by adopting a data set, wherein a training sample in the data set is LIBS spectrum of a sample to be tested, and a label is LIBS spectrum after pretreatment, and the type and content of the sample to be tested; the parallel spectrum convolutional neural network comprises a parallel spectrum preprocessing module, a category prediction module and a content prediction module, wherein the category prediction module and the content prediction module are connected with a characteristic extraction layer of the spectrum preprocessing module;
in the training process, taking the minimization of the characteristic loss between the sample type and the type label predicted by the type prediction module and the characteristic loss between the sample content and the content label predicted by the content prediction module as targets, reversely adjusting the network parameters of the spectrum preprocessing module until the loss converges or reaches a set training round to obtain a trained parallel spectrum convolutional neural network;
the application stage comprises the following steps: inputting an unknown sample to be detected into a trained parallel spectrum convolutional neural network to obtain a preprocessed spectrum, a category of the sample and a content of the sample.
2. The spectroscopic analysis method according to claim 1, wherein in the label, the pre-processed LIBS spectrum is a LIBS spectrum obtained by performing at least one of a spectral averaging, a spectral noise removal, a spectral line smoothing process and a spectral background subtraction on the LIBS spectrum of the sample to be measured.
3. The spectroscopic analysis method according to claim 2, wherein a plurality of spectra are averaged into one to spectrally average the LIBS spectrum of the sample to be measured;
spectral noise removal is carried out on LIBS spectra of the sample to be detected by adopting wavelet transformation;
performing spectral line smoothing on the LIBS spectrum of the sample to be detected by adopting a Savitzky-Golay algorithm;
and carrying out spectrum background baseline subtraction on the LIBS spectrum of the sample to be detected by adopting a self-adaptive iterative re-weighting punishment least square method.
4. The spectroscopic analysis method as claimed in claim 1 or 2, wherein the spectroscopic pretreatment module comprises: the one-dimensional convolution layer, the activation function layer and the group normalization layer are sequentially connected.
5. The spectroscopic analysis method according to claim 1 or 2, wherein the category prediction module or the content prediction module comprises: a one-dimensional convolution layer, an activation function layer and a full connection layer.
6. The spectroscopic analysis method as set forth in claim 1, characterized in that a mean square error function is employed as a loss function of the spectroscopic preprocessing module and the content prediction module;
and adopting a cross entropy function as a loss function of the category prediction module.
7. The spectroscopic analysis method as set forth in claim 1, wherein training samples in the dataset are input in batches to the parallel spectral convolutional neural network in a Mini-batch manner during training.
8. The spectroscopic analysis method as set forth in claim 1, further comprising, prior to the application stage:
measuring LIBS spectrum fluctuation output by the spectrum preprocessing module by adopting relative standard deviation;
measuring the accuracy of the sample category predicted by the category prediction module by adopting accuracy and a confusion matrix;
and measuring the deviation of the sample content predicted by the content prediction module by adopting an average absolute error, a root mean square error and a determination coefficient.
9. A spectrum analysis system based on a parallel convolutional neural network, which is characterized by comprising a computer readable storage medium and a processor;
the computer-readable storage medium is for storing executable instructions;
the processor is configured to read executable instructions stored in the computer readable storage medium to perform the method of any one of claims 1-8.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-8.
CN202311850964.0A 2023-12-29 2023-12-29 Spectral analysis method and system based on parallel convolution neural network Pending CN117828400A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311850964.0A CN117828400A (en) 2023-12-29 2023-12-29 Spectral analysis method and system based on parallel convolution neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311850964.0A CN117828400A (en) 2023-12-29 2023-12-29 Spectral analysis method and system based on parallel convolution neural network

Publications (1)

Publication Number Publication Date
CN117828400A true CN117828400A (en) 2024-04-05

Family

ID=90518558

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311850964.0A Pending CN117828400A (en) 2023-12-29 2023-12-29 Spectral analysis method and system based on parallel convolution neural network

Country Status (1)

Country Link
CN (1) CN117828400A (en)

Similar Documents

Publication Publication Date Title
Birks et al. Does pollen-assemblage richness reflect floristic richness? A review of recent developments and future challenges
CN109324013B (en) Near-infrared rapid analysis method for constructing crude oil property by using Gaussian process regression model
CN108399434B (en) Analysis and prediction method of high-dimensional time series data based on feature extraction
Bai et al. Novel hybrid extreme learning machine and multi-objective optimization algorithm for air pollution prediction
CN114091349A (en) Multi-source field self-adaption based rolling bearing service life prediction method
Lee et al. Bayesian deep learning–based 1H‐MRS of the brain: Metabolite quantification with uncertainty estimation using Monte Carlo dropout
Kołczyńska et al. Modeling public opinion over time: a simulation study of latent trend models
Foldager et al. On the role of model uncertainties in Bayesian optimisation
CN117828400A (en) Spectral analysis method and system based on parallel convolution neural network
CN116861373A (en) Query selectivity estimation method, system, terminal equipment and storage medium
Ruiz‐Munoz et al. Super resolution for root imaging
Wendelberger et al. Monitoring Deforestation Using Multivariate Bayesian Online Changepoint Detection with Outliers
Liao et al. Efficient and robust bayesian selection of hyperparameters in dimension reduction for visualization
Hader et al. On noise-sensitive automatic tuning of gate-defined sensor dots
Rios et al. A systematic literature review on decomposition approaches to estimate time series components
CN113295674A (en) Laser-induced breakdown spectroscopy characteristic nonlinear processing method based on S transformation
Işık et al. Predicting soil quality index with a deep regression approach
Velluet et al. Practical Identifiability of Plant Growth Models: A Unifying Framework and Its Specification for Three Local Indices
Xu et al. Change point detection of multimode processes considering both mode transitions and parameter changes
Arumugam et al. Time Series Modeling and Forecasting Using Autoregressive Integrated Moving Average and Seasonal Autoregressive Integrated Moving Average Models.
JP7390210B2 (en) Spectrum processing device and method
Ismail et al. Prediction Model for Spectroscopy Using Python Programming
Kessentini et al. Maximum likelihood and maximum a posteriori estimators for the Riesz probability distribution
Ravina et al. Distilling Interpretable Models into Human-Readable Code
Mulvey et al. Assessing the Adequacy of Morphological Models used in Palaeobiology

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination