Qualitative and quantitative analysis method and system for mixture based on Raman spectrum

Through the sparse adaptive step by step orthogonal matching tracking method, the problems of high spectral interference and training cost in qualitative quantitative analysis of Raman spectroscopic mixtures are solved, and fast and accurate judgment of mixture composition and concentration is achieved, which is suitable for portable instrument applications.

CN120558932AActive Publication Date: 2025-08-29BEIJING YIXINGYUAN PETROCHEMICAL TECHNOLOGY CO LTD +1

Patent Information

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

AI Technical Summary

Technical Problem

The existing qualitative quantitative analysis methods of Raman spectral mixture rely on the accurate extraction of spectral characteristic peaks, are susceptible to baseline drift and noise interference, and are costly to train models, making it difficult to accurately identify the mixture components and concentrations.

Method used

The Raman spectrum is analyzed by the sparse adaptive step by step orthogonal matching tracking method based on the sparse adaptive step by step orthogonal matching tracking method. Combined with the sparse adaptive step by step orthogonal matching tracking method and non-negative constraints, the pure substance components and their spectra and weights in the mixture are quickly and accurately determined, and qualitative and quantitative analysis is performed.

Benefits of technology

It realizes fast and accurate identification of mixture components and concentration judgment, which is suitable for portable instrument applications, effectively avoids the influence of spectral interference, and improves the accuracy and efficiency of analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120558932A_ABST
    Figure CN120558932A_ABST
Patent Text Reader

Abstract

The invention 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 spectral information of a mixture and a qualitative dictionary as input, adopting a sparseness-based adaptive step-by-step orthogonal matching pursuit method for analysis, preliminarily determining various pure substance components in the mixture and corresponding spectrums and weights thereof, and adding constraint conditions to the pure substance components to obtain a final qualitative analysis result. And finally, taking the mixture spectrum, the qualitative component list and the quantitative dictionary as input of an orthogonal matching pursuit algorithm, and carrying out iterative loop according to qualitative analysis steps to obtain a quantitative analysis result. The components and the concentration of the mixture can be quickly and accurately judged through an orthogonal matching pursuit algorithm; meanwhile, by adding constraint conditions, the problem that analysis results are affected by factors such as baseline drift and noise interference due to the reasons of spectrums is effectively avoided, and the accuracy and efficiency of the analysis results 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, and specifically relates to a mixture qualitative and quantitative analysis method and system based on Raman spectroscopy. Background Art

[0002] Raman spectroscopy is a type of scattering spectrum whose peaks are associated with chemical bonds in materials, including information about molecular vibrations or rotations. Therefore, Raman spectroscopy is now widely used in substance identification and molecular structure research. Specifically, because each substance has its own unique Raman spectral signature, accurate identification of the various components in a mixture can be achieved through comparison with a standard spectral library or through spectral analysis methods.

[0003] Existing methods for qualitative and quantitative analysis of mixtures using Raman spectroscopy mostly adopt mathematical model analysis methods, chemometric methods 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. However, the characteristic peaks of Raman spectra may have poor identification accuracy due to various reasons, such as baseline drift, noise interference and other factors, thereby affecting the performance of the model. In addition, the model itself also has certain errors. Therefore, the accuracy of the analysis of the mathematical model method cannot be guaranteed.

[0005] The chemometric method, based on the principles of chemometrics, determines the composition of a mixture by analyzing the reaction characteristics of each component in the mixture and calculating and interpreting the data obtained from Raman spectroscopy. This method requires a deep understanding of the reaction mechanism and composition characteristics of the mixture. However, since each component in the mixture is in an unknown state, it is difficult for operators to gain a deep understanding of the reaction mechanisms and characteristics of all components in the mixture, and therefore the accuracy of the analysis results cannot be guaranteed.

[0006] Machine learning methods require a pre-built training set for model training and validation, making them suitable for analyzing complex mixtures. However, these methods require a large amount of labeled data to construct the training set, and the high cost of acquiring and annotating Raman spectral data limits model training. Furthermore, they also place high demands on feature extraction, and traditional feature extraction methods may not effectively capture features relevant to the mixture's composition. Consequently, this method suffers from relatively poor analytical accuracy and high initial investment costs.

[0007] In view of this, the present invention is 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 mixtures using Raman spectroscopy.

[0009] To achieve the above objectives, the present invention provides a method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on an orthogonal matching pursuit method, comprising: 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 a sparsity-adaptive step-by-step orthogonal matching pursuit method to obtain multiple pure substance components in the mixture and their corresponding spectra and weights; Step S120 , obtaining residual spectra after each round of analysis based on the multiple pure components and their corresponding spectra and weights, and subjecting the residual spectra of all pure components to non-negativity constraints; Step S130 , determining whether the maximum weight value obtained by matching the residual spectra of all pure components is less than 0.1; Step S140: If it exists, the detection is completed and a list of qualitative analysis components is output; if it does not exist, step S120 is executed; In step S150 , the preprocessed mixture spectrum 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 by the component list and the quantitative dictionary. Steps S110 to S140 are executed to obtain the quantitative analysis results.

[0010] Furthermore, the qualitative dictionary matrix D1 generated based on the preprocessed mixture spectral information A1 and the qualitative dictionary adopts a sparsity-adaptive step-by-step orthogonal matching pursuit method to analyze the preprocessed mixture spectral information A to obtain a plurality of pure substances and their corresponding spectra and weights, including the following steps: input: dictionary matrix D1, preprocessed mixture spectral information A1 and sparsity K (K is less than the number of atoms in the quantitative dictionary / qualitative dictionary); initialization: setting the first residual f0=A1, index set θ0=φ, counter t=0, t represents the iteration round; wherein φ represents the empty set; iteration loop: in the tth iteration, the first residual is Transformed into , calculate the first residual after transformation and the columns of the qualitative dictionary matrix D1 Maximum value in inner product Save to collection ,Right now ; Where N represents the number of atoms in the qualitative dictionary; Update the index set , establish the spectrum reconstruction set ; obtained by least squares method , That is, the vector calculated in the tth round that is close to the ideal sparse vector; , = , update the residual , ; Determine whether the iteration end condition is met: t>K; If the iteration end 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 end condition is not met, continue to execute the iteration loop; filter out The maximum value of The maximum value is used as the weight of the pure component in the mixture, and this process is iterated and the value obtained each time is deducted. The maximum value of , and finally each pure substance component and its corresponding spectrum and weight are obtained.

[0011] Furthermore, the step of obtaining a residual spectrum after each round of analysis based on the multiple pure components and their corresponding spectra and weights includes: obtaining a contribution spectrum Y of the pure component and calculating a second inner product between the pure 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, subtracting the contribution spectrum from the pure component spectrum to obtain a residual spectrum after the current 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, all substances in the mixture have been detected, and the cycle ends.

[0012] Furthermore, the step of obtaining the contribution spectrum Y of the pure component includes: obtaining the contribution spectrum Y of the corresponding pure component according to the weight S and the spectrum Z of the pure component according to the following formula: Y=S*Z.

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

[0014] Furthermore, the step of peak matching each pure component spectrum with the contribution spectrum includes: taking a second-order derivative of the pure component spectrum signal and obtaining a peak value to eliminate noise in the spectrum; calculating a peak abscissa difference between the contribution spectrum and the pure component spectrum; determining whether the peak abscissa difference between the contribution spectrum and the pure component spectrum is greater than 5; if the peak abscissa difference between the contribution spectrum and the pure component spectrum is less than or equal to 5, determining it as a matching peak and recording the intensity information of the matching peak; and finding the minimum values ​​(valley bottoms) on both sides of the second-order derivative peak point to determine the peak boundary position and define the peak area.

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

[0016] Furthermore, the step of subjecting the residual spectra of all pure components to non-negativity constraints 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.

[0017] Furthermore, the Raman spectroscopy mixture qualitative and quantitative analysis method also includes: obtaining multiple spectra of pure substances predicted to be present in different hazardous chemicals; and denoising the multiple spectral information of each pure substance to generate a sequence list of pure substances and corresponding spectra, i.e., an unpreprocessed qualitative dictionary; and performing characteristic peak intensity transformation on the unpreprocessed qualitative dictionary to obtain a preprocessed qualitative dictionary.

[0018] Furthermore, the Raman spectroscopy mixture qualitative and quantitative analysis method further includes: using the unpreprocessed qualitative dictionary as a quantitative dictionary.

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

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

[0021] In some embodiments, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the Raman spectroscopy mixture qualitative and quantitative analysis method based on the orthogonal matching pursuit method as described above is implemented and applied to the Raman spectroscopy detection / analysis system described above.

[0022] In other embodiments, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the Raman spectroscopy mixture qualitative and quantitative analysis method based on the orthogonal matching pursuit method as described above is implemented and applied to the Raman spectroscopy detection / analysis system described above.

[0023] Based on the above description, those skilled in the art will understand that the mixture detected by Raman spectroscopy across instruments is qualitatively and quantitatively analyzed by using the orthogonal matching pursuit algorithm. Specifically, based on the mixture spectral information and the qualitative dictionary as input, the sparsity-adaptive step-by-step orthogonal matching pursuit method is used to analyze and preliminarily determine the multiple pure substance components in the mixture and their corresponding spectra and weights, and then add constraints to them to obtain the final qualitative analysis results. Finally, the unprocessed mixture spectrum, the component list obtained by qualitative analysis, and the quantitative dictionary are used as inputs to the orthogonal matching pursuit algorithm, and an iterative cycle is performed according to the steps of qualitative analysis to obtain the quantitative analysis results of the mixture. The present invention can quickly and accurately determine the composition and concentration of the mixture through the orthogonal matching pursuit algorithm, even if the substance categories in the mixture are very similar, and the algorithm executes very quickly, and the qualitative and quantitative analysis of a spectrum can be completed within 1 to 2 seconds. The algorithm principle is simple and suitable for deployment on edge devices to achieve on-site rapid detection. Compared with traditional methods, it shows significant technical advantages in portable instrument application scenarios. At the same time, by adding constraints to the orthogonal matching pursuit algorithm to correct the obtained components and contents, it can effectively avoid the problem of the analysis results being affected by factors such as baseline drift and noise interference due to the spectrum itself, thereby effectively improving the accuracy and efficiency of the analysis results. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings are part of this invention and are used to provide a further understanding of the invention. The exemplary embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention. Obviously, the drawings described below are only some embodiments. For those skilled in the art, other drawings can be obtained based on these drawings without inventive efforts. In the accompanying drawings: Figure 1 Flowchart of a method for qualitative and quantitative analysis of a mixture using Raman spectroscopy based on an orthogonal matching pursuit method in some embodiments of the present invention; Figure 2 Graphs showing partial results of a first example of a method for qualitative and quantitative analysis of a mixture using Raman spectroscopy based on an orthogonal matching pursuit method in some specific embodiments of the present invention; Figure 3 1 is a partial result diagram of a second example of a method for qualitative and quantitative analysis of a mixture using Raman spectroscopy based on an orthogonal matching pursuit method in some other specific embodiments of the present invention; Figure 4 yes Figure 2 Partial result diagram of the first example; Figure 5 yes Figure 4 Partial result diagram of the second example; Figure 6 yes Figure 3Partial result diagram of the second example; Figure 7 It is a result schematic diagram of the comparative example of the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, 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 in conjunction with the drawings in the embodiments of the present invention. The following embodiments are used to illustrate the present invention but are not used to limit the scope of the present invention.

[0026] In the description of the present invention, it should be noted that the terms "upper", "lower", "front", "back", "left", "right", "vertical", "inside", "outside", etc., indicating directions or positional relationships, are based on the directions or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction. Therefore, they cannot be understood as limiting the present invention.

[0027] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood broadly. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; and direct or indirect connections through an intermediary. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0028] It should be understood by those skilled in the art that the embodiments described below are only some embodiments of the present invention, rather than all embodiments of the present invention, and that these 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.

[0029] Refer to the following Figures 1 to 7 , to describe in detail the Raman spectroscopy mixture qualitative and quantitative analysis method based on the orthogonal matching pursuit method in some embodiments of the present invention.

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

[0031] like Figure 1 As shown, in some embodiments of the present invention, a method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on an orthogonal matching pursuit method is provided, comprising: 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 a sparsity-adaptive step-by-step orthogonal matching pursuit method to obtain multiple pure substance components and their corresponding spectra and weights.

[0032] Spectral information includes the substance name (mixture or pure substance) and the shape of the spectrum, namely the location of absorption peaks and the depth of valleys. It should be noted that the comparison of spectral information is not based on absolute spectral similarity, but rather on geometric similarity.

[0033] Before step S110, the method further includes: The collected spectral information of the sample mixture is standardized and denoised to improve the quality and analyzability of the mixture's spectral data. Specifically, the standardization process for the spectrum of the test mixture utilizes a normalization process to convert the spectral information collected by different instruments into a consistent state. Specifically, the collected spectral information can be loaded into a spectral detection system and processed according to any one of maximum normalization, minimum-maximum normalization, mean normalization, or standard normalization. After performing multiple normalization processes, the better spectral information is used as the standardized final spectral information to avoid the problem of large errors in the spectrum of the test mixture due to the presence of noise.

[0034] It should be noted that the "mixture spectrum" referred to in this invention refers to the spectrum that has been subjected to standardization and denoising algorithms. Denoising methods include, but are not limited to, signal smoothing using wavelet transforms and signal filtering to avoid the presence of excessive interference in the spectrum of the mixture being tested, which can lead to inaccurate results in subsequent quantitative and qualitative analyses.

[0035] Specifically, in this embodiment, the Daubechies wavelet transform is used to transform 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. Subsequently, a fast Fourier transform (FFT) is used to convert the time domain signal into a frequency domain signal to better analyze the signal characteristics. A Butterworth low-pass filter is then used to extract and suppress specific frequency components. De-noising is achieved through the application of multiple filters. Finally, a median filter is used to remove noise spikes from the signal. This completes the denoising process of the spectral information of the test mixture.

[0036] The qualitative and quantitative analysis method of mixtures also includes: constructing a qualitative analysis dictionary. Specifically: Obtain multiple spectra of pure substances that are predicted to be present in different hazardous chemicals. Perform denoising on the multiple spectral information of each pure substance to generate a sequence list of pure substances and corresponding spectra, i.e., an unprocessed qualitative dictionary. Perform characteristic peak intensity transformation on the unprocessed qualitative dictionary to obtain a preprocessed qualitative dictionary. Specifically, first collect spectra of 1,699 different hazardous chemical pure substances, and about 40 spectra need to be collected for each pure substance, and average these 40 spectra to reduce measurement errors. Then standardize the pure substance spectra, and truncate and interpolate the spectral range, all set to 200 cm -1 -1900cm -1 The spectrum of 1700 data points is obtained. Finally, the spectrum is denoised using wavelet transform and saved as a CSV file. The spectrum in the CSV file is then transformed by characteristic peak intensity to obtain a qualitative dictionary.

[0037] Before building the dictionary, it is necessary to abbreviate the substance name of each pure substance, such as the following examples: Table 1. List of abbreviations of pure substances

[0038] The present invention employs the Orthogonal Matching Pursuit (OMP) method for both qualitative and quantitative analysis. This method is a greedy algorithm for sparse signal decomposition and a type of sparse decomposition method. It iteratively selects the atoms most correlated with the current residual and performs orthogonalization at each step, thereby improving the efficiency and accuracy of signal decomposition. The difference between qualitative and quantitative analysis in the present invention lies in the different input values ​​used in the OMP method. Specifically, the input values ​​for qualitative analysis are a qualitative dictionary matrix and mixture spectral information. The input values ​​for quantitative analysis are a quantitative dictionary matrix, a list of components after qualitative analysis, and unprocessed mixture spectral information. The difference between the qualitative and quantitative dictionaries is that the spectra of the different pure hazardous chemical substances in the qualitative dictionary are all de-noised and feature peak intensity processed, while the spectra of the different pure hazardous chemical substances in the quantitative analysis are only de-noised and feature peak ratio intensity conversion is not performed.

[0039] Among them, the function of the characteristic peak intensity transformation is to limit the characteristic peak intensity of the spectrum to the interval [0, 1]. The specific steps are: 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 intensity to complete the characteristic peak intensity transformation.

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

[0041] Step 110 specifically includes: 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 dictionary and the quantitative dictionary is 1699, so the K value is also 1699 when performing quantitative analysis.

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

[0043] Iteration loop: In the tth iteration, the residual is given by Transformed into , calculate the residual and the columns of the qualitative dictionary matrix D1 Maximum value in inner product Save to collection ,Right now .

[0044] Update index set , establish the spectrum reconstruction set .

[0045] Obtained by the least squares method , That is, the vector value calculated in the tth round that is close to the ideal sparse vector.

[0046] It should be noted that the qualitative dictionary and the quantitative dictionary in the present invention are both set as static dictionaries and do not have the function of real-time updating and training data. Therefore, the vector close to the ideal sparse vector calculated in the tth round here is Each weight in is smaller than the upper limit of the previous dictionary output weight.

[0047] Output the final signal estimate , = , update the residual , ; Determine whether the iteration end condition is met: t>K; If the iteration end 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 end condition is not met, the iteration cycle steps will continue to be executed.

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

[0049] Step S120 , obtaining residual spectra after each round of analysis based on the multiple pure substance components and their corresponding spectra and weights, and subjecting the residual spectra of all pure substance components to non-negativity constraints.

[0050] Step S121: Obtain the contribution spectrum Y of the pure component and calculate the second inner product between the spectrum Z of the pure component and the contribution spectrum Y. The step of "obtaining the contribution spectrum Y of the pure component" includes: obtaining the contribution spectrum Y of the corresponding pure component based on the weight S and the spectrum Z of the pure component. The contribution spectrum of the pure component can be calculated according to the following formula: Y=S*Z.

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

[0052] In step S123, if the second inner product is greater than the first preset value, the contribution spectrum is subtracted from the spectrum of the pure component to obtain the residual spectrum after this round of analysis. If the second inner product is less than the first preset value, the pure component is not part of the mixture; all substances in the mixture are considered to have been detected, and the cycle ends.

[0053] The step of "subtracting the contribution spectrum from the pure component spectrum to obtain the residual spectrum after this round of analysis" in step S123 includes: Step S1231, peak matching is performed on each pure substance component spectrum and contribution spectrum. Step S1231 includes: Step S12311 performs a second-order derivative on the pure component spectrum signal and locates the peak value to eliminate noise in the spectrum. Specifically, this process includes: calculating the second-order derivative of each pure component spectrum; identifying the local maximum (i.e., peak top) of the second-order derivative and obtaining the positions of all peaks in the second-order derivative; and determining whether the Raman intensity at the peak top position is greater than a second preset value. If it is greater than the preset value, it is considered a peak in the Raman spectrum. If it is less than or equal to the preset value, the peak top position is treated as noise, and the Raman intensity of the next peak top position is determined to be greater than the second preset value, and this cycle repeats. Constraints are set to ensure peak finding accuracy and eliminate interference. The second preset value is 0.01 multiplied by the maximum Raman intensity of the corresponding pure component spectrum.

[0054] Step S12312 matches the peak value of the contribution spectrum with the pure component spectrum. Specifically, this includes: calculating the peak abscissa difference between the contribution spectrum and the pure component spectrum; determining whether the peak abscissa difference between the contribution spectrum and the pure component spectrum is greater than 5; if the peak abscissa difference between the contribution spectrum and the pure component spectrum is less than or equal to 5, determining the peak as a matching peak and recording the intensity information of the matching peak.

[0055] Step S12313 locates the peak boundary of the function after the second-order derivative is taken for detection. Specifically, this includes finding the minimum values ​​(valleys) on both sides of the second-order derivative peak point to determine the peak boundary position and define the peak region. This avoids over-interpretation of the spectrum, which results in high computational complexity and low analysis efficiency.

[0056] Step S1232: Proportionally reduce 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 of the corresponding pure component from the absolute intensity of the matched peak of the pure component to obtain a matching value, which is used as the residual spectrum for this round.

[0057] In step S124, the residual spectra of all pure components are constrained to be non-negative, and the residual spectra are returned as the spectra for the next round of detection. The step of "constraining the residual spectra of all pure components to be non-negative" includes: determining whether the residual spectrum is less than 0; if so, setting the residual spectrum to 0; and if the residual spectrum is equal to or greater than 0, retaining the original residual spectrum.

[0058] Step S130 , determining whether the maximum weight value obtained by matching the residual spectra of all pure components has a value less than 0.1.

[0059] In step S140, if a value less than 0.1 is present, it is determined that all pure components in the mixture spectrum have been detected. The residuals detected after the residual spectrum corresponding to the value less than 0.1 are treated as noise spectra and are not analyzed. In other words, if a noise spectrum is detected, component detection is exited and the qualitative analysis result is output. If no noise spectrum is present, step S120 is executed.

[0060] In step S150, the preprocessed mixture spectrum 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. Specifically, the quantitative analysis utilizes three inputs: the unprocessed mixture spectrum (i.e., the unprocessed mixture spectrum), the component list derived from the qualitative analysis, and the quantitative dictionary for all pure substances. First, dictionary atoms corresponding to the qualitative analysis components are selected from the quantitative dictionary. Following steps S110 to S140, the orthogonal matching pursuit (OMP) algorithm is applied to the mixture spectrum to calculate the quantitative weight of each component. This algorithm, based on the principle of finding sparse solutions to underdetermined linear equations, determines the weight coefficients of each pure substance spectrum in the linear combination of the mixture spectra through a stepwise iteration. 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.

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

[0062] The Raman spectroscopy detection / analysis system includes a Raman spectrometer for detecting the spectrum of the test mixture 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.

[0063] The portable Raman spectrometer used in this embodiment is a Blade 785B Pro portable Raman spectrometer produced by Liqiong Optoelectronics Co., Ltd., with a spectral range of 200 cm -1 to 3200 cm -1 , using a laser with a wavelength of 785nm and a resolution of 6 cm -1 to 8 cm -1 The maximum output power is 500 mW.

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

[0065] The portable instrument was used to collect data from 1,699 substances and upload the collected information to the control system, which generated a dictionary of pure substances. Each mixture collected included at least nine portable Raman spectral data points.

[0066] In order to verify the accuracy of the detection results of the above-mentioned Raman spectroscopy mixture qualitative and quantitative detection method, a visualization experiment of spectral decomposition can be performed. The spectral decomposition visualization experiment is to have the operator make a mixture solution and detect the spectrum of the mixture, decomposing the mixture spectral data into the form of multiple pure substance spectra. The decision-making process of each round of the algorithm and the obtained detection results can be displayed in an intuitive way to verify the accuracy of the detection results. Therefore, the present invention conducted the following two visualization verification experiments: Example 1, analysis of methanol and ethanol mixed solution A solution of methanol and ethanol mixed in a ratio of three to two was used as the sample to be tested, and the spectrum of the mixture was collected using Portman785. The spectrum of the mixture is as follows Figure 2 and Figure 3 shown.

[0067] In the first round of testing, the spectrum of the pure components of the mixture was analyzed and matched to the spectrum of methanol. 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 weight. After the test is completed, the residual spectrum is subtracted from the pure component spectrum to obtain a residual spectrum for the second round of testing. The residual spectrum is analyzed and matched to the ethanol spectrum. After subtraction, the test cycle exit criteria are met, indicating that the test is complete.

[0068] Example 2, Analysis of Acetonitrile, Methanol, and Ethanol Mixed Solutions A solution of acetonitrile, methanol, and ethanol in a ratio of 1:1:1 was used as the sample to be tested. The spectrum of the mixture was collected using a Liqiong instrument. The analysis process was as follows: Figures 4 to 6 shown.

[0069] During the first round of testing, the spectrum of the pure component in the mixture was analyzed and matched to the spectrum of acetonitrile. After the test was completed, the spectrum was subtracted from the spectrum of the pure component to obtain a residual spectrum for the second round of testing. The residual spectrum was analyzed and matched to the spectrum of methanol. After the test was completed, the residual spectrum was subtracted from the spectrum of the pure component to obtain a residual spectrum for the third round of testing. The residual spectrum was analyzed and matched to the spectrum of ethanol. After the subtraction, the test cycle exit condition was met, indicating that the test was completed.

[0070] The experiment successfully analyzed the composition of a mixture of acetonitrile, methanol, and ethanol. The data used in this experiment was also collected by another set of equipment, demonstrating the robustness of our algorithm. This visualization method allows us to more quickly understand the process of analyzing the mixture's composition, demonstrating the algorithm's excellent performance and practicality.

[0071] Comparative Example 1, a comparative experiment on qualitative analysis of mixtures, the operator designed 8 analysis experiments of binary mixtures to demonstrate the accuracy and robustness of the algorithm, and compared the DeepRaman algorithm with the RamanOMP algorithm used in the present invention.

[0072] The binary mixture spectrum was first analyzed using the DeepRaman algorithm. DeepRaman is a deep learning-based spectral analysis method specifically designed for processing Raman spectral data. It combines a pseudo-twin neural network (pSNN) and spatial pyramid pooling (SPP) technology to efficiently identify components in Raman spectra. Experiments have shown that DeepRaman requires a large amount of data source and time during training. Specifically, one round of training takes 4 minutes or more. To save training time, the operator trained it for 15 rounds. The results showed that although DeepRaman performs well when processing large data sets, its training process may take a long time, especially when the number of training rounds is small. DeepRaman's model structure is relatively complex, which may result in the need for more computing resources in practical applications.

[0073] Specifically, the experimental results of DeepRaman are worse than those of RamanOMP. Figure 7 As shown in the figure, in most cases, DeepRaman's accuracy is less than 80%. It can even reach below 25% at the lowest point, which shows that DeepRaman requires a large amount of training data.

[0074] At the same time, the binary mixture spectrum was analyzed using the RamanOMP method of the present invention. The core of RamanOMP is the OMP algorithm, which is a method based on sparse decomposition. It does not require additional training and directly obtains a dictionary matrix, as shown in Table 2. The pure substance components contained in the table are calculated by volume ratio. The final analysis experimental results have an accuracy rate greater than 90%. Regardless of the instrument used to collect the data, the performance of RamanOMP is not affected. Therefore, it is more suitable for deployment on portable Raman spectrometers than DeepRaman.

[0075] Table 2. Confusion matrix of qualitative analysis experiment

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

[0077] Table 3. Quantitative analysis results

[0078] In other embodiments of the present invention, a computer is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps associated with qualitative and quantitative analysis of a Raman spectroscopy mixture are implemented. When the processor executes the computer program, the control method for qualitative and quantitative analysis of a Raman spectroscopy mixture described above is implemented and applied to the Raman spectroscopy detection / analysis system described above.

[0079] In other embodiments of the present invention, a computer-readable storage medium is provided, storing a computer program thereon. The computer program is used by a processor to execute the aforementioned control method for qualitative and quantitative analysis of a Raman spectroscopy mixture. When executed by the processor, the computer program implements the aforementioned control method for qualitative and quantitative analysis of a Raman spectroscopy mixture and is applied to the aforementioned Raman spectroscopy detection / analysis system.

[0080] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, prediction model or other media used in the embodiments provided in this application may 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 many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double 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.

[0081] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by 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.

[0082] It will be understood by those skilled in the art that the present invention uses an orthogonal matching pursuit algorithm to perform qualitative and quantitative analysis on mixtures detected by Raman spectra across instruments. Specifically, based on the mixture spectral information and the qualitative dictionary as input, a sparsity-adaptive step-by-step orthogonal matching pursuit method is used for analysis to preliminarily determine the multiple pure substance components in the mixture and their corresponding spectra and weights, and then constraints are added to them to obtain the final qualitative analysis results. Finally, the unpreprocessed mixture spectrum, the component list obtained by qualitative analysis, and the quantitative dictionary are used as inputs to the orthogonal matching pursuit algorithm, and an iterative cycle is performed according to the steps of qualitative analysis to obtain the quantitative analysis results of the mixture. The present invention can quickly and accurately determine the composition and concentration of the mixture through the orthogonal matching pursuit algorithm, even if the substance categories in the mixture are very similar, and the algorithm executes very quickly, and the qualitative and quantitative analysis of a spectrum can be completed within 1-2 seconds. The algorithm principle is simple and suitable for deployment on edge devices to achieve on-site rapid detection. Compared with traditional methods, it shows significant technical advantages in portable instrument application scenarios. 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 due to the spectrum itself, thereby effectively improving the accuracy of the analysis results.

[0083] The above description is merely a preferred embodiment of the present invention and does not constitute any form of limitation to the present invention. Although the present invention has been disclosed as above in terms of a preferred embodiment, it is not intended to limit the present invention. Any technician familiar with the present application can make some changes or modifications to equivalent embodiments of equivalent changes using the above-mentioned technical contents without departing from the scope of the technical solution of the present invention. The implementation schemes in the above-mentioned embodiments can be further combined or replaced. However, any simple modifications, equivalent changes and modifications made to the above-mentioned embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of the solution of the present invention.

Claims

1. A method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on orthogonal matching 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 A is analyzed using a sparsity-adaptive step-by-step orthogonal matching pursuit method to obtain multiple pure substance components in the mixture and their corresponding spectra and weights; Step S120 , obtaining residual spectra after each round of analysis based on the multiple pure components and their corresponding spectra and weights, and subjecting the residual spectra of all pure components to non-negativity constraints; Step S130 , determining whether the maximum weight value obtained by matching the residual spectra of all pure components is less than 0.1; Step S140: If it exists, the detection is completed and a list of qualitative analysis components is output; If not, execute step S120; In step S150 , the preprocessed mixture spectrum 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 by the component list and the quantitative dictionary. Steps S110 to S140 are executed to obtain the quantitative analysis results.

2. The method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on orthogonal matching pursuit method according to claim 1, characterized in that: The step of analyzing the preprocessed mixture spectral information A1 based on the preprocessed mixture spectral information A1 and the qualitative dictionary matrix D1 generated by the qualitative dictionary using a sparsity-adaptive step-by-step 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; where the sparsity K is less than the number of atoms in the quantitative dictionary / qualitative dictionary; Initialization: Set the first residual f0=A1, the index set θ0=φ, the counter t=0, t represents the iteration round; where φ represents the empty set; Iteration loop: In the tth iteration, the first residual is given by Transformed into , calculate the first residual after transformation and the columns of the qualitative dictionary matrix D1 Maximum value in inner product Save to collection ,Right now ;Where N represents the number of atoms in the qualitative dictionary; Update index set , establish the spectrum reconstruction set ; Obtained by the least squares method , That is, the vector calculated in the tth round that is close to the ideal sparse vector; , = , update the residual , ; Determine whether the iteration end condition is met: t>K; If the iteration end 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 end condition is not met, continue to execute the iteration loop; Filter out The maximum value of The maximum value is used as the weight of the pure component in the mixture, and this process is iterated and the value obtained each time is deducted. The maximum value of , and finally each pure substance component and its corresponding spectrum and weight are obtained.

3. The method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on orthogonal matching pursuit method according to claim 1, characterized in that: The step of obtaining the residual spectrum after each round of analysis based on the multiple pure substance components and their corresponding spectra and weights includes: Obtaining a contribution spectrum Y of a pure substance component, and calculating a second inner product between a spectrum Z of the pure substance component and the contribution spectrum Y; Determine whether the second inner product is less than a first preset value: If the second inner product is greater than the first preset value, the contribution spectrum is deducted from the pure component spectrum to obtain a 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 smaller than the first preset value, all substances in the mixture have been detected, and the cycle ends.

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

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

6. The method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on orthogonal matching pursuit method according to claim 5, characterized in that: The step of performing peak matching on each pure substance component spectrum and the contribution spectrum comprises: Take the second-order derivative of the spectrum signal of the pure component and obtain the peak value to eliminate the noise in the spectrum; Calculate the peak abscissa difference between the contribution spectrum and the pure component spectrum: Determining that a peak abscissa difference between the contribution spectrum and the pure component spectrum is greater than 5; If the difference in peak abscissa between the contribution spectrum and the pure 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 second-order derivative peak point to determine the peak boundary position and define the peak area range.

7. The method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on orthogonal matching pursuit method according to claim 6, characterized in that: The step of performing a second-order derivative of the spectrum signal of the pure component and obtaining the peak value to eliminate noise in the spectrum includes: Calculate the second derivative of the spectrum of each pure component; Determine the local maximum of the second-order derivative and obtain the positions of all peaks in the second-order derivative; Determine whether the Raman intensity at the peak position is greater than a second preset value: If it is greater than a second preset value, the peak top is considered to be a peak of the Raman spectrum corresponding to the spectrum of the pure substance; If it is less than or equal to the second preset value, then obtain the next peak top position, and determine whether the Raman intensity of the next peak top position is greater than the second set value, and repeat this process; The second preset value is set to the product of 0.01 and the maximum Raman intensity of the spectrum of the corresponding pure component.

8. The method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on orthogonal matching pursuit method according to claim 5, characterized in that: The step of performing proportional intensity reduction on the matched peaks comprises: The absolute intensity of the matching peak of the pure component is subtracted from the weight value of the corresponding pure component to obtain the matching value, which is used as the residual spectrum of this round.

9. The method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on orthogonal matching pursuit method according to claim 8, characterized in that: The step of constraining the residual spectra of all pure substance components to be non-negative includes: Determine whether the residual spectrum is less than 0; If the residual spectrum is less than 0, set the residual spectrum equal to 0; If the residual spectrum is equal to or greater than 0, the original residual spectrum is retained.

10. The method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on orthogonal matching pursuit method according to claim 1, characterized in that: Also includes: Obtain multiple spectra of pure substances that may be predicted to exist in different hazardous chemicals; The multiple spectral information of each pure substance is denoised to generate a sequence list of pure substances and corresponding spectra, i.e., a qualitative dictionary without preprocessing. The unprocessed qualitative dictionary is subjected to characteristic peak intensity transformation to obtain the preprocessed qualitative dictionary.

11. The method for qualitative and quantitative analysis of Raman spectroscopy mixtures based on orthogonal matching pursuit method according to claim 10, characterized in that: Also includes: The unprocessed qualitative dictionary is used as the quantitative dictionary.

12. A Raman spectroscopy detection / analysis system, characterized in that: The Raman spectroscopy mixture qualitative and quantitative analysis method based on the orthogonal matching pursuit method described in any one of claims 1 to 11 can be applied to the Raman spectroscopy detection / analysis system.

13. The Raman spectrum detection / analysis system according to claim 12, characterized in that: The Raman spectrum detection / analysis system includes a portable Raman spectrometer and a scientific Raman spectrometer.

14. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the Raman spectroscopy mixture qualitative and quantitative analysis method based on the orthogonal matching pursuit method according to any one of claims 1 to 11 is implemented and applied to the Raman spectroscopy detection / analysis system according to claims 12 and 13.

15. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the Raman spectroscopy mixture qualitative and quantitative analysis method based on the orthogonal matching pursuit method as described in any one of claims 1 to 11 and is applied to the Raman spectroscopy detection / analysis system described in claims 12 and 13.

Citation Information

Patent Citations

  • Raman signal reconstruction method under strong noise background

    CN105138826A

  • Mixture component determination method based on laser-Raman spectrum

    CN108398416A

  • Edible oil type rapid identification method based on Raman spectrum typical correlation analysis fusion

    CN109001181A

  • Mixture Raman spectrum qualitative analysis method based on sparse non-negative least square

    CN109738413A

  • Raman spectrum qualitative analysis method, system and equipment for mixture

    CN117935963A

Cited By

  • Modeling-free mixture component intelligent identification method and system

    CN121185941A