Method and device for detecting narcotics and metabolites thereof in hair

By using Raman spectrometer and correlation analysis technology in drug 2C-B detection, confidence index is generated to evaluate the accuracy of detection concentration, and the problem of inconsistent detection results caused by light and temperature changes is solved, and the accuracy of detection is improved and reliability.

CN119438175AActive Publication Date: 2025-02-14HEILONGJIANG FULL TEST INSPECTION CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411628831.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-02-14
Estimated Expiration
2044-11-14

AI Technical Summary

Technical Problem

The existing drug 2C-B detection methods have different light and temperature, resulting in inconsistent accuracy of the detection results, which affects the reliability of the detection results.

Method used

Using Raman spectrometer combined with correlation analysis technology, the spectral data matrix and response variable matrix are generated by collecting the spectral data of hair samples, and the correlation analysis is performed to generate the relationship matrix and weight vector, and the spectral data is further adjusted through the confidence vector and the reflex matrix. Map back to the response variables, generating a confidence index to evaluate the accuracy of the detection concentration.

Benefits of technology

The accuracy and reliability of drug 2C-B detection are improved, and the effectiveness of detection concentrations in the current environment is output through the comparison of confidence indexes, and the impact of light and temperature changes on the detection results are solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119438175A_ABST
    Figure CN119438175A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for detecting narcotics and metabolites thereof in hair, and relates to the technical field of narcotics detection.According to the method, a hair sample is collected, a sample with a known narcotics concentration value is prepared through modulation, spectral data is collected through a Raman spectrometer, a spectral data matrix and a response variable matrix are input, and the spectral data matrix and the response variable matrix are analyzed; generating a relation matrix reflecting the relevance between the spectrum data matrix and the response variable matrix, further processing to generate a weight vector reflecting the weight coefficient of the detection sample concentration under the corresponding wavelength, and analyzing the relevance between the weight vector and the spectrum data matrix. And generating a confidence vector which maximally reflects the direction relationship between the response variable matrix Y and the spectral data matrix X, generating a reflection matrix after reflection, outputting a confidence index, comparing the confidence index with a confidence threshold, and outputting whether the detection concentration of the Raman spectrometer in the current environment is effective or not.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of drug detection, and in particular to a method and a device for detecting drugs and their metabolites in hair. Background Art

[0002] The drug 2C-B is a synthetic hallucinogen that belongs to the phenylethylamine class of compounds. 2C-B produces hallucinogenic effects and a few physical effects, and usually appears in the form of tablets or capsules, and is sometimes used in powder form. 2C-B can cause changes in perception, visual and auditory hallucinations, enhanced color and shape perception, etc. Users may experience amplified emotions, including pleasure, excitement or anxiety, and may also include accelerated heartbeat, sweating, mild nausea, etc. At the same time, the intensity and nature of the effects brought about by 2C-B are closely related to the dose. Higher doses may lead to stronger hallucinations and physical and mental reactions.

[0003] When testing the drug 2C-B, a Raman spectrometer is often used for auxiliary testing. Raman spectroscopy technology is based on the Raman scattering phenomenon, that is, when the laser is irradiated on the sample, most of the photons will undergo Rayleigh scattering, but a small part will change energy due to interaction with the vibration or rotation energy level of the molecule. This is Raman scattering. By measuring the frequency shift of Raman scattered light, information about molecular vibrations can be obtained to identify chemical components. During detection, differences in light and temperature will affect the signal intensity and quality, resulting in inconsistent detection results at different temperatures and light intensities, affecting the accuracy of the detection results.

[0004] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not constitute the prior art that is already known to one of ordinary skill in the art. Summary of the invention

[0005] The object of the present invention is to provide a method and a device for detecting drugs and their metabolites in hair, so as to solve the problems raised in the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solutions:

[0007] A method for detecting drugs and their metabolites in hair, the specific steps comprising:

[0008] Step 1, collecting sample hair and processing the sample hair;

[0009] Step 2: Collect spectral data through a Raman spectrometer and generate a spectral data matrix X and a response variable matrix Y;

[0010] Step 3: perform correlation analysis on the spectral data matrix X and the response variable matrix Y to generate a relationship matrix C, wherein the relationship matrix C is used to reflect the correlation between the spectral data matrix X and the response variable matrix Y;

[0011] Step 4: Analyze the relationship matrix C to generate a weight vector V, where the weight vector is used to reflect the weight coefficient of the concentration of the detected sample at the corresponding wavelength;

[0012] Step 5: Perform a correlation analysis on the weight vector V and the spectral data matrix X to generate a confidence vector, which is used to maximize the directional relationship between the response variable matrix Y and the spectral data matrix X;

[0013] Step 6: Perform correlation analysis on the confidence vector, the response variable matrix Y and the spectral data matrix X, respectively, to generate the response variable projection vector Q and the spectral data variable projection vector P, and perform correlation analysis on the response variable projection vector Q, the spectral data variable projection vector P, and the weight vector V, to generate a reflection matrix B, which is used to map the spectral data matrix X back to the response variable matrix Y;

[0014] Step 7: Perform correlation analysis on the reflection matrix B, the spectral data matrix X, and the response variable matrix Y to generate a confidence index ZZ. The confidence index ZZ is used to reflect the confidence level of the accuracy of the detected concentration. Set a confidence threshold, compare the confidence index ZZ with the confidence threshold, and output whether the detected concentration is valid.

[0015] Furthermore, in S1, the sample hair is rinsed with deionized water to remove surface dirt, the hair sample is placed in an ultrasonic cleaner, the frequency is set to 40 kHz, the cleaning time is ten minutes, the residual cleaning agent is removed, the hair sample is dried at 60 degrees Celsius for one hour, and frozen in liquid nitrogen for five minutes. The sample hair is ground using a cryo-grinder, and different doses of 2CB drugs are added to each sample hair, the known concentration values ​​are recorded, and the detection concentration values ​​of each hair sample are detected by a Raman spectrometer.

[0016] Furthermore, the spectral data matrix X is a matrix of m rows and n columns, m is the number of samples, n is the number of spectral wavelengths, each item in the spectral data matrix X corresponds to the detected concentration value of the sample under different spectral wavelengths, and the response variable matrix Y is a matrix of m rows and 1 column, wherein each item is a known concentration value of the corresponding sample.

[0017] Furthermore, correlation analysis is performed on the spectral data matrix X and the response variable matrix Y to generate the relationship matrix C, based on the formula:

[0018] C=X T Y

[0019] Among them, X T is the transpose of the spectral data matrix X, and the relationship matrix C is used to reflect the correlation between the spectral data matrix X and the response variable matrix Y.

[0020] Furthermore, correlation analysis is performed on the relationship matrix C to generate eigenvalues ​​based on the following formula:

[0021] det(A-εI)=0

[0022] Where I is the unit matrix, ε is the eigenvalue, and the maximum value ε among the eigenvalues ​​is max Substitute into formula (a-4I) V = 0, and output V, where V is the weight vector, each of which is the weight coefficient of the concentration of the detected sample at the corresponding wavelength;

[0023] The weight vector V and the spectral data matrix X are subjected to correlation analysis to generate the confidence vector t, based on the formula:

[0024] t=XV

[0025] Among them, the confidence vector is used to maximize the directional relationship between the response variable matrix Y and the spectral data matrix X;

[0026] Perform correlation analysis on the confidence vector t and the response variable matrix Y to generate the response variable projection vector Q. The formula is as follows:

[0027]

[0028] The response variable projection vector Q is used to reflect the projection of the known concentration value in the direction of the confidence vector t;

[0029] The confidence vector t and the spectral data matrix X are subjected to correlation analysis to generate the spectral data variable projection vector P, based on the following formula:

[0030]

[0031] The spectral data variable projection vector P is used to reflect the projection of the known concentration value in the direction of the confidence vector t.

[0032] Furthermore, correlation analysis is performed on the spectral data variable projection vector P, the response variable projection vector Q, and the weight vector V to generate the reflection matrix B, based on the formula:

[0033] B=(P T V) -1 IQ T

[0034] The back-mapping matrix B is used to map the spectral data matrix X back to the response variable matrix Y.

[0035] Furthermore, the correlation analysis is performed on the reflection matrix B and the spectral data matrix X to generate the prediction matrix The formula is:

[0036]

[0037] For the prediction matrix Perform correlation analysis with the response variable matrix Y to generate the confidence index ZZ, based on the formula:

[0038]

[0039] in, in is the average value of known concentrations, and the confidence index ZZ is used to reflect the confidence level of the accuracy of the detected concentration.

[0040] Furthermore, the confidence threshold θ is 0.67, and the confidence index ZZ is compared with the confidence threshold θ. When ZZ≥θ, it means that the detected concentration can be used as a valid value, and when ZZ<θ, it means that the detected concentration cannot be used as a valid value.

[0041] The present invention also provides a device for detecting drugs and their metabolites in hair, which is used to perform a method for detecting drugs and their metabolites in hair, comprising:

[0042] A sample collection module, used for collecting sample hair and processing the sample hair;

[0043] A detection module is used to collect spectral data through a Raman spectrometer and generate a spectral data matrix X and a response variable matrix Y;

[0044] The relationship matrix analysis module is used to perform correlation analysis on the spectral data matrix X and the response variable matrix Y to generate the relationship matrix C;

[0045] The weight analysis module is used to analyze the relationship matrix C and generate the weight vector V;

[0046] A confidence analysis module is used to perform correlation analysis on the weight vector V and the spectral data matrix X to generate a confidence vector;

[0047] The echo module is used to perform correlation analysis on the confidence vector, the response variable matrix Y and the spectral data matrix X, respectively, to generate the response variable projection vector Q and the spectral data variable projection vector P, and to perform correlation analysis on the response variable projection vector Q, the spectral data variable projection vector P and the weight vector V, to generate the echo matrix B;

[0048] The comprehensive analysis module is used to perform correlation analysis on the reflection matrix B, the spectral data matrix X, and the response variable matrix Y, and generate a confidence index ZZ. The confidence index ZZ is used to reflect the confidence level of the accuracy of the detection concentration, set a confidence threshold, compare the confidence index ZZ with the confidence threshold, and output whether the detection concentration is valid.

[0049] Compared with the prior art, the present invention has the following beneficial effects:

[0050] The present invention collects hair samples and modulates samples with known drug concentration values, collects spectral data through a Raman spectrometer, and enters the spectral data matrix and the response variable matrix, analyzes them, generates a relationship matrix reflecting the correlation between the spectral data matrix and the response variable matrix, and further processes to generate a weight vector reflecting the weight coefficient of the detection sample concentration at the corresponding wavelength, generates a confidence vector that maximizes the directional relationship between the response variable matrix Y and the spectral data matrix X by analyzing the correlation between the weight vector and the spectral data matrix, generates a reflection matrix after reflection, and outputs a confidence index, compares the confidence index with the confidence threshold, and outputs whether the Raman spectrometer detection concentration is effective under the current environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is a schematic diagram of the overall method flow of the present invention;

[0052] Figure 2 It is a schematic diagram of the system flow of the present invention. DETAILED DESCRIPTION

[0053] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.

[0054] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0055] Example:

[0056] See also Figure 1 , the present invention provides a technical solution:

[0057] A method for detecting drugs and their metabolites in hair. When detecting the drug 2C-B, a Raman spectrometer is often used for auxiliary detection. Raman spectroscopy technology is based on the Raman scattering phenomenon, that is, when the laser is irradiated on the sample, most of the photons will undergo Rayleigh scattering, but a small part will change energy due to interaction with the vibration or rotation energy level of the molecule, which is Raman scattering. By measuring the frequency shift of Raman scattered light, information about molecular vibrations can be obtained, thereby identifying chemical components. During detection, due to differences in light and temperature, the signal intensity and quality will be affected, resulting in inconsistent detection results at different temperatures and different light intensities, affecting the accuracy of the detection results. Therefore, the present invention performs analysis and detection before each detection, and outputs an execution index reflecting the accuracy of the detection. The specific steps include:

[0058] Step 1, collecting sample hair and processing the sample hair;

[0059] Rinse the sample hair with deionized water to remove surface dirt, place the hair sample in an ultrasonic cleaner, set the frequency to 40kHz, clean for ten minutes, remove residual cleaning agent, dry at 60 degrees Celsius for one hour, freeze in liquid nitrogen for five minutes, grind the sample hair with a cryo-grinder, add different doses of 2CB drugs to each sample hair, record the known concentration values, and detect the detection concentration values ​​of each hair sample using a Raman spectrometer.

[0060] Step 2: Collect spectral data through a Raman spectrometer and generate a spectral data matrix X and a response variable matrix Y;

[0061] The spectral data matrix X is a matrix of m rows and n columns, where m is the number of samples and n is the number of spectral wavelengths. Each item in the spectral data matrix X corresponds to the detected concentration value of the sample under different spectral wavelengths. The response variable matrix Y is a matrix of m rows and 1 column, where each item is the known concentration value of the corresponding sample.

[0062] Step 3: perform correlation analysis on the spectral data matrix X and the response variable matrix Y to generate a relationship matrix C, wherein the relationship matrix C is used to reflect the correlation between the spectral data matrix X and the response variable matrix Y;

[0063] Correlation analysis is performed on the spectral data matrix X and the response variable matrix Y to generate the relationship matrix C, based on the formula:

[0064] C=X T Y

[0065] Among them, X Tis the transpose of the spectral data matrix X, and the relationship matrix C is used to reflect the correlation between the spectral data matrix X and the response variable matrix Y.

[0066] Step 4: Analyze the relationship matrix C to generate a weight vector V, where the weight vector is used to reflect the weight coefficient of the concentration of the detected sample at the corresponding wavelength;

[0067] The correlation analysis of the relationship matrix C is performed to generate the eigenvalue based on the formula:

[0068] det(A-εI)=0

[0069] Where I is the unit matrix, ε is the eigenvalue, and the maximum value ε among the eigenvalues ​​is max Substitute into formula (a-4I) V = 0, and output V, where V is the weight vector, each of which is the weight coefficient of the concentration of the detected sample at the corresponding wavelength;

[0070] Step 5: Perform a correlation analysis on the weight vector V and the spectral data matrix X to generate a confidence vector, which is used to maximize the directional relationship between the response variable matrix Y and the spectral data matrix X;

[0071] The weight vector V and the spectral data matrix X are subjected to correlation analysis to generate the confidence vector t, based on the formula:

[0072] t=XV

[0073] Among them, the confidence vector is used to maximize the directional relationship between the response variable matrix Y and the spectral data matrix X;

[0074] Step 6: Perform correlation analysis on the confidence vector, the response variable matrix Y and the spectral data matrix X, respectively, to generate the response variable projection vector Q and the spectral data variable projection vector P, and perform correlation analysis on the response variable projection vector Q, the spectral data variable projection vector P, and the weight vector V, to generate a reflection matrix B, which is used to map the spectral data matrix X back to the response variable matrix Y;

[0075] Perform correlation analysis on the confidence vector t and the response variable matrix Y to generate the response variable projection vector Q. The formula is as follows:

[0076]

[0077] The response variable projection vector Q is used to reflect the projection of the known concentration value in the direction of the confidence vector t;

[0078] The confidence vector t and the spectral data matrix X are subjected to correlation analysis to generate the spectral data variable projection vector P, based on the following formula:

[0079]

[0080] The spectral data variable projection vector P is used to reflect the projection of the known concentration value in the direction of the confidence vector t.

[0081] The correlation analysis is performed on the spectral data variable projection vector P, the response variable projection vector Q, and the weight vector V to generate the reflection matrix B. The formula is as follows:

[0082] B=(P T V) -1 IQ T

[0083] The back-mapping matrix B is used to map the spectral data matrix X back to the response variable matrix Y.

[0084] Step 7: Perform correlation analysis on the reflection matrix B, the spectral data matrix X, and the response variable matrix Y to generate a confidence index ZZ. The confidence index ZZ is used to reflect the confidence level of the accuracy of the detected concentration. Set a confidence threshold, compare the confidence index ZZ with the confidence threshold, and output whether the detected concentration is valid.

[0085] Perform correlation analysis on the reflection matrix B and the spectral data matrix X to generate the prediction matrix The formula is:

[0086]

[0087] For the prediction matrix Perform correlation analysis with the response variable matrix Y to generate the confidence index ZZ, based on the formula:

[0088]

[0089] in, in is the average value of known concentrations, and the confidence index ZZ is used to reflect the confidence level of the accuracy of the detected concentration.

[0090] The confidence threshold θ is 0.67. The confidence index ZZ is compared with the confidence threshold θ. When ZZ ≥ θ, it means that the detected concentration can be used as a valid value. When ZZ < θ, it means that the detected concentration cannot be used as a valid value.

[0091] Reference Figure 2 The present invention also provides a device for detecting drugs and their metabolites in hair, which is used to perform a method for detecting drugs and their metabolites in hair, including:

[0092] A sample collection module, used for collecting sample hair and processing the sample hair;

[0093] A detection module is used to collect spectral data through a Raman spectrometer and generate a spectral data matrix X and a response variable matrix Y;

[0094] The relationship matrix analysis module is used to perform correlation analysis on the spectral data matrix X and the response variable matrix Y to generate the relationship matrix C;

[0095] The weight analysis module is used to analyze the relationship matrix C and generate the weight vector V;

[0096] A confidence analysis module is used to perform correlation analysis on the weight vector V and the spectral data matrix X to generate a confidence vector;

[0097] The echo module is used to perform correlation analysis on the confidence vector, the response variable matrix Y and the spectral data matrix X, respectively, to generate the response variable projection vector Q and the spectral data variable projection vector P, and to perform correlation analysis on the response variable projection vector Q, the spectral data variable projection vector P and the weight vector V, to generate the echo matrix B;

[0098] The comprehensive analysis module is used to perform correlation analysis on the reflection matrix B, the spectral data matrix X, and the response variable matrix Y, and generate a confidence index ZZ. The confidence index ZZ is used to reflect the confidence level of the accuracy of the detection concentration, set a confidence threshold, compare the confidence index ZZ with the confidence threshold, and output whether the detection concentration is valid.

[0099] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.

[0100] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.

[0101] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0102] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A method for detecting drugs and their metabolites in hair, characterized in that: The specific steps include: S1. Collecting sample hair and processing the sample hair; S2, collecting spectral data through a Raman spectrometer, and generating a spectral data matrix X and a response variable matrix Y; S3, performing correlation analysis on the spectral data matrix X and the response variable matrix Y to generate a relationship matrix C, wherein the relationship matrix C is used to reflect the correlation between the spectral data matrix X and the response variable matrix Y; S4, analyzing the relationship matrix C to generate a weight vector V, wherein the weight vector is used to reflect the weight coefficient of the concentration of the detected sample at the corresponding wavelength; S5, performing correlation analysis on the weight vector V and the spectral data matrix X to generate a confidence vector, where the confidence vector is used to maximize the directional relationship between the response variable matrix Y and the spectral data matrix X; S6, performing correlation analysis on the confidence vector, the response variable matrix Y and the spectral data matrix X, respectively, to generate a response variable projection vector Q and a spectral data variable projection vector P, and performing correlation analysis on the response variable projection vector Q, the spectral data variable projection vector P, and the weight vector V, to generate a reflection matrix B, which is used to map the spectral data matrix X back to the response variable matrix Y; S7. Perform correlation analysis on the reflection matrix B, the spectral data matrix X, and the response variable matrix Y to generate a confidence index ZZ. The confidence index ZZ is used to reflect the confidence level of the accuracy of the detected concentration. Set a confidence threshold, compare the confidence index ZZ with the confidence threshold, and output whether the detected concentration is valid.

2. The method for detecting drugs and their metabolites in hair according to claim 1, characterized in that: In S1, the sample hair is rinsed with deionized water to remove surface dirt, the hair sample is placed in an ultrasonic cleaner, the frequency is set to 40 kHz, the cleaning time is ten minutes, the residual cleaning agent is removed, the hair sample is dried at 60 degrees Celsius for one hour, and frozen in liquid nitrogen for five minutes. The sample hair is ground using a cryo-grinder, and different doses of 2CB drugs are added to each sample hair, the known concentration values ​​are recorded, and the detection concentration values ​​of each hair sample are detected by a Raman spectrometer.

3. The method for detecting drugs and their metabolites in hair according to claim 2, characterized in that: The spectral data matrix X is a matrix of m rows and n columns, where m is the number of samples and n is the number of spectral wavelengths. Each item in the spectral data matrix X corresponds to the detected concentration value of the sample under different spectral wavelengths. The response variable matrix Y is a matrix of m rows and 1 column, where each item is the known concentration value of the corresponding sample.

4. The method for detecting drugs and their metabolites in hair according to claim 3, characterized in that: Correlation analysis is performed on the spectral data matrix X and the response variable matrix Y to generate the relationship matrix C, based on the formula: C=X T Y Among them, X T is the transpose of the spectral data matrix X, and the relationship matrix C is used to reflect the correlation between the spectral data matrix X and the response variable matrix Y.

5. The method for detecting drugs and their metabolites in hair according to claim 4, characterized in that: The correlation analysis of the relationship matrix C is performed to generate the eigenvalue based on the formula: det(A-εI)=0 Where I is the unit matrix, ε is the eigenvalue, and the maximum value ε among the eigenvalues ​​is max Substitute into formula (a-4I) V = 0, and output V, where V is the weight vector, each of which is the weight coefficient of the concentration of the detected sample at the corresponding wavelength; The weight vector V and the spectral data matrix X are subjected to correlation analysis to generate the confidence vector t, based on the formula: t=XV Among them, the confidence vector is used to maximize the directional relationship between the response variable matrix Y and the spectral data matrix X; Perform correlation analysis on the confidence vector t and the response variable matrix Y to generate the response variable projection vector Q. The formula is as follows: The response variable projection vector Q is used to reflect the projection of the known concentration value in the direction of the confidence vector t; The confidence vector t and the spectral data matrix X are subjected to correlation analysis to generate the spectral data variable projection vector P, based on the following formula: The spectral data variable projection vector P is used to reflect the projection of the known concentration value in the direction of the confidence vector t.

6. The method for detecting drugs and their metabolites in hair according to claim 5, characterized in that: The correlation analysis is performed on the spectral data variable projection vector P, the response variable projection vector Q, and the weight vector V to generate the reflection matrix B. The formula is as follows: B=(P T V) -1 IQ T The back-mapping matrix B is used to map the spectral data matrix X back to the response variable matrix Y.

7. A method for detecting drugs and their metabolites in hair according to claim 6, characterized in that: Perform correlation analysis on the reflection matrix B and the spectral data matrix X to generate the prediction matrix The formula is: For the prediction matrix Perform correlation analysis with the response variable matrix Y to generate the confidence index ZZ, based on the formula: in, in is the average value of known concentrations, and the confidence index ZZ is used to reflect the confidence level of the accuracy of the detected concentration.

8. The method for detecting drugs and their metabolites in hair according to claim 1, characterized in that: The confidence threshold θ is 0.

67. The confidence index ZZ is compared with the confidence threshold θ. When ZZ ≥ θ, it means that the detected concentration can be used as a valid value. When ZZ < θ, it means that the detected concentration cannot be used as a valid value.

9. A device for detecting drugs and their metabolites in hair, used for executing the method for detecting drugs and their metabolites in hair according to claim 1, characterized in that: include: A sample collection module, used for collecting sample hair and processing the sample hair; A detection module is used to collect spectral data through a Raman spectrometer and generate a spectral data matrix X and a response variable matrix Y; The relationship matrix analysis module is used to perform correlation analysis on the spectral data matrix X and the response variable matrix Y to generate the relationship matrix C; The weight analysis module is used to analyze the relationship matrix C and generate the weight vector V; A confidence analysis module is used to perform correlation analysis on the weight vector V and the spectral data matrix X to generate a confidence vector; The echo module is used to perform correlation analysis on the confidence vector, the response variable matrix Y and the spectral data matrix X, respectively, to generate the response variable projection vector Q and the spectral data variable projection vector P, and to perform correlation analysis on the response variable projection vector Q, the spectral data variable projection vector P and the weight vector V, to generate the echo matrix B; The comprehensive analysis module is used to perform correlation analysis on the reflection matrix B, the spectral data matrix X, and the response variable matrix Y, and generate a confidence index ZZ. The confidence index ZZ is used to reflect the confidence level of the accuracy of the detection concentration, set a confidence threshold, compare the confidence index ZZ with the confidence threshold, and output whether the detection concentration is valid.

Citation Information

Patent Citations

  • Online monitoring instrument and method for drug

    CN103344579A

  • Online infrared spectroscopy monitoring system and method for hard drug taking condition

    CN103884673A

  • Method and system for analyzing substance concentration based on near infrared spectrum technology

    CN114611582A

  • Multi-channel drug fuzzy recognition method and system based on surface enhanced Raman spectroscopy

    CN115774008A