A medicine identification method, system, storage medium and electronic device

By preprocessing Raman spectra and performing kernel-free operations using the L1-KernelPCA method to extract principal component vectors, the problems of insufficient accuracy and high computational complexity in drug identification in existing technologies are solved, enabling more efficient drug quality assessment.

CN116359201BActive Publication Date: 2026-04-14BEIJING HUATAI NUOAN INFORMATION TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING HUATAI NUOAN INFORMATION TECH CO LTD
Filing Date
2023-04-23
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing Raman spectroscopy methods are not sensitive enough to small changes in characteristic variables in drug identification, and the single threshold is easily affected by outliers and noise, resulting in low identification accuracy.

Method used

The L1-KernelPCA method was used to preprocess Raman spectra and perform kernel-free operations to extract principal component vectors. The cumulative variance was used to determine drug quality. The L1-KernelPCA method was used to perform kernel-free operations on Raman spectra, which reduced computational complexity and improved identification accuracy.

Benefits of technology

It improves the accuracy of drug identification, reduces computational complexity, simplifies data processing, and enhances the ability to identify abnormal drugs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116359201B_ABST
    Figure CN116359201B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of drug identification, and particularly relates to a drug identification method, system, storage medium and electronic device, the method comprising: obtaining a Raman spectrum of each preset drug sample of a preset kind, preprocessing to obtain a plurality of first Raman spectra, and then calculating a threshold value; using an L1-KernelPCA method to perform non-multiplication kernel operation on all the first Raman spectra to obtain a matrix and a characteristic vector sorted in descending order of eigenvalue; selecting the first m characteristic vectors as principal component vectors, calculating the cumulative variance of each first Raman spectrum and the corresponding first reconstruction vector, and judging the quality of each preset drug sample according to the size relationship between the cumulative variance and the threshold value. The accuracy can be ensured, and the method is efficient and fast.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of drug identification technology, and in particular to a drug identification method, system, storage medium, and electronic device. Background Technology

[0002] Raman spectroscopy can be used to detect expired medicines. Currently, the invention patent with publication number CN104777143A and subject title "A Raman Spectroscopy-Based Similarity Identification Method for Expired Medicines" discloses the specific identification process, but it has the following shortcomings:

[0003] 1) This invention patent is based on similarity calculations and is not sensitive to small changes in feature variables;

[0004] 2) The single threshold defined by this invention patent is susceptible to outliers and noise, and therefore cannot guarantee accuracy. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to address the shortcomings of the prior art by providing a drug identification method, system, storage medium and electronic device.

[0006] The technical solution of a drug identification method of the present invention is as follows:

[0007] Obtain the Raman spectrum of each preset drug sample of a preset category, wherein all preset drug samples include at least one drug that exhibits an anomaly;

[0008] The Raman spectra of all preset drug samples were preprocessed to obtain multiple first Raman spectra;

[0009] The threshold is calculated based on all the first Raman spectra;

[0010] The L1-KernelPCA method was used to perform kernel-free operations on all first Raman spectra to obtain matrices;

[0011] Multiple eigenvectors are obtained from the matrix, and the eigenvalues ​​corresponding to each eigenvector are obtained. The eigenvectors are sorted in descending order of eigenvalues. The first m eigenvectors from the sorted eigenvectors are selected as principal component vectors, where m is a positive integer.

[0012] Based on each first Raman spectrum and all principal component vectors, the first reconstruction vector corresponding to each first Raman spectrum is obtained;

[0013] Calculate the cumulative variance of each first Raman spectrum and the corresponding first reconstruction vector, and determine whether each cumulative variance exceeds the threshold. If the judgment result is yes, the quality of the preset drug sample corresponding to the preset drug sample is judged as abnormal, and if the judgment result is no, the quality of the preset drug sample is judged as normal.

[0014] The technical solution of the drug identification system of the present invention is as follows:

[0015] It includes an acquisition module, a preprocessing module, a threshold calculation module, an operation module, a sorting and selection module, a reconstruction module, and a calculation and judgment module;

[0016] The acquisition module is used to: acquire the Raman spectrum of each preset drug sample of a preset type, wherein all preset drug samples include at least one drug that exhibits an abnormality;

[0017] The preprocessing module is used to: preprocess the Raman spectra of all preset drug samples to obtain multiple first Raman spectra;

[0018] The threshold calculation module is used to: calculate the threshold based on all the first Raman spectra;

[0019] The computation module is used to: perform kernel-free operations on all first Raman spectra using the L1-KernelPCA method to obtain a matrix;

[0020] The sorting and selection module is used to: obtain multiple feature vectors and the feature values ​​corresponding to each feature vector according to the matrix, sort the feature vectors according to the feature values ​​from largest to smallest, and select the first m feature vectors from the sorted feature vectors as principal component vectors, where m is a positive integer;

[0021] The reconstruction module is used to: obtain the first reconstruction vector corresponding to each first Raman spectrum based on each first Raman spectrum and all principal component vectors;

[0022] The calculation and judgment module is used to: calculate the cumulative variance of each first Raman spectrum and the corresponding first reconstruction vector, determine whether each cumulative variance exceeds the threshold, determine the quality of the preset drug sample corresponding to the yes judgment result as abnormal, and determine the quality of the preset drug sample corresponding to the no judgment result as normal.

[0023] The present invention provides a storage medium storing instructions, wherein when a computer reads the instructions, the computer executes any of the above-described drug identification methods.

[0024] An electronic device according to the present invention includes a processor and the above-described storage medium, wherein the processor executes instructions in the storage medium.

[0025] The beneficial effects of this invention are as follows:

[0026] On the one hand, the L1-KernelPCA method can extract key information from the first Raman spectrum, specifically the principal component vector, eliminating the mutual influence between Raman shifts of each preset drug sample's Raman spectrum. Therefore, it can improve the accuracy of drug identification. On the other hand, the L1-KernelPCA method can reduce data dimensionality, simplify data, avoid matrix multiplication operations, eliminate multiplier operations, reduce computational complexity, and improve computational efficiency. Attached Figure Description

[0027] Figure 1 This is a flowchart illustrating a drug identification method according to an embodiment of the present invention;

[0028] Figure 2 This is a schematic diagram of a drug identification method according to an embodiment of the present invention. Detailed Implementation

[0029] like Figure 1 As shown, a drug identification method according to an embodiment of the present invention includes the following steps:

[0030] S1. Obtain the Raman spectrum of each preset drug sample of a preset type. All preset drug samples include at least one drug that shows abnormality. Specifically, the Raman spectrum of each preset drug sample of a preset type can be obtained by a Raman spectrometer such as a CR2000 handheld spectrometer. The preset types include ibuprofen, etc.

[0031] S2. Preprocess the Raman spectra of all preset drug samples to obtain multiple first Raman spectra;

[0032] S3. Calculate the threshold based on all the first Raman spectra;

[0033] S4. Using the L1-KernelPCA method, perform kernelless operations on all first Raman spectra to obtain the matrix;

[0034] S5. Obtain multiple eigenvectors from the matrix, and the corresponding eigenvalues ​​of each eigenvector. Sort the eigenvectors according to the eigenvalues ​​from largest to smallest. Select the first m eigenvectors from the sorted eigenvectors as principal component vectors, where m is a positive integer.

[0035] The eigenvectors sorted by eigenvalue from largest to smallest are explained as follows:

[0036] In the results calculated using the L1-KernelPCA method, each eigenvector corresponds to an eigenvalue. All eigenvectors are sorted in descending order of eigenvalues ​​to obtain eigenvectors sorted in descending order of eigenvalues.

[0037] S6. Based on each first Raman spectrum and all principal component vectors, obtain the first reconstruction vector corresponding to each first Raman spectrum; for example:

[0038] Based on the first Raman spectrum and all principal component vectors, the first reconstruction vector corresponding to the first Raman spectrum is obtained.

[0039] S7. Calculate the cumulative variance of each first Raman spectrum and its corresponding first reconstruction vector. Determine whether each cumulative variance exceeds a threshold. For samples with a "yes" result, classify the quality of the pre-defined drug sample as abnormal; for samples with a "no" result, classify the quality of the pre-defined drug sample as normal. For example:

[0040] Calculate the cumulative variance of the first Raman spectrum with all the first reconstructed vectors, and determine whether the cumulative variance exceeds the threshold. If it does, the quality of the preset drug sample corresponding to the first Raman spectrum is determined to be abnormal; otherwise, the quality of the preset drug sample corresponding to the first Raman spectrum is determined to be normal.

[0041] On the one hand, this invention utilizes the L1-Kernel PCA method to extract key information from the first Raman spectrum. This key information is specifically embodied in the principal component vector, eliminating the mutual influence between Raman shifts of each preset drug sample's Raman spectrum. Therefore, it can improve the accuracy of drug identification. On the other hand, this invention utilizes the L1-Kernel PCA method to reduce data dimensionality, simplify data, avoid matrix multiplication operations, eliminate multiplier operations, reduce computational complexity, and improve computational efficiency.

[0042] Optionally, in the above technical solution, in step S2, the Raman spectra of all preset drug samples are preprocessed, including:

[0043] S20. Perform abnormal data cleaning on all preset drug samples to obtain multiple candidate Raman spectra;

[0044] Among these steps, abnormal data cleaning involves removing Raman spectra with obvious errors.

[0045] S21. For each candidate Raman spectrum, perform noise reduction, fluorescence interference subtraction, interpolation normalization, and regularization in sequence to obtain multiple first Raman spectra.

[0046] The Savitzky-Golay algorithm is used to denoise each candidate Raman spectrum, IAsLS (improved asymmetric least square IAsLS) is used to remove fluorescence interference, cubic spline interpolation is used for normalization, and regularization is performed by normalizing the spectrum to the range [0,1] using the maxminscale method.

[0047] Optionally, in the above technical solution, in step S3, calculating the threshold based on all the first Raman spectra includes:

[0048] S30. Calculate the mean light intensity corresponding to each Raman shift of all first Raman spectra;

[0049] S31. Calculate the variance of the light intensity corresponding to each Raman shift based on the mean value of the light intensity corresponding to each Raman shift.

[0050] For example, there are 10 first Raman spectra. The same Raman shift corresponds to one light intensity in each first Raman spectrum. That is, each Raman shift corresponds to 10 light intensities. Calculate the average of the light intensities corresponding to each Raman shift of all first Raman spectra.

[0051] S32. Calculate the threshold using the threshold calculation formula, which is:

[0052]

[0053] Where F represents the threshold, u i σ represents the mean light intensity corresponding to the i-th Raman shift. ii is the variance of the light intensity corresponding to the i-th Raman shift, n represents the initial Raman shift, N represents the final Raman shift, n < i ≤ N, and a represents an empirical coefficient.

[0054] In the above embodiments, although the steps are numbered S1, S2, etc., they are only specific embodiments given in this application. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation, which is also within the protection scope of this invention. It can be understood that in some embodiments, some or all of the above embodiments may be included.

[0055] like Figure 2 As shown, a drug identification system 200 according to an embodiment of the present invention includes an acquisition module 210, a preprocessing module 220, a threshold calculation module 230, a calculation module 240, a sorting and selection module 250, a reconstruction module 260, and a calculation and judgment module 270.

[0056] The acquisition module 210 is used to: acquire the Raman spectrum of each preset drug sample of a preset type, wherein all preset drug samples include at least one drug that exhibits an anomaly;

[0057] The preprocessing module 220 is used to: preprocess the Raman spectra of all preset drug samples to obtain multiple first Raman spectra;

[0058] Threshold calculation module 230 is used to: calculate the threshold based on all the first Raman spectra;

[0059] The computation module 240 is used to: perform kernel-free operations on all first Raman spectra using the L1-KernelPCA method to obtain a matrix;

[0060] The sorting and selection module 250 is used to: obtain multiple eigenvectors and the corresponding eigenvalues ​​of each eigenvector from the matrix, sort the eigenvectors according to the eigenvalues ​​from largest to smallest, and select the first m eigenvectors from the sorted eigenvectors as principal component vectors, where m is a positive integer;

[0061] The reconstruction module 260 is used to: obtain the first reconstruction vector corresponding to each first Raman spectrum based on each first Raman spectrum and all principal component vectors;

[0062] The calculation and judgment module 270 is used to: calculate the cumulative variance of each first Raman spectrum and the corresponding first reconstruction vector, determine whether each cumulative variance exceeds the threshold, determine the quality of the preset drug sample corresponding to the yes judgment result as abnormal, and determine the quality of the preset drug sample corresponding to the no judgment result as normal.

[0063] Optionally, in the above technical solution, the preprocessing module 220 is specifically used for:

[0064] Abnormal data cleaning was performed on all preset drug samples to obtain multiple candidate Raman spectra;

[0065] For each candidate Raman spectrum, noise reduction, fluorescence interference subtraction, interpolation normalization, and regularization are performed sequentially to obtain multiple first Raman spectra.

[0066] Optionally, in the above technical solution, the threshold calculation module 230 is specifically used for:

[0067] Calculate the mean light intensity corresponding to each Raman shift of all first Raman spectra;

[0068] Calculate the variance of the light intensity corresponding to each Raman shift based on the mean of the light intensity corresponding to each Raman shift.

[0069] The threshold is calculated using the threshold calculation formula, which is:

[0070]

[0071] Where F represents the threshold, u i σ represents the mean light intensity corresponding to the i-th Raman shift. ii is the variance of the light intensity corresponding to the i-th Raman shift, n represents the initial Raman shift, N represents the final Raman shift, n < i ≤ N, and a represents an empirical coefficient.

[0072] The parameters and steps for implementing the corresponding functions of each unit module in the drug identification system of the present invention described above can be referred to the parameters and steps in the embodiments of the drug identification method above, and will not be repeated here.

[0073] An embodiment of the present invention provides a storage medium storing instructions, which, when read by a computer, cause the computer to execute any of the above-mentioned drug identification methods.

[0074] An electronic device according to an embodiment of the present invention includes a processor and the aforementioned storage medium, wherein the processor executes instructions stored in the storage medium. The electronic device may be a computer, mobile phone, or the like.

[0075] Those skilled in the art will know that this invention can be implemented as a system, method, or computer program product.

[0076] Therefore, this disclosure can be implemented in the following forms: it can be entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," or "system." Furthermore, in some embodiments, the invention can also be implemented as a computer program product in one or more computer-readable media, the computer-readable medium containing computer-readable program code.

[0077] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0078] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for identifying pharmaceuticals, characterized in that, include: Obtain the Raman spectrum of each preset drug sample of a preset category, wherein all preset drug samples include at least one drug that exhibits an anomaly; The Raman spectra of all preset drug samples were preprocessed to obtain multiple first Raman spectra; The threshold is calculated based on all the first Raman spectra; The L1-KernelPCA method was used to perform kernel-free operations on all first Raman spectra to obtain matrices; Multiple eigenvectors are obtained from the matrix, and the eigenvalues ​​corresponding to each eigenvector are obtained. The eigenvectors are sorted in descending order of eigenvalues. The first m eigenvectors from the sorted eigenvectors are selected as principal component vectors, where m is a positive integer. Based on each first Raman spectrum and all principal component vectors, the first reconstruction vector corresponding to each first Raman spectrum is obtained; Calculate the cumulative variance of each first Raman spectrum and the corresponding first reconstruction vector, and determine whether each cumulative variance exceeds the threshold. If the judgment result is yes, the quality of the preset drug sample corresponding to the preset drug sample is judged as abnormal, and if the judgment result is no, the quality of the preset drug sample is judged as normal.

2. The drug identification method according to claim 1, characterized in that, The Raman spectra of all pre-defined drug samples were preprocessed, including: Abnormal data cleaning was performed on all preset drug samples to obtain multiple candidate Raman spectra; For each candidate Raman spectrum, noise reduction, fluorescence interference subtraction, interpolation normalization, and regularization are performed sequentially to obtain multiple first Raman spectra.

3. The drug identification method according to claim 1, characterized in that, The calculation of the threshold based on all the first Raman spectra includes: Calculate the mean light intensity corresponding to each Raman shift of all first Raman spectra; Calculate the variance of the light intensity corresponding to each Raman shift based on the mean of the light intensity corresponding to each Raman shift. The threshold is calculated using the threshold calculation formula, which is: Where F represents the threshold, u i σ represents the mean light intensity corresponding to the i-th Raman shift. ii is the variance of the light intensity corresponding to the i-th Raman shift, n represents the initial Raman shift, N represents the final Raman shift, n < i ≤ N, and a represents an empirical coefficient.

4. A drug identification system, characterized in that, It includes an acquisition module, a preprocessing module, a threshold calculation module, an operation module, a sorting and selection module, a reconstruction module, and a calculation and judgment module; The acquisition module is used to: acquire the Raman spectrum of each preset drug sample of a preset type, wherein all preset drug samples include at least one drug that exhibits an abnormality; The preprocessing module is used to: preprocess the Raman spectra of all preset drug samples to obtain multiple first Raman spectra; The threshold calculation module is used to: calculate the threshold based on all the first Raman spectra; The computation module is used to: perform kernel-free operations on all first Raman spectra using the L1-KernelPCA method to obtain a matrix; The sorting and selection module is used to: obtain multiple feature vectors and the feature values ​​corresponding to each feature vector according to the matrix, sort the feature vectors according to the feature values ​​from largest to smallest, and select the first m feature vectors from the sorted feature vectors as principal component vectors, where m is a positive integer; The reconstruction module is used to: obtain the first reconstruction vector corresponding to each first Raman spectrum based on each first Raman spectrum and all principal component vectors; The calculation and judgment module is used to: calculate the cumulative variance of each first Raman spectrum and the corresponding first reconstruction vector, determine whether each cumulative variance exceeds the threshold, determine the quality of the preset drug sample corresponding to the yes judgment result as abnormal, and determine the quality of the preset drug sample corresponding to the no judgment result as normal.

5. A drug identification system according to claim 4, characterized in that, The preprocessing module is specifically used for: Abnormal data cleaning was performed on all preset drug samples to obtain multiple candidate Raman spectra; For each candidate Raman spectrum, noise reduction, fluorescence interference subtraction, interpolation normalization, and regularization are performed sequentially to obtain multiple first Raman spectra.

6. A drug identification system according to claim 4, characterized in that, The threshold calculation module is specifically used for: Calculate the mean light intensity corresponding to each Raman shift of all first Raman spectra; Calculate the variance of the light intensity corresponding to each Raman shift based on the mean of the light intensity corresponding to each Raman shift. The threshold is calculated using the threshold calculation formula, which is: Where F represents the threshold, u i σ represents the mean light intensity corresponding to the i-th Raman shift. ii is the variance of the light intensity corresponding to the i-th Raman shift, n represents the initial Raman shift, N represents the final Raman shift, n < i ≤ N, and a represents an empirical coefficient.

7. A storage medium, characterized in that, The storage medium stores instructions that, when read by a computer, cause the computer to execute a drug identification method as described in any one of claims 1 to 3.

8. An electronic device, characterized in that, It includes a processor and the storage medium of claim 7, wherein the processor executes instructions in the storage medium.

Citation Information

Patent Citations

  • Method for similarity identification of expired drugs based on Raman spectroscopy

    CN104777143A

  • A high-precision classification and recognition algorithm of white spirit spectrum

    CN109359678A

  • Improved Raman spectrum multivariate data analysis and imaging method

    CN114295600A