Drug infusion intelligent identification method and system based on Raman spectrum technology

By combining Raman spectroscopy with artificial intelligence, an intelligent drug infusion identification system has been established, which solves the problems of low accuracy and low efficiency in drug identification in existing technologies. It enables rapid and accurate drug infusion identification and quality control, reducing human error and patient risks.

CN119000635APending Publication Date: 2024-11-22XIANGYA HOSPITAL CENT SOUTH UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411014870.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-26
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

Existing Raman spectroscopy technology has low accuracy and efficiency in drug identification and classification, which cannot meet the high efficiency requirements of clinical drug use. Furthermore, it cannot identify colorless, odorless, and transparent liquid drugs, resulting in a high error rate and safety hazards.

Method used

Raman spectroscopy was used for data preprocessing to establish a classification model based on convolutional neural networks and multilayer perceptrons. Standardized spectra were generated through data preprocessing, and cross-entropy was used to optimize model parameters to achieve rapid and accurate identification of drug infusions.

Benefits of technology

It enables rapid and accurate identification of drugs without obvious appearance characteristics, reduces human error, lowers the risk of medication use for patients, reduces medical accidents and economic losses, and improves the efficiency of quality control for drug infusions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119000635A_ABST
    Figure CN119000635A_ABST
Patent Text Reader

Abstract

The invention discloses a drug infusion intelligent identification method and system based on a Raman spectrum technology, and the method comprises the steps: carrying out the detection through the Raman spectrum technology, and collecting the original atlas of drug infusion under different detection conditions; preprocessing the original atlas to form a standardized atlas; stratified random sampling is carried out on the standardized maps, and the two parts of standardized maps obtained through sampling are used for training and verification of a medicine infusion recognition model; in the training stage, the standardized atlas is input into a convolutional neural network, and the convolutional neural network is guided to output medicine labels corresponding to the standardized atlas. Inputting the spectral features of the standardized atlas into a linear classifier based on a multilayer perceptron, and outputting a final classification result; pre-processing to-be-identified medicine transfusion, inputting the pre-processed to-be-identified medicine transfusion into the medicine transfusion identification model, and taking out the medicine label with the maximum prediction probability as a final judgment result. Qualitative and quantitative infusion is completed, and it is guaranteed that the type and dosage of clinical medication are correct.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent identification technology, and in particular discloses a method and system for intelligent identification of drug infusion based on Raman spectroscopy technology. Background Art

[0002] With the development and improvement of medical treatment, drug safety is a crucial issue. Most of the drug infusions configured in medical institutions are colorless and odorless transparent liquids, which cannot be identified by the naked eye, nor can they be identified and controlled by image recognition technology. The existing technologies on the market are mainly the combined application of Raman spectroscopy technology and chemometrics, or the research and exploration of the combined use of Raman spectroscopy technology and artificial intelligence, and they are only for a specific drug or a certain type of drug, and cannot be expanded.

[0003] This invention is based on the application of Raman spectroscopy monitoring technology and convolutional neural networks. A large-scale Raman spectroscopy database for drug infusion is established, and artificial intelligence technology is used to perform fast and accurate matching and identification. Some companies in the world sell Raman spectroscopy databases for commercial use, but they are all standard substances for drugs, rather than spectra of drug preparations after they are launched on the market. They cannot be used clinically and are updated very slowly.

[0004] Introduction to Raman spectrum database: Raman spectrum is a one-dimensional data with fingerprint characteristics. Fingerprint characteristics mean that the spectra between different substances are like fingerprints. There is no completely consistent Raman spectrum. It can be used as the basis for drug feature identification. The development and application of Raman spectrum and some databases are mainly used for drug detection and material science, but they are only one of the ways to characterize substances and have a small application range. The existing patents and literature related to Raman spectroscopy technology are basically monitoring methods or related technologies established for one or several substances (such as: CN202111400890.1, CN202311621874.4, CN201711442674.7).

[0005] The existing Raman spectroscopy databases are all for a single chemical substance, while the drugs on the market are composed of multiple chemical substances or traditional Chinese medicines with complex ingredients. Compared with chemical substances with a single and clear ingredient, the Raman spectroscopy data of drugs is complex. The Raman spectra of drugs from different manufacturers or specifications are theoretically inconsistent. Therefore, the commercial data on the market cannot be used clinically at all.

[0006] The existing Raman spectroscopy technology used in the identification and classification of drugs is mainly concentrated in the direction of chemometrics, with low accuracy and long time consumption. Moreover, as the database increases, the efficiency of matching and classification will be greatly reduced, and it cannot meet the clinical high-efficiency requirements.

[0007] Most of the infusions prepared by the intravenous drug preparation center in the hospital are colorless and odorless, with no difference in appearance. It is difficult to identify them manually and the error rate is high, which poses a great safety hazard to patients. The application of artificial intelligence in the medical field is mainly focused on image recognition, so simple image recognition cannot be applied in the identification and classification of infusions.

[0008] Therefore, the above-mentioned defects in the application of existing Raman spectroscopy technology in the identification and classification of drugs are technical problems that need to be solved urgently. Summary of the invention

[0009] The present invention provides a method and system for intelligent identification of drug infusion based on Raman spectroscopy technology, aiming to solve at least one of the above-mentioned defects.

[0010] One aspect of the present invention relates to a method for intelligent identification of drug infusion based on Raman spectroscopy technology, comprising the following steps:

[0011] Data preprocessing: Use Raman spectroscopy technology to detect and collect the original spectra of drug infusion under different detection conditions; preprocess the original spectra and combine multiple preprocessed original spectra to form a standardized spectrum;

[0012] Establish a classification model: perform stratified random sampling of standardized spectra at a ratio of 1:1, and use the two parts of the sampled standardized spectra for training and verification of the drug infusion recognition model; in the training stage, input the standardized spectra into the convolutional neural network to guide it to output the drug label corresponding to the standardized spectra; then input the spectral features of the extracted standardized spectra into a linear classifier based on a multi-layer perceptron, and the linear classifier outputs the final classification result;

[0013] Identify drug infusion: The drug infusion to be identified is pre-processed and input into the drug infusion identification model, and then the drug label with the highest prediction probability by the drug infusion identification model is taken as the final judgment result.

[0014] Furthermore, in the step of data preprocessing, the original spectrum is normalized, baseline removed, and interval intercepted. The normalization formula is:

[0015]

[0016] Where x represents the spectral intensity corresponding to each Raman shift point, x min and x max Represent the minimum and maximum values ​​of all data points respectively;

[0017] The baseline removal algorithm uses iterative adaptive weighted penalty least squares method, which is expressed as:

[0018]

[0019] Among them, Q t is the optimization goal of the algorithm; is a weighted squared error term used to measure the observed value x i Compared with the baseline estimate The difference between is the coefficient used for weighting; is a smoothing term used to ensure that the baseline estimate The smoothness between ; λ is the weight of the smoothness term.

[0020] Furthermore, in the step of establishing the classification model, the convolutional neural network includes two parts: feature extraction and result prediction. The feature extraction part aims to capture the specific spectral information of different drugs using convolution operations. The process can be expressed as:

[0021]

[0022] Among them, Z i,n is the i-th feature of the n-th output channel, C in is the input channel of the convolution operation, W m,n represents the mth convolution kernel of the nth output channel, R i is the ith computational region, represents the spectral pixel of the ith calculation area of ​​the mth input channel, and * is the cross-correlation operator.

[0023] Furthermore, in the step of establishing the classification model, the process of the linear classifier outputting the final classification result is expressed as:

[0024] Y = softmax(WX+B)

[0025] Among them, Y is the final classification result output by the linear classifier; X is the input spectral feature, W is the weight of the classifier, B represents the bias of the classifier, and the softmax function maps the linearly transformed features to a probability space with a value range of [0,1];

[0026] The specific expression of the softmax function is as follows:

[0027]

[0028] Among them, y i represents the prediction result of the i-th category, represents the natural logarithmic exponent of xi, and j represents any category.

[0029] Furthermore, in the step of establishing the classification model, cross entropy is used as the loss function to optimize the parameters in the drug infusion recognition model. The specific calculation formula of cross entropy is as follows:

[0030]

[0031] Among them, H(p,q) represents the cross entropy, p(x) is the actual drug label, and q(x) is the label predicted by the model.

[0032] Another aspect of the present invention relates to an intelligent drug infusion identification system based on Raman spectroscopy technology, comprising:

[0033] The data preprocessing module is used to detect using Raman spectroscopy technology and collect the original spectra of drug infusion under different detection conditions; preprocess the original spectra and combine multiple preprocessed original spectra to form a standardized spectrum;

[0034] A classification model module is established to perform stratified random sampling of standardized spectra at a ratio of 1:1, and the two parts of the standardized spectra obtained by sampling are used for training and verification of the drug infusion recognition model; in the training stage, the standardized spectra are input into the convolutional neural network to guide it to output the drug label corresponding to the standardized spectra; then the spectral features of the extracted standardized spectra are input into a linear classifier based on a multi-layer perceptron, and the linear classifier outputs the final classification result;

[0035] The drug infusion identification module is used to input the drug infusion to be identified into the drug infusion identification model after pre-processing, and then take out the drug label with the highest prediction probability of the drug infusion identification model as the final judgment result.

[0036] Furthermore, in the data preprocessing module, the original spectrum is normalized, baseline removed, and interval intercepted. The normalization formula is:

[0037]

[0038] Where x represents the spectral intensity corresponding to each Raman shift point, x min and x max Represent the minimum and maximum values ​​of all data points respectively;

[0039] The baseline removal algorithm uses iterative adaptive weighted penalty least squares method, which is expressed as:

[0040]

[0041] Among them, Q t is the optimization goal of the algorithm; is a weighted squared error term used to measure the observed value x i Compared with the baseline estimate The difference between is the coefficient used for weighting; is a smoothing term used to ensure that the baseline estimate The smoothness between ; λ is the weight of the smoothness term.

[0042] Furthermore, in the classification model module, the convolutional neural network includes two parts: feature extraction and result prediction. The feature extraction part aims to capture the specific spectral information of different drugs using convolution operations. The process can be expressed as:

[0043]

[0044] Among them, Z i,n is the i-th feature of the n-th output channel, C in is the input channel of the convolution operation, W m,n represents the mth convolution kernel of the nth output channel, R i is the ith computational region, represents the spectral pixel of the ith calculation area of ​​the mth input channel, and * is the cross-correlation operator.

[0045] Furthermore, in the classification model building module, the process of the linear classifier outputting the final classification result is expressed as:

[0046] Y = softmax(WX+B)

[0047] Among them, Y is the final classification result output by the linear classifier; X is the input spectral feature, W is the weight of the classifier, B represents the bias of the classifier, and the softmax function maps the linearly transformed features to a probability space with a value range of [0,1];

[0048] The specific expression of the softmax function is as follows:

[0049]

[0050] Among them, y i represents the prediction result of the i-th category, represents the natural logarithmic exponent of xi, and j represents any category.

[0051] Furthermore, in the classification model module, cross entropy is used as the loss function to optimize the parameters in the drug infusion recognition model. The specific calculation formula of cross entropy is as follows:

[0052]

[0053] Among them, H(p,q) represents the cross entropy, p(x) is the actual drug label, and q(x) is the label predicted by the model.

[0054] The beneficial effects achieved by the present invention are:

[0055] The present invention provides a method and system for intelligent identification of drug infusion based on Raman spectroscopy technology, which adopts data preprocessing: using Raman spectroscopy technology to perform detection, collecting original spectra of drug infusion under different detection conditions; preprocessing the original spectra, combining multiple preprocessed original spectra to form a standardized spectra; establishing a classification model: stratified random sampling of the standardized spectra according to a 1:1 ratio, and using the two parts of the sampled standardized spectra for training and verification of the drug infusion identification model; in the training stage, inputting the standardized spectra into a convolutional neural network to guide it to output drug labels corresponding to the standardized spectra; then inputting the spectral features of the extracted standardized spectra into a linear classifier based on a multi-layer perceptron, and the linear classifier outputs the final classification result; identifying drug infusion: inputting the drug infusion to be identified into the drug infusion identification model after preprocessing, and then taking out the drug label with the highest prediction probability of the drug infusion identification model as the final judgment result. The Raman spectroscopy-based intelligent identification method and system for drug infusion provided by the present invention uses Raman spectroscopy to collect as much spectrum data as possible for a single sample, selects a suitable method to preprocess the original spectrum data, reduces the interference of instrument noise or natural light, obtains the real data of the drug, and then uses artificial intelligence technology to process all the spectra of a certain drug to form a standard spectrum; integrates artificial intelligence technology with the Raman spectroscopy database to improve the efficiency and accuracy of matching, and the beneficial effects achieved are:

[0056] 1. It can identify completely unknown drugs and infusions that have no obvious appearance features. With the optimization of the algorithm, the concentration of the drug can be calculated, which not only completes the qualitative and quantitative analysis of the infusion, but also ensures the correct type and dosage of clinical drugs. 2. All infusions prepared by the intravenous medication preparation center can be tested, and each drug can be scientifically quality-checked before being delivered to the ward, eliminating human errors and eliminating the need for a large number of staff for manual identification, saving labor costs.

[0057] 3. When a drug mismatch occurs, it can accurately identify which bottle is at fault and what the error is, rather than scrapping the batch of questionable infusions. This reduces economic losses, greatly reduces the risk of medication errors for patients, and reduces the occurrence of medical accidents caused by mis-prescription.

[0058] 4. When using drugs clinically, if the label falls off or the patient questions the infusion, this technology can be used for retrospective proof to reduce medical disputes and losses. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is a schematic diagram of the process of the intelligent identification method of drug infusion based on Raman spectroscopy technology of the present invention;

[0060] Figure 2This is a schematic diagram of the convolutional neural network model for identifying drugs based on Raman spectroscopy in the present invention. DETAILED DESCRIPTION

[0061] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0062] like Figure 1 and Figure 2 As shown, the first embodiment of the present invention proposes a method for intelligent identification of drug infusion based on Raman spectroscopy technology, comprising the following steps:

[0063] Step S100, data preprocessing: using Raman spectroscopy technology to detect, collect original spectra of drug infusion under different detection conditions; preprocess the original spectra, and combine multiple preprocessed original spectra to form a standardized spectrum.

[0064] In order to improve the data quality and highlight the characteristic information of each spectrum, the original spectrum must be preprocessed by normalization, baseline removal and truncation interval (209.45~3367.53).

[0065] Step S200, establishing a classification model: performing stratified random sampling on the standardized spectrum in a ratio of 1:1, and using the two parts of the standardized spectrum obtained by sampling for training and verification of the drug infusion recognition model; in the training stage, inputting the standardized spectrum into the convolutional neural network to guide it to output the drug label corresponding to the standardized spectrum; then inputting the spectral features of the extracted standardized spectrum into a linear classifier based on a multi-layer perceptron, and the linear classifier outputs the final classification result.

[0066] The data is randomly sampled in a stratified manner at a ratio of 1:1, and the two parts of the sampled data are used for model training and verification respectively. In the training stage, the preprocessed Raman spectrum is input into the convolutional neural network to guide it to output the drug label corresponding to the spectrum. After that, the extracted spectral features are input into a linear classifier based on a multi-layer perceptron (MLP), which outputs the final classification result (Y).

[0067] Step S300, identifying drug infusion: pre-processing the drug infusion to be identified and inputting it into the drug infusion identification model, and then taking out the drug label with the highest prediction probability by the drug infusion identification model as the final judgment result.

[0068] In actual use, the Raman spectrum to be identified is pre-processed and input into the drug infusion identification model (such as Figure 2As shown in the figure, the drug infusion recognition model then takes out the drug label with the highest probability predicted by the drug infusion recognition model as the final judgment result. After testing, the drug infusion recognition model can complete the identification within a few seconds and achieve an identification accuracy rate of more than 99%.

[0069] Further, see Figure 1 and Figure 2 In the method for intelligent identification of drug infusion based on Raman spectroscopy technology provided in this embodiment, in step S100, the original spectrum is normalized, baseline removed, and intervals are preprocessed. The normalization formula is:

[0070]

[0071] In formula (1), x represents the spectral intensity corresponding to each Raman shift point, x min and x max Represent the minimum and maximum values ​​of all data points respectively.

[0072] The baseline removal algorithm uses iterative adaptive weighted penalty least squares method, which is expressed as:

[0073]

[0074] In formula (2), Q t is the optimization goal of the algorithm; is a weighted squared error term used to measure the observed value x i Compared with the baseline estimate The difference between is a weighting factor that can be updated in each iteration. Typically, this is used to perform a baseline correction or correction on each observation. is a smoothing term used to ensure that the baseline estimate λ is the weight of the smoothing term, which controls the degree of smoothing. Usually, this part is used to maintain the continuity between baseline estimates and avoid mutations.

[0075] Preferably, see Figure 1 and Figure 2 In the method for intelligent identification of drug infusion based on Raman spectroscopy technology provided in this embodiment, in step S200, in the training stage, the pre-processed Raman spectrum is input into the convolutional neural network to guide it to output the drug label corresponding to the spectrum. The convolutional neural network includes two parts: feature extraction and result prediction. The feature extraction part aims to capture the specific spectral information of different drugs using convolution operations. The process can be expressed as:

[0076]

[0077] In formula (3), Z i,nis the i-th feature of the n-th output channel, C in is the input channel of the convolution operation, W m,n represents the mth convolution kernel of the nth output channel, R i is the ith computational region, represents the spectral pixel of the ith calculation area of ​​the mth input channel, and * is the cross-correlation operator.

[0078] Preferably, see Figure 1 and Figure 2 In the method for intelligent identification of drug infusion based on Raman spectroscopy technology provided in this embodiment, in step S200, the process of the linear classifier outputting the final classification result is expressed as follows:

[0079] Y=softmax(WX+B) (4)

[0080] In formula (4), Y is the final classification result output by the linear classifier; X is the input spectral feature, W is the weight of the classifier, B represents the bias of the classifier, and the softmax function maps the linearly transformed feature to a probability space with a value range of [0,1].

[0081] The specific expression of the softmax function is as follows:

[0082]

[0083] In formula (5), y i represents the prediction result of the i-th category, represents the natural logarithmic exponent of xi, and j represents any category. All j feature categories in the training samples were counted. In order to make the model's prediction results as close as possible to the actual drug labels, cross entropy was used as the loss function to optimize the parameters in the model.

[0084] Preferably, see Figure 1 and Figure 2 In the method for intelligent identification of drug infusion based on Raman spectroscopy technology provided in this embodiment, in step S200, cross entropy is used as a loss function to optimize the parameters in the drug infusion identification model. The specific calculation formula of cross entropy is as follows:

[0085] H(p,q)=-∑ x p(x)logq(x) (6)

[0086] In formula (6), H(p,q) represents the cross entropy, p(x) is the actual drug label, and q(x) is the label predicted by the model.

[0087] Preferably, see Figure 1 and Figure 2The method for intelligent identification of drug infusion based on Raman spectroscopy technology provided in this embodiment includes the following parts:

[0088] Application of Raman spectroscopy technology: Among the various analytical instruments and methods, it is necessary to select analytical methods and technologies suitable for clinical application scenarios and needs. The clinical detection environment and objectives require the detection methods to be fast, accurate, and stable. Choose to use Raman spectroscopy technology to establish a detection tool for a large-scale database exclusive to infusion. The image features of the Raman spectroscopy database are mainly due to the signals generated by the functional groups of chemical substances. Therefore, the repeatability on the same instrument is extremely high and will not change with the life cycle of the instrument. On the other hand, compared with traditional drug analysis and monitoring technology, Raman spectroscopy technology is simple to operate, the process is simple, and the time consumption is greatly shortened. Traditional instruments for quality analysis of drugs or infusions are large in size, high in purchase cost, and use a large amount of consumables, causing pollution and high economic costs, and there are professional requirements for operators. There are portable Raman spectrometers on the market. Choose an instrument with a moderate price that can meet the detection sensitivity and accuracy of the present invention.

[0089] Establishment of drug database: collect drugs that have been put on the market, use Raman spectroscopy technology to detect them, and adjust instrument parameters such as scanning time, frequency, laser intensity, etc. to obtain spectra under different detection conditions for the same drug, so as to obtain standardized spectra of the drug through artificial intelligence technology. When new drugs are put on the market, the database is improved through the same data collection and processing steps.

[0090] Application of artificial intelligence: Drugs are characterized by Raman spectroscopy, and the output is a one-dimensional linear map (such as Figure 2 As shown in the figure, artificial intelligence technology is used to pre-process the original spectrum, and a standard spectrum is formed for each drug. The standard spectrum of all drugs forms an infusion database. For drugs that need to be identified, a Raman spectrum needs to be detected, and then the artificial intelligence method is used to compare and identify the database, and the drug is qualitatively identified, which takes only a few seconds.

[0091] Another aspect of the present invention relates to an intelligent drug infusion identification system based on Raman spectroscopy technology, comprising a data preprocessing module, a classification model building module and a drug infusion identification module, wherein the data preprocessing module is used to use Raman spectroscopy technology for detection and collect original spectra of drug infusion under different detection conditions; preprocess the original spectra and combine multiple preprocessed original spectra to form a standardized spectra; establish a classification model module, which is used to perform stratified random sampling of the standardized spectra in a ratio of 1:1, and use the two parts of the sampled standardized spectra for training and verification of the drug infusion identification model; in the training stage, the standardized spectra are input into a convolutional neural network to guide it to output the drug label corresponding to the standardized spectrum; then the spectral features of the extracted standardized spectrum are input into a linear classifier based on a multi-layer perceptron, and the linear classifier outputs the final classification result; the drug infusion identification module is used to input the preprocessed drug infusion to be identified into the drug infusion identification model, and then take out the drug label with the highest prediction probability of the drug infusion identification model as the final judgment result.

[0092] In order to improve the data quality and highlight the characteristic information of each spectrum, the data preprocessing module normalizes, removes the baseline and preprocesses the original spectrum by extracting the interval (209.45-3367.53).

[0093] The classification model module is established by stratified random sampling of data in a 1:1 ratio. The two parts of the sampled data are used for model training and verification respectively. In the training stage, the preprocessed Raman spectrum is input into the convolutional neural network to guide it to output the drug label corresponding to the spectrum. After that, the extracted spectral features are input into a linear classifier based on a multi-layer perceptron, which outputs the final classification result (Y).

[0094] In actual use, the Raman spectrum to be identified is pre-processed and input into the drug infusion identification model. The drug infusion identification module will predict the drug label with the highest probability as the final judgment result. After testing, the drug infusion identification model can complete the identification within a few seconds and achieve an identification accuracy rate of more than 99%.

[0095] Further, see Figure 1 and Figure 2 In the intelligent drug infusion identification system based on Raman spectroscopy technology provided in this embodiment, in the data preprocessing module, the original spectrum is normalized, baseline removed, and interval intercepted. The normalization formula is:

[0096]

[0097] In formula (7), x represents the spectral intensity corresponding to each Raman shift point, x min and x maxRepresent the minimum and maximum values ​​of all data points respectively;

[0098] The baseline removal algorithm uses iterative adaptive weighted penalty least squares method, which is expressed as:

[0099]

[0100] In formula (8), Q t is the optimization goal of the algorithm; is a weighted squared error term used to measure the observed value x i Compared with the baseline estimate The difference between is a weighting factor that can be updated in each iteration. Typically, this is used to perform a baseline correction or correction on each observation. is a smoothing term used to ensure that the baseline estimate λ is the weight of the smoothing term, which controls the degree of smoothing. Usually, this part is used to maintain the continuity between baseline estimates and avoid mutations.

[0101] Preferably, see Figure 1 and Figure 2 In the intelligent drug infusion identification system based on Raman spectroscopy technology provided in this embodiment, in the classification model module, the convolutional neural network includes two parts: feature extraction and result prediction. The feature extraction part aims to capture the specific spectral information of different drugs using convolution operation. The process can be expressed as:

[0102]

[0103] In formula (9), Z i,n is the i-th feature of the n-th output channel, C in is the input channel of the convolution operation, W m,n represents the mth convolution kernel of the nth output channel, R i is the ith computational region, represents the spectral pixel of the ith calculation area of ​​the mth input channel, and * is the cross-correlation operator.

[0104] Preferably, see Figure 1 and Figure 2 In the intelligent drug infusion identification system based on Raman spectroscopy technology provided in this embodiment, in the classification model module, the process of the linear classifier outputting the final classification result is expressed as follows:

[0105] Y=softmax(WX+B) (10)

[0106] In formula (10), Y is the final classification result output by the linear classifier; X is the input spectral feature, W is the weight of the classifier, B represents the bias of the classifier, and the softmax function maps the linearly transformed features to a probability space with a value range of [0,1].

[0107] The specific expression of the softmax function is as follows:

[0108]

[0109] In formula (11), y i represents the prediction result of the i-th category, represents the natural logarithmic exponent of xi, and j represents any category. All j feature categories in the training samples were counted. In order to make the model's prediction results as close as possible to the actual drug labels, cross entropy was used as the loss function to optimize the parameters in the model.

[0110] Preferably, see Figure 1 and Figure 2 In the intelligent drug infusion identification system based on Raman spectroscopy technology provided in this embodiment, in the classification model module, cross entropy is used as a loss function to optimize the parameters in the drug infusion identification model. The specific calculation formula of cross entropy is as follows:

[0111] H(p,q)=-∑ x p(x)logq(x) (12)

[0112] In formula (12), H(p,q) represents the cross entropy, p(x) is the actual drug label, and q(x) is the label predicted by the model.

[0113] The following is a specific example of a method and system for intelligent identification of drug infusion based on Raman spectroscopy technology provided by the present application:

[0114] Example 1

[0115] The experiment of the present invention was conducted on a self-made drug recognition data set, which contains 13016 Raman spectra and 68 drug categories. The ratio of the training set to the test set is 1:1. First, the spectra are baseline- and noise-free, and the spectra are normalized. The spectra of various drugs are obtained as follows: Figure 2 As shown. Subsequently, a convolutional neural network with a convolution kernel size of 5 and a depth of 12 layers was used and trained on a V100 server for 100 rounds based on the Adam optimizer. The batch size was set to 64 and the initial learning rate was set to 0.002. During the test, the inference stage was tested on the computer CPU. The accuracy of judging the type of drug based on the Raman spectrum of the drug was 99%. The classification effect of each drug is detailed in Table 1.

[0116] Table 1 Details of modeled drugs and classification effects

[0117]

[0118]

[0119]

[0120]

[0121] Example 2

[0122] The experiment of the present invention was conducted on a self-made drug identification data set, which contains 13016 Raman spectra, including 85 drugs and their origins. The ratio of training set to test set is 1:1. First, the spectrum was baselined and noised, and the spectrum was normalized. Subsequently, we used a convolutional neural network with a convolution kernel size of 5 and a depth of 12 layers and trained 200 rounds on a V100 server based on the Adam optimizer. The batch size was set to 64 and the initial learning rate was set to 0.002. During the test, the inference stage was tested on the computer CPU. Finally, the accuracy of judging the origin of the drug based on the Raman spectrum of the drug was 99%. The detailed classification effect of each drug and origin is shown in Table 2.

[0123] Table 2 Details of modeled drugs, origins and classification effects

[0124]

[0125]

[0126]

[0127] The present embodiment provides a method and system for intelligent identification of drug infusion based on Raman spectroscopy technology. Compared with the prior art, data preprocessing is adopted: Raman spectroscopy technology is used for detection to collect original spectra of drug infusion under different detection conditions; the original spectra are preprocessed, and a plurality of preprocessed original spectra are combined to form a standardized spectra; a classification model is established: the standardized spectra are stratified and randomly sampled in a ratio of 1:1, and the two parts of the sampled standardized spectra are used for training and verification of the drug infusion identification model; in the training stage, the standardized spectra are input into the convolutional neural network to guide it to output the drug label corresponding to the standardized spectrum; then the spectral features of the extracted standardized spectrum are input into a linear classifier based on a multi-layer perceptron, and the linear classifier outputs the final classification result; identification of drug infusion: the drug infusion to be identified is preprocessed and input into the drug infusion identification model, and then the drug label with the highest prediction probability of the drug infusion identification model is taken out as the final judgment result. The method and system for intelligent identification of drug infusion based on Raman spectroscopy provided in this embodiment use Raman spectroscopy to collect as much spectrum data as possible for a single sample, select a suitable method to preprocess the original spectrum data, reduce the interference of instrument noise or natural light, obtain the real data of the drug, and then use artificial intelligence technology to process all the spectra of a certain drug to form a standard spectrum; integrate and apply artificial intelligence technology with the Raman spectroscopy database to improve the efficiency and accuracy of matching, and the beneficial effects achieved are as follows:

[0128] 1. It can identify completely unknown drugs and infusions that have no obvious appearance features. With the optimization of the algorithm, the concentration of the drug can be calculated, which not only completes the qualitative and quantitative analysis of the infusion, but also ensures the correct type and dosage of clinical drugs. 2. All infusions prepared by the intravenous medication preparation center can be tested, and each drug can be scientifically quality-checked before being delivered to the ward, eliminating human errors and eliminating the need for a large number of staff for manual identification, saving labor costs.

[0129] 3. When a drug mismatch occurs, it can accurately identify which bottle is at fault and what the error is, rather than scrapping the batch of questionable infusions. This reduces economic losses, greatly reduces the risk of medication errors for patients, and reduces the occurrence of medical accidents caused by mis-prescription.

[0130] 4. When using drugs clinically, if the label falls off or the patient questions the infusion, this technology can be used for retrospective proof to reduce medical disputes and losses.

[0131] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for intelligent identification of drug infusion based on Raman spectroscopy technology, characterized in that: The following steps are involved: Data preprocessing: Use Raman spectroscopy technology to detect and collect original spectra of drug infusion under different detection conditions; preprocess the original spectra and combine multiple preprocessed original spectra to form a standardized spectrum; Establishing a classification model: performing stratified random sampling on the standardized spectrum in a ratio of 1:1, and using the two parts of the standardized spectrum obtained by sampling for training and verification of the drug infusion recognition model; in the training stage, inputting the standardized spectrum into a convolutional neural network to guide it to output the drug label corresponding to the standardized spectrum; then inputting the extracted spectral features of the standardized spectrum into a linear classifier based on a multi-layer perceptron, and the linear classifier outputs the final classification result; Identify drug infusion: pre-process the drug infusion to be identified and input it into the drug infusion identification model, and then take out the drug label with the highest prediction probability of the drug infusion identification model as the final judgment result.

2. The method for intelligent identification of drug infusion based on Raman spectroscopy technology according to claim 1, characterized in that: In the step of data preprocessing, the original spectrum is normalized, baseline removed and interval truncated, and the normalization formula is: Where x represents the spectral intensity corresponding to each Raman shift point, x min and x max Represent the minimum and maximum values ​​of all data points respectively; The baseline removal algorithm uses iterative adaptive weighted penalty least squares method, which is expressed as: Among them, Q t is the optimization goal of the algorithm; is a weighted squared error term used to measure the observed value x i Compared with the baseline estimate The difference between is the coefficient used for weighting; is a smoothing term used to ensure that the baseline estimate The smoothness between ; λ is the weight of the smoothness term.

3. The method for intelligent identification of drug infusion based on Raman spectroscopy technology according to claim 2, characterized in that: In the step of establishing the classification model, the convolutional neural network includes two parts: feature extraction and result prediction. The feature extraction part aims to capture the specific spectral information of different drugs using convolution operations. The process can be expressed as: Among them, Z i,n is the i-th feature of the n-th output channel, C in is the input channel of the convolution operation, W m,n represents the mth convolution kernel of the nth output channel, R i is the ith computational area, X Ri,m represents the spectral pixel of the ith calculation area of ​​the mth input channel, and * is the cross-correlation operator.

4. The method for intelligent identification of drug infusion based on Raman spectroscopy technology according to claim 3, characterized in that: In the step of establishing the classification model, the process of the linear classifier outputting the final classification result is expressed as: Y = softmax(WX+B) Among them, Y is the final classification result output by the linear classifier; X is the input spectral feature, W is the weight of the classifier, B represents the bias of the classifier, and the softmax function maps the linearly transformed features to a probability space with a value range of [0,1]; The specific expression of the softmax function is as follows: Among them, y i represents the prediction result of the i-th category, represents the natural logarithmic exponent of xi, and j represents any category.

5. The method for intelligent identification of drug infusion based on Raman spectroscopy technology according to claim 4, characterized in that: In the step of establishing the classification model, cross entropy is used as a loss function to optimize the parameters in the drug infusion recognition model. The specific calculation formula of cross entropy is as follows: Among them, H(p,q) represents the cross entropy, p(x) is the actual drug label, and q(x) is the label predicted by the model.

6. A drug infusion intelligent identification system based on Raman spectroscopy technology, characterized in that: include: A data preprocessing module is used to detect using Raman spectroscopy technology and collect original spectra of drug infusion under different detection conditions; preprocess the original spectra and combine multiple preprocessed original spectra to form a standardized spectrum; A classification model module is established to perform stratified random sampling of the standardized spectrum in a ratio of 1:1, and the two parts of the standardized spectrum obtained by sampling are used for training and verification of the drug infusion recognition model; in the training stage, the standardized spectrum is input into a convolutional neural network to guide it to output the drug label corresponding to the standardized spectrum; then the spectral features of the extracted standardized spectrum are input into a linear classifier based on a multi-layer perceptron, and the linear classifier outputs the final classification result; The drug infusion identification module is used to input the drug infusion to be identified into the drug infusion identification model after pre-processing, and then take out the drug label with the highest prediction probability of the drug infusion identification model as the final judgment result.

7. The intelligent drug infusion identification system based on Raman spectroscopy technology according to claim 6, characterized in that: In the data preprocessing module, the original spectrum is normalized, baseline removed, and intervals are preprocessed. The normalization formula is: Where x represents the spectral intensity corresponding to each Raman shift point, x min and x max Represent the minimum and maximum values ​​of all data points respectively; The baseline removal algorithm uses iterative adaptive weighted penalty least squares method, which is expressed as: Among them, Q t is the optimization goal of the algorithm; is a weighted squared error term used to measure the observed value x i Compared with the baseline estimate The difference between is the coefficient used for weighting; is a smoothing term used to ensure that the baseline estimate The smoothness between ; λ is the weight of the smoothness term.

8. The drug infusion intelligent identification system based on Raman spectroscopy technology as claimed in claim 7, characterized in that: In the module for establishing the classification model, the convolutional neural network includes two parts: feature extraction and result prediction. The feature extraction part aims to capture the specific spectral information of different drugs using convolution operations. The process can be expressed as: Among them, Z i,n is the i-th feature of the n-th output channel, C in is the input channel of the convolution operation, W m,n represents the mth convolution kernel of the nth output channel, R i is the ith computational area, X Ri,m represents the spectral pixel of the ith calculation area of ​​the mth input channel, and ★ is the cross-correlation operator.

9. The drug infusion intelligent identification system based on Raman spectroscopy technology as claimed in claim 8, characterized in that: In the classification model building module, the process of the linear classifier outputting the final classification result is expressed as: Y = softmax(WX+B) Among them, Y is the final classification result output by the linear classifier; X is the input spectral feature, W is the weight of the classifier, B represents the bias of the classifier, and the softmax function maps the linearly transformed features to a probability space with a value range of [0,1]; The specific expression of the softmax function is as follows: Among them, y i represents the prediction result of the i-th category, represents the natural logarithmic exponent of xi, and j represents any category.

10. The drug infusion intelligent identification system based on Raman spectroscopy technology according to claim 9, characterized in that: In the classification model building module, cross entropy is used as a loss function to optimize the parameters in the drug infusion recognition model. The specific calculation formula of cross entropy is as follows: Among them, H(p,q) represents the cross entropy, p(x) is the actual drug label, and q(x) is the label predicted by the model.

Citation Information

Cited By

  • TDLAS intravenous medication concentration prediction method based on one-dimensional convolutional neural network

    CN119479986A