A non-medicine pouring recognition and medicine amount confirmation method and system of a medicine cup

CN122907232APending Publication Date: 2026-10-13JIANGXI UNIVERSITY OF TRADITIONAL CHINESE MEDICINE
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611400166.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-10
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]然而,现有方案主要依赖药液量的单一变化维度进行判定,而实际使用过程中,药液减少可能由饮用、倾倒、清洗、洒落等多种不同行为引起,且不同使用者在饮用速度、持杯习惯以及不同药剂在黏稠度、流动性等方面均存在显著差异,使得基于固定阈值的判定逻辑在复杂多变的实际场景中难以维持记录结果与真实服药行为之间的一致性,从而导致长期用药依从性监测数据的可靠性不足

Benefits of technology

[0016]本发明通过获取多模态数据和目标服药计划信息,并在事件切片后结合两类信息共同生成事件特征向量,使药液变化事件能够同时从物理行为特征和服药计划符合度两个维度被量化描述,为后续类别判定提供了区分真实服药与非服药倾倒的信息基础;通过基于初始判定边界和用户行为画像对事件特征向量进行类别评分并获得两个独立的类别评分,使类别判定不再依赖单一物理信号与固定阈值的简单比对,而是通过两个评分之间的比较结果综合判定事件类别,有效降低了因个体差异、药剂差异或行为差异导致的误判风险;进一步地,通过根据事件类别分配置信权重并对各事件的药液减少量进行加权计算以确定实际服药量,而非简单将全部药液减少量累加作为服药量,使得非服药倾倒事件对应的药液减少量不会影响实际服药量的计算结果,从而显著提升了服药记录的准确性;同时,通过以被确认为真实服药事件的样本更新用户行为画像,使判定依据能够随特定用户的实际服药习惯逐步适配,形成从判定到反馈再到自适应调整的闭环,随着使用次数的增加判定准确性持续提升。因此,本发明解决了现有技术中的缺少一种能够在药液减少来源多样的情况下有效保证服药记录真实性与可靠性的服药杯的非服药倾倒识别与服药量确认方法的问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122907232A_ABST
    Figure CN122907232A_ABST
Patent Text Reader

Abstract

The application provides a medicine cup non-medicine pouring identification and medicine amount confirmation method and system, and belongs to the technical field of Internet of Things monitoring, which comprises the following steps: acquiring medicine taking multi-modal data and target medicine taking plan information, pre-processing the multi-modal data to cut continuous monitoring signals into multiple medicine liquid change events and generate event feature vectors; performing category scoring on the event feature vectors according to an initial judgment boundary and a user behavior portrait, obtaining a first score of a real medicine taking event and a second score of a non-medicine taking event, judging the category of the medicine liquid change event and the corresponding confidence weight according to the comparison result of the two scores, and performing weighted calculation on the medicine liquid reduction amount of each medicine liquid change event to determine the actual medicine taking amount. The application solves the problem that there is no medicine cup non-medicine pouring identification and medicine amount confirmation method in the prior art which can effectively ensure the authenticity and reliability of medicine taking records under the condition that the sources of medicine liquid reduction are various.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of Internet of Things (IoT) monitoring technology, and in particular to a method and system for identifying non-medication spillage and confirming medication dosage in a medication cup. Background Technology

[0002] With the deep integration of the Internet of Things (IoT) and healthcare management, intelligent medication monitoring devices based on sensors are being increasingly widely used in scenarios such as chronic disease management, postoperative rehabilitation, and home care. These devices provide a technological foundation for quantifiable tracking of medication behavior and remote adherence assessment by collecting physical parameters of the medication process in real time.

[0003] In liquid medication administration scenarios, smart medication cups are typically equipped with liquid level or weight detection units to infer medication completion status by recording changes in the amount of medication before and after a single dose. For example, existing patent CN213251329U describes a medication cup with medication reminders. This monitoring method plays a role in routine medication management, especially suitable for treatment scenarios requiring long-term, regular medication.

[0004] However, existing solutions mainly rely on the single dimension of changes in the amount of medication to make judgments. In actual use, the reduction of medication may be caused by a variety of different behaviors such as drinking, pouring, washing, and spilling. Furthermore, different users have significant differences in drinking speed, cup holding habits, and the viscosity and flowability of different medications. This makes it difficult for judgment logic based on fixed thresholds to maintain consistency between recorded results and actual medication behavior in complex and ever-changing real-world scenarios, resulting in insufficient reliability of long-term medication adherence monitoring data. Summary of the Invention

[0005] Based on this, the purpose of the present invention is to provide a method and system for identifying non-medication spillage and confirming medication dosage in a medication cup, aiming to solve the problem in the prior art of lacking a method for identifying non-medication spillage and confirming medication dosage in a medication cup that can effectively ensure the authenticity and reliability of medication records when the source of medication reduction is diverse.

[0006] A method for identifying non-medication spillage and confirming medication dosage using a medication cup according to an embodiment of the present invention, wherein the medication cup is equipped with an information acquisition device, the method comprising: Acquire multimodal data and target medication plan information of the medication cup during medication administration, preprocess the multimodal data, and divide the continuous monitoring signal into several medication change events based on the preprocessed liquid volume change data and determine the corresponding event feature vectors; Based on the initial judgment boundary and user behavior profile, the event feature vector is classified and scored to obtain a first score for the change in medication liquid as a real medication event and a second score for the change in medication liquid as a non-medication spill event. The event category of the change in medication liquid is determined based on the comparison of the two scores. The confidence weights corresponding to each medication change event are determined based on the event categories. The amount of medication reduction for each medication change event is weighted and calculated to determine the actual dosage. The user behavior profile is then updated based on samples confirmed as genuine medication events.

[0007] Furthermore, the steps for segmenting drug change events include: Collect data on liquid level, weight, cup tilt angle, tilt angular velocity, and triaxial acceleration. The liquid level and weight data are filtered, and the attitude calculation of the cup body tilt angle, tilt angular velocity and triaxial acceleration is performed to obtain the filtered liquid level data, weight data, and real-time tilt angle and tilt angular velocity of the cup body, respectively. Mechanical vibration events are identified based on the impact peak value of the triaxial acceleration and the abrupt change characteristics of the real-time tilt angle of the cup. Based on the changing trends of the filtered liquid level data and weight data, the mechanical vibration events are distinguished from actual liquid reduction events, and the instantaneous shaking segments corresponding to the mechanical vibration events are eliminated. When the filtered liquid level change or weight change exceeds the activation threshold, the continuous reduction duration exceeds the shortest event time threshold, and the cumulative reduction exceeds the minimum event amount threshold, the corresponding continuous monitoring signal is segmented into several liquid change events.

[0008] Furthermore, the steps for generating event feature vectors include: Obtain the target medication time window and target medication dosage, and obtain the event duration and cup lid open status of the medication change event; The amount of drug reduction in the drug solution change event is determined based on the filtered liquid level data and weight data, and the drug solution reduction rate is determined based on the event duration and the amount of drug solution reduction. Based on the attitude calculation results, determine the maximum tilt angle, average tilt angle, average tilt angular velocity, and tilt trajectory morphology of the drug liquid change event; The time window matching value is determined based on the target medication time window and the event duration, and the dose fit is determined based on the target medication dosage and the amount of medication reduction. The historical speed matching degree is determined based on the degree of matching between the rate of decrease in the medication solution during the aforementioned medication solution change event and the user's historical medication dosing speed. The event feature vector includes at least the amount of drug reduction, the rate of drug reduction, the maximum tilt angle, the average tilt angle, the average tilt angular velocity, the tilt trajectory morphology, the dose fit, and the historical velocity matching degree.

[0009] Furthermore, the step of classifying the event feature vector based on the initial judgment boundary and user behavior profile includes: The initial judgment boundary is determined based on the equipment calibration parameters, the type and viscosity grade of the drug solution, and the user group tags. After the user completes a preset number of supervised medication administrations, the user behavior profile is generated or updated based on real medication administration samples confirmed by the user or monitoring end. Based on the initial judgment boundary and the user behavior profile, the features representing normal drinking behavior in the event feature vector are weighted and calculated to obtain a first score indicating that the change in the liquid is a real medication event. The features representing pouring behavior in the event feature vector are weighted and calculated to obtain a second score indicating that the change in the liquid is a real medication event.

[0010] Furthermore, the step of determining the event category of the drug solution change event based on the comparison results of the two scores includes: When the first score is greater than or equal to the first threshold, and the difference between the first score and the second score is greater than or equal to the difference threshold, the drug solution change event is determined to be a real medication event. When the second score is greater than or equal to the second threshold, and the difference between the second score and the first score is greater than or equal to the difference threshold, the event of change in the liquid medicine is determined to be a non-drug spillage event. When the difference between the first score and the second score is less than the difference threshold, the change in the medicine solution is determined to be a pending confirmation event, and a confirmation prompt is sent to the user terminal or the monitoring terminal.

[0011] Further steps in determining the actual dosage include: The confidence weights for each medication change event are assigned according to the event category. The confidence weight for a real medication administration event is the first confidence weight value, the confidence weight for a non-medication spill event is the second confidence weight value, and the confidence weight for an event to be confirmed is determined based on the category confidence or user confirmation result. The actual dosage is obtained by multiplying the amount of drug reduction for each drug change event by its corresponding confidence weight and then summing the results. The completion rate of medication administration is determined by a weighted combination of the ratio of the actual dosage to the target dosage, the suitability of the medication time, the suitability of the medication temperature, and the reliability of the data.

[0012] Furthermore, the step of updating the user behavior profile based on samples confirmed as genuine medication use events includes: Real medication events that have been confirmed by the user or monitoring end and whose multi-sensor consistency meets the preset confidence conditions are marked as high-confidence supervision samples and added to the high-confidence sample pool. For each supervised sample in the high-confidence sample pool, the sample weight is determined based on at least one of its sensor consistency confidence, human confirmation confidence, and scene validity confidence. Based on the sample weights, confidence-weighted statistics are performed on the sample features in the high-confidence sample pool to update the drinking rate distribution, tilt trajectory distribution, and event duration distribution in the user behavior profile.

[0013] Another object of the present invention is to provide a system for identifying non-drug spillage and confirming the dosage of a medication cup, for implementing the above-mentioned method for identifying non-drug spillage and confirming the dosage of a medication cup, the system comprising: The data acquisition and processing module is used to acquire multimodal data and target medication plan information of the medication cup during medication administration, preprocess the multimodal data, and divide the continuous monitoring signal into several medication change events based on the preprocessed liquid volume change data and determine the corresponding event feature vectors. The judgment module is used to classify the event feature vector based on the initial judgment boundary and user behavior profile to obtain a first score for the change in medicine liquid as a real medication event and a second score for the change in medicine liquid as a non-medication spill event, so as to determine the event category of the change in medicine liquid based on the comparison result of the two scores. The dosage determination module is used to determine the confidence weight corresponding to each medication change event according to the event category, perform weighted calculation on the amount of medication reduction for each medication change event, determine the actual dosage, and update the user behavior profile based on the samples confirmed as real medication events.

[0014] Another objective of this invention is to provide a storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for identifying non-drug spillage from a medicine cup and confirming the dosage.

[0015] Another objective of this invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described method for identifying non-drug spillage from a medication cup and confirming the dosage.

[0016] This invention acquires multimodal data and target medication plan information, and combines these two types of information to generate an event feature vector after event slicing. This allows medication change events to be quantified simultaneously from two dimensions: physical behavioral characteristics and medication plan compliance. This provides an informational basis for subsequent category determination, distinguishing between actual medication administration and non-administration dumping. By classifying the event feature vector based on an initial determination boundary and user behavior profile, two independent category scores are obtained. This eliminates the reliance on a simple comparison of a single physical signal and a fixed threshold for category determination. Instead, the event category is determined by comprehensively comparing the results of the two scores, effectively reducing the impact of individual differences and medication variations. The invention addresses the risk of misjudgment due to differences in XOR behavior. Furthermore, by assigning weights based on event categories and calculating the actual dosage by weighting the amount of medication reduction for each event, rather than simply summing all reductions, the invention ensures that the reduction in medication for non-drug spill events does not affect the calculation of the actual dosage, thus significantly improving the accuracy of medication records. Simultaneously, by updating user behavior profiles with samples confirmed as genuine medication events, the judgment criteria can be gradually adapted to the actual medication habits of specific users, forming a closed loop from judgment to feedback to adaptive adjustment. The accuracy of judgment continues to improve with increased usage. Therefore, this invention solves the problem in the prior art of lacking a method for identifying non-drug spills and confirming medication dosage using a medication cup that can effectively guarantee the authenticity and reliability of medication records when there are diverse sources of medication reduction. Attached Figure Description

[0017] Figure 1 This is a flowchart of the non-medication spillage identification and medication dosage confirmation method of the medication cup in the first embodiment of the present invention; Figure 2 This is a schematic diagram of the non-drug spillage identification and dosage confirmation system of the medication cup in the second embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the electronic device in the third embodiment of the present invention; The following detailed description, in conjunction with the accompanying drawings, will further illustrate the present invention. Detailed Implementation

[0018] To facilitate understanding of the present invention, a more complete description will be given below with reference to the accompanying drawings. Several embodiments of the invention are illustrated in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.

[0020] Example 1 Please see Figure 1 The figure shows a method for identifying non-medication spillage and confirming medication dosage in a medication cup according to the first embodiment of the present invention. The method specifically includes S01-S03.

[0021] S01, acquire multimodal data and target medication plan information of the medication cup during medication administration, preprocess the multimodal data, divide the continuous monitoring signal into several medication change events based on the preprocessed liquid volume change data, and determine the corresponding event feature vectors.

[0022] In practice, multimodal data of the medication cup during the medication process and target medication plan information are collected synchronously. After preprocessing the multimodal data, it is divided into independent drug liquid change events. This discretizes the continuous monitoring signal into behavioral units that can be analyzed independently, thus providing a data foundation for subsequent refined behavior discrimination for each drug liquid change event. At the same time, filtering is used to eliminate environmental noise and mechanical vibration interference to ensure that the data on which subsequent feature extraction and category determination are based have sufficient accuracy and reliability.

[0023] Specifically, the system collects data on liquid level, weight, cup tilt angle, tilt angular velocity, and triaxial acceleration. The liquid level and weight data are filtered, and the cup tilt angle, tilt angular velocity, and triaxial acceleration are used for attitude calculation, yielding filtered liquid level and weight data, as well as real-time cup tilt angle and tilt angular velocity. Mechanical vibration events are identified based on the peak value of the triaxial acceleration and the abrupt change characteristics of the real-time cup tilt angle. Based on the changing trends of the filtered liquid level and weight data, the mechanical vibration events are distinguished from actual liquid reduction events, and the instantaneous jitter segments corresponding to the mechanical vibration events are removed. When the filtered liquid level or weight change exceeds a trigger threshold, the continuous reduction duration exceeds a minimum event time threshold, and the cumulative reduction exceeds a minimum event amount threshold, the system segments the corresponding continuous monitoring signal into several liquid change events.

[0024] In practice, high-frequency noise and instantaneous jumps are eliminated by filtering the liquid level and weight data and performing attitude calculations on the cup body attitude data. This yields stable data that accurately reflects the cup body's motion state and changes in liquid volume. Mechanical vibration events are then identified based on the triaxial acceleration impact peak and the cup body's real-time tilt angle abrupt change characteristics. These events are then distinguished from actual liquid volume reduction events by combining the trends in liquid level and weight changes, thus eliminating transient vibration segments. Finally, events are segmented using a triple constraint of a trigger threshold, a shortest event time threshold, and a minimum event quantity threshold. This ensures that each segmented liquid volume change event corresponds to a continuous liquid volume reduction process with clear physical meaning, preventing brief fluctuations from being misjudged as valid events. This improves the accuracy of event segmentation and the reliability of subsequent behavior discrimination.

[0025] As an example, and not a limitation, in some alternative embodiments, the raw level and weight data are first subjected to three-point median filtering to remove isolated jump points, and then to first-order low-pass filtering, with the following filtering formula: ,in, These are the filter coefficients. The original sampled value at the current moment. This is the filtered output value from the previous moment; This is the filtered output value at the current moment.

[0026] In practice, by combining the target medication plan information with multimodal data, an event feature vector is generated for each medication change event. This quantitatively integrates the physical behavior features with the medication plan compliance, enabling a single event to be comprehensively described in both the drinking behavior dimension and the plan matching dimension. This provides multidimensional input for the subsequent category scoring model, thereby enabling the real medication behavior and non-medication dumping behavior to be effectively distinguished in the feature space.

[0027] Specifically, the process involves: acquiring the target medication time window and target dosage; acquiring the event duration and lid opening status of the medication change event; determining the amount of medication reduction in the medication change event based on the filtered liquid level and weight data; determining the medication reduction rate based on the event duration and the amount of medication reduction; determining the maximum tilt angle, average tilt angle, average tilt angular velocity, and tilt trajectory shape of the medication change event based on the attitude calculation results; determining the time window matching value based on the target medication time window and the event duration; determining the dose fit based on the target dosage and the amount of medication reduction; determining the historical speed matching degree based on the matching degree between the medication reduction rate of the medication change event and the user's historical medication speed; and generating an event feature vector based on the data determined in the above processes. The event feature vector includes at least the amount of medication reduction, medication reduction rate, maximum tilt angle, average tilt angle, average tilt angular velocity, tilt trajectory shape, event duration, lid opening status, time window matching value, dose fit degree, and historical speed matching degree.

[0028] In practice, the feature system incorporates planned constraints such as the target medication time window and target medication dosage, as well as event status information such as event duration and cup lid opening status. It also integrates the amount and rate of medication reduction calculated from liquid level and weight data, the tilt angle feature extracted from attitude calculation results, the time window matching value and dose fit degree determined by plan compliance, and the historical speed matching degree obtained by comparing historical data to generate a multi-dimensional event feature vector, thereby improving the ability to distinguish between actual medication administration and non-medication dispensing.

[0029] As an optional implementation, the reduction in drug solution is determined as follows: a first volume value is obtained by converting the liquid level height, a second volume value is obtained by converting the weight change, and the first volume value and the second volume value are dynamically weighted and fused to obtain the reduction in drug solution. Wherein, the volume calculated from the liquid level... From the cross-sectional area function of the cup calculate, Weight to Volume Conversion Density corrected by weight change and temperature calculate, The fusion volume is λ is the weighted fusion coefficient, which is dynamically determined based on the reliability of the liquid level signal and the reliability of the weight signal. When the cup tilt angle is large or the liquid level fluctuation is significant, the reliability of the liquid level signal is reduced. When the cup is not placed stably or the weight sensor has zero-point drift, the reliability of the weight signal is reduced.

[0030] Furthermore, the rate of drug reduction is determined based on the ratio of the amount of drug reduction to the duration of the event. The maximum tilt angle, average tilt angle, average tilt angular velocity, and tilt trajectory morphology of the drug change event are determined based on the attitude calculation results.

[0031] A time window matching value Tw is determined based on the target medication time window and the event duration. Optionally, when the event duration falls entirely within the target medication time window, Tw takes a first value; when the event duration partially overlaps with the target medication time window, Tw takes the ratio of the overlap duration to the event duration; when the event duration falls entirely outside the target medication time window, Tw takes a second value, wherein the first value is greater than the ratio and the second value is less than the ratio.

[0032] The dose fit is determined based on the target dosage and the reduction in drug solution: ,in To reduce the amount of medicine, Target dosage; This represents the dose fit.

[0033] The historical speed matching degree is determined based on the degree to which the rate of decrease in medication solution during the medication solution change event matches the user's historical medication dosing speed. Optionally, the user's historical medication dosing speed is based on the median of the historical rate distribution in the user's personalized medication behavior profile, and the historical speed matching degree decreases monotonically as the rate of decrease in medication solution deviates from the median.

[0034] S02, the event feature vector is categorized and scored based on the initial judgment boundary and user behavior profile to obtain a first score for the change in medication as a real medication event and a second score for the change in medication as a non-medication spill event. The event category of the change in medication is determined based on the comparison of the two scores.

[0035] In practice, the event feature vector is simultaneously categorized in two directions—actual medication administration and non-medication dispensing—by utilizing the initial judgment boundary and user behavior profile. This approach leverages the dual constraints of general rules and individual habits to independently assess the evidence strength of medication change events. The event category is then determined by comparing the relative relationship between the two scores. This avoids the bias caused by a single score or fixed threshold, ensuring that when the evidence strength of two types of behavior is close, it can be identified as a pending state rather than being forcibly categorized. This effectively reduces the risk of misjudgment and improves the accuracy and robustness of category determination.

[0036] Specifically, an initial judgment boundary is determined based on equipment calibration parameters, drug type and drug viscosity grade, and user group tags. After the user completes a preset number of supervised medication administrations, the user behavior profile is generated or updated based on real medication administration samples confirmed by the user or monitoring end. Based on the initial judgment boundary and the user behavior profile, the features representing normal drinking behavior in the event feature vector are weighted to obtain a first score indicating that the drug change event belongs to a real medication administration event. The features representing pouring behavior in the event feature vector are weighted to obtain a second score indicating that the drug change event belongs to a real medication administration event.

[0037] In practice, the initial judgment boundary is first determined based on the equipment calibration parameters, drug type, drug viscosity grade, and user group labels. This provides a benchmark judgment range based on physical constraints and general population experience during the system's cold start phase. After the user completes a preset number of supervised medication administrations, a user behavior profile is generated or updated based on confirmed real medication administration samples. This allows the judgment criteria to gradually adapt to the actual drinking habits of specific users. Finally, based on the initial judgment boundary and user behavior profile, the features representing normal drinking behavior and the features representing pouring behavior in the event feature vector are weighted differently to obtain the first score and the second score. This achieves bidirectional independent evaluation and cross-validation of real medication administration evidence and non-medication pouring evidence.

[0038] As an example, and not a limitation, in some optional embodiments, the initial determination boundary consists of four parts: an initial rule threshold, a drug correction threshold, a population correction threshold, and a user-individualized threshold. The initial rule threshold is derived from the cup structure and device calibration; for example, the drinking angle range under a standard cup rim can be set to 30° to 85°, the pouring angle threshold can be set to greater than 100°, and the inverted pouring time threshold can be set to more than 1 second. The drug correction threshold is determined based on the drug type and viscosity grade; for example, the initial drinking rate range for ordinary decoctions can be set to 3ml / s to 18ml / s, for granule solutions to 2ml / s to 15ml / s, and for diluted herbal pastes or high-viscosity solutions to 1ml / s to 10ml / s. The population correction threshold is determined based on labels such as elderly, children, users with swallowing difficulties, and users who drink medication quickly. For elderly people and users with difficulty swallowing, the system lowers the upper limit of drinking rate and increases the probability of needing confirmation; for users who drink medicine quickly as confirmed by historical samples, the system can increase the upper limit of drinking rate, but does not reduce the weight of key features of medicine pouring such as pouring angle, continuous inversion and time window mismatch.

[0039] After a user completes a preset number of supervised medication administrations, a user behavior profile is generated or updated based on real medication administration samples confirmed by the user or monitoring system. During the supervised medication administration phase, only samples that simultaneously meet the conditions of consistent liquid level change, weight change, and posture trajectory, and whose confirmation results have not been revoked, are marked as high-confidence supervised samples. The user behavior profile includes at least the distribution of drinking rate, tilt angle trajectory, and event duration.

[0040] Furthermore, based on the aforementioned initial judgment boundary, user-specific thresholds are generated according to the high-confidence supervision samples to replace or correct at least some of the thresholds in the initial judgment boundary. Specifically, real medication event samples confirmed by the user or monitoring end and whose multi-sensor consistency meets preset confidence conditions are marked as high-confidence supervision samples and added to the high-confidence sample pool. For each supervision sample in the high-confidence sample pool, the sample weight is determined according to its sensor consistency confidence, human confirmation confidence, and scenario validity confidence. ,in, To assess the reliability of sensor consistency, the readings from the level sensor, weight sensor, and attitude sensor are considered consistent. When the trends of change in the three readings are aligned, [the following criteria are applied]. Take the higher value; when any two readings contradict each other, Take the median value; when all three are inconsistent or any sensor reading is fixed or exceeds the physical range. Take the lower value; The credibility of the verification is determined by the source of the verification. Verification is considered valid when the source is the user themselves and includes a complete confirmation of the medication administration process. Take the higher value when the confirmation source is remote monitoring terminal observation. Take the median value when the source is confirmed to be a subsequent record. Take the lower value; The validity and credibility of the scenario are determined based on the scenario in which the event occurs. When the event occurs within the target medication time window and the cup lid is opened normally, Take the higher value when the event occurs outside the target medication time window but the user notes an abnormal situation. Take the median value when the event occurs outside the target medication time window and there is no reasonable explanation. Take the lower value. Calculate the confidence-weighted median and confidence-weighted interquartile range based on the sample weights, and update the user's individual feature mean and variance using an exponential moving average. The corresponding formula is:

[0041]

[0042] Among them, a certain feature value of the current sample, and , respectively, are the mean and variance before the update. The update coefficients are set to 0.05 to 0.30. The mean and variance are used for anomaly detection in subsequent samples. When the feature value of a new sample deviates from the mean by more than a preset multiple of the standard deviation, the confidence weight of that sample is reduced or a pending confirmation judgment is triggered. Taking the drinking rate range as an example, the updated individualized threshold range is... ,in, The confidence-weighted median. For confidence weighted interquartile range, and The multiplier factor ranges from 1.2 to 2.5. and These are the lower and upper limits of the rate, jointly defined by the reagent correction threshold and the equipment safety boundary. The update magnitude of any threshold in a single instance does not exceed the preset maximum step size and is always confined within the safety boundary. New samples identified as being from cleaning, spillage, sensor malfunction, or confirmation errors are not included in the threshold update. If consecutive low-confidence samples, contradictory sensor samples, or user-revoked confirmation samples appear, the current threshold update is frozen and reverted to the most recent stable profile.

[0043] Furthermore, based on the initial judgment boundary and the user behavior profile, the event feature vector is categorized and scored. In an optional implementation, a rule-based model is used for scoring: for a genuine medication administration score, features positively correlated with normal drinking behavior are selected from the event feature vector, including time window matching value, matching degree of tilt angle within the drinking angle range, dose fit degree, historical speed matching degree, matching degree with user behavior profile, and segmented pause pattern, which are assigned positive weights. Features negatively correlated with pouring behavior are selected, including matching degree of tilt angle within the pouring angle range and jitter noise score, which are assigned negative weights. The weighted sum of each feature value and its corresponding weight is then obtained to obtain the first score indicating that the medication change event belongs to a genuine medication administration event. For non-medication spillage scoring, features positively correlated with spillage behavior are selected from the event feature vector, including the matching degree of tilt angle within the pouring angle range, the matching degree of pouring rate, the mismatch of time window, the lid not being opened, and the degree of continuous inversion, and are assigned positive weights. Features negatively correlated with normal drinking behavior are selected, including low dose fit and low matching degree with user behavior profile, and are assigned negative weights. The weighted sum of each feature value and its corresponding weight is used to obtain the second score for the medication change event belonging to a non-medication spillage event. The weight coefficients of each feature are determined based on the initial judgment boundary and user behavior profile, and the weight of the first score focuses on the features representing normal drinking behavior, while the weight of the second score focuses on the features representing spillage behavior. Optionally, the rule model can also be replaced by a classification model for scoring calculation.

[0044] Additionally, when the first score is greater than or equal to the first threshold and the difference between the first score and the second score is greater than or equal to the difference threshold, the change in medication is determined to be a genuine medication administration event; when the second score is greater than or equal to the second threshold and the difference between the second score and the first score is greater than or equal to the difference threshold, the change in medication is determined to be a non-medication spillage event; when the difference between the first score and the second score is less than the difference threshold, the change in medication is determined to be a pending confirmation event, and a confirmation prompt is sent to the user or monitoring terminal.

[0045] In practice, when the difference between two scores does not reach the difference threshold, the event is judged as an event to be confirmed and a confirmation prompt is sent to the user or monitoring end. This avoids the system from making a forced misclassification when the evidence is ambiguous. At the same time, the manual confirmation process is used to supplement the judgment basis and feed back into the system optimization.

[0046] In one optional implementation, a cleaning score, a spillage score, and a dose-based score can also be calculated; if the highest category score is greater than the corresponding category threshold and the difference between the highest and second highest scores is greater than the difference threshold, then the category corresponding to the highest score is output; otherwise, an event pending confirmation is output.

[0047] S03, determine the confidence weight corresponding to each medicine change event according to the event category, perform weighted calculation on the amount of medicine reduction for each medicine change event, determine the actual dosage, and update the user behavior profile based on the samples confirmed as real medication events.

[0048] In practical implementation, the system assigns confidence weights to each medication change event based on the event category and performs weighted calculations on the amount of medication reduction to determine the actual dosage. This addresses the recording distortion problem caused by directly equating all medication reduction with the dosage in existing technologies. The confidence weight mechanism effectively eliminates interference from non-medication spillage events on the final dosage calculation. Simultaneously, by updating user behavior profiles with samples confirmed as genuine medication events, a closed-loop mechanism is constructed from event judgment to sample feedback to adaptive profile updates. This allows the system to gradually adapt to the individual drinking habits of specific users during continuous use, thereby forming an adaptive discrimination capability that continuously improves with increasing usage frequency.

[0049] Specifically, each medication change event is assigned a confidence weight according to the event category. The confidence weight of a real medication administration event is the first confidence weight value, the confidence weight of a non-administered medication spill event is the second confidence weight value, and the confidence weight of an event to be confirmed is determined based on the category confidence or user confirmation result. The amount of medication reduction for each medication change event is multiplied by its corresponding confidence weight and then summed to obtain the actual medication dosage. The medication completion rate is determined based on a weighted combination of the ratio of the actual medication dosage to the target medication dosage, medication time suitability, medication temperature suitability, and data confidence.

[0050] In practice, a mechanism for calculating the amount of medication reduction is established, which matches the certainty of the event category. This is achieved by assigning a first confidence weight value to real medication events, a second confidence weight value to non-medication spill events, and a confidence weight dynamically determined based on category credibility or user confirmation results for events awaiting confirmation. This ensures that the contribution of events with different credibility levels to the final medication dosage is proportional to the probability of being confirmed as real medication. The actual medication dosage is obtained by multiplying the amount of medication reduction for each event by its confidence weight and summing the results. The medication completion rate is then determined by a weighted combination of the ratio of the actual medication dosage to the target dosage, the medication time suitability, the medication temperature suitability, and the data credibility. This allows for a comprehensive evaluation of the effectiveness of a single medication administration from four dimensions: medication dosage, medication timing, medication temperature, and monitoring data quality.

[0051] In one optional implementation, information weights are assigned to each drug solution change event according to the event category. The actual dosage is determined according to... Calculate, where: This refers to the actual dosage taken. Within the same target medication time window i The amount of medicine reduction corresponding to each medicine solution change event. Confidence weight. When an event is determined to be a genuine medication administration. When the event is a pending confirmation of actual medication use. Determined based on user confirmation or category reliability; when the event is not related to medication spillage, washing, or overflow. .

[0052] Medication completion rate according to Calculation. Where: F is the medication completion rate, To achieve the target dosage, To determine the fit between the actual medication time and the target medication time window. For the temperature compatibility of the medicine solution, For data credibility, , , and For weights.

[0053] Additionally, real medication event samples confirmed by the user or monitoring end and whose multi-sensor consistency meets the preset credibility conditions are marked as high-credibility supervision samples and added to the high-credibility sample pool. For each supervision sample in the high-credibility sample pool, the sample weight is determined according to at least one of its sensor consistency credibility, human confirmation credibility, and scenario validity credibility. Based on the sample weight, confidence-weighted statistics are performed on the sample features in the high-credibility sample pool to update the drinking rate distribution, tilt trajectory distribution, and event duration distribution in the user behavior profile.

[0054] In practice, real medication event samples that have been confirmed by the user or monitoring end and whose multi-sensor consistency meets the preset credibility conditions are marked as high-credibility supervision samples and added to the high-credibility sample pool. High-quality samples that combine the reliability of human confirmation and the self-consistency of sensor data are selected as supervision signals for profile updates. Then, based on the credibility of sensor consistency, the credibility of human confirmation, and the credibility of scene effectiveness, a sample weight matching its credibility level is determined for each sample. Finally, based on the sample weight, confidence-weighted statistics are performed on the sample features to update the drinking rate distribution, tilt trajectory distribution, and event duration distribution in the user behavior profile. In this way, stable individualized patterns are extracted from the user's own historical behavior using statistical learning methods, so that subsequent judgments can be based on the user's real habits rather than general assumptions, continuously improving the recognition accuracy of specific users.

[0055] In addition, this method includes anomaly detection. Anomaly detection includes transient jitter anomalies, sensor inconsistencies, and sensor malfunctions. Transient jitter anomalies refer to large acceleration peaks, sudden changes in tilt angle, or brief fluctuations in weight when picking up or putting down the cup, but without a sustained decrease in liquid level or weight. The system filters these anomalies based on the shortest event duration, continuous reduction threshold, and multi-sensor consistency.

[0056] Conflicting sensor anomalies include situations such as a decrease in liquid level display while the weight remains constant, a decrease in weight while the tilt angle remains close to 0°, and a continuous inverted orientation while the liquid level and weight remain unchanged. The system reduces the reliability of conflicting sensors and makes further degrading inferences based on sensors with higher reliability.

[0057] When the liquid level sensor malfunctions but its weight and orientation are normal, As the amount of medicine reduced; when the weight sensor malfunctions but the liquid level and attitude are normal, As a measure of the amount of medicine being reduced; when the attitude sensor malfunctions, it does not directly determine whether medicine has been poured out, but rather combines the time window, cup lid status, liquid level / weight changes, and user confirmation to make a judgment; when two or more key sensors malfunction, it does not generate a definite event category, but outputs user confirmation or equipment check prompts.

[0058] In summary, this invention acquires multimodal data and target medication plan information, and combines these two types of information to generate an event feature vector after event slicing. This allows medication change events to be quantified and described simultaneously from two dimensions: physical behavioral characteristics and medication plan compliance. This provides an informational basis for subsequent category determination, distinguishing between actual medication administration and non-administration dumping. By classifying the event feature vector based on initial judgment boundaries and user behavior profiles, and obtaining two independent category scores, category determination no longer relies on a simple comparison of a single physical signal and a fixed threshold. Instead, it comprehensively determines the event category through the comparison results between the two scores, effectively reducing the impact of individual differences and medication administration. This invention addresses the risk of misjudgment due to differences in dosage or behavior. Furthermore, by assigning weights based on event categories and calculating the actual dosage by weighting the amount of medication loss for each event, rather than simply summing all medication loss amounts, the reduction in medication loss for non-drug spill events does not affect the calculated actual dosage, thus significantly improving the accuracy of medication records. Simultaneously, by updating user behavior profiles with samples confirmed as genuine medication events, the judgment criteria can be gradually adapted to the actual medication habits of specific users, forming a closed loop from judgment to feedback to adaptive adjustment. Judgment accuracy continuously improves with increased usage. Therefore, this invention solves the problem in the prior art of lacking a method for identifying non-drug spills and confirming medication dosage using a medication cup that can effectively ensure the authenticity and reliability of medication records when medication loss sources are diverse.

[0059] Example 2 Please see Figure 2 The diagram shows a structural block diagram of the non-drug spillage identification and dosage confirmation system for a medication cup proposed in the second embodiment of the present invention. This non-drug spillage identification and dosage confirmation system 200 includes: a data acquisition and processing module 21, a judgment module 22, and a dosage determination module 23, wherein: The data acquisition and processing module 21 is used to acquire multimodal data and target medication plan information of the medication cup during medication administration, preprocess the multimodal data, and divide the continuous monitoring signal into several medication change events based on the preprocessed liquid volume change data and determine the corresponding event feature vectors. The judgment module 22 is used to classify the event feature vector according to the initial judgment boundary and user behavior profile to obtain a first score for the change in medicine liquid as a real medication event and a second score for the change in medicine liquid as a non-medication spill event, so as to determine the event category of the change in medicine liquid based on the comparison result of the two scores. The dosage determination module 23 is used to determine the confidence weight corresponding to each drug change event according to the event category, perform weighted calculation on the amount of drug reduction in each drug change event, determine the actual dosage, and update the user behavior profile based on the samples confirmed as real drug administration events.

[0060] Example 3 In another aspect, the present invention also proposes an electronic device, please refer to [link to relevant documentation]. Figure 3 The diagram shows an electronic device according to the third embodiment of the present invention, including a memory 20, a processor 10, and a computer program 30 stored in the memory and executable on the processor. When the processor 10 executes the computer program 30, it implements the non-medication spillage identification and medication dosage confirmation method of the medication cup as described above.

[0061] In some embodiments, the processor 10 may be a central processing unit (CPU), controller, microcontroller, microprocessor or other data processing chip, used to run program code stored in memory 20 or process data, such as executing access restriction programs.

[0062] The memory 20 includes at least one type of readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 20 can be an internal storage unit of an electronic device, such as the hard disk of the electronic device. In other embodiments, the memory 20 can also be an external storage device of the electronic device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Furthermore, the memory 20 can include both internal and external storage units of the electronic device. The memory 20 can be used not only to store application software and various types of data of the electronic device, but also to temporarily store data that has been output or will be output.

[0063] It should be pointed out that, Figure 3 The structure shown does not constitute a limitation on the electronic device. In other embodiments, the electronic device may include fewer or more components than shown, or combine certain components, or have different component arrangements.

[0064] This invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for identifying non-medication spillage from a medication cup and confirming medication dosage.

[0065] Those skilled in the art will understand that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can mean any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.

[0066] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0067] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0068] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0069] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A method for identifying non-medication spillage and confirming medication dosage using a medication cup, characterized in that, The medicine cup is equipped with an information collection device, and the method includes: Acquire multimodal data and target medication plan information of the medication cup during medication administration, preprocess the multimodal data, and divide the continuous monitoring signal into several medication change events based on the preprocessed liquid volume change data and determine the corresponding event feature vectors; Based on the initial judgment boundary and user behavior profile, the event feature vector is classified and scored to obtain a first score for the change in medication liquid as a real medication event and a second score for the change in medication liquid as a non-medication spill event. The event category of the change in medication liquid is determined based on the comparison of the two scores. The confidence weights corresponding to each medication change event are determined based on the event categories. The amount of medication reduction for each medication change event is weighted and calculated to determine the actual dosage. The user behavior profile is then updated based on samples confirmed as genuine medication events.

2. The method for identifying non-medication spillage and confirming medication dosage using a medication cup according to claim 1, characterized in that, The steps for segmenting drug solution change events include: Collect data on liquid level, weight, cup tilt angle, tilt angular velocity, and triaxial acceleration. The liquid level and weight data are filtered, and the attitude calculation of the cup body tilt angle, tilt angular velocity and triaxial acceleration is performed to obtain the filtered liquid level data, weight data, and real-time tilt angle and tilt angular velocity of the cup body, respectively. Mechanical vibration events are identified based on the impact peak value of the triaxial acceleration and the abrupt change characteristics of the real-time tilt angle of the cup. Based on the changing trends of the filtered liquid level data and weight data, the mechanical vibration events are distinguished from actual liquid reduction events, and the instantaneous shaking segments corresponding to the mechanical vibration events are eliminated. When the filtered liquid level change or weight change exceeds the activation threshold, the continuous reduction duration exceeds the shortest event time threshold, and the cumulative reduction exceeds the minimum event amount threshold, the corresponding continuous monitoring signal is segmented into several liquid change events.

3. The method for identifying non-medication spillage and confirming medication dosage using a medication cup according to claim 2, characterized in that, The steps involved in generating event feature vectors include: Obtain the target medication time window and target medication dosage, and obtain the event duration and cup lid open status of the medication change event; The amount of drug reduction in the drug solution change event is determined based on the filtered liquid level data and weight data, and the drug solution reduction rate is determined based on the event duration and the amount of drug solution reduction. Based on the attitude calculation results, determine the maximum tilt angle, average tilt angle, average tilt angular velocity, and tilt trajectory morphology of the drug liquid change event; The time window matching value is determined based on the target medication time window and the event duration, and the dose fit is determined based on the target medication dosage and the amount of medication reduction. The historical speed matching degree is determined based on the degree of matching between the rate of decrease in the medication solution during the aforementioned medication solution change event and the user's historical medication dosing speed. The event feature vector includes at least the amount of drug reduction, the rate of drug reduction, the maximum tilt angle, the average tilt angle, the average tilt angular velocity, the tilt trajectory morphology, the dose fit, and the historical velocity matching degree.

4. The method for identifying non-medication spillage and confirming medication dosage using a medication cup according to claim 1, characterized in that, The steps for classifying the event feature vector based on the initial judgment boundary and user behavior profile include: The initial judgment boundary is determined based on the equipment calibration parameters, the type and viscosity grade of the drug solution, and the user group tags. After the user completes a preset number of supervised medication administrations, the user behavior profile is generated or updated based on real medication administration samples confirmed by the user or monitoring end. Based on the initial judgment boundary and the user behavior profile, the features representing normal drinking behavior in the event feature vector are weighted and calculated to obtain a first score indicating that the change in the liquid is a real medication event. The features representing pouring behavior in the event feature vector are weighted and calculated to obtain a second score indicating that the change in the liquid is a real medication event.

5. The method for identifying non-drug spillage and confirming dosage of a medication cup according to claim 4, characterized in that, The steps for determining the event category of the drug solution change event based on the comparison results of the two scores include: When the first score is greater than or equal to the first threshold, and the difference between the first score and the second score is greater than or equal to the difference threshold, the drug solution change event is determined to be a real medication event. When the second score is greater than or equal to the second threshold, and the difference between the second score and the first score is greater than or equal to the difference threshold, the event of change in the liquid medicine is determined to be a non-drug spillage event. When the difference between the first score and the second score is less than the difference threshold, the change in the medicine solution is determined to be a pending confirmation event, and a confirmation prompt is sent to the user terminal or the monitoring terminal.

6. The method for identifying non-medication spillage and confirming medication dosage using a medication cup according to claim 1, characterized in that, The steps for determining the actual dosage include: The confidence weights for each medication change event are assigned according to the event category. The confidence weight for a real medication administration event is the first confidence weight value, the confidence weight for a non-medication spill event is the second confidence weight value, and the confidence weight for an event to be confirmed is determined based on the category confidence or user confirmation result. The actual dosage is obtained by multiplying the amount of drug reduction for each drug change event by its corresponding confidence weight and then summing the results. The completion rate of medication administration is determined by a weighted combination of the ratio of the actual dosage to the target dosage, the suitability of the medication time, the suitability of the medication temperature, and the reliability of the data.

7. The method for identifying non-medication spillage and confirming medication dosage using a medication cup according to claim 1, characterized in that, The steps for updating the user behavior profile based on samples confirmed as genuine medication use events include: Real medication events that have been confirmed by the user or monitoring end and whose multi-sensor consistency meets the preset confidence conditions are marked as high-confidence supervision samples and added to the high-confidence sample pool. For each supervised sample in the high-confidence sample pool, the sample weight is determined based on at least one of its sensor consistency confidence, human confirmation confidence, and scene validity confidence. Based on the sample weights, confidence-weighted statistics are performed on the sample features in the high-confidence sample pool to update the drinking rate distribution, tilt trajectory distribution, and event duration distribution in the user behavior profile.

8. A system for identifying non-medication spillage and confirming medication dosage using a medication cup, characterized in that, The system for implementing the non-drug spillage identification and dosage confirmation method for a medication cup according to any one of claims 1 to 7, the system comprising: The data acquisition and processing module is used to acquire multimodal data and target medication plan information of the medication cup during medication administration, preprocess the multimodal data, and divide the continuous monitoring signal into several medication change events based on the preprocessed liquid volume change data and determine the corresponding event feature vectors. The judgment module is used to classify the event feature vector based on the initial judgment boundary and user behavior profile to obtain a first score for the change in medicine liquid as a real medication event and a second score for the change in medicine liquid as a non-medication spill event, so as to determine the event category of the change in medicine liquid based on the comparison result of the two scores. The dosage determination module is used to determine the confidence weight corresponding to each medication change event according to the event category, perform weighted calculation on the amount of medication reduction for each medication change event, determine the actual dosage, and update the user behavior profile based on the samples confirmed as real medication events.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of the non-medication spillage identification and medication dosage confirmation method for the medication cup as described in any one of claims 1 to 7.

10. An electronic device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the non-drug spillage identification and dosage confirmation method for a medication cup as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Medicine taking cup with medicine taking reminding function

    CN213251329U