A deep material raman spectrum reconstruction method

By combining the Voigt function and a deep neural network, a training dataset is generated and the deep neural network is trained, which solves the problem that the reconstruction of Raman spectra of deep materials in existing technologies is complex and dependent on expert experience, and realizes rapid and simple Raman spectrum reconstruction.

CN119574529BActive Publication Date: 2025-11-21XIAN INST OF OPTICS & PRECISION MECHANICS CHINESE ACAD OF SCI
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411742439.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-11-21
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

Existing technologies are complex to reconstruct the Raman spectra of deep materials, requiring the selection of appropriate initial values ​​and relying on expert experience, which raises the implementation threshold and fails to meet the needs of rapid detection.

Method used

By combining the Voigt function and a deep neural network, and by generating a training dataset and training the deep neural network, the Raman spectra of deep materials are reconstructed, eliminating the spectral peak interference of packaging materials and obtaining pure Raman spectra.

Benefits of technology

It enables rapid and efficient reconstruction of Raman spectra of deep samples, simplifies the spectral processing, reduces reliance on expert experience, and improves analysis speed and computational efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119574529B_ABST
    Figure CN119574529B_ABST
Patent Text Reader

Abstract

The application discloses a method based on the combination of Voigt functions and deep neural networks, which is used for reconstructing the Raman spectrum of deep substances, and solves the technical problems of complex implementation process and high implementation threshold of the prior art, and specifically comprises the following steps: step one, generating a training data set; step two, training a deep neural network to obtain a Raman spectrum reconstruction model; step three, collecting spatial offset Raman spectra of a double-layer sample; step four, performing baseline correction processing on the collected Raman spectra, so as to obtain corrected Raman spectra, splicing the corrected Raman spectra into input data, and inputting the input data into the Raman spectrum reconstruction model to obtain reconstructed pure Raman spectra. The method has strong adaptability, simple operation steps, can automatically process the Raman spectrum, eliminates the spectral peak interference of packaging materials, and thus quickly and simply obtains the pure Raman spectrum of the deep sample.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a method for optical detection of deep substances, in particular to a method for reconstructing Raman spectrum of deep substances. BACKGROUND

[0002] Raman spectrum is a spectral technique for analyzing the structure and composition of substances. It is based on the phenomenon of Raman scattering, that is, when light interacts with matter, part of the energy of the photons is absorbed or emitted by the matter, causing the frequency of the scattered light to change. By measuring this frequency change, information about the sample can be obtained, such as chemical composition, crystal structure, molecular vibration, etc. Raman spectrum is widely used in chemistry, material science, biology, etc.

[0003] Spatially offset Raman spectroscopy (SORS) is a derivative technique of Raman spectroscopy. By offsetting the collection point of Raman scattered light from the laser incident point, this technique can suppress the fluorescence and Raman spectrum interference of the sample surface packaging material, thereby improving the detection sensitivity. However, the spatially offset Raman spectroscopy technique can only weaken the interference caused by the packaging, but cannot completely eliminate its influence; therefore, it is necessary to analyze and process the spatially offset Raman spectrum to obtain the pure Raman spectrum of the deep sample; but this process is usually complex to implement, cannot meet the needs of on-site rapid detection, and limits the application of Raman spectrum in the detection of dangerous and explosive materials, biological medicine, pesticide residue detection, etc.

[0004] Currently, there are various methods for processing spatially offset Raman spectrum to obtain the pure Raman spectrum of deep samples; among them, there are proportional subtraction methods, such as Chinese invention patent with publication number CN113970539A and publication date January 25, 2022, which uses proportional subtraction method to select an appropriate proportional factor to offset the Raman spectrum of the surface material in the non-zero spatially offset spectrum. This method usually needs to collect spatially offset Raman spectrum at the best offset distance and needs to repeatedly experiment to find the proportional factor; in addition, methods such as self-modeling mixture analysis, target band entropy minimization, and independent component analysis can also be used to reconstruct the spectrum of deep samples; however, the implementation process of the above methods is relatively complex, usually needs to select appropriate initial values to obtain good performance, and often relies on expert experience, with high implementation threshold. SUMMARY

[0005] The present application aims to solve the technical problem of the prior art that the implementation process is relatively complex, usually needs to select appropriate initial values to obtain good performance, and often relies on expert experience, with high implementation threshold, and provides a method for reconstructing Raman spectrum of deep substances.

[0006] The application concept of the application is: a method combining Voigt function, spatial offset Raman spectrum technology and deep neural network (DNN) for reconstructing Raman spectrum of deep material, aiming to eliminate spectral peak interference of packaging materials to obtain pure Raman spectrum information of deep material.

[0007] In order to achieve the above-mentioned purpose and complete the above-mentioned application concept, the application adopts the following technical solutions:

[0008] A deep material Raman spectrum reconstruction method, characterized by comprising the following steps:

[0009] Step 1: generating a training data set

[0010] 1.1, using Voigt function to simulate and randomly generate a Raman spectrum peak P, a total of n Raman spectrum peaks P are generated and superimposed to obtain a simulated Raman spectrum R, and the simulated Raman spectrum R is denoted as R a is regarded as a sample spectrum, wherein n is randomly generated in the interval range of [2, 5] and is used to control the number of generated Raman spectrum peaks P;

[0011] 1.2, another simulated Raman spectrum R is obtained by using the same method as step 1.1 b , and R b is regarded as a packaging spectrum;

[0012] 1.3, adding the sample spectrum R a and the packaging spectrum R b to obtain the simulated Raman spectrum R d=0 at zero spatial offset; mixing the sample spectrum R a and the packaging spectrum R b according to a preset proportion coefficient to obtain the simulated Raman spectrum R d>0 at non-zero spatial offset; and further obtaining a group of training data [X1, Y1], wherein X1 is a Raman spectrum sequence spliced from R d=0 and R d>0 , that is, X1 = [R d=0 , R d>0 ], Y1 is a target output, and Y1 = R a ;

[0013] 1.4, repeating steps 1.1 to 1.3 to generate m groups of training data to obtain a training data set D = {(X k , Y k ), k = 1, 2,..., m}, for training a deep neural network, wherein X k is input data, Y k is target output, and m > 100;

[0014] Step two, training a deep neural network to obtain a Raman spectrum reconstruction model

[0015] 2.1 Building a deep neural network as f(X; θ); wherein X is input data, θ is a set of all deep neural network parameters, including the weight matrix W and the bias vector b of each layer, denoted as θ = {W1, b1, W2, b2,..., W5, b5}, wherein W j is the weight matrix of the jth layer network, b j is the bias vector of the jth layer network, wherein j = 1, 2, 3, 4, 5;

[0016] 2.2, using the training data set D to train the deep neural network f(X; θ) to obtain a Raman spectrum reconstruction model Y pred = f(X input ; θ), wherein X input is input data, Y pred is the reconstructed pure Raman spectrum, and it is deployed to actual application for Raman spectrum reconstruction;

[0017] Step three, collecting spatially offset Raman spectra of the double-layer sample;

[0018] Step four, performing baseline correction on the collected Raman spectra to obtain corrected Raman spectra; splicing the corrected Raman spectra as input data X input , inputting into the Raman spectrum reconstruction model Y pred = f(X input ; θ) to obtain the reconstructed pure Raman spectrum Y pred .

[0019] Further, in step 1.1, the Voigt function is defined by the following formula:

[0020]

[0021] wherein μ is the independent variable of the Voigt function, σ is the standard deviation of the Gaussian distribution part, and γ is the full width at half maximum of the Lorentz distribution part; w(z) is the Faddeeva function, which has the form: wherein Re[w(z)] is the real part of w(z), and i is the imaginary unit;

[0022] The Raman peak P = a · V(μ - l; σ, γ), wherein l is a randomly generated Raman peak P position parameter in the range of 200-2000 cm -1 ; σ, γ are randomly generated in the interval (0, 2); a is a randomly generated Raman peak P intensity parameter in the interval (0, 1), used to control the intensity of the Raman peak P;

[0023] the Raman spectrum

[0024] Further, in step 1.3, the proportionality coefficients are a1, b1 and are randomly generated within the interval (0.5, 1); the R d>0 = a1R a + a1b1R b .

[0025] Further, in step 1.4, the m = 10 6 .

[0026] Further, in step 2.1, the deep neural network includes a first hidden layer fc1, a second hidden layer fc2, a third hidden layer fc3, a fourth hidden layer fc4, and an output layer output.

[0027] The first hidden layer fc1: accepts a feature vector of size 512, maps the input to a 1024-dimensional hidden feature space through a fully connected layer; then applies a ReLU activation function to introduce a nonlinear transformation;

[0028] The second hidden layer fc2: the output of the previous layer is passed into the second fully connected layer, reducing the features from 1024 dimensions to 512 dimensions; the ReLU activation function is continued to be applied to enhance the nonlinearity of the network;

[0029] The third hidden layer fc3: the third fully connected layer maintains a 512-dimensional feature size, and the ReLU activation function is continued to be applied; this layer helps the network to further learn and refine the features while avoiding the loss of important information through dimension maintenance;

[0030] The fourth hidden layer fc4: the features are further reduced from 512 dimensions to 256 dimensions; the ReLU function is activated to strengthen the nonlinearity of the network and reduce the parameter quantity, and to prepare the final features for the output layer;

[0031] The output layer output: the last fully connected layer outputs a 256-dimensional vector as the final prediction result; this layer does not use an activation function, and the output is the prediction output of the deep neural network.

[0032] Further, in step 2.2, the process of training the deep neural network is as follows:

[0033] 2.2.1 Normalize X k in the training data set D to obtain the training sample for accelerating the training speed and improving the network performance, where X kmin is the minimum value of X k . kmaxFor X k The maximum value;

[0034] 2.2.2 The parameters θ of the deep neural network are randomly initialized with a normal distribution, with a mean of 0 and a standard deviation of 0.1.

[0035] 2.2.3 The training sample X' k The predicted output PY is obtained by forward propagation of the input into a deep neural network. k ;

[0036] 2.2.4 Output PY based on prediction k and target output Y k We choose the mean squared error (MSE) to calculate the loss value of the training dataset D. Used to measure the predicted output PY k With target output Y k The differences between them;

[0037] 2.2.5 Backpropagation calculates the gradient of the loss value L with respect to the parameters θ of the deep neural network.

[0038] 2.2.6 Based on the calculated gradient Update the parameters θ of the deep neural network using the gradient descent method;

[0039] 2.2.7 Repeat steps 2.2.3 to 2.2.6 until the loss value L converges to a point where it gradually stabilizes and no longer decreases significantly;

[0040] 2.2.8 Output and save the final optimized deep neural network parameters θ to obtain the Raman spectral reconstruction model Y. pred =f(X) input ;θ), where X input For input data, Y pred The goal is to obtain the reconstructed pure Raman spectrum and then deploy it in practical applications for Raman spectrum reconstruction.

[0041] Furthermore, in step 2.2.3, the specific process of the forward propagation is as follows:

[0042] Input training sample: X′ k

[0043] After passing through the first hidden layer: H1=φ(W1X′) k +b1);

[0044] After passing through the second hidden layer: H2 = φ(W2H1 + b2);

[0045] After passing through the 3rd hidden layer: H3 = φ(W3H2 + b3);

[0046] After the 4th hidden layer: H4 = φ(W4H3 + b4)

[0047] After the output layer: PY k = W5H4 + b5

[0048] Wherein: φ is a ReLu activation function, φ(x) = max(0, x), x is the independent variable of the ReLu activation function; H h is the output of the hth hidden layer, h = 1, 2, 3, 4; the predicted output is denoted as PY k , PY k = f(X' k ; θ).

[0049] Further, in step 2.2.6, the update is to adjust the weight matrix W and the bias vector b by the formula , wherein η is the learning rate, used to control the step size of each deep neural network parameter θ update, usually between 0.001 to 0.1.

[0050] Further, in step three, the collection uses a transmission type spatial shift Raman spectrometer, the excitation wavelength is 785nm, the resolution is 5cm; the excitation power is set to 400mW, the integration time is 4s, and the Raman spectra of the double-layer sample model at the shift distance of 0mm and 3mm are collected respectively; the upper layer of the double-layer sample uses polymethyl methacrylate (PMMA) as the packaging material, the thickness is 2mm, and the lower layer puts the sample to be measured as the deep material, the thickness is 7mm.

[0051] Further, in step four, the process of baseline correction is: for a collected original Raman spectrum RS, the background signal of the original Raman spectrum RS is approximated by fitting a polynomial function g(x), and then the fitting polynomial function g(x) is subtracted from the original Raman spectrum RS, thereby obtaining the corrected Raman spectrum RS'= RS-g(x), wherein RS is the collected original Raman spectrum, and g(x) is the fitted background signal.

[0052] The beneficial effects of the application are:

[0053] 1、The training data set simulated and generated by the Voigt function in the deep material Raman spectrum reconstruction method can better simulate the real Raman spectrum, so that the Raman spectrum reconstruction model obtained by training the deep neural network is more accurate.

[0054] 2、The deep matter Raman spectrum reconstruction method provided by the application uses a deep neural network to reconstruct spatially offset Raman spectra, can quickly and efficiently reconstruct the Raman spectrum of a deep sample, and implements automatic processing, simplifies the spectrum processing process, controls the spectrum processing time to the order of milliseconds, solves the problems of complex spectrum processing process, slow analysis speed and low calculation efficiency in the prior art, and thus quickly and simply obtains a pure Raman spectrum of a deep sample. BRIEF DESCRIPTION OF DRAWINGS

[0055] Figure 1 is a flowchart of an embodiment of the deep matter Raman spectrum reconstruction method provided by the application;

[0056] Figure 2 is a schematic diagram of the reconstruction of the Raman spectrum of potassium perchlorate using a deep neural network in an embodiment of the deep matter Raman spectrum reconstruction method provided by the application; (a) is a Raman spectrum of potassium perchlorate with packaging; (b) is a Raman spectrum of potassium perchlorate reconstructed using a deep neural network; and (c) is a reference Raman spectrum of a pure sample of potassium perchlorate;

[0057] Figure 3 is a schematic diagram of the reconstruction of the Raman spectrum of sodium nitrate using a deep neural network in an embodiment of the deep matter Raman spectrum reconstruction method provided by the application; (a) is a Raman spectrum of sodium nitrate with packaging; (b) is a Raman spectrum of sodium nitrate reconstructed using a deep neural network; and (c) is a reference Raman spectrum of a pure sample of sodium nitrate;

[0058] Figure 4 is a schematic diagram of the training process using a deep neural network in step two of an embodiment of the deep matter Raman spectrum reconstruction method provided by the application. DETAILED DESCRIPTION

[0059] The technical solutions of the application will be described clearly and completely below with reference to the drawings and embodiments. Obviously, the described embodiments are only some of the embodiments of the application, rather than all the embodiments. Based on the embodiments of the application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the application.

[0060] In combination with Figure 1 and Figure 4 , the deep matter Raman spectrum reconstruction method provided by the embodiment of the application includes the following steps:

[0061] Step one, generating a training data set

[0062] 1.1 The spectral peaks of Raman spectra are essentially Lorentz-type, but due to factors such as instrument resolution or sample characteristics, the measured Raman spectra are usually the convolution of the Lorentz distribution and the Gaussian distribution. This combination is called the Voigt function. Therefore, the Voigt function can better simulate the real Raman spectrum.

[0063] The Voigt function can be defined by the following formula:

[0064]

[0065] Where μ is the independent variable of the Voigt function, σ is the standard deviation of the Gaussian distribution, γ is the full width at half maximum (FWHM) of the Lorentz distribution; w(z) is the Faddeeva function, which has the following form: in Re[w(z)] is the real part of w(z), where i is the imaginary unit;

[0066] A Raman peak P = a·V(μ-l; σ, γ) was simulated and randomly generated using the Voigt function, where l is in the range of 200-2000 cm⁻¹. -1 The position parameters of Raman peak P are randomly generated within the wavenumber range; σ and γ are randomly generated within the interval (0, 2), and different combinations of σ and γ can produce Voigt peaks of different shapes; a is the intensity parameter of Raman peak P, randomly generated within the interval (0, 1), used to control the intensity of Raman peak P; a total of n Raman peaks P are generated, namely P1, P2, ..., P n The generated n Raman peaks P are superimposed to obtain a simulated Raman spectrum. The simulated Raman spectrum R is denoted as R a And it is regarded as the sample spectrum, where n is randomly generated in the range of [2, 5], which is used to control the number of Raman peaks P generated;

[0067] 1.2. Obtain another simulated Raman spectrum R using the same method as in step 1.1. b , will R b Viewed as a packaging spectrum;

[0068] 1.3 Simulated Raman spectrum at null space shift: R d=0 =R a +R b ; Scale coefficients a1 and b1 are randomly generated within the interval (0.5, 1) to obtain the Raman spectrum at the simulated non-zero spatial shift: R d>0 =a1R a +a1b1R b Let [X1, Y1] be a set of training data, where X1 is a subset of R. d=0and R d>0 The Raman spectrum sequence spliced, that is, X1=[R d=0 , R d>0 ], Y1 is the target output, and Y1=R a ;

[0069] 1.4, repeat steps 1.1 to 1.3, a total of m groups of training data are generated, to obtain a training data set D={(X k , Y k ), k=1, 2,..., m}, for training a deep neural network, wherein X k is input data, Y k is the target output, the number of training data groups m>100, preferably m=10 6 The training effect can be better;

[0070] Step two, training a deep neural network to obtain a Raman spectrum reconstruction model

[0071] 2.1, constructing a deep neural network as f(X; θ); wherein X is input data, θ is a set of all deep neural network parameters, including the weight matrix W and the bias vector b of each layer, denoted as θ={W1, b1, W2, b2,..., W5, b5}, wherein W j is the weight matrix of the jth layer network, b j is the bias vector of the jth layer network, wherein j=1, 2, 3, 4, 5;

[0072] Table 1 is a structure configuration table of a deep neural network of an embodiment of the deep material Raman spectrum reconstruction method of the present application;

[0073] Hierarchy Type Input size Output size Activation function 1st hidden layer Fully connected layer 512 1024 ReLU 2nd hidden layer Fully connected layer 1024 512 ReLU 3rd hidden layer Fully connected layer 512 256 ReLU 4th hidden layer Fully connected layer 256 256 ReLU Output layer Fully connected layer 256 256 \

[0074] As shown in Table 1, the deep neural network of the embodiment includes a first hidden layer (fc1), a second hidden layer (fc2), a third hidden layer (fc3), a fourth hidden layer (fc4), and an output layer (output);

[0075] The first hidden layer (fc1) accepts a feature vector with a size of 512, maps the input to a hidden feature space with a dimension of 1024 through a fully connected layer, and then applies a ReLU activation function to introduce a nonlinear transformation;

[0076] The second hidden layer (fc2) transmits the output of the previous layer into a second fully connected layer, reduces the features from 1024 dimensions to 512 dimensions, and continues to apply a ReLU activation function to enhance the nonlinear ability of the network;

[0077] The third hidden layer (fc3): the third fully connected layer keeps the feature size of 512 dimensions, and continues to apply the ReLU activation function. This layer keeps the dimension, helps the network to further learn and refine the features, and avoids losing important information;

[0078] The fourth hidden layer (fc4): the features are further reduced from 512 dimensions to 256 dimensions; activated by the ReLU function, the nonlinear representation ability of the network is strengthened, and the parameter quantity is reduced, preparing the final features for the output layer;

[0079] Output layer (output): the last fully connected layer outputs a 256-dimensional vector for the final prediction result; this layer does not use an activation function, and the output is the prediction output of the deep neural network;

[0080] 2.2, obtain the training sample: X k is normalized to obtain the training sample Wherein, X kmin is the minimum value of X k , X kmax is the maximum value of X k , used to speed up the training speed and improve the performance of the network;

[0081] 2.3, initialize the parameters of the deep neural network: normally distributed random initialization is performed on the parameters of the deep neural network θ = {W1, b1, W2, b2, …, W5, b5}, the mean is set to 0 and the standard deviation is set to 0.1, wherein W j is the weight matrix of the jth layer network, b i is the bias vector of the jth layer network, wherein j = 1, 2, 3, 4, 5;

[0082] 2.4, forward propagation: for each normalized training sample X k , forward propagation is performed through the deep neural network to calculate the prediction output PY k ;

[0083] The specific process of forward propagation is as follows:

[0084] Input training sample: X k

[0085] After the first hidden layer: H1 = φ (W1X k + b1);

[0086] After the second hidden layer: H2 = φ (W2H1 + b2);

[0087] After the third hidden layer: H3 = φ (W3H2 + b3);

[0088] After the 4th hidden layer: H4 = φ(W4H3 + b4)

[0089] After the output layer: PY k = W5H4 + b5;

[0090] Where: φ is the ReLu activation function, φ(x) = max(0, x), x is the independent variable of the ReLu activation function; H h is the output of the hth hidden layer, h = 1, 2, 3, 4; the predicted output is denoted as PY k , PY k = f(X k ; θ);

[0091] 2.5, Calculate the loss value: according to the predicted output PY k and the target output Y k , select the mean square error (MSE) to calculate the loss value L of the training data set D to measure the difference between the predicted output PY k and the target output Y k ; where m is the number of groups of training data;

[0092] 2.6, Back propagation to calculate the gradient: calculate the gradient of the loss value L with respect to the deep neural network parameters θ

[0093] 2.7, Gradient descent to update parameters: according to the calculated gradient several L, use the gradient descent method to update the deep neural network parameters θ, that is, adjust the weight matrix W and the bias vector b through the formula , where η is the learning rate, used to control the step size of each deep neural network parameter θ update, usually between 0.001 to 0.1;

[0094] 2.8, Repeat the training process: repeat steps 2.4 to 2.7 until the loss value L converges to gradually stabilize and no longer significantly decrease;

[0095] 2.9, Output the optimized model: after training, output and save the final optimized deep neural network parameters θ, get the Raman spectrum reconstruction model Y pred = f(X input ; θ), and deploy it to the actual application for Raman spectrum reconstruction, where X input is the spliced input data, and Y pred is the reconstructed pure Raman spectrum;

[0096] Step three, collect the spatially offset Raman spectrum of the double-layer sample

[0097] Spectra were collected using a transmission spatially offset Raman spectrometer with an excitation wavelength of 785 nm and a resolution of 5 cm-1; a double-layer sample model was prepared as a test sample, in which polymethyl methacrylate (PMMA) was used as a packaging material for the upper layer with a thickness of 2 mm, and the lower layer was placed into the sample to be tested as a deep material with a thickness of 7 mm; the excitation power was set to 400 mW, the integration time was 4 s, and the Raman spectra of the double-layer sample model at offset distances of 0 mm and 3 mm were collected, respectively, as Raman spectra RS d = 0 and Raman spectra RS d>0 ;

[0098] Step four, the process of baseline correction is as follows: for the collected original Raman spectrum RS, the background signal of the original Raman spectrum RS is approximated by fitting a polynomial function g(x), and then the fitted polynomial function g(x) is subtracted from the original Raman spectrum RS, thereby obtaining the corrected Raman spectrum RS' = RS - g(x), wherein RS is the collected original Raman spectrum, and g(x) is the fitted background signal; the Raman spectrum RS d=0 and the Raman spectrum RS d>0 Through the above process of baseline correction, the corrected Raman spectrum RS' d=0 and the corrected Raman spectrum RS' d>0 are finally obtained; the corrected Raman spectrum RS' d=0 and the corrected Raman spectrum RS' d>0 are spliced into input data X input = [RS' d=0 , RS' d>0 ]; X input is input into the Raman spectrum reconstruction model Y pred = f(X input ; θ), and the reconstructed pure Raman spectrum Y pred is obtained, and the reconstruction of the deep substance Raman spectrum is completed.

[0099] As shown in Figure 2 and Figure 3 , potassium perchlorate and sodium nitrate with packaging were detected respectively, and the Raman spectrum was reconstructed using a deep neural network; it can be seen that the Raman spectrum reconstructed using the deep neural network accurately restores the five characteristic peaks of potassium perchlorate: A, B, C, D, and E; the Raman spectrum reconstructed using the deep neural network accurately restores the three characteristic peaks of sodium nitrate: A, B, and C; the characteristic peaks of potassium perchlorate and sodium nitrate are accurately restored respectively, and the interference peaks generated by the packaging are eliminated.

[0100] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited thereto, any change or replacement within the technical scope disclosed by the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A deep material Raman spectrum reconstruction method, characterized in that it comprises the following steps: Step one, generating a training data set 1.1, Simulate and randomly generate a Raman peak P using Voigt function, generate n Raman peaks P and superimpose to get a simulated Raman spectrum R, record the simulated Raman spectrum R as R a Take as a sample spectrum, where n is randomly generated in the interval range of [2, 5] to control the number of generated Raman peaks P; 1.

2. Using the same method as in step 1.1, a second simulated Raman spectrum R is obtained b and R is considered as the package spectrum b ; 1.3, the sample spectrum R a and the package spectrum R b are added to obtain a simulated Raman spectrum R d=0 at the zero-space offset; Mixing the sample spectrum R a and the package spectrum R b according to the preset proportion coefficient to obtain a simulated Raman spectrum R d>0 at a non-zero space offset; and then obtaining a set of training data [X1, Y1], wherein X1 is a Raman spectrum sequence spliced from R d=0 and R d>0 , that is, X1 = [R d=0 , R d>0 ], and Y1 is a target output, that is, Y1 = R a ; 1.4、Repeat steps 1.1 to 1.3 to generate m sets of training data, resulting in a training dataset D = {(X k ,Y k ), k = 1, 2, …, m} for training the deep neural network, where X k is the input data, Y k is the target output, and m > 100; Step two, training deep neural network to obtain Raman spectrum reconstruction model 2.1 Construct a deep neural network as f(X; θ); where X is the input data, θ is the set of all deep neural network parameters, including the weight matrix W and bias vector b of each layer, denoted as θ = {W1, b1, W2, b2, …, W5, b5}, where W j is the weight matrix of the jth layer network, b j is the bias vector of the jth layer network, where j = 1, 2, 3, 4, 5; 2.2, training the deep neural network f(X; θ) with the training dataset D to obtain a Raman spectrum reconstruction model Y pred = f(X input ; θ), where X input is the input data, Y pred is the reconstructed pure Raman spectrum, and it is deployed to the actual application for Raman spectrum reconstruction; Step three, collecting spatially offset Raman spectrum of double-layer sample Step four, the collected Raman spectrum is processed by baseline correction to obtain the corrected Raman spectrum; the corrected Raman spectrum is spliced into input data X input , which is input into a Raman spectrum reconstruction model Y pred =f(X input ; θ) to obtain a reconstructed pure Raman spectrum Y pred .

2. The deep material Raman spectrum reconstruction method according to claim 1, wherein: In step 1.1, the Voigt function is defined by the following formula: where μ is the argument of the Voigt function, σ is the standard deviation of the Gaussian part, and γ is the full width at half maximum of the Lorentzian part; w(z) is the Faddeeva function, which has the form: where Re[w(z)] is the real part of w(z), and i is the imaginary unit. The Raman spectral peak P = a V (μ; σ, γ), wherein, l is a Raman spectral peak P position parameter randomly generated in a wave number range of 200-2000 cm -1 ; σ, γ are randomly generated in an interval of (0, 2); a is a Raman spectral peak P intensity parameter randomly generated in an interval of (0, 1) and used for controlling the intensity of the Raman spectral peak P; The Raman spectrum 3. The deep material Raman spectrum reconstruction method according to claim 2, wherein: In step 1.3, the proportionality coefficients are a1, b1 and are randomly generated in the interval (0.5, 1); the R d>0 = a1R a + a1b1R b .

4. The deep material Raman spectrum reconstruction method according to claim 3, wherein: In step 1.4, m = 10 6 .

5. The deep material Raman spectrum reconstruction method according to claim 4, wherein: In step 2.1, the deep neural network comprises a first hidden layer fc1, a second hidden layer fc2, a third hidden layer fc3, a fourth hidden layer fc4, and an output layer output. The first hidden layer fc1: accepts a feature vector with a size of 512, maps the input to a hidden feature space with a size of 1024 through a fully connected layer, and then applies a ReLU activation function to introduce a nonlinear transformation. The second hidden layer fc2: transmits the output of the previous layer into a second fully connected layer, reduces the features from 1024 dimensions to 512 dimensions, and continues to apply a ReLU activation function to enhance the nonlinear capability of the network. The third hidden layer fc3: the third fully connected layer maintains a feature size of 512, and continues to apply a ReLU activation function. This layer helps the network to further learn and refine the features while avoiding the loss of important information through dimension maintenance. The fourth hidden layer fc4: further reduces the features from 512 dimensions to 256 dimensions, activates through a ReLU function to strengthen the nonlinear representation capability of the network, and reduces the parameter quantity to prepare the final features for the output layer. The output layer output: the last fully connected layer outputs a vector with a size of 256, which is the final prediction result. This layer does not use an activation function, and the output is the prediction output of the deep neural network.

6. The deep material Raman spectrum reconstruction method according to claim 5, wherein: In step 2.2, the process of training the deep neural network is as follows: 2.2.1 Obtain X in the training data set D k After normalization, the training sample For accelerating the training speed and improving the network performance, wherein X kmin is the minimum value of X k is the maximum value of X kmax is the maximum value of X k is the maximum value of X 2.2.

2. Normally distributed random initialization is performed on the parameters θ of the deep neural network, with a mean of 0 and a standard deviation of 0.1; 2.2.3 Training the model on the training samples X' k Forward propagation in the input deep neural network to obtain the predicted output PY k ; 2.2.4 Selecting Mean Squared Error (MSE) as a loss value for the training dataset D k and target output Y k for measuring the difference between the predicted output PY k and target output Y k ;​ 2.2.5 Backpropagation computes the gradient of the loss value L with respect to the deep neural network parameters θ 2.2.6 Updating the depth neural network parameters θ using the computed gradient updating the depth neural network parameters θ using a gradient descent method; 2.2.

7. Steps 2.2.3 to 2.2.6 are repeated until the loss value L converges to a gradually stable value and no longer decreases significantly; 2.2.8 Output and save the final optimized deep neural network parameters θ, get the Raman spectrum reconstruction model Y pred = f(X input ; θ), where X input is the input data, Y pred is the reconstructed pure Raman spectrum, and it is deployed to the actual application for Raman spectrum reconstruction.

7. The deep material Raman spectrum reconstruction method according to claim 6, wherein: In step 2.2.3, the specific process of forward propagation is as follows: Input training sample: X' k After passing through the first hidden layer: h1=φ(W1x' k +b1); After the second hidden layer: H2 = φ(W2H1 + b2) After the third hidden layer: H3 = φ(W3H2 + b3) After the fourth hidden layer: H4 = φ(W4H3 + hb4) Through the output layer: PY k = W5H4 + b5; where: φ is a ReLu activation function, φ(x) = max(0, x), x is the argument of the ReLu activation function; H h is the output of the hth hidden layer, h = 1, 2, 3, 4; the predicted output is denoted as PY k . k = f(X' k ; θ).

8. The deep material Raman spectrum reconstruction method according to claim 7, wherein: In step 2.2.6, the update is made by adjusting the weight matrix W and the bias vector b with the formula where η is the learning rate, which is used to control the step size of each update of the deep neural network parameters θ, and is typically taken to be between 0.001 and 0.

1.

9. The deep material Raman spectrum reconstruction method according to claim 8, wherein: In step three, the collection uses a transmission spatially offset Raman spectrometer with an excitation wavelength of 785 nm and a resolution of 5 cm -1 ; The excitation power is set to 400 mW, the integration time is 4 s, and the Raman spectra of the double-layer sample model at the offset distances of 0 mm and 3 mm are collected respectively; the upper layer of the double-layer sample uses polymethyl methacrylate (PMMA) as a packaging material, with a thickness of 2 mm, and the lower layer is the sample to be measured as a deep material, with a thickness of 7 mm.

10. The deep substance Raman spectrum reconstruction method according to claim 9, characterized in that: In step four, the process of the baseline correction processing is: for a collected original Raman spectrum RS, the background signal of the original Raman spectrum RS is approximated by fitting a polynomial function g(x), and then the fitted polynomial function g(x) is subtracted from the original Raman spectrum RS, so as to obtain a corrected Raman spectrum RS'=RS-g(x), wherein RS is the collected original Raman spectrum, and g(x) is the fitted background signal.

Citation Information

Patent Citations

  • Raman spectrum method for rapidly detecting substances in packaging container

    CN113970539A

  • Method for detecting brittleness of tilapia meat by using Raman spectrum

    CN115326782A

  • Raman spectrum denoising method based on adaptive sparse decomposition

    CN116380869A