Out-of-hospital patient pharmacy monitoring system and method based on smart cloud platform

By developing an out-of-hospital patient pharmacy monitoring system on the smart cloud platform, combining physiological, drug use and motor data, and using decision trees and deep neural networks for health assessment and drug use analysis, the shortcomings of the existing system in capturing multi-dimensional features and providing personalized suggestions are solved, and efficient, accurate and intelligent pharmacy monitoring effects are achieved.

CN119626531APending Publication Date: 2025-03-14THE 971ST HOSPITAL OF THE CHINESE PEOPLES LIBERATION ARMY NAVY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411569238.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing pharmaceutical monitoring system is difficult to capture the multi-dimensional characteristics of patients in a comprehensive and accurate manner, resulting in low monitoring accuracy and difficulty in providing personalized medication advice and health management plans.

Method used

The out-of-hospital patient pharmacy monitoring system is adopted based on the smart cloud platform. Through the data acquisition module, data preprocessing module, health assessment module and comprehensive management module, combined with physiological data, drug compliance data and exercise data, the decision tree model and deep neural network are used to predict health status and analyze medication methods.

Benefits of technology

It has achieved efficient and intelligent monitoring and management of comprehensive drug use behaviors for patients outside the hospital, improved the accuracy of drug compliance data and the accuracy of health status assessment, reduced the risk of misuse of drugs, and provided real-time health status feedback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119626531A_ABST
    Figure CN119626531A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligence, and discloses an out-of-hospital patient pharmacy monitoring system and method based on a smart cloud platform. Comprising the following steps: collecting comprehensive medication behavior data of out-of-hospital patients; preprocessing the comprehensive medication behavior data to obtain a preliminary medication behavior data set; based on the preliminary medication behavior data set, predicting the health condition of the patient by using a decision tree model; the comprehensive medication behavior data of the patient is controlled and collected to the health condition of the patient, and the comprehensive medication behavior data and the health condition data of the patient are uploaded to the cloud platform terminal, so that the medication compliance of the patient and the accuracy of the health condition are effectively improved, and by intelligently analyzing the comprehensive medication behavior data and the health condition of the patient, the medication compliance of the patient is improved. Personalized pharmaceutical monitoring service can be provided for the patient outside the hospital, and the health state of the patient is monitored in real time and fed back to medical staff and the patient in time.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present invention relates to the field of intelligent technology, and in particular to a pharmaceutical monitoring system and method for outpatient patients based on a smart cloud platform. Background Art

[0002] The patent application with the publication number CN111210890A discloses an anticoagulant pharmaceutical monitoring management method based on clinical data, comprising the following steps: step 1, realizing clinical data collection and processing; step 2, realizing monitoring patient enrollment assessment; step 3, realizing active monitoring and real-time early warning; the present invention can automatically include patients who need anticoagulant pharmaceutical monitoring into pharmaceutical monitoring, and perform automated and intelligent active monitoring and real-time early warning on these monitored patients according to the monitoring early warning model.

[0003] The patent with application publication number CN116779097A discloses a clinical pharmacy monitoring management system and a monitoring management method thereof, the system includes an information acquisition module, a pharmacy service list generation and recording module, a medication problem analysis module, a medication suggestion and feedback module and a pharmacy service recording module; wherein the medication problem classification unit of the medication problem analysis module includes multiple primary classification aspects, namely, severity grading of drug-related problems, prescription problems of drug-related problems, sources of drug-related problems, intervention plans for drug-related problems, acceptance of intervention plans for drug-related problems and status review of drug-related problems.

[0004] However, the existing monitoring systems still have many shortcomings. First, it is difficult for traditional systems to capture transaction patterns comprehensively and accurately. They often only focus on a single dimension and ignore the comprehensive analysis of multi-dimensional features, resulting in low accuracy of the monitoring system. Secondly, due to the limited ability of traditional systems in processing complex data and intelligent analysis, it is difficult to fully integrate patient data and provide patients with personalized medication recommendations and health management plans based on their personal circumstances.

[0005] In view of this, the present invention proposes an out-of-hospital patient pharmaceutical monitoring system and method based on a smart cloud platform to solve the above problems. Summary of the invention

[0006] In order to overcome the above-mentioned defects of the prior art and to achieve the above-mentioned purpose, the present invention provides the following technical solutions: a pharmaceutical monitoring system for outpatient patients based on a smart cloud platform, comprising: a data collection module: used to collect comprehensive medication behavior data of outpatient patients;

[0007] Data preprocessing module: used to preprocess the comprehensive medication behavior data to obtain a preliminary medication behavior data set;

[0008] Health assessment module: Based on the preliminary medication behavior data set, the decision tree model is used to predict the patient's health status;

[0009] Comprehensive management module: includes a control unit and a terminal transmission unit, wherein the control unit is used to control the collection of comprehensive medication behavior data of out-of-hospital patients to the patient's health status, and the terminal transmission unit is used to upload the comprehensive medication behavior data and the patient's health status data to the cloud platform terminal; each module is connected by wired and / or wireless means.

[0010] Furthermore, the comprehensive medication behavior data includes patient physiological data, medication compliance data, and exercise data;

[0011] The physiological data include blood pressure, blood sugar, body temperature and blood oxygen saturation data;

[0012] The medication compliance data includes medication indicators and medication method data;

[0013] The exercise data includes exercise time, exercise intensity and heart rate data;

[0014] Blood pressure, blood sugar, body temperature, blood oxygen saturation, exercise time, exercise intensity and heart rate data are obtained through the smart watch worn by the patient.

[0015] Furthermore, the method for obtaining the medication compliance data includes:

[0016] Medication compliance data includes medication indicators and medication methods. Medication indicators and medication methods are combined into an input feature vector X, which is input into the improved K clustering algorithm to obtain medication compliance data.

[0017] Furthermore, the method for obtaining the medication index includes:

[0018] Medication indicators include medication time, medication frequency and medication dosage. A pressure sensor is built into the smart medicine box to record the specific time of each opening of the medicine box, or the patient manually records the specific time of medication through a mobile phone application. The medication frequency is calculated based on the number of times the medicine box is opened and closed. The smart medicine box controls the medication dosage by the amount of medicine in each medicine slot.

[0019] Furthermore, the method of obtaining the medication includes:

[0020] The camera on the smart medicine box is used to collect the hand video stream of the patient when taking medicine in real time. The frame rate of the video stream is f fps , duration is T seconds, total number of frames is N f =f fps*T, process the collected video frames, adjust the image size, set the image size, normalize the pixel values ​​to the range of 0-1, rotate and flip the image for data enhancement, input each frame of the preprocessed image into the convolutional neural network model, the convolutional neural network model analyzes the input image and detects the key points, and outputs the coordinates of the key points (x a (t), y a (t)), where t is the index of the frame, t = 1, 2, ..., N f , a is the index of the key point, a = 1, 2, ..., n, n is the number of key points, where the key points include the base, middle and tip of the fingers, the center of the palm and both sides of the wrist;

[0021] The method of rotating and flipping the image for data enhancement is as follows: first, use the image processing library to load the original image and define the rotation angle. By calculating the rotation matrix, rotate around the center of the image to generate a new image. Secondly, select the flip direction and use the corresponding flip function to flip the image horizontally or vertically.

[0022] Based on the key point coordinates in each frame of the image, the finger extension data, grasping action data and palm angle change data are calculated. The finger extension angle is calculated through the three key points of the finger, namely the root, middle and tip of the finger, and the angle between each segment of the finger is calculated. The angle formula from the root to the middle is: B1(t)=atan2(y m (t)-y e (t), x m (t)-x e (t)); where e is the key point at the base of the finger, and m is the key point in the middle of the finger; the angle calculation formula from the middle to the tip is: B2(t) = atan2(y j (t)-y m (t), x j (t)-x m (t)); where j is the key point of the finger tip, the overall finger extension angle is calculated by the angle from the base to the middle and the angle from the middle to the tip, the formula is: B(t) = B1(t) + B2(t);

[0023] The grasping action is calculated by the curvature of the finger, and the formula is: Bgra(t) = atan2(ym(t)-y e (t), x m (t)-x e (t)), when the angle becomes smaller, it means that the finger is bending to perform the grasping action;

[0024] The palm angle change is calculated by the coordinate difference between the palm center and the wrist reference point. The coordinate of the palm center is obtained by the convolutional neural network model output. The wrist reference coordinate (x b (t), y b (t)) is calculated by the average value of the key points on both sides of the wrist. The calculation formula for the change in palm angle is: p =atan2(y p (t)-y b (t), x p (t)-x b (t)), where x p (t) and y p (t) are the horizontal and vertical coordinates of the palm respectively;

[0025] After extracting features in the convolutional layer, the object detection algorithm SSD is used to generate multiple candidate regions of different scales at different feature layers. In each candidate region, the network generates a corresponding bounding box position b according to its features. a and Drug C a , remove overlapping bounding boxes, use non-maximum suppression to retain the bounding boxes with the highest confidence and delete low-confidence and duplicate boxes, output the bounding boxes of the labeled drugs and their categories, and convert the drug categories into numerical types through one-hot encoding;

[0026] The finger extension data, grasping action data, palm angle change data, object category and bounding box position data are processed and trained using a deep neural network to obtain the medication method.

[0027] Furthermore, the deep neural network training method includes:

[0028] The finger extension data, grasping action data, palm angle change data, and object category bounding box position data are fused, and the attention mechanism is used for weight allocation. The formula is: where α c represents the weight of the cth feature, W c represents the cth feature F c The learnable weight parameters, the values ​​learned through model training, F c represents the cth feature vector, N is the total number of features, and d represents the index used for all features, ranging from 1 to N;

[0029] By the attention weight α c Weight different features to generate fused features F f , the formula is: The fused feature F f Input into the deep neural network for classification, first the fused feature Ff Input to the first fully connected layer for linear transformation, the formula is: z1 = W1*F f +b1, where z1 is the output of the first fully connected layer, which is the result of linear transformation, W1 is the learnable weight matrix of the first layer, b1 is the bias term of the first layer, and the result of linear transformation is processed by the nonlinear activation function Sigmoid to enhance the nonlinear ability of the model. The formula is d1=Sigmoid(z1), where d1 refers to the output after Sigmoid activation function processing, which represents the result of the first fully connected layer after nonlinear transformation. The above operation is repeated in multiple fully connected layers, and the features processed by multiple fully connected layers are input to the Softmax layer. Softmax converts the output value of the network into a probability distribution, which is used to represent the predicted probability of each medication method. The formula is: Among them, z g is the activation value of category g, G is the total number of categories, G = 3, oral, injectable and topical, h is the hth category, h = 1, 2, 3, p(Y = g | F f ) represents the probability of category g. The model outputs the predicted probability of oral, injection and topical use for each category, and the category with the highest predicted probability is selected as the medication method. The dosage is indicated by numbers: 1 for oral administration, 2 for injection, and 3 for external use.

[0030] Furthermore, the improved K clustering algorithm includes:

[0031] Determine the K value, determine the K value range based on the empirical method, and randomly select the K value within the range. Use the K clustering algorithm to divide the data set into K different clusters. For each sample, calculate its average distance m with other samples in the same cluster, calculate its average distance m′ with the samples in the nearest neighbor cluster, and then calculate the silhouette coefficient R of each sample. The formula is: Select the K value with the highest silhouette coefficient as the determined K value; initialize the cluster center, randomly select a sample in the data set as the first cluster center, and for each unselected sample, calculate the distance between it and the nearest cluster center that has been selected, and select the next cluster center by probability weighting. Repeat the operation until K cluster centers are selected;

[0032] Introducing sample weights, giving lower weights to samples that meet medication specifications and higher weights to samples that do not meet medication specifications;

[0033] When calculating the weighted distance, the weighted Euclidean distance is used to calculate the difference between samples. For each sample, the difference on each feature is first calculated, and the square of the difference is then calculated with the weight of the feature. The weighted distance between samples is calculated by summing all the features.

[0034] During the clustering iteration process, each sample is assigned to the cluster center closest to it according to the current cluster center, and the weighted average of each cluster center is recalculated. This process will continue until the cluster centers converge or the set number of iterations is reached; the medication compliance data is output.

[0035] Furthermore, the preprocessing method of the comprehensive medication behavior data includes:

[0036] Remove outliers and missing values ​​in the comprehensive medication behavior data, and unify the comprehensive medication behavior data from different sources to the same timestamp; normalize the physiological data and motion data in the comprehensive medication behavior data, and form a preliminary medication behavior data set with the medication compliance data.

[0037] Furthermore, the method of using the decision tree model to predict the patient's health status includes:

[0038] The preliminary medication behavior data set is input into the decision tree model, and the data set is divided using information gain. Entropy calculation is performed first, and the formula is: Among them, S is the data set, pi is the proportion of samples belonging to category i in the data set, and n is the number of categories; after being divided by feature A, the data set will be divided into several subsets, and the entropy of each subset represents the purity and uncertainty under the condition of feature A. Among them, v∈A represents each value of feature A, S v represents a subset divided by a certain value v of feature A, |S v | is a subset S v is the total number of samples, |S| is the total number of samples in the entire data set, H(S v ) is a subset S v entropy; calculate information gain, the formula is: IG(S, A) = H(S)-H(S|A), where IG(S, A) is the information gain of feature A, H(S) is the entropy of the unpartitioned data set, and H(S|A) is the weighted conditional entropy after partitioning using feature A; calculate the information gain of all features, select the feature with the largest information gain for partitioning until the termination condition is reached, and after the tree is completed, prune the subtrees that do not significantly improve the overall prediction of the model based on the performance on the validation set.

[0039] A pharmaceutical monitoring method for outpatient patients based on a smart cloud platform is implemented by a pharmaceutical monitoring system for outpatient patients based on a smart cloud platform, comprising: S1, collecting comprehensive medication behavior data of outpatient patients;

[0040] S2, preprocessing the comprehensive medication behavior data to obtain a preliminary medication behavior data set;

[0041] S3. Based on the preliminary medication behavior data set, the decision tree model is used to predict the patient's health status;

[0042] S4. Control the collection of comprehensive medication behavior data of patients to the patient's health status data, and upload the comprehensive medication behavior data and patient health status data to the cloud platform terminal.

[0043] The technical effects and advantages of the pharmaceutical monitoring system and method for outpatient patients based on the smart cloud platform of the present invention are as follows:

[0044] The present invention can realize efficient and intelligent monitoring and management of the comprehensive medication behavior of outpatient patients, combine physiological data, medication compliance data and motion data, eliminate outliers and missing values ​​through data preprocessing and fusion technology, and unify them under the same time dimension for processing; through the improved K clustering algorithm and deep neural network, the accuracy of medication compliance data is improved, and the recognition and analysis of medication methods are optimized by using the weighted features of the attention mechanism; the decision tree model is combined to predict health status, which effectively improves the accuracy of patient health assessment; the patient's medication behavior can be monitored throughout the process, the risk of misuse of medication can be reduced, and real-time health status feedback can be provided, with the technical advantages of high efficiency, accuracy and intelligence. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 This is a schematic diagram of an out-of-hospital patient pharmaceutical monitoring system based on a smart cloud platform according to the present invention;

[0046] Figure 2 This is a schematic diagram of a pharmaceutical monitoring method for outpatient patients based on a smart cloud platform according to the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] Example 1

[0049] See also Figure 1 As shown, the pharmaceutical monitoring system for outpatient patients based on the smart cloud platform described in this embodiment includes: a data collection module: used to collect comprehensive medication behavior data of outpatient patients;

[0050] Data preprocessing module: used to preprocess the comprehensive medication behavior data to obtain a preliminary medication behavior data set;

[0051] Health assessment module: Based on the preliminary medication behavior data set, the decision tree model is used to predict the patient's health status data;

[0052] Comprehensive management module: includes a control unit and a terminal transmission unit, wherein the control unit is used to control the collection of comprehensive medication behavior data of out-of-hospital patients to optimal medication behavior parameters, and the terminal transmission unit is used to upload the comprehensive medication behavior data and optimal medication behavior parameters to the remote medical monitoring terminal; each module is connected by wired and / or wireless means.

[0053] Comprehensive medication behavior data includes patient physiological data, medication compliance data, and exercise data;

[0054] Physiological data include blood pressure, blood sugar, body temperature and blood oxygen saturation data;

[0055] Medication adherence data include medication indicators and medication mode data;

[0056] Exercise data includes exercise time, exercise intensity and heart rate data;

[0057] Blood pressure, blood sugar, body temperature, blood oxygen saturation, exercise time, exercise intensity and heart rate data are obtained through the smart watch worn by the patient.

[0058] Medication adherence data can be obtained by:

[0059] Medication compliance data includes medication indicators and medication methods. Medication indicators and medication methods are combined into an input feature vector X, which is input into the improved K clustering algorithm to obtain medication compliance data.

[0060] The methods for obtaining medication indicators include:

[0061] Medication indicators include medication time, medication frequency and medication dosage. A pressure sensor is built into the smart medicine box to record the specific time of each opening of the medicine box, or the patient manually records the specific time of medication through a mobile phone application. The medication frequency is calculated based on the number of times the medicine box is opened and closed. The smart medicine box controls the medication dosage by the amount of medicine in each medicine slot.

[0062] The ways to obtain medication include:

[0063] The camera on the smart medicine box is used to collect the hand video stream of the patient when taking medicine in real time. The frame rate of the video stream is f fps , duration is T seconds, total number of frames is N f =f fps*T, process the collected video frames, adjust the image size, set the image size, normalize the pixel values ​​to the range of 0-1, rotate and flip the image for data enhancement, input each frame of the preprocessed image into the convolutional neural network model, the convolutional neural network model analyzes the input image and detects the key points, and outputs the coordinates of the key points (x a (t), y a (t)), where t is the index of the frame, t = 1, 2, ..., N f , a is the index of the key point, a = 1, 2, ..., n, n is the number of key points, where the key points include the base, middle and tip of the fingers, the center of the palm and both sides of the wrist;

[0064] The method of rotating and flipping the image for data enhancement is as follows: first, use the image processing library to load the original image and define the rotation angle. By calculating the rotation matrix, rotate around the center of the image to generate a new image. Secondly, select the flip direction and use the corresponding flip function to flip the image horizontally or vertically.

[0065] Based on the key point coordinates in each frame of the image, the finger extension data, grasping action data and palm angle change data are calculated. The finger extension angle is calculated through the three key points of the finger, namely the root, middle and tip of the finger, and the angle between each segment of the finger is calculated. The angle formula from the root to the middle is: B1(t)=atan2(y m (t)-y e (t), X m (t)-x e (t)); where e is the key point at the base of the finger, and m is the key point in the middle of the finger; the angle calculation formula from the middle to the tip is: B2(t) = atan2(y j (t)-y m (t), x j (t)-x m (t)); where j is the key point of the finger tip, the overall finger extension angle is calculated by the angle from the base to the middle and the angle from the middle to the tip, the formula is: B(t) = B1(t) + B2(t);

[0066] The grasping action is calculated by the curvature of the finger, and the formula is: Bgra(t) = atan2(ym(t)-y e (t), x m (t)-x e (t)), when the angle becomes smaller, it means that the finger is bending to perform the grasping action;

[0067] The palm angle change is calculated by the coordinate difference between the palm center and the wrist reference point. The coordinate of the palm center is obtained by the convolutional neural network model output. The wrist reference coordinate (x b (t), y b (t)) is calculated by the average value of the key points on both sides of the wrist. The calculation formula for the change in palm angle is: p =atan2(y p (t)-y b (t), x p (t)-x b (t)), where x p (t) and y p (t) are the horizontal and vertical coordinates of the palm respectively.

[0068] The object detection algorithm SSD is used to identify the drug category and its bounding box in the patient's hand. After extracting features in the convolution layer, the object detection algorithm SSD is used to generate multiple candidate regions of different scales in different feature layers. In each candidate region, the network will generate the corresponding bounding box position b according to its features. a and Drug C a , remove overlapping bounding boxes, use non-maximum suppression to retain the bounding boxes with the highest confidence and delete low-confidence and duplicate boxes, output the bounding boxes of the labeled drugs and their categories, and convert the drug categories into numerical types through one-hot encoding;

[0069] The finger extension data, grasping action data, palm angle change data, object category and bounding box position data are processed and trained using a deep neural network to obtain the medication method.

[0070] Methods of training using deep neural networks include:

[0071] The finger extension data, grasping action data, palm angle change data, and object category bounding box position data are fused, and the attention mechanism is used for weight allocation. The formula is: where α c represents the weight of the cth feature, W c represents the cth feature F c The learnable weight parameters, the values ​​learned through model training, F c represents the cth feature vector, N is the total number of features, and d represents the index used for all features, ranging from 1 to N;

[0072] By the attention weight α c Weight different features to generate fused features F f , the formula is: The fused feature F fInput into the deep neural network for classification, first the fused feature F f Input to the first fully connected layer for linear transformation, the formula is: z1 = W1*F f +b1, where z1 is the output of the first fully connected layer, which is the result of linear transformation, W1 is the learnable weight matrix of the first layer, b1 is the bias term of the first layer, and the result of linear transformation is processed by the nonlinear activation function Sigmoid to enhance the nonlinear ability of the model. The formula is d1=Sigmoid(z1), where d1 refers to the output after Sigmoid activation function processing, which represents the result of the first fully connected layer after nonlinear transformation. The above operation is repeated in multiple fully connected layers, and the features processed by multiple fully connected layers are input to the Softmax layer. Softmax converts the output value of the network into a probability distribution, which is used to represent the predicted probability of each medication method. The formula is: Among them, z g is the activation value of category g, G is the total number of categories, G = 3, oral, injectable and topical, h is the hth category, h = 1, 2, 3, p(Y = g | F f ) represents the probability of category g. The model outputs the predicted probability of oral, injection and topical use for each category, and the category with the highest predicted probability is selected as the medication method. The dosage is indicated by numbers: 1 for oral administration, 2 for injection, and 3 for external use.

[0073] In the calculation of each layer, the output is usually input through the activation value of the previous layer. In the second fully connected layer, d1 is used as input instead of z1.

[0074] The medication time is converted into numerical value using the time difference calculation method and normalized. Then the medication time B, medication frequency H, medication dosage T and medication method are calculated. Composed of input feature vector X = Input into the improved K clustering algorithm to obtain medication compliance data;

[0075] The method to convert medication time into numerical type is to regard 24 hours a day as 1440 minutes. Medication time can be expressed by converting hours and minutes into the total number of minutes in a day. For example, if the medication time is 11:50, 11 hours are converted to 660 minutes, and then added to the minutes to get the total time 660+50=710, so 11:50 is converted to 710. In order to avoid excessive differences in the feature range, it is normalized to 710 / 1440=0.493.

[0076] The improved K clustering algorithm includes:

[0077] Determine the K value, determine the K value range based on the empirical method, and randomly select the K value within the range. Use the K clustering algorithm to divide the data set into K different clusters. For each sample, calculate its average distance m with other samples in the same cluster, calculate its average distance m′ with the samples in the nearest neighbor cluster, and then calculate the silhouette coefficient R of each sample. The formula is: Select the K value with the highest silhouette coefficient as the determined K value;

[0078] Initialize the cluster center, randomly select a sample in the data set as the first cluster center, calculate the distance between each unselected sample and the nearest selected cluster center, select the next cluster center by probability weighting, and repeat the operation until K cluster centers are selected;

[0079] Introduce sample weights, assign lower weights to samples that meet medication standards, and assign higher weights to samples that do not meet medication standards. Whether medication is standardized is determined based on historical medication time, medication frequency, medication dosage, and medication method.

[0080] When calculating the weighted distance, the weighted Euclidean distance is used to calculate the difference between samples. For each sample, the difference on each feature is first calculated, and the square of the difference is then calculated with the weight of the feature. The weighted distance between samples is calculated by summing all the features.

[0081] During the clustering iteration process, each sample is assigned to the cluster center closest to it according to the current cluster center, and the weighted average of each cluster center is recalculated. This process will continue until the cluster centers converge or the set number of iterations is reached; the medication compliance data is output.

[0082] The pre-processing methods of comprehensive medication behavior data include:

[0083] Remove outliers and missing values ​​in the comprehensive medication behavior data, and unify the comprehensive medication behavior data from different sources to the same timestamp; normalize the physiological data and motion data in the comprehensive medication behavior data, and form a preliminary medication behavior data set with the medication compliance data.

[0084] The decision tree model can be used to predict the patient's health status in the following ways:

[0085] The preliminary medication behavior data set is input into the decision tree model, and the data set is divided using information gain. Entropy calculation is performed first, and the formula is: Among them, S is the data set, p iis the proportion of samples belonging to category i in the data set, and n is the number of categories; after being divided using feature A, the data set will be divided into several subsets, and the entropy of each subset represents the purity and uncertainty under the condition of feature A. Among them, v∈A represents each value of feature A, S v represents a subset divided by a certain value v of feature A, |S v | is a subset S v is the total number of samples, |S| is the total number of samples in the entire data set, H(S v ) is a subset S v entropy; calculate information gain, the formula is: IG(S,A) = H(S)-H(S|A), where IG(S,A) is the information gain of feature A, H(S) is the entropy of the unpartitioned data set, and H(S|A) is the weighted conditional entropy after partitioning using feature A; calculate the information gain of all features, select the feature with the largest information gain for partitioning until the termination condition is reached, and after the tree is completed, prune the subtrees that do not significantly improve the overall prediction of the model based on the performance on the validation set.

[0086] This embodiment can realize efficient and intelligent monitoring and management of the comprehensive medication behavior of outpatient patients, combine physiological data, medication compliance data and motion data, eliminate outliers and missing values ​​through data preprocessing and fusion technology, and unify them under the same time dimension for processing; through the improved K clustering algorithm and deep neural network, the accuracy of medication compliance data is improved, and the recognition and analysis of medication methods are optimized by using the weighted features of the attention mechanism; the decision tree model is combined to predict health status, which effectively improves the accuracy of patient health assessment; the patient's medication behavior can be monitored throughout the process, the risk of misuse of medication can be reduced, and real-time health status feedback can be provided, with the technical advantages of high efficiency, accuracy and intelligence.

[0087] Example 2

[0088] See also Figure 2 As shown, the part not described in detail in this embodiment is described in Example 1, which provides a pharmaceutical monitoring method for outpatient patients based on a smart cloud platform, including:

[0089] S1. Collect comprehensive medication behavior data of outpatient patients;

[0090] S2, preprocessing the comprehensive medication behavior data to obtain a preliminary medication behavior data set;

[0091] S3. Based on the preliminary medication behavior data set, the decision tree model is used to predict the patient's health status;

[0092] S4. Control the collection of comprehensive medication behavior data of patients to the patient's health status data, and upload the comprehensive medication behavior data and patient health status data to the cloud platform terminal.

[0093] Example 3

[0094] The present embodiment discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the operation mode of the above-mentioned out-of-hospital patient pharmaceutical monitoring system and method based on the smart cloud platform is implemented.

[0095] Since the electronic device introduced in this embodiment is an electronic device used to implement an out-of-hospital patient pharmaceutical monitoring system and method based on a smart cloud platform in the embodiment of this application, based on the out-of-hospital patient pharmaceutical monitoring system and method based on a smart cloud platform introduced in the embodiment of this application, the technical personnel of this field can understand the specific implementation of the electronic device of this embodiment and its various variations, so how the electronic device implements the method in the embodiment of this application is not introduced in detail here. As long as the technical personnel of this field implement the electronic device used by the out-of-hospital patient pharmaceutical monitoring system and method based on a smart cloud platform in the embodiment of this application, it belongs to the scope of protection of this application.

[0096] 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 and thresholds in the formula are set by technicians in this field according to actual conditions.

[0097] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.

Claims

1. A pharmaceutical monitoring system for outpatient patients based on a smart cloud platform, characterized in that: include: Data collection module: used to collect comprehensive medication behavior data of outpatient patients; Data preprocessing module: used to preprocess the comprehensive medication behavior data to obtain a preliminary medication behavior data set; Health assessment module: Based on the preliminary medication behavior data set, the decision tree model is used to predict the patient's health status; Comprehensive management module: includes a control unit and a terminal transmission unit, wherein the control unit is used to control the collection of comprehensive medication behavior data of out-of-hospital patients to the patient's health status, and the terminal transmission unit is used to upload the comprehensive medication behavior data and the patient's health status data to the cloud platform terminal; each module is connected by wired and / or wireless means.

2. According to claim 1, the outpatient pharmaceutical monitoring system based on the smart cloud platform is characterized in that: The comprehensive medication behavior data includes patient physiological data, medication compliance data and exercise data; The physiological data include blood pressure, blood sugar, body temperature and blood oxygen saturation data; The medication compliance data includes medication indicators and medication method data; The exercise data includes exercise time, exercise intensity and heart rate data.

3. According to claim 2, the outpatient pharmaceutical monitoring system based on the smart cloud platform is characterized in that: The methods for obtaining the medication compliance data include: Medication compliance data includes medication indicators and medication methods. Medication indicators and medication methods are combined into an input feature vector X, which is input into the improved K clustering algorithm to obtain medication compliance data.

4. According to claim 3, the outpatient pharmaceutical monitoring system based on the smart cloud platform is characterized in that: Methods for obtaining the medication indicators include: Medication indicators include medication time, medication frequency and medication dosage. A pressure sensor is built into the smart medicine box to record the specific time of each opening of the medicine box, or the patient manually records the specific time of medication through a mobile phone application. The medication frequency is calculated based on the number of times the medicine box is opened and closed. The smart medicine box controls the medication dosage by the amount of medicine in each medicine slot.

5. According to claim 3, the outpatient pharmaceutical monitoring system based on the smart cloud platform is characterized in that: The methods of obtaining the medication include: The camera on the smart medicine box is used to collect the hand video stream of the patient when taking medicine in real time. The frame rate of the video stream is f fps , duration is T seconds, total number of frames is N f =f fps *T, process the collected video frames, adjust the image size, set the image size, normalize the pixel values ​​to the range of 0-1, rotate and flip the image for data enhancement, input each frame of the preprocessed image into the convolutional neural network model, the convolutional neural network model analyzes the input image and detects the key points, and outputs the coordinates of the key points (x a (t),y a (t)), where t is the index of the frame, t = 1, 2, ..., N f , a is the index of the key point, a = 1, 2, ..., n, n is the number of key points, where the key points include the base, middle and tip of the fingers, the center of the palm and both sides of the wrist; Based on the key point coordinates in each frame of the image, the finger extension data, grasping action data and palm angle change data are calculated. The finger extension angle is calculated through the three key points of the finger, namely the root, middle and tip of the finger, and the angle between each segment of the finger is calculated. The angle formula from the root to the middle is: B1(t)=atan2(y m (t)-y e (t),x m (t)-x e (t)); where e is the key point at the base of the finger, and m is the key point in the middle of the finger; the angle calculation formula from the middle to the tip is: B2(t) = atan2(y j (t)-y m (t),x j (t)-x m (t)); where j is the key point of the finger tip, the overall finger extension angle is calculated by the angle from the base to the middle and the angle from the middle to the tip, the formula is: B(t) = B1(t) + B2(t); The grasping action is calculated by the bending degree of the fingers, and the formula is: B gra (t) = atan2(y m (t)-y e (t),x m (t)-x e (t)), when the angle becomes smaller, it means that the finger is bending to perform the grasping action; The palm angle change is calculated by the coordinate difference between the palm center and the wrist reference point. The coordinate of the palm center is obtained by the convolutional neural network model output. The wrist reference coordinate (x b (t),y b (t)) is calculated by the average value of the key points on both sides of the wrist. The calculation formula for the change in palm angle is: p =atan2(y p (t)-y b (t),x p (t)-x b (t)), where x p (t) and y p (t) are the horizontal and vertical coordinates of the palm respectively. After extracting features in the convolutional layer, the object detection algorithm SSD is used to generate multiple candidate regions of different scales at different feature layers. In each candidate region, the network generates a corresponding bounding box position b according to its features. a and Drug C a , remove overlapping bounding boxes, use non-maximum suppression to retain the bounding boxes with the highest confidence and delete low-confidence and duplicate boxes, output the bounding boxes of the labeled drugs and their categories, and convert the drug categories into numerical types through one-hot encoding; The finger extension data, grasping action data, palm angle change data, object category and bounding box position data are processed and trained using a deep neural network to obtain medication method data.

6. According to claim 4, the outpatient pharmaceutical monitoring system based on the smart cloud platform is characterized in that: The deep neural network training method includes: The finger extension data, grasping action data, palm angle change data, and object category bounding box position data are fused, and the attention mechanism is used for weight allocation. The formula is: where α c represents the weight of the cth feature, W c represents the cth feature F c The learnable weight parameters, the values ​​learned through model training, F c represents the cth feature vector, N is the total number of features, and d represents the index used for all features, ranging from 1 to N; By the attention weight α c Weight different features to generate fused features F f , the formula is: The fused feature F f Input into the deep neural network for classification, first the fused feature F f Input to the first fully connected layer for linear transformation, the formula is: z1 = W1*F f +b1, where z1 is the output of the first fully connected layer, which is the result of linear transformation, W1 is the learnable weight matrix of the first layer, b1 is the bias term of the first layer, and the result of linear transformation is processed by the nonlinear activation function Sigmoid to enhance the nonlinear ability of the model. The formula is d1=Sigmoid(z1), where d1 refers to the output after Sigmoid activation function processing, which represents the result of the first fully connected layer after nonlinear transformation. The above operation is repeated in multiple fully connected layers, and the features processed by multiple fully connected layers are input to the Softmax layer. The Softmax layer converts the output value of the network into a probability distribution, which is used to represent the predicted probability of each medication method. The formula is: Among them, z g is the activation value of category g, G is the total number of categories, G = 3, oral, injectable and topical, h is the hth category, h = 1, 2, 3, p(Y = g | F f ) represents the probability of category g. The model outputs the predicted probability of oral, injection and topical use for each category, and the category with the highest predicted probability is selected as the medication method. The dosage is indicated by numbers: 1 for oral administration, 2 for injection, and 3 for external use.

7. The outpatient pharmaceutical monitoring system based on the smart cloud platform according to claim 5 is characterized in that: The improved K clustering algorithm includes: Determine the K value, determine the K value range based on the empirical method, and randomly select the K value within the range. Use the K clustering algorithm to divide the data set into K different clusters. For each sample, calculate its average distance m with other samples in the same cluster, calculate its average distance m' with the samples in the nearest neighbor cluster, and then calculate the silhouette coefficient R of each sample. The formula is: Select the K value with the highest silhouette coefficient as the determined K value; Initialize the cluster center, randomly select a sample in the data set as the first cluster center, calculate the distance between each unselected sample and the nearest selected cluster center, select the next cluster center by probability weighting, and repeat the operation until K cluster centers are selected; Introducing sample weights, giving lower weights to samples that meet medication specifications and higher weights to samples that do not meet medication specifications; When calculating the weighted distance, the weighted Euclidean distance is used to calculate the difference between samples. For each sample, the difference on each feature is first calculated, and the square of the difference is then calculated with the weight of the feature. The weighted distance between samples is calculated by summing all the features. During the clustering iteration process, each sample is assigned to the cluster center closest to it according to the current cluster center, and the weighted average of each cluster center is recalculated. This process will continue until the cluster centers converge or the set number of iterations is reached.

8. The outpatient pharmaceutical monitoring system based on the smart cloud platform according to claim 6 is characterized in that: The preprocessing method of the comprehensive medication behavior data includes: Remove outliers and missing values ​​in the comprehensive medication behavior data, and unify the comprehensive medication behavior data from different sources to the same timestamp; normalize the physiological data and motion data in the comprehensive medication behavior data, and form a preliminary medication behavior data set with the medication compliance data.

9. The outpatient pharmaceutical monitoring system based on the smart cloud platform according to claim 7 is characterized in that: The method of using the decision tree model to predict the patient's health status includes: The preliminary medication behavior data set is input into the decision tree model, and the data set is divided using information gain. Entropy calculation is performed first, and the formula is: Among them, S is the data set, p i is the proportion of samples belonging to category i in the data set, and n is the number of categories; after being divided using feature A, the data set will be divided into several subsets, and the entropy of each subset represents the purity and uncertainty under the condition of feature A. Among them, v∈A represents each value of feature A, S v represents a subset divided by a certain value v of feature A, |S v | is a subset S v is the total number of samples, |S| is the total number of samples in the entire data set, H(S v ) is a subset S v entropy; calculate information gain, the formula is: IG(S,A) = H(S)-H(S|A), where IG(S,A) is the information gain of feature A, H(S) is the entropy of the unpartitioned data set, and H(S|A) is the weighted conditional entropy after partitioning using feature A; calculate the information gain of all features, select the feature with the largest information gain for partitioning until the termination condition is reached, and after the tree is completed, prune the subtrees that do not significantly improve the overall prediction of the model based on the performance on the validation set.

10. A pharmaceutical monitoring method for outpatient patients based on a smart cloud platform, which is used to implement a pharmaceutical monitoring system for outpatient patients based on a smart cloud platform as described in any one of claims 1 to 9, characterized in that: include: S1. Collect comprehensive medication behavior data of outpatient patients; S2, preprocessing the comprehensive medication behavior data to obtain a preliminary medication behavior data set; S3. Based on the preliminary medication behavior data set, the decision tree model is used to predict the patient's health status; S4. Control the collection of comprehensive medication behavior data of patients to the patient's health status data, and upload the comprehensive medication behavior data and patient health status data to the cloud platform terminal.

Citation Information

Patent Citations

  • Anticoagulant pharmaceutical monitoring management method based on clinical data

    CN111210890A

  • Clinical pharmacy monitoring management system and monitoring management method thereof

    CN116779097A