Raman spectrum-based qualitative and quantitative analysis method and system for mixture

The Raman spectroscopy analysis method based on sparsity adaptive successive orthogonal matching pursuit solves the problems of inaccurate extraction of spectral characteristic peaks and noise interference in existing technologies, and realizes rapid and accurate qualitative and quantitative analysis of mixtures, which is suitable for portable instrument applications.

CN120558932BActive Publication Date: 2025-11-21BEIJING YIXINGYUAN PETROCHEMICAL TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510750139.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-11-21
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

Existing qualitative and quantitative analysis methods for Raman spectroscopy mixtures rely on the accurate extraction of spectral characteristic peaks, which are easily affected by baseline drift and noise interference. Furthermore, the model training costs are high, making it difficult to guarantee the accuracy and efficiency of the analysis.

Method used

A sparsity-adaptive stepwise orthogonal matching pursuit method is adopted to analyze Raman spectra. By combining the sparsity-adaptive stepwise orthogonal matching pursuit method and non-negative constraints, the pure components, their spectra and weights in the mixture can be quickly determined, reducing the influence of noise interference.

Benefits of technology

It enables rapid and accurate qualitative and quantitative analysis of mixtures, is suitable for portable instrument applications, improves the accuracy and efficiency of analysis results, and reduces model training costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120558932B_ABST
    Figure CN120558932B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of Raman spectrum detection, and relates to a mixture qualitative and quantitative analysis method and system based on Raman spectrum. The method comprises the following steps: taking mixture spectrum information and qualitative dictionary as input, adopting a sparse degree adaptive step-by-step orthogonal matching pursuit method to analyze, preliminarily determining multiple pure components in the mixture and corresponding spectrum and weight, adding a constraint condition to the components, and obtaining a final qualitative analysis result. Finally, taking the mixture spectrum, a qualitative component list and a quantitative dictionary as input of the orthogonal matching pursuit algorithm, and according to the steps of the qualitative analysis, an iterative cycle is carried out to obtain a quantitative analysis result. The orthogonal matching pursuit algorithm can quickly and accurately determine the components and concentration of the mixture. Meanwhile, by adding a constraint condition, the problem that the analysis result is affected by factors such as baseline drift and noise interference due to the spectrum itself is effectively avoided, and the accuracy and efficiency of the analysis result are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of Raman spectroscopy detection technology, specifically relating to a qualitative and quantitative analysis method and system for mixtures based on Raman spectroscopy. Background Technology

[0002] Raman spectroscopy is a type of scattering spectroscopy. The peaks of the spectrum are related to the chemical bonds of materials that contain information about molecular vibrations or rotations. Therefore, Raman spectroscopy analysis is now widely used in substance identification and molecular structure research. Specifically, because each substance has its unique Raman spectral characteristics, various components in a mixture can be accurately identified by comparing them with a standard spectral library or by using spectral analysis methods.

[0003] Existing methods for qualitative and quantitative analysis of mixtures using Raman spectroscopy mostly employ mathematical modeling, chemometrics, and machine learning methods.

[0004] Among them, the mathematical model method uses multiple regression analysis to establish a complex mathematical model to describe the relationship between Raman spectra and component content. However, this method relies too much on the accurate extraction of spectral characteristic peaks. But the characteristic peaks of Raman spectra may be identified in poor accuracy due to various reasons, such as baseline drift and noise interference, which will affect the performance of the model. Moreover, the model itself also has certain errors. Therefore, the accuracy of the mathematical model method cannot be guaranteed.

[0005] Chemometric methods, based on chemometric principles, analyze the reaction characteristics of each component in a mixture and use data obtained from Raman spectroscopy for calculation and interpretation to determine the composition of the mixture. This method requires a deep understanding of the reaction mechanisms and component characteristics of the mixture beforehand. However, since each component in the mixture is in an unknown state, it is difficult for operators to gain a thorough understanding of the reaction mechanisms and characteristics of all components in the mixture, thus compromising the accuracy of the analytical results.

[0006] Machine learning methods require a pre-built training set for model training and validation, making them suitable for complex mixture analysis. However, they necessitate large amounts of labeled data for training, and the acquisition and labeling of Raman spectroscopy data is costly, limiting model training. Furthermore, they place high demands on feature extraction, as traditional methods may fail to effectively capture features related to the mixture's components. Therefore, this method suffers from relatively poor accuracy and high upfront costs.

[0007] In view of this, the present invention is hereby proposed. Summary of the Invention

[0008] One object of the present invention is to provide a rapid and accurate method for qualitative and quantitative analysis of Raman spectroscopy mixtures.

[0009] To achieve the above objectives, this invention provides a qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method, comprising:

[0010] Step S110: Based on the preprocessed mixture spectral information A1 and the qualitative dictionary matrix D1 generated by the qualitative dictionary, the preprocessed mixture spectral information A is analyzed using the sparsity-adaptive stepwise orthogonal matching pursuit method to obtain the various pure substance components in the mixture and their corresponding spectra and weights.

[0011] Step S120: Based on the various pure substance components and their corresponding spectra and weights, obtain the residual spectra after each round of analysis, and apply non-negative constraints to the residual spectra of all pure substance components;

[0012] Step S130: Determine whether the maximum weight value matched by the residual spectra of all pure substance components is less than 0.1;

[0013] Step S140: If the sample exists, the detection is complete, and a list of qualitative analysis detected components is output; if the sample does not exist, proceed to step S120.

[0014] In step S150, the preprocessed mixture spectral information A1 is replaced with the unprocessed mixture spectrum A2, and the qualitative dictionary matrix D1 is replaced with the quantitative dictionary matrix D2 generated from the component list and the quantitative dictionary. Steps S110 to S140 are then executed to obtain the quantitative analysis results.

[0015] Further, the step of analyzing the preprocessed mixture spectral information A1 and the qualitative dictionary matrix D1 generated from the preprocessed mixture spectral information A1 using a sparsity-adaptive stepwise orthogonal matching pursuit method to obtain multiple pure substances and their corresponding spectra and weights includes: Input: dictionary matrix D1, preprocessed mixture spectral information A1 and sparsity K (K is less than the number of atoms in the quantitative / qualitative dictionary); Initialization: set the first residual f0=A1, index set θ0=φ, counter t=0, where t represents the iteration round; where φ represents the empty set; Iteration loop: in the t-th iteration, the first residual is... Transform into Calculate the first residual after transformation. and columns of the qualitative dictionary matrix D1 Maximum value in inner product Store in collection ,Right now Where N represents the number of atoms in the qualitative dictionary; update the index set. Establish a spectral reconstruction set Obtained by least squares method , That is, the vector that approximates the ideal sparse vector calculated in the t-th round; , = Update residuals , Determine if the iteration termination condition is met: t > K; if the termination condition is met, the iteration ends, and the approximate result of the ideal sparse vector calculated in the last round is output. If the iteration termination condition is not met, continue executing the iteration loop; filter out The maximum value, and The maximum value is used as the weight of the pure component in the mixture. This process is iterated and looped, and the value obtained each time is subtracted. The maximum value is obtained, and finally each pure substance component and its corresponding spectrum and weight are obtained.

[0016] Further, the step of obtaining the residual spectrum after each round of analysis based on multiple pure substance components and their corresponding spectra and weights includes: obtaining the contribution spectrum Y of the pure substance component, and calculating the second inner product of the pure substance component spectrum Z and the contribution spectrum Y; determining whether the second inner product is less than a first preset value; if the second inner product is greater than the first preset value, then subtracting the contribution spectrum from the pure substance component spectrum to obtain the residual spectrum after this round of analysis, and returning the residual spectrum as the spectrum for the next round of detection; if the second inner product is less than the first preset value, then all substances in the mixture have been detected, and the cycle ends.

[0017] Further, the step of obtaining the contribution spectrum Y of the pure substance component includes: obtaining the contribution spectrum Y of the corresponding pure substance component according to the following formula based on the weight S and the pure substance component spectrum Z: Y=S*Z.

[0018] Furthermore, the step of subtracting the contribution spectrum from the pure substance component spectrum to obtain the residual spectrum after this round of analysis includes: performing peak matching between the spectrum of each pure substance component and the contribution spectrum; and proportionally reducing the intensity of the matched peaks to obtain the residual spectrum for this round.

[0019] Furthermore, the step of peak matching for each pure component spectrum and the contribution spectrum includes: taking the second derivative of the pure component spectral signal and acquiring the peak value to eliminate noise in the spectrum; calculating the difference in the abscissa of the peak value between the contribution spectrum and the pure component spectrum; determining that the difference in the abscissa of the peak value between the contribution spectrum and the pure component spectrum is greater than or equal to 5; if the difference in the abscissa of the peak value between the contribution spectrum and the pure component spectrum is less than or equal to 5, then determining it as a matching peak and recording the intensity information of the matching peak; finding the minimum values ​​(valleys) on both sides of the peak point of the second derivative to determine the boundary position of the peak and define the peak region range.

[0020] Furthermore, the step of proportionally reducing the intensity of the matched peaks includes: subtracting the weight value of the corresponding pure substance component from the absolute intensity of the matched peak of the pure substance component to obtain the matching value, and using the matching value as the residual spectrum for this round.

[0021] Furthermore, the step of applying non-negative constraints to the residual spectra of all pure substance components includes: determining whether the residual spectrum is less than 0; if the residual spectrum is less than 0, then setting the residual spectrum to 0; if the residual spectrum is equal to or greater than 0, then retaining the original residual spectrum.

[0022] Furthermore, the qualitative and quantitative analysis method for Raman spectroscopy mixtures also includes: acquiring multiple spectra of pure substances that may be present in different hazardous chemicals; denoising the multiple spectral information of each pure substance to generate a sequence list of pure substances and their corresponding spectra, i.e., an unprocessed qualitative dictionary; and performing characteristic peak intensity transformation on the unprocessed qualitative dictionary to obtain a preprocessed qualitative dictionary.

[0023] Furthermore, the qualitative and quantitative analysis method for Raman spectroscopy mixtures also includes using an untreated qualitative dictionary as a quantitative dictionary.

[0024] In other embodiments, a Raman spectroscopy detection / analysis system is provided, and the qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method described above can be applied to the Raman spectroscopy detection / analysis system.

[0025] Furthermore, the Raman spectroscopy detection / analysis system includes a portable Raman spectrometer and a scientific Raman spectrometer.

[0026] In some embodiments, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the qualitative and quantitative analysis method for Raman spectroscopic mixtures based on the orthogonal matched pursuit method as described above and applies it to the Raman spectroscopic detection / analysis system described above.

[0027] In other embodiments, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, which, when executed by a processor, implements the qualitative and quantitative analysis method for Raman spectroscopic mixtures based on the orthogonal matched pursuit method as described above and is applied to the Raman spectroscopic detection / analysis system described above.

[0028] Based on the foregoing description, those skilled in the art will understand that the orthogonal matching pursuit algorithm is used to perform qualitative and quantitative analysis of mixtures detected by Raman spectroscopy across instruments. Specifically, based on the spectral information of the mixture and a qualitative dictionary as input, a sparsity-adaptive stepwise orthogonal matching pursuit method is used to analyze and initially determine the various pure substance components in the mixture and their corresponding spectra and weights. Then, constraints are added to obtain the final qualitative analysis results. Finally, the unprocessed mixture spectrum, the component list obtained from the qualitative analysis, and the quantitative dictionary are used as input to the orthogonal matching pursuit algorithm, and the steps of the qualitative analysis are iteratively repeated to obtain the quantitative analysis results of the mixture. This invention can quickly and accurately determine the composition and concentration of mixtures using the orthogonal matching pursuit algorithm, even if the substances in the mixture are very similar. Furthermore, the algorithm executes very quickly, completing the qualitative and quantitative analysis of a spectrum within 1 to 2 seconds. The algorithm principle is simple, making it suitable for deployment on edge devices for rapid on-site detection. Compared with traditional methods, it demonstrates significant technical advantages in portable instrument applications. At the same time, by adding constraints to the orthogonal matching pursuit algorithm to correct the obtained components and contents, it effectively avoids the problem of the analysis results being affected by factors such as baseline drift and noise interference caused by the spectrum itself, thus effectively improving the accuracy and efficiency of the analysis results. Attached Figure Description

[0029] The accompanying drawings, as part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments and descriptions of the invention are used to explain the invention, but do not constitute an undue limitation of the invention. Obviously, the drawings described below are merely some embodiments, and those skilled in the art can obtain other drawings based on these drawings without creative effort. In the drawings:

[0030] Figure 1 This is a flowchart of a qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matching pursuit method in some embodiments of the present invention;

[0031] Figure 2 This is a partial result figure of a first example of a qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matching pursuit method in some specific embodiments of the present invention;

[0032] Figure 3This is a partial result figure of a second example of the qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matching pursuit method in some other specific embodiments of the present invention;

[0033] Figure 4 yes Figure 2 Partial results of the first example;

[0034] Figure 5 yes Figure 4 Partial results from the second example;

[0035] Figure 6 yes Figure 3 Partial results from the second example;

[0036] Figure 7 This is a schematic diagram showing the results of the comparative example of the present invention. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments will be clearly and completely described below with reference to the accompanying drawings. The following embodiments are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0038] In the description of this invention, it should be noted that the terms "upper", "lower", "front", "rear", "left", "right", "vertical", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.

[0039] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0040] Those skilled in the art should understand that the embodiments described below are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. These partial embodiments are intended to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by those skilled in the art without creative effort should still fall within the scope of protection of the present invention.

[0041] The following reference Figures 1 to 7 This document will provide a detailed description of the qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matching pursuit method in some embodiments of the present invention.

[0042] Figure 1 This is a flowchart of a qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matching pursuit method in some embodiments of the present invention; Figure 2 This is a partial result figure of a first example of a qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matching pursuit method in some specific embodiments of the present invention; Figure 4 yes Figure 2 Partial results of the first example; Figure 3 This is a partial result figure of a second example of the qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matching pursuit method in some other specific embodiments of the present invention; Figure 5 yes Figure 4 Partial results from the second example; Figure 6 yes Figure 3 Partial results from the second example; Figure 7 This is a schematic diagram of the comparative results of the present invention. In the diagram, ethanol-cyclohexane, ethanol-methane, ethanol-n-propanol and ethanol-tetraethyl orthosilicate were collected by a scientific Raman instrument, while ethanol-cyclohexane*, ethanol-methane*, ethanol-n-propanol* and ethanol-tetraethyl orthosilicate* were collected by a portable instrument.

[0043] like Figure 1 As shown, in some embodiments of the present invention, a qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method is provided, comprising:

[0044] Step S110: Based on the preprocessed mixture spectral information A1 and the qualitative dictionary matrix D1 generated by the qualitative dictionary, the preprocessed mixture spectral information A is analyzed using the sparsity-based adaptive stepwise orthogonal matching pursuit method to obtain various pure substance components and their corresponding spectra and weights.

[0045] The spectral information includes the name of the substance (mixture or pure substance) and the shape of the spectrum, i.e., the position of the absorption peaks, the depth of the valleys, etc. It should be noted that in the process of comparing spectral information, the comparison is not based on the absolute similarity of the spectra, but rather on the geometric similarity of the spectra.

[0046] Before step S110, the method further includes:

[0047] The spectral information of the collected sample mixture is standardized and denoised to improve the quality and analyzability of the spectral data. Specifically, the standardization process involves using normalization to convert spectral information collected by different instruments to a consistent standard. This can be achieved by loading the collected spectral information into the spectral detection system and applying one or more of the following methods: maximum value normalization, minimum-maximum value normalization, mean value normalization, or standard normalization. The best-performing spectral information is then used as the final standardized spectral information to avoid significant errors caused by noise in the spectra of the sample mixture.

[0048] It should be noted that the "mixture spectrum" mentioned in this invention refers to the spectrum after denoising the spectral information through standardization and denoising algorithms. The denoising methods include, but are not limited to, wavelet transform and signal filtering to smooth the signal, in order to avoid the problem of inaccurate subsequent quantitative and qualitative analysis results due to a large amount of interference information in the spectrum of the mixture under test.

[0049] Specifically, in this embodiment, the Daubechies wavelet transform is applied to the spectral information of the mixture. The wavelet signal is db4. The wavelet decomposition coefficients of the signal are calculated, and then a threshold is applied to eliminate noise. Next, a Fast Fourier Transform (FFT) is used to convert the time-domain signal into a frequency-domain signal for better analysis of signal characteristics. Then, a Butterworth low-pass filter is used to extract and suppress specific frequency components. Multiple filters are applied to enhance the noise reduction effect. Finally, median filtering is used to remove noise spikes from the signal. This completes the denoising process for the spectral information of the mixture under test.

[0050] Qualitative and quantitative analysis methods for mixtures also include: constructing a qualitative analysis dictionary. Specifically:

[0051] Multiple spectra of potentially present pure substances in various hazardous chemicals were acquired. Noise was removed from the multiple spectra of each pure substance to generate a sequence list of pure substances and their corresponding spectra, i.e., an unprocessed qualitative dictionary. The unprocessed qualitative dictionary was then subjected to characteristic peak intensity transformation to obtain a preprocessed qualitative dictionary. More specifically, spectra of 1699 different hazardous chemical pure substances were first collected, with approximately 40 spectra for each pure substance. These 40 spectra were then averaged to reduce measurement error. The pure substance spectra were then standardized, and the spectral ranges were truncated and interpolated, all set to 200 cm⁻¹. -1 -1900cm -1The spectra of 1700 data points were obtained. Finally, wavelet transform was used to denoise the spectra, and the data was saved to a CSV file. Then, characteristic peak intensity transformation was performed on the spectra in the CSV file to obtain a qualitative dictionary.

[0052] Before constructing the dictionary, it is also necessary to write abbreviations for the names of each pure substance, as shown in the table below:

[0053] Table 1. List of Abbreviations for Pure Substances

[0054]

[0055] In this invention, both qualitative and quantitative analyses employ the Orthogonal Matching Pursuit (OMP) method. OMP is a greedy algorithm for sparse signal decomposition, belonging to the category of sparse decomposition methods. It iteratively selects the atom most relevant to the current residual and performs orthogonalization processing at each step, thereby improving the efficiency and accuracy of signal decomposition. The difference between qualitative and quantitative analyses in this invention lies in the input values ​​used in the OMP method. Specifically, the input values ​​for qualitative analysis are a qualitative dictionary matrix and the spectral information of the mixture. The input values ​​for quantitative analysis are a quantitative dictionary matrix, a list of components after qualitative analysis, and the unprocessed spectral information of the mixture. The difference between the qualitative and quantitative dictionaries is that the spectra of different hazardous chemical pure substances in the qualitative dictionary undergo denoising and characteristic peak intensity processing, while the quantitative analysis only denoises the spectra of different hazardous chemical pure substances without performing characteristic peak intensity transformation.

[0056] The characteristic peak intensity transformation aims to limit the intensity of the characteristic peaks in the spectrum to the interval [0, 1]. The specific steps are as follows: first, find the minimum value of the spectrum. If the minimum value is negative, subtract this minimum value from the entire spectrum to make the spectrum non-negative. When the spectrum is non-negative, divide the entire spectrum by the difference between the maximum and minimum values ​​of its peak intensities to complete the characteristic peak intensity transformation.

[0057] Construct a qualitative dictionary matrix D1 from the qualitative dictionary. Generally, the way to convert a qualitative dictionary into a dictionary matrix D1 is to use the values ​​in the dictionary as rows and columns in the matrix, and the keys of the dictionary as indices and column names in the matrix.

[0058] Step 110 specifically includes:

[0059] Input: Qualitative dictionary matrix D1, preprocessed mixture spectral information A1, and sparsity K, where K is less than the number of atoms in the quantitative dictionary. In this embodiment, the number of atoms in both the qualitative and quantitative dictionaries is 1699, therefore the value of K is also 1699 when performing quantitative analysis.

[0060] Initialization: Set residual f0=A1, index set θ0=φ, counter t=0, where t represents the iteration round.

[0061] Iterative loop: In the t-th iteration, the residual is changed by... Transform into Calculate the residual and columns of the qualitative dictionary matrix D1 Maximum value in inner product Store in collection ,Right now .

[0062] Update index set Establish a spectral reconstruction set .

[0063] Obtained by least squares method , That is, the vector value of the near-ideal sparse vector calculated in the t-th round.

[0064] It should be noted that both the qualitative and quantitative dictionaries in this invention are static dictionaries and do not have the function of real-time updating or training on data. Therefore, the vector calculated in the t-th round here that approximates the ideal sparse vector... Each weight in the dictionary should be less than the upper limit of the weights output by the previous dictionary.

[0065] Output final signal estimate , = Update residuals , ;

[0066] Determine if the iteration termination condition is met: t > K;

[0067] If the iteration termination condition is met, the iteration ends, and the approximate result of the ideal sparse vector calculated in the last round is output. If the iteration termination condition is not met, the iteration loop steps continue to be executed.

[0068] Filter out The maximum value, and The maximum value is used as the weight of the pure component in the mixture. This process is iterated and looped, and the value obtained each time is subtracted. The maximum value is obtained, and finally each pure substance component and its corresponding spectrum and weight are obtained.

[0069] Step S120: Based on the various pure substance components and their corresponding spectra and weights, obtain the residual spectra after each round of analysis, and apply non-negative constraints to the residual spectra of all pure substance components.

[0070] Step S121: Obtain the contribution spectrum Y of the pure substance component, and calculate the second inner product of the pure substance component spectrum Z and the contribution spectrum Y. The step of "obtaining the contribution spectrum Y of the pure substance component" includes: obtaining the contribution spectrum Y of the corresponding pure substance component based on the weight S and the pure substance component spectrum Z. The contribution spectrum of the pure substance component can be calculated using the following formula:

[0071] Y = S * Z.

[0072] Step S122: Determine whether the second inner product is less than the first preset value. The first preset value can be obtained based on the operator's experience or after multiple trials. Specifically, in some specific embodiments, the first preset value can be set to 0.5.

[0073] Step S123: If the second inner product is greater than the first preset value, the contribution spectrum is subtracted from the pure substance component spectrum to obtain the residual spectrum after this round of analysis. If the second inner product is less than the first preset value, the pure substance component does not belong to the mixture; at the same time, it is considered that all substances in the mixture have been detected, and the cycle ends.

[0074] Step S123, "subtracting the contribution spectrum from the pure substance component spectrum to obtain the residual spectrum after this round of analysis," includes:

[0075] Step S1231 involves peak matching of the spectra and contribution spectra of each pure substance component. Step S1231 includes:

[0076] Step S12311 involves performing second-order differentiation on the spectral signals of the pure components and acquiring the peak values ​​to eliminate noise in the spectrum. Specifically, this includes: calculating the second derivative of the spectrum for each pure component; identifying local maxima (peaks) of the second derivative and acquiring the positions of all peaks in the second derivative; determining whether the Raman intensity at the peak position is greater than a second preset value: if it is greater than the preset value, it is considered a peak of that Raman spectrum; if it is less than or equal to the preset value, the peak position is considered noise, and the Raman intensity at the next peak position is determined to be greater than the second preset value, and this process is repeated. By setting constraints, peak finding accuracy is ensured and interference information is removed. The second preset value is the product of 0.01 and the maximum Raman intensity of the corresponding pure component spectrum.

[0077] Step S12312 involves matching the peak values ​​of the contributed spectrum with those of the pure component spectrum. Specifically, this includes: calculating the difference in the abscissa of the peak values ​​between the contributed spectrum and the pure component spectrum; determining if the difference in the abscissa of the peak values ​​between the contributed spectrum and the pure component spectrum is greater than or equal to 5; and if the difference in the abscissa of the peak values ​​between the contributed spectrum and the pure component spectrum is less than or equal to 5, then identifying it as a matching peak and recording the intensity information of the matching peak.

[0078] Step S12313 involves detecting the peak boundaries of the function after second-order differentiation. Specifically, this includes finding the minimum values ​​(valleys) on both sides of the peak point of the second derivative to determine the peak boundary position, thereby defining the peak region range and avoiding over-interpretation of the spectrum, which leads to excessive computation and low analysis efficiency.

[0079] Step S1232 involves proportionally reducing the intensity of the matched peaks to eliminate interference from contributing components. Specifically, the step of "proportionally reducing the intensity of the matched peaks" includes: subtracting the weight value of the corresponding pure substance component from the absolute intensity of the matched peak of the pure substance component to obtain the matching value, and using the matching value as the residual spectrum for this round.

[0080] Step S124 involves applying non-negative constraints to the residual spectra of all pure substance components and returning the residual spectra as the spectra for the next round of detection. The step of "applying non-negative constraints to the residual spectra of all pure substance components" includes: determining whether the residual spectrum is less than 0; if the residual spectrum is less than 0, setting the residual spectrum to 0; if the residual spectrum is equal to or greater than 0, retaining the original residual spectrum.

[0081] Step S130: Determine whether there is a maximum weight value less than 0.1 obtained by matching the residual spectra of all pure components.

[0082] In step S140, if a value less than 0.1 exists, it is determined that all pure components in the mixture spectrum have been detected, and the residuals detected after the residual spectra corresponding to values ​​less than 0.1 are treated as noise spectra and no further analysis is performed on them. That is, if a noise spectrum is detected, component detection is terminated, and qualitative analysis results are output. If no noise spectrum is detected, step S120 is executed.

[0083] In step S150, the preprocessed mixture spectral information A1 is replaced with the unprocessed mixture spectrum A2, and the qualitative dictionary matrix D1 is replaced with the quantitative dictionary matrix D2 generated from the component list and quantitative dictionary. Steps S110 to S140 are then executed to obtain the quantitative analysis results. Specifically, the quantitative analysis requires three inputs: the unprocessed mixture spectrum (without characteristic intensity transformation), the component list obtained from the qualitative analysis, and the quantitative dictionary of all pure substances. First, dictionary atoms corresponding to the qualitative analysis components are selected from the quantitative dictionary. Following steps S110 and S140, the Orthogonal Matching Pursuit (OMP) algorithm is applied to the mixture spectrum to calculate the quantitative weight of each component. This algorithm is based on the principle of solving sparse solutions of underdetermined linear equations, and iteratively determines the weight coefficients of each pure substance's spectrum in the linear combination of the mixture spectra. Finally, these calculated weights are compared, and the concentration of each component in the mixture is calculated based on the proportional relationship between the weights.

[0084] In other embodiments of the present invention, a Raman spectroscopy detection / analysis system is provided, and any of the qualitative and quantitative analysis methods for Raman spectroscopy mixtures based on the orthogonal matching pursuit method described above can be applied to the Raman spectroscopy detection / analysis system.

[0085] The Raman spectroscopy detection / analysis system includes a Raman spectrometer for detecting the spectrum of the mixture to be tested and a control system. In this embodiment, a scientific Raman instrument and a portable Raman instrument are used to collect data, and the data is processed by the control system. Both the scientific Raman instrument and the portable Raman instrument are electrically connected to the control system.

[0086] The portable Raman spectrometer used in this embodiment is a Blade 785B Pro portable Raman spectrometer manufactured by Liqiong Optoelectronics Co., Ltd., with a spectral range of 200 cm⁻¹. -1 Up to 3200 cm -1 Using a 785nm laser, the resolution is 6 cm. -1 up to 8 cm -1 Between these values, the maximum output power is 500 mW.

[0087] The scientific benchtop Raman spectrometer used in this embodiment is a Horiba LabRAM HR Evolution Raman spectrometer with a spectral range of 50 cm⁻¹. -1 Up to 4000 cm -1 The spectral resolution is 0.35 cm⁻¹. -1 The available excitation wavelengths include 325nm, 532nm, 633nm and 785nm, and the output power is 500 mW.

[0088] The portable instrument was used to collect data on 1699 substances, and the collected information was uploaded to the control system, which then generated a pure substance dictionary. Each collected mixture included at least nine portable Raman spectral data points.

[0089] To verify the accuracy of the qualitative and quantitative detection method for mixtures using Raman spectroscopy described above, a visualization experiment of spectral decomposition can be conducted. This visualization experiment involves the operator preparing a mixture solution and detecting its spectrum. The mixture's spectral data is decomposed into multiple pure substance spectra, allowing for an intuitive demonstration of the algorithm's decision-making process at each stage and the obtained detection results, thus verifying the accuracy of the detection results. Therefore, the present invention conducted the following two visualization verification experiments:

[0090] Example 1, Analysis of a Methanol and Ethanol Mixture

[0091] A solution of methanol and ethanol mixed in a 3:2 ratio was used as the test sample. The spectrum of the mixture was acquired using a Portman 785, and the spectrum is shown below. Figure 2 and Figure 3 As shown.

[0092] In the first round of testing, the spectra of the pure components of the mixture were analyzed and matched to the methanol spectrum. Figure 2 and Figure 3 The dashed line represents the result calculated by the OMP algorithm, which is the methanol spectrum multiplied by the corresponding weights. After the detection is completed, the residual spectrum is subtracted from the pure component spectrum to obtain the residual spectrum used for the second round of detection. The residual spectrum is analyzed and matched with the ethanol spectrum. After subtraction, the detection cycle exit condition is met, and the detection is completed.

[0093] Example 2: Analysis of a mixed solution of acetonitrile, methanol, and ethanol

[0094] A solution of acetonitrile, methanol, and ethanol in a 1:1:1 ratio was used as the test sample. The spectra of the mixture were acquired using a LiQong instrument, and the analysis process is as follows: Figures 4 to 6 As shown.

[0095] In the first round of detection, the spectra of the pure components of the mixture are analyzed and matched to the acetonitrile spectrum. After the detection is completed, the residual spectra are subtracted from the pure component spectra to obtain the residual spectra used for the second round of detection. The residual spectra are analyzed and matched to the methanol spectrum. After the detection is completed, the residual spectra are subtracted from the pure component spectra to obtain the residual spectra used for the third round of detection. The residual spectra are analyzed and matched to the ethanol spectrum. After subtraction, the detection cycle exit condition is met, and the detection is completed.

[0096] The experiment successfully analyzed the composition of a mixture of acetonitrile, methanol, and ethanol. Furthermore, the data used in this experiment was collected using a different set of equipment, demonstrating the robustness of the algorithm. This visualization method allows for a faster understanding of the algorithm's process in analyzing the mixture's composition, showcasing its superior performance and practicality.

[0097] Comparative Example 1: Qualitative Analysis of Mixtures Comparison Experiment. The operator designed eight analytical experiments for binary mixtures to demonstrate the accuracy and robustness of the algorithm, comparing the DeepRaman algorithm with the RamanOMP algorithm used in this invention.

[0098] First, the binary mixture spectrum was analyzed using the DeepRaman algorithm. DeepRaman is a deep learning-based spectral analysis method specifically designed for processing Raman spectral data. It combines pseudo-Siamese neural networks (pSNN) and spatial pyramid pooling (SPP) techniques to efficiently identify components in Raman spectra. Experiments revealed that DeepRaman requires significant data sources and time for training. Specifically, a single training epoch takes 4 minutes or more. To conserve training time, the operator trained it for 15 epochs. The results showed that while DeepRaman performs well on large datasets, its training process can be lengthy, especially with a limited number of training epochs. The relatively complex DeepRaman model structure may lead to higher computational resource requirements in practical applications.

[0099] Specifically, DeepRaman's experimental results are worse than RamanOMP's, as shown in the experimental results below. Figure 7 As shown, in most cases, DeepRaman's accuracy is below 80%. It can even drop below 25% at its lowest point, indicating that DeepRaman requires a large amount of training data.

[0100] Simultaneously, the binary mixture spectrum was analyzed using the Raman OMP method described in this invention. The core of Raman OMP is the OMP algorithm, a sparse decomposition method that requires no additional training and directly obtains the dictionary matrix, as shown in Table 2. The pure substance components in the table are expressed as volume ratios. The final analytical results all achieved an accuracy greater than 90%. The performance of Raman OMP remains unaffected regardless of the instrument used for data collection. Therefore, it is more suitable than DeepRaman for deployment on portable Raman spectrometers.

[0101] Table 2. Qualitative Analysis Experiment Confusion Matrix

[0102]

[0103] Example 3, Quantitative Spectroscopic Analysis of Mixtures

[0104] As shown in Table 3, the system demonstrates the quantitative analysis performance of the RamanOMP algorithm for six complex mixtures, including the measured concentrations, predicted concentrations, and average relative errors of each pure component. The results show that: (1) as the complexity of the mixture increases (from binary to hexa-component systems), the quantitative accuracy of RamanOMP remains stable, with a maximum average relative error of 2.214% and a minimum of 0.71%, and the average error of all test cases is strictly controlled within 2.5% (most are below 1.5%); (2) the algorithm exhibits excellent anti-interference ability, and even in high-complexity scenarios (such as those containing 5 pure components), its prediction error is still significantly better than that of the RamanOMP method. The above results fully verify the high accuracy and robustness of RamanOMP in the quantitative analysis of complex mixtures.

[0105] Table 3. Quantitative Analysis Results

[0106]

[0107] In other embodiments of the present invention, a computer is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the relevant steps for qualitative and quantitative analysis of Raman spectroscopy mixtures. When the processor executes the computer program, it implements the control method for qualitative and quantitative analysis of Raman spectroscopy mixtures described above and applies it to the Raman spectroscopy detection / analysis system described above.

[0108] In other embodiments of the present invention, a computer-readable storage medium is also provided, on which a computer program is stored. The computer program is executed by a processor using the control method for qualitative and quantitative analysis of Raman spectroscopy mixtures described above. When executed by the processor, the computer program implements the control method for qualitative and quantitative analysis of Raman spectroscopy mixtures described above and applies it to the Raman spectroscopy detection / analysis system described above.

[0109] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, prediction models, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0110] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0111] Those skilled in the art will understand that this invention employs an orthogonal matching pursuit algorithm to perform qualitative and quantitative analysis of mixtures detected by Raman spectroscopy across instruments. Specifically, based on the spectral information of the mixture and a qualitative dictionary as input, a sparsity-adaptive stepwise orthogonal matching pursuit method is used to analyze and initially determine the various pure substance components in the mixture and their corresponding spectra and weights. Constraints are then added to obtain the final qualitative analysis results. Finally, the unprocessed mixture spectrum, the component list obtained from the qualitative analysis, and the quantitative dictionary are used as input to the orthogonal matching pursuit algorithm, and the algorithm iteratively cycles according to the qualitative analysis steps to obtain the quantitative analysis results of the mixture. This invention can quickly and accurately determine the composition and concentration of mixtures using the orthogonal matching pursuit algorithm, even if the substances in the mixture are very similar. Furthermore, the algorithm executes very quickly, completing the qualitative and quantitative analysis of a spectrum within 1-2 seconds. The algorithm principle is simple, making it suitable for deployment on edge devices for rapid on-site detection. Compared with traditional methods, it demonstrates significant technical advantages in portable instrument applications. At the same time, by adding constraints to the orthogonal matching pursuit algorithm to correct the obtained components and contents, it effectively avoids the problem of the analysis results being affected by factors such as baseline drift and noise interference caused by the spectrum itself, thus effectively improving the accuracy of the analysis results.

[0112] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-described technical content to create equivalent embodiments without departing from the scope of the present invention. The implementation schemes in the above embodiments can be further combined or replaced. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.

Claims

1. A qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method, characterized in that, include: Step S110: Based on the preprocessed mixture spectral information A1 and the qualitative dictionary matrix D1 generated by the qualitative dictionary, the preprocessed mixture spectral information A1 is analyzed using the sparsity-adaptive stepwise orthogonal matching pursuit method to obtain the various pure substance components in the mixture and their corresponding spectra and weights. Step S120: Based on the various pure substance components and their corresponding spectra and weights, obtain the residual spectra after each round of analysis, and apply non-negative constraints to the residual spectra of all pure substance components; Step S130: Determine whether the maximum weight value matched by the residual spectra of all pure substance components is less than 0.1; Step S140: If the presence of the components is found, the detection is complete, and a list of qualitative analysis detected components is output. If it does not exist, proceed to step S120; In step S150, the preprocessed mixture spectral information A1 is replaced with the unprocessed mixture spectral information A2, and the qualitative dictionary matrix D1 is replaced with the quantitative dictionary matrix D2 generated from the component list and the quantitative dictionary. Steps S110 to S140 are then executed to obtain the quantitative analysis results. The step of analyzing the preprocessed mixture spectral information A1 and the qualitative dictionary matrix D1 generated from the qualitative dictionary using a sparsity-adaptive stepwise orthogonal matching pursuit method to obtain various pure substances and their corresponding spectra and weights includes: Input: dictionary matrix D1, preprocessed mixture spectral information A1, and sparsity K; wherein the sparsity K is less than the number of atoms in the quantitative or qualitative dictionary; Initialization: Set the first residual f0=A1, the index set θ0=φ, and the counter t=0, where t represents the iteration number; where φ represents the empty set; Iterative loop: In the t-th iteration, the first residual is... Transform into Calculate the first residual after transformation. And the columns of the qualitative dictionary matrix D1 Maximum value in inner product Store in collection ,Right now Where N represents the number of atoms in the qualitative dictionary; Update index set Establish a spectral reconstruction set ; Obtained by least squares method , That is, the vector that approximates the ideal sparse vector calculated in the t-th round; , = Update residuals , ; Determine if the iteration termination condition is met: t > K; If the iteration termination condition is met, the iteration ends, and the approximate result of the ideal sparse vector calculated in the last round is output. If the iteration termination condition is not met, the iteration loop continues. Filter out The maximum value, and The maximum value is used as the weight of the pure component in the mixture. This process is iterated and looped, and the value obtained each time is subtracted. The maximum value is used to obtain the spectrum and weight of each pure substance component. The step of obtaining the residual spectrum after each round of analysis based on multiple pure substance components and their corresponding spectra and weights includes: Obtain the contribution spectrum Y of the pure substance component, and calculate the second inner product of the pure substance component spectrum Z and the contribution spectrum Y; Determine whether the second inner product is less than the first preset value: If the second inner product is greater than the first preset value, the contribution spectrum is subtracted from the pure substance component spectrum to obtain the residual spectrum after this round of analysis, and the residual spectrum is returned as the spectrum for the next round of detection. If the second inner product is less than the first preset value, then all substances in the mixture have been detected, and the cycle ends.

2. The qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method according to claim 1, characterized in that, The step of obtaining the contribution spectrum Y of the pure substance component includes: Based on the weight S and the pure substance component spectrum Z, the contribution spectrum Y of the corresponding pure substance component is obtained according to the following formula: Y = S * Z.

3. The qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method according to claim 1, characterized in that, The step of subtracting the contributing spectrum from the pure substance component spectrum to obtain the residual spectrum after this round of analysis includes: Peak matching was performed on the spectrum of each pure substance component and the contribution spectrum; The intensity of the matched peaks is reduced proportionally to obtain the residual spectrum for this round.

4. The qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method according to claim 3, characterized in that, The step of peak matching between the spectrum of each pure substance component and the contribution spectrum includes: The second derivative of the spectral signal of the pure substance components is calculated, and the peak value is obtained to eliminate noise in the spectrum; Calculate the difference in peak abscissa between the contribution spectrum and the pure component spectrum: Determine whether the difference in the peak abscissa between the contribution spectrum and the pure substance component spectrum is greater than 5; If the difference between the peak abscissa of the contribution spectrum and the pure substance component spectrum is less than or equal to 5, it is determined to be a matching peak, and the intensity information of the matching peak is recorded. Find the minimum values ​​on both sides of the peak point of the second derivative to determine the boundary position of the peak and define the range of the peak region.

5. The qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method according to claim 4, characterized in that, The steps of performing second-order derivatives on the spectral signals of the pure substance components, acquiring the peak values, and eliminating noise in the spectrum include: Calculate the second derivative of the spectrum of each pure substance component; Determine the local maxima of the second derivative and obtain the positions of all peaks in the second derivative; Determine whether the Raman intensity at the peak position is greater than the second preset value: If the value is greater than the second preset value, then the peak is considered to be a peak of the Raman spectrum of the corresponding pure substance spectrum; If it is less than or equal to the second preset value, then obtain the next peak position and determine whether the Raman intensity of the next peak position is greater than the second preset value, and repeat this process. The second preset value is set to the product of 0.01 and the maximum Raman intensity of the corresponding pure substance component spectrum.

6. The qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method according to claim 3, characterized in that, The step of proportionally reducing the intensity of the matched peaks includes: The matching value is obtained by subtracting the weight value of the corresponding pure substance component from the absolute intensity value of the matching peak of the pure substance component. The matching value is used as the residual spectrum of this round.

7. The qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method according to claim 6, characterized in that, The step of applying nonnegative constraints to the residual spectra of all pure substance components includes: Determine if the residual spectrum is less than 0; If the residual spectrum is less than 0, then set the residual spectrum to 0. If the residual spectrum is equal to or greater than 0, then the original residual spectrum is retained.

8. The qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method according to claim 1, characterized in that, Also includes: Obtain multiple spectra of pure substances that may be present in different hazardous chemicals; The multiple spectral information of each pure substance is denoised to generate a sequence list of pure substances and their corresponding spectra, i.e., an unprocessed qualitative dictionary. The preprocessed qualitative dictionary is obtained by performing a feature peak intensity transformation on the unprocessed qualitative dictionary.

9. The qualitative and quantitative analysis method for Raman spectroscopy mixtures based on the orthogonal matched pursuit method according to claim 8, characterized in that, Also includes: Use the unprocessed qualitative dictionary as a quantitative dictionary.

10. A Raman spectroscopy analysis system, characterized in that, The qualitative and quantitative analysis method for Raman spectroscopic mixtures based on the orthogonal matched pursuit method according to any one of claims 1 to 9 can be applied to the Raman spectroscopic analysis system.

11. The Raman spectroscopy analysis system according to claim 10, characterized in that, The Raman spectroscopy analysis system includes a portable Raman spectrometer and a scientific Raman spectrometer.

12. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the qualitative and quantitative analysis method for Raman spectroscopic mixtures based on the orthogonal matching pursuit method as described in any one of claims 1 to 9 and applies it to the Raman spectroscopic analysis system described in claim 10 or 11.

13. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the qualitative and quantitative analysis method for Raman spectroscopic mixtures based on the orthogonal matching pursuit method as described in any one of claims 1 to 9 and is applied to the Raman spectroscopic analysis system described in claim 10 or 11.

Citation Information

Patent Citations

  • Raman signal reconstruction method under strong noise background

    CN105138826A

  • Mixture component determination method based on laser-Raman spectrum

    CN108398416A