An adaptive windowed Raman spectrum recognition method based on similarity

Through adaptive windowed similarity comparison, the problem of mismatch and mismatch of spectral matching of low-concentration substances in the prior art is solved, and the automation and high accuracy of Raman spectrum recognition are achieved.

CN114330411BActive Publication Date: 2025-03-25ANHUI ZHONGKE SAIFEIER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111356343.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-16
Publication Date
2025-03-25
Estimated Expiration
2041-11-16

AI Technical Summary

Technical Problem

The existing Raman spectral recognition algorithms are prone to mismatch when the spectral matching of low-concentration substances and lack automated recognition capabilities.

Method used

An adaptive windowed Raman spectral recognition method based on similarity is proposed. By obtaining the Raman spectrum of the substance to be identified, its characteristic peaks are determined, and compared with the characteristic peaks of the standard products in the database, an adaptive window is established, and the similarity is calculated, so as to automatically identify the substance.

Benefits of technology

It improves the accuracy and speed of low-concentration Raman spectral recognition, realizes automation of Raman spectral recognition, and reduces artificial intervention and error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114330411B_ABST
    Figure CN114330411B_ABST
Patent Text Reader

Abstract

The invention discloses an adaptive windowed Raman spectrum recognition method based on similarity, which comprises the following steps: obtaining the Raman spectrum of a substance to be identified and performing preprocessing; determining the Raman characteristic peak of the substance to be identified; traversing the Raman characteristic peaks of standard products in a database, and comparing them with the Raman characteristic peaks of the substance to be identified to determine a target standard product that meets a matching condition; establishing an adaptive window, and calculating the similarity of the Raman characteristic peaks of the substance to be identified and the target standard product in the adaptive window; calculating the matching coefficient of the Raman spectrum of the target standard product to determine whether the substance to be identified contains the target standard product; and realizing the automation of Raman spectrum recognition by adaptive window similarity comparison without artificially setting any parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of spectrum recognition, and in particular to an adaptive windowed Raman spectrum recognition method based on similarity. Background Art

[0002] Raman detection has the characteristics of fast speed, high sensitivity, and no damage to fingerprints. It has unique advantages in on-site detection and has also been widely used in agriculture, medicine, food, petrochemicals and other fields. Since the Raman spectrum signal of the test object can be amplified by more than a million times through the nano-enhanced substrate, and even single-molecule level detection can be achieved, the Raman spectrum characteristic peak information can be used to identify the object being tested. Raman spectroscopy analysis includes the steps of spectral preprocessing, feature extraction and feature classification, among which feature extraction is the core link of Raman spectroscopy analysis. Since each substance has a corresponding Raman spectral characteristic peak distribution, the position and size of the Raman spectral characteristic peak directly reflect the structure and content information of the substance. Whether the Raman spectral characteristic peak can be well identified will directly affect the accuracy of sample feature classification.

[0003] In the Raman spectrum recognition algorithm, the matching method of characteristic peaks or similarity is generally used. Automatic spectrum recognition method based on Raman characteristic peaks. This method is a reverse matching recognition method, which uses the peak position and peak intensity of the spectral characteristic peak as the index for reverse retrieval. The specific process is shown below.

[0004] (1) Load the spectral data of the substance to be identified, perform pre-processing, and use wavelet transform to extract the peak position and peak intensity information of its characteristic peak; (2) Compare the characteristic peaks of all substances in the Raman database with the characteristic peaks of the substance to be identified. If the peak position deviation of a characteristic peak is within 5 beams, the peak intensity of the substance at this position in the database is accumulated in S; (3) According to the peak position information in the second step, find the peak intensity corresponding to the characteristic peak of the substance to be tested, and all the corresponding peak intensities are accumulated in A. The similarity calculation formula is as follows:

[0005]

[0006] (4) If the value of the similarity P exceeds 0.85, it can be considered that the substance to be identified contains the substance, and the above steps are repeated until all substances in the Raman database are compared.

[0007] Automatic spectral recognition method based on similarity. This method is a forward search method that uses spectral similarity as the material classification criterion. The difference between the spectrum of the substance to be identified and the database spectrum is judged by the hit quality index (HQI), and the calculation formula of HQI is as follows:

[0008]

[0009] In the above formula, A represents the Raman spectrum of the substance to be identified, L represents the standard spectrum of the Raman spectrum library, and p is the spectrum length. The larger the HQI value, the closer the Raman spectrum of the substance to be identified is to the standard spectrum. At this time, HQI can be used as the matching coefficient. After traversing the standard spectra in the spectrum library, the standard spectrum with the largest matching coefficient and higher than 85% is the final result.

[0010] However, in the low-concentration Raman spectrum identification and classification, due to the less effective information in the spectrum, it is easy to cause mismatches when using the full spectrum for similarity matching. Therefore, it is necessary to further improve the method of calculating similarity of the full spectrum, and perform spectral similarity matching on places with more effective information to reduce the adverse effects of useless fragments. Summary of the invention

[0011] In order to solve the technical problems existing in the background technology, the present invention proposes an adaptive windowed Raman spectrum recognition method based on similarity, which overcomes the insufficient matching ability of the existing Raman spectrum similarity matching algorithm for the spectrum of low-concentration substances and realizes the automation of Raman spectrum recognition.

[0012] The present invention proposes an adaptive windowed Raman spectrum recognition method based on similarity, comprising:

[0013] S1: Obtaining the Raman spectrum of the substance to be identified and preprocessing the Raman spectrum of the substance to be identified;

[0014] S2: Acquire all peaks of the Raman spectrum of the substance to be identified after preprocessing, and determine the Raman characteristic peaks of the substance to be identified according to the peak positions and peak heights of the peaks;

[0015] S3: Obtain a database containing Raman spectrum data of standard substances to be identified;

[0016] S4: traverse the Raman characteristic peaks of the standard substances in the database, and compare them with the Raman characteristic peaks of the substance to be identified to determine the target standard substances that meet the matching conditions;

[0017] S5: establishing an adaptive window according to the peak position and peak width of the Raman characteristic peak of the target standard, and calculating the similarity between the Raman characteristic peak of the substance to be identified and the target standard within the adaptive window;

[0018] S6: Calculate the matching coefficient of the Raman spectrum of the target standard based on the similarity between the Raman characteristic peaks of the substance to be identified and the target standard;

[0019] S7: Determine whether the target standard substance is contained in the substance to be identified based on the matching coefficient.

[0020] Preferably, the preprocessing of the Raman spectrum of the substance to be identified in step S1 specifically includes: removing fluorescence background interference from the Raman spectrum of the substance to be identified.

[0021] Preferably, the step S2 specifically includes:

[0022] S201: performing window function smoothing on the Raman spectrum data of the substance to be identified after preprocessing and then performing second-order derivative to obtain all peaks;

[0023] S202: extracting the peak position and peak height of the peak, calculating the ratio vr of the peak height to the half-peak width of each peak, Where H is the peak height and w is the peak width.

[0024] S203: When the vr of the peak meets the characteristic peak signal-to-noise ratio requirement, it is determined to be a Raman characteristic peak.

[0025] Preferably, the matching condition in step S4 specifically includes: the peak position deviation between the Raman characteristic peak of the standard and the Raman characteristic peak of the substance to be identified is less than a first matching threshold and the peak height difference does not exceed a second matching threshold.

[0026] Preferably, the specific formula for calculating the similarity of the Raman characteristic peaks of the substance to be identified and the target standard in the adaptive window in step S5 is:

[0027]

[0028] Where HQI represents similarity, A and B are the Raman data matrices of the substance to be detected and the target standard of two identical sizes, respectively. and is the mean of matrices A and B, and m and n are the number of rows and columns of the matrices respectively.

[0029] Preferably, the specific formula for calculating the matching coefficient of the target standard Raman spectrum in step S6 is:

[0030] in

[0031] Wherein, n is the number of Raman characteristic peaks for adaptive windowed similarity matching.

[0032] Preferably, the step S7 of determining whether the target standard substance is contained in the substance to be identified based on the matching coefficient specifically includes: if the matching coefficient is less than a first similarity threshold, it is determined that the substance to be detected does not contain the target standard substance; if the matching coefficient is greater than the first similarity threshold and less than the second similarity threshold, it is determined that the substance to be detected may contain the target standard substance; if the matching coefficient is greater than the second similarity threshold, it is determined that the substance to be detected contains the target standard substance.

[0033] The invention discloses an adaptive windowed Raman spectrum recognition method based on similarity, which comprises the following steps: obtaining the Raman spectrum of a substance to be identified and performing preprocessing; obtaining all wave peaks of the Raman spectrum of the substance to be identified after the preprocessing to determine the Raman characteristic peaks of the substance to be identified; traversing the Raman characteristic peaks of standard products in a database, and comparing them with the Raman characteristic peaks of the substance to be identified to determine a target standard product that meets a matching condition; establishing an adaptive window, and calculating the similarity of the Raman characteristic peaks of the substance to be identified and the target standard product in the adaptive window; calculating the matching coefficient of the Raman spectrum of the target standard product to determine whether the substance to be identified contains the target standard product; and realizing the automation of Raman spectrum recognition by adaptive window similarity comparison without artificially setting any parameters.

[0034] In the present invention, the fluorescence background removal preprocessing is introduced according to the Raman spectrum characteristics, which effectively reduces the interference of invalid information on matching.

[0035] In the present invention, the ratio of peak height to half-peak width vr is introduced as a false peak discrimination mechanism to determine the Raman characteristic peak. Compared with the amplitude method, slope method and area method in traditional peak detection methods, the characteristics of the Raman characteristic peak are combined to improve the low-concentration Raman spectrum recognition speed and accuracy.

[0036] In the present invention, in the spectrum recognition process, the adaptive window similarity calculation is introduced, which can not only further improve the weight of effective information, but also reduce the interference of invalid information. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A flowchart of a similarity-based adaptive windowed Raman spectrum recognition method proposed by the present invention;

[0038] Figure 2 is a Raman spectrum of a true positive methamphetamine hair sample in the first embodiment of the present invention;

[0039] Figure 3 This is a Raman spectrum of a false positive methamphetamine hair sample in the second embodiment of the present invention;

[0040] Figure 4 This is a Raman spectrum of a true positive methamphetamine urine sample in the third embodiment of the present invention. DETAILED DESCRIPTION

[0041] like Figure 1 As shown, Figure 1 A flowchart of a similarity-based adaptive windowed Raman spectrum recognition method is proposed for an embodiment of the present invention.

[0042] Reference Figure 1 The first embodiment of the present invention proposes an adaptive windowed Raman spectroscopy identification method based on similarity, which is applied to a true positive methamphetamine hair sample of a substance to be identified. The specific method includes:

[0043] S1: Obtaining the Raman spectrum of the substance to be identified and preprocessing the Raman spectrum of the substance to be identified;

[0044] like Figure 2 As shown, Figure 2 This is the spectrum diagram of the Raman spectrum of the true positive methamphetamine hair sample after preprocessing. It should be noted that the preprocessing only removes the fluorescence background, that is, the baseline interference, of the spectrum to be identified, and no smoothing is performed to prevent the loss of effective information on the peak shape.

[0045] S2: Acquire all peaks of the Raman spectrum of the substance to be identified after preprocessing, and determine the Raman characteristic peaks of the substance to be identified according to the peak positions and peak heights of the peaks;

[0046] Specifically, step S2 specifically includes:

[0047] S201: performing window function smoothing on the Raman spectrum data of the substance to be identified after preprocessing and then performing second-order derivative to obtain all peaks;

[0048] S202: extracting the peak position and peak height of the peak, calculating the ratio vr of the peak height to the half-peak width of each peak, Where H is the peak height and w is the peak width.

[0049] S203: When the vr of the peak meets the characteristic peak signal-to-noise ratio requirement, it is determined to be a Raman characteristic peak.

[0050] It should be noted that whether the characteristic peak signal-to-noise ratio requirement ε is met can be adjusted based on the property characteristics of the substance to be detected. In this embodiment, the true positive methamphetamine hair sample ε is 50, and vr>50 is counted as a Raman characteristic peak.

[0051] In this embodiment, Figure 2 The spectrum shown is subjected to peak position extraction to obtain 54 peaks, and the peak positions and peak heights of the 54 peaks are extracted. The ratio vr of the peak height to the half-peak width of each peak is calculated. Only when vr>50 is it considered as a Raman characteristic peak and retained, otherwise it is deleted; the calculation results are shown in the following table:

[0052]

[0053]

[0054]

[0055]

[0056] S3: Obtain a database containing Raman spectrum data of standard substances to be identified;

[0057] S4: traverse the Raman characteristic peaks of the standard substances in the database, and compare them with the Raman characteristic peaks of the substance to be identified to determine the target standard substances that meet the matching conditions;

[0058] Specifically, the matching condition is that the peak position deviation between the Raman characteristic peak of the standard and the Raman characteristic peak of the substance to be identified is less than the first matching threshold Δ and the peak height difference does not exceed the second matching threshold δ. It should be noted that the matching conditions Δ and δ can be adjusted according to the resolution of the detection instrument. In this embodiment, Δ=5 and δ=10.

[0059] S5: establishing an adaptive window according to the peak position and peak width of the Raman characteristic peak of the target standard, and calculating the similarity between the Raman characteristic peak of the substance to be identified and the target standard within the adaptive window;

[0060] Specifically, the similarity formula is:

[0061]

[0062] Where HQI represents similarity, A and B are the Raman data matrices of the substance to be detected and the target standard of two identical sizes, respectively. and is the mean of matrices A and B, and m and n are the number of rows and columns of the matrices respectively.

[0063] It should be noted that, in this embodiment, the Raman data matrix includes two rows of data, wherein the first row of data is Raman shift, and the second row of data is Raman relative intensity.

[0064] In this embodiment, similarity matching is performed on peaks that meet the matching conditions. The adaptive windowing mainly consists in that the window length is automatically changed according to the length of the characteristic peak width during similarity calculation, and the spectral data range to be identified is consistent with the starting position of the characteristic peak in the database.

[0065] S6: Calculate the matching coefficient of the Raman spectrum of the target standard based on the similarity between the Raman characteristic peaks of the substance to be identified and the target standard;

[0066] Specifically, the specific formula for calculating the matching coefficient of the target standard Raman spectrum is:

[0067] in

[0068] Wherein, n is the number of Raman characteristic peaks for adaptive windowed similarity matching.

[0069] S7: Determine whether the target standard substance is contained in the substance to be identified based on the matching coefficient.

[0070] Specifically: if the matching coefficient is less than the first similarity threshold, it is determined that the substance to be detected does not contain the target standard substance; if the matching coefficient is greater than the first similarity threshold and less than the second similarity threshold, it is determined that the substance to be detected may contain the target standard substance; if the matching coefficient is greater than the second similarity threshold, it is determined that the substance to be detected contains the target standard substance.

[0071] In this embodiment, the first similarity threshold is 0.6; the second similarity threshold is 0.9, that is, the final result is returned according to the size of the p value. If the p values ​​are all less than P1 = 60%, the result is that the target standard substance is not detected; if the p value is greater than P1 = 60% and not greater than P2 = 90%, the result is that the target standard substance may be contained; if the p value exceeds P2 = 90%, the result is that the target standard substance is contained.

[0072] like Figure 3 As shown, Figure 3 A similarity-based adaptive windowed Raman spectrum recognition method proposed in the second embodiment of the present invention is applied to the Raman spectrum of a false positive methamphetamine-positive hair sample of the substance to be identified after preprocessing;

[0073] The difference from the first embodiment is that in this embodiment, the ratio of peak height to half-peak width vr needs to be greater than 100, the first similarity threshold P1 of the matching coefficient is 75%, and the second similarity threshold P2 is 95%.

[0074] like Figure 4 As shown, Figure 4 A similarity-based adaptive windowed Raman spectroscopy recognition method proposed in the third embodiment of the present invention is applied to the Raman spectrum of a true positive methamphetamine urine sample of the substance to be identified after preprocessing;

[0075] The difference from the first embodiment is that the ratio of peak height to half-peak width vr needs to be greater than 150, the first similarity threshold P1 of the matching coefficient is 85%, and the second similarity threshold P2 is 99%.

[0076] The invention discloses an adaptive windowed Raman spectrum recognition method based on similarity, which comprises the following steps: obtaining the Raman spectrum of a substance to be identified and performing preprocessing; obtaining all wave peaks of the Raman spectrum of the substance to be identified after the preprocessing to determine the Raman characteristic peaks of the substance to be identified; traversing the Raman characteristic peaks of standard products in a database, and comparing them with the Raman characteristic peaks of the substance to be identified to determine a target standard product that meets a matching condition; establishing an adaptive window, and calculating the similarity of the Raman characteristic peaks of the substance to be identified and the target standard product in the adaptive window; calculating the matching coefficient of the Raman spectrum of the target standard product to determine whether the substance to be identified contains the target standard product; and realizing the automation of Raman spectrum recognition by adaptive window similarity comparison without artificially setting any parameters.

[0077] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A similarity-based adaptive windowed Raman spectroscopy recognition method, characterized in that: include: S1: Obtaining the Raman spectrum of the substance to be identified and preprocessing the Raman spectrum of the substance to be identified; S2: Acquire all peaks of the Raman spectrum of the substance to be identified after preprocessing, and determine the Raman characteristic peaks of the substance to be identified according to the peak positions and peak heights of the peaks; S3: Obtain a database containing Raman spectrum data of standard substances to be identified; S4: traverse the Raman characteristic peaks of the standard substances in the database, and compare them with the Raman characteristic peaks of the substance to be identified to determine the target standard substances that meet the matching conditions; S5: establishing an adaptive window according to the peak position and peak width of the Raman characteristic peak of the target standard, and calculating the similarity between the Raman characteristic peak of the substance to be identified and the target standard within the adaptive window; S6: Calculate the matching coefficient of the Raman spectrum of the target standard based on the similarity between the Raman characteristic peaks of the substance to be identified and the target standard; S7: Determine whether the target standard substance is contained in the substance to be identified based on the matching coefficient; The step S2 specifically includes: S201: performing window function smoothing on the Raman spectrum data of the substance to be identified after preprocessing and then performing second-order derivative to obtain all peaks; S202: extracting the peak position and peak height of the peak, calculating the ratio vr of the peak height to the half-peak width of each peak, Where H is the peak height and w is the peak width; S203: When the vr of the peak meets the characteristic peak signal-to-noise ratio requirement, it is determined to be a Raman characteristic peak; The specific formula for calculating the similarity between the Raman characteristic peaks of the substance to be identified and the target standard in the adaptive window in step S5 is: Among them, HQI represents similarity, A and B are the Raman data matrices of the substance to be detected and the target standard of two identical sizes, respectively. and is the mean of matrices A and B, and m and n are the number of rows and columns of the matrices respectively.

2. The similarity-based adaptive windowed Raman spectrum recognition method according to claim 1, characterized in that: The preprocessing of the Raman spectrum of the substance to be identified in step S1 specifically includes: removing fluorescence background interference from the Raman spectrum of the substance to be identified.

3. The similarity-based adaptive windowed Raman spectrum recognition method according to claim 1, characterized in that: The matching condition in step S4 specifically includes: the peak position deviation between the Raman characteristic peak of the standard and the Raman characteristic peak of the substance to be identified is less than a first matching threshold and the peak height difference does not exceed a second matching threshold.

4. The similarity-based adaptive windowed Raman spectrum recognition method according to claim 1, characterized in that: The specific formula for calculating the matching coefficient of the target standard Raman spectrum in step S6 is: in Wherein, n is the number of Raman characteristic peaks for adaptive windowed similarity matching; i is a positive integer.

5. The similarity-based adaptive windowed Raman spectrum recognition method according to claim 1, characterized in that: The step S7 of determining whether the target standard substance is contained in the substance to be identified based on the matching coefficient specifically includes: if the matching coefficient is less than the first similarity threshold, it is determined that the substance to be detected does not contain the target standard substance; if the matching coefficient is greater than the first similarity threshold and less than the second similarity threshold, it is determined that the substance to be detected may contain the target standard substance; if the matching coefficient is greater than the second similarity threshold, it is determined that the substance to be detected contains the target standard substance.

Citation Information

Patent Citations

  • Raman spectrum matter automatic identification method based on self-adaption hypergraph algorithm

    CN107679569A

  • General Raman spectrum feature extraction method for machine learning substance identification algorithm

    CN107818298A