Home medication safety data processing system for elderly patients with chronic diseases

CN122930581APending Publication Date: 2026-10-16PEKING UNION MEDICAL COLLEGE HOSPITAL +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610940699.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-27
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]为了解决无法准确区分认知障碍患者因记忆不清导致的确认性检查行为与重复服药行为的技术问题,本发明的目的在于提供一种老年慢病患者居家用药安全数据处理系统,所采用的技术方案具体如下:

Benefits of technology

第一方面:本方案创造性地构建了行为结构向量与生理响应观测值双维验证机制。在行为层面,通过求解最优解释组合,将混乱的传感器事件流重构为包含认知流程中断指数、主意图间期偏离度及流程缺失度的结构化向量。使得系统能够深入理解行为背后的认知逻辑,量化识别出患者反复开关药盒等行为混乱特征。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122930581A_ABST
    Figure CN122930581A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of medical auxiliary, in particular to a home medication safety data processing system for elderly patients with chronic diseases, which constructs a benchmark behavior paradigm and a benchmark physiological paradigm; in the unsupervised period, when a medication trigger event occurs, based on the benchmark behavior paradigm, an optimal explanation combination is determined from the behavior element events in the behavior observation window after the medication trigger event, and a behavior structure vector is generated; based on the physiological data in the medication observation window after the medication trigger event, a physiological response observation value is determined; the risk type of the medication trigger event is determined by combining the behavior structure vector and the physiological response observation value; when the risk type is determined as normal medication, the benchmark behavior paradigm and the benchmark physiological paradigm are iteratively updated using the data of the medication trigger event, and the risk type of the next medication trigger event is determined using the updated two paradigms. The scheme can effectively distinguish the confirmatory check behavior caused by memory loss from the repeated medication behavior.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical auxiliary technology, specifically to a data processing system for safe home medication use by elderly patients with chronic diseases. Background Technology

[0002] Elderly patients with chronic diseases, especially those with cognitive impairment, often need to follow complex multi-drug regimens while at home, making medication safety a core aspect of health management. Current technologies, such as some terminal devices, monitor patient medication behavior by recording the timestamps of medication compartment opening events. However, this method has fundamental technical limitations when applied to patients with mild to moderate cognitive impairment, particularly those with declining working memory. Due to the decline in working memory, these patients are highly susceptible to interruptions in performing procedural tasks like taking medication; after the interruption, they often repeatedly open the medication compartment because they cannot accurately recall their state of mind before the interruption.

[0003] Existing technologies can only record discrete time points of behavior and cannot understand the behavioral structure and user intent behind these time points. They cannot effectively distinguish between the following two situations: one is the "checking behavior of repeatedly checking for confirmation" performed by patients because they are unsure whether they have taken their medication; the other is the "dangerous behavior of repeating medication due to forgetting" performed by patients because they have completely forgotten that they have taken their medication, which leads to the underreporting or false reporting of high-risk medication events. Summary of the Invention

[0004] To address the technical problem of accurately distinguishing between confirmatory testing behaviors and repeated medication behaviors caused by memory impairment in patients with cognitive impairment, the present invention aims to provide a home medication safety data processing system for elderly patients with chronic diseases. The specific technical solution adopted is as follows: This invention proposes a home medication safety data processing system for elderly patients with chronic diseases, the system comprising: The data acquisition module is used to acquire the user's behavioral meta-event sequence during the preset calibration period. The behavioral meta-event includes the event type, trigger time, and duration. The paradigm construction module is used to extract normal medication event sequences from the behavioral meta-event sequences and construct a baseline behavioral paradigm based on the normal medication event sequences; and to construct a baseline physiological paradigm based on the changes in physiological data of the user at each time point within the medication observation window after the normal medication event sequences. The behavioral and physiological analysis module is used to determine the optimal explanatory combination from behavioral meta-events within the behavioral observation window after the drug-triggered event, based on the baseline behavioral paradigm, during the unsupervised period; generate a behavioral structure vector based on the optimal explanatory combination; and determine the physiological response observation value based on the degree of deviation of the physiological data within the drug observation window after the drug-triggered event from the baseline physiological paradigm. The risk decision and paradigm update module is used to combine the behavioral structure vector and the physiological response observation value to determine the risk type of the medication trigger event; when the risk type is determined to be normal medication, the baseline behavioral paradigm and baseline physiological paradigm are iteratively updated using the data of the medication trigger event, and the risk type of the next medication trigger event is determined using the updated two paradigms.

[0005] Furthermore, the extraction of the normal medication event sequence includes: Arrange the event types of each behavioral meta-event in the behavioral meta-event sequence to obtain the type label sequence; Using a sliding window with a length equal to that of the standard medication template sequence, the type label sequence is traversed by step size 1; when the order of event types in the sliding window is consistent with the standard medication template sequence, the behavior meta-events corresponding to the event types in the sliding window are arranged to form a basic medication event sequence. Obtain the basic medication event sequence that is marked as normal within the preset calibration period, and denot it as the normal medication event sequence.

[0006] Furthermore, the construction of the benchmark behavior paradigm includes: The step interval observation vector is formed by the time interval between the triggering times of every two adjacent behavioral meta-events in the normal medication event sequence, and the action duration observation vector is formed by the duration of each behavioral meta-event in the normal medication event sequence. The normal medication event sequence within the preset calibration period is arranged chronologically to obtain the normal behavior sequence; an initial step-interval covariance matrix and an action duration covariance matrix are constructed, with the main diagonal elements of both matrices being preset variance values ​​and the remaining elements being zero; the step-interval observation vector and action duration observation vector of the first normal medication event sequence in the normal behavior sequence are denoted as the initial step-interval vector and action duration vector, respectively; the initial two vectors and two matrices constitute the initial medication behavior paradigm; Starting from the second normal medication event sequence in the normal behavior sequence, traverse the normal behavior sequence and perform an iterative update operation: based on the step interval observation vector and action duration observation vector of the normal medication event sequence used in the current iteration, update the vectors and matrices in the medication behavior paradigm obtained in the previous iteration through the exponentially weighted moving average algorithm to obtain the medication behavior paradigm updated in the current iteration. The medication behavior paradigm obtained after traversing the normal behavior sequence is determined as the baseline behavior paradigm.

[0007] Furthermore, obtaining the medication behavior paradigm after the current iteration update includes: In the formula, and Let represent the step interval vector and action duration vector in the medication behavior paradigm obtained after the k-th iteration update, respectively; and Let represent the step interval vector and action duration vector in the medication behavior paradigm obtained after the (k-1)th iteration update, respectively; and Let represent the step interval vector and action duration vector of the normal medication event sequence obtained after the k-th iteration update, respectively; The preset learning rate parameter; and Let represent the inter-step covariance matrix and the action duration covariance matrix in the medication behavior paradigm obtained after the k-th iteration update, respectively. and Let represent the step interval covariance matrix and the action duration covariance matrix in the medication behavior paradigm obtained after the (k-1)th iteration update, respectively; This is the transpose operator; Depend on , , and This constitutes the medication behavior paradigm obtained after the k-th iteration update.

[0008] Furthermore, the construction of the benchmark physiological paradigm includes: Acquire physiological data of the user at each time point within the medication observation window following the normal medication event sequence within the preset calibration period; The physiological data at each time point within the medication observation window are fitted with a straight line, and the slope of the fitted straight line is taken as the rate of physiological change. The mean and standard deviation of the physiological change rate corresponding to all normal medication event sequences within the preset calibration period are calculated respectively, and the mean and standard deviation constitute the benchmark physiological paradigm.

[0009] Further, determining the optimal combination of explanations includes: Arrange the behavioral meta-events within the behavior observation window after the medication trigger event in chronological order to obtain the window event sequence; Select any behavior meta-event from the window event sequence and record it as the anchor event. Starting from the anchor event, search along the forward and backward directions in the window event sequence to obtain valid candidate events. The event types of the valid candidate events and the anchor events are adjacent in the standard medication template sequence and conform to the search direction; the step interval observation vector and action duration observation vector of the event sequence composed of the valid candidate events and the anchor events are determined, and the Mahalanobis distance between the step interval observation vector and the action duration observation vector and the step interval vector and the action duration vector in the benchmark behavior paradigm are all less than the preset chi-square distribution critical threshold. The anchor event and all valid candidate events are arranged in chronological order to obtain the candidate medication intent sequence of the anchor event; the candidate medication intent sequence of all behavioral meta-events in the window event sequence constitutes the candidate medication intent sequence set of the medication trigger event. Based on the candidate drug intention sequence set, the optimal interpretation combination is generated using the weighted set covering algorithm.

[0010] Furthermore, the step of generating the optimal interpretation combination based on the candidate drug intention sequence set using a weighted set covering algorithm includes: Calculate the Mahalanobis distance between the step interval observation vector and the action duration observation vector of the candidate drug intention sequence and the step interval vector and action duration vector in the baseline behavior paradigm, respectively, and record them as the step interval deviation and the action duration deviation. Then, perform a weighted summation of the step interval deviation and the action duration deviation of the candidate drug intention sequence to obtain the drug intention cost of the candidate drug intention sequence. An initial set of events to be covered is formed by all candidate medication intent sequences in the candidate medication intent sequence set of medication trigger events; an initial result set is set, which is an empty set; The ratio of the number of behavioral meta-events in each candidate medication intent sequence that does not exist in the initial result set within the initial event set to be covered, to the sum of the medication intent cost of the corresponding candidate medication intent sequence and a preset positive number, is denoted as the cost-effectiveness ratio. The candidate medication intent sequence with the largest cost-effectiveness ratio is selected from the initial event set to be covered as the optimal subsequence, the optimal subsequence is added to the result set, and the optimal subsequence is removed from the event set to be covered. Continue selecting new optimal subsequences from the updated set of events to be covered, and use the new optimal subsequences to update the result set and the set of events to be covered respectively, until the updated set of events to be covered is empty; the updated result set when the set of events to be covered is empty is taken as the optimal interpretation combination.

[0011] Further, the step of generating the behavioral structure vector based on the optimal interpretation combination includes: The sum of the number of candidate drug intention sequences in the optimal interpretation combination and the constant 1 is used as the cognitive process interruption index. The number of elements in each medication intention sequence in the optimal interpretation combination is counted, and the candidate medication intention sequence corresponding to the largest number of elements is selected and denoted as the sequence to be judged; when the number of the sequence to be judged is 1, the sequence to be judged is denoted as the main intention sequence; when the number of the sequence to be judged is greater than 1, the sequence to be judged corresponding to the smallest medication intention cost is selected and denoted as the main intention sequence; the step interval deviation of the main graph sequence is denoted as the main intention interval deviation. The number of event types in the standard medication template sequence that do not exist in the behavioral meta-events of the concept graph sequence is taken as the concept graph flow missing degree; A behavioral structure vector is constructed from the cognitive process interruption index, the idea graph interval deviation, and the idea graph process missingness.

[0012] Furthermore, determining the risk type of the medication-triggered event includes: The behavioral structure anomaly index is obtained by weighted summation of the elements in the behavioral structure vector. Acquire physiological data at each time point within the medication observation window after the medication trigger event, and calculate the rate of physiological change; The ratio of the difference between the rate of physiological change corresponding to the drug-triggered event and the mean in the baseline physiological paradigm is used as the numerator, and the sum of the standard deviation and the preset positive number is used as the denominator, is used as the observed value of the physiological response. When the behavioral structure abnormality index is greater than a preset behavioral threshold and the physiological response observation value is greater than the upper limit of a preset normal physiological range, it is determined to be a confirmatory check event. When the abnormal behavior structure index is greater than a preset behavior threshold and the observed physiological response value is lower than the lower limit of a preset normal physiological range, it is determined to be a repeated medication event. When the behavioral structure abnormality index is greater than a preset behavioral threshold and the physiological response observation value is within a preset normal physiological range, it is determined to be a behavioral abnormality event. When the abnormal behavior structure index is less than a preset behavior threshold and the physiological response observation value is within a preset normal physiological range, it is determined to be a normal medication event.

[0013] Furthermore, the event type of the medication triggering event is the same as the first element in the standard medication template sequence.

[0014] The present invention has the following beneficial effects: Firstly, this solution creatively constructs a two-dimensional verification mechanism combining behavioral structure vectors and physiological response observations. At the behavioral level, by solving for the optimal interpretation combination, the chaotic sensor event flow is reconstructed into a structured vector containing a cognitive process interruption index, a mind-graph interphase deviation, and a process missing degree. This enables the system to deeply understand the cognitive logic behind the behavior and quantitatively identify chaotic behavioral characteristics such as patients repeatedly opening and closing medicine boxes.

[0015] Secondly, by utilizing the precise pharmacodynamic effects of commonly used medications on physiological indicators in elderly patients with chronic diseases, physiological response observations are introduced as objective verification evidence. Standardizing real-time physiological data using a benchmark physiological paradigm allows for the precise capture of subtle differences in drug efficacy responses, significantly reducing the probability of underreporting high-risk repeated medication use or falsely reporting harmless examinations.

[0016] Thirdly, through the adaptive closed-loop mechanism established by the risk decision-making and paradigm update module, the baseline behavioral paradigm and baseline physiological paradigm are iteratively updated using only high-confidence data that are believed to be normal medication use. This not only ensures that the monitoring baseline can dynamically follow the natural changes in the movement rate and physiological tolerance of elderly patients with age, avoiding model aging, but also ensures the stability and continuity of the system's ability to distinguish the above-mentioned subtle behaviors and physiological characteristics in long-term home monitoring scenarios.

[0017] In summary, this approach can accurately distinguish between confirmatory testing behaviors and repeated medication behaviors caused by memory impairment in patients with cognitive impairment. Attached Figure Description

[0018] Figure 1 This is a system structure diagram of a home medication safety data processing system for elderly patients with chronic diseases, provided in one embodiment of the present invention. Detailed Implementation

[0019] The following description, in conjunction with the accompanying drawings, details the specific scheme of the home medication safety data processing system for elderly patients with chronic diseases provided by this invention.

[0020] Example 1: Please see Figure 1 The diagram illustrates a system block diagram of a home medication safety data processing system for elderly patients with chronic diseases, provided by an embodiment of the present invention. The system includes: a data acquisition module, a paradigm construction module, a behavioral and physiological analysis module, and a risk decision-making and paradigm update module.

[0021] The data acquisition module is used to acquire the user's behavioral meta-event sequence during the preset calibration period. The behavioral meta-event includes the event type, trigger time, and duration.

[0022] Behavioral events are captured and analyzed through a multimodal sensor network deployed in the user's home environment. The sensor network includes, but is not limited to: inertial measurement units or contact switch sensors installed on medicine boxes to monitor the opening and closing of the medicine box; passive infrared sensors or pressure pads deployed in the medication area (such as near the dining table) to sense the user's presence; and flow sensors in smart water cups or installed near water dispensers to monitor drinking behavior. The system receives the raw signal streams uploaded by the above sensors in real time via wireless communication protocols (such as Bluetooth or wireless network communication technology). Through the module's built-in event parsing logic, the received raw signals are mapped into behavioral events with semantic information. For example, when the infrared sensor continuously outputs a high-level signal for more than a preset duration (such as 2 seconds), it is parsed as an entry into the medication area event; when the medicine box sensor detects an opening action signal, it is parsed as a medicine box interaction event; when the smart water cup detects a change in tilt angle or flow rate, it is parsed as a drinking event. Each behavioral meta-event is encapsulated as a data object containing three core attribute fields: the event type that identifies the semantic category of the event, the trigger time of the sensor signal trigger start point, and the duration of the signal from triggering until it returns to a silent state.

[0023] The preset calibration period refers to a specific learning period set after the system's initial deployment or reset to build a user-individualized baseline model. This period is typically set to the first 7 days after the system goes live. All behavioral meta-events within the preset calibration period are arranged chronologically according to their trigger times to obtain a behavioral meta-event sequence. During this period, the system is in supervised learning mode and will not trigger any risk alerts or interventions. The system will push each identified medication event record to the user's caregiver or guardian through a companion mobile application or interactive interface, requesting the caregiver to perform simple manual annotation to confirm whether the event constitutes normal medication use. The purpose of setting a preset calibration period is to eliminate individual differences in lifestyle habits, movement rates, and physiological characteristics among different users, ensuring that subsequent anomaly detection by the system is based on the user's own baseline rather than general group statistical data, thereby effectively reducing the false alarm rate.

[0024] The paradigm construction module is used to extract normal medication event sequences from behavioral meta-event sequences and construct a baseline behavioral paradigm based on the normal medication event sequences; and to construct a baseline physiological paradigm based on the changes in physiological data of users at each time point within the medication observation window after the normal medication event sequences.

[0025] This system is primarily used to correct patients' long-term erroneous behavioral habits and to provide caregivers with accurate debriefing data. This module is designed to address the lack of personalized baselines. Its core function lies in using supervised calibration data to establish statistical baselines for both the user's explicit behavioral habits (behavioral meta-event sequences) and implicit drug efficacy responses (physiological data changes). By constructing baseline behavioral paradigms, the system can quantify the user's specific movement rhythms; by constructing baseline physiological paradigms, it can understand the user's standard physiological response patterns to specific drugs.

[0026] The Behavioral and Physiological Analysis module is used to determine the optimal explanatory combination from the behavioral meta-events within the behavioral observation window after a medication trigger event occurs during the unsupervised period, based on the baseline behavioral paradigm; generate a behavioral structure vector based on the optimal explanatory combination; and determine the physiological response observation value based on the degree of deviation of the physiological data within the medication observation window after the medication trigger event from the baseline physiological paradigm.

[0027] The unsupervised period refers to the time period following the pre-set calibration period. For behavioral data, the solution to the optimal interpretation combination is used to analyze chaotic sensor data and reduce its dimensionality to a behavioral structure vector containing dimensions such as interruption, rhythm, and missing data, thereby enabling the identification of complex behavioral patterns under cognitive impairment. This solution takes coronary heart disease as an example, a typical chronic non-communicable disease in the elderly. Certain medications commonly taken by elderly patients with coronary heart disease (such as beta-blockers) have a clear and predictable acute inhibitory effect on heart rate. Such physiological data, such as changes in heart rate after medication, can serve as objective evidence to verify whether the drug was actually ingested and effective. For physiological data, standardized physiological response observations relative to a baseline are calculated, providing objective evidence of pharmacodynamics. This module transforms the raw multimodal data into orthogonal, computable high-dimensional features, providing a structured evidence foundation for accurately distinguishing between cognitive impairment repetitions and normal behavioral fluctuations.

[0028] The risk decision and paradigm update module is used to combine behavioral structure vectors and physiological response observations to determine the risk type of medication triggering events. When the risk type is determined to be normal medication, the baseline behavioral paradigm and baseline physiological paradigm are iteratively updated using the data of the medication triggering event. The updated two paradigms are then used to determine the risk type of the next medication triggering event.

[0029] By fusing behavioral structure vectors and physiological response observations, the directionality of physiological evidence addresses the challenge of simple behavioral monitoring failing to distinguish between no-drug and repeat-drug administration, thus determining the final risk type. Simultaneously, a feedback loop is established to iteratively update the dual-paradigm model using only new data confirmed as normal medication use. This ensures the system model dynamically follows the user's slowly changing physiological and behavioral characteristics over time (such as slower movements and changes in drug tolerance), overcoming the performance degradation of static models over time and guaranteeing the system's long-term robustness.

[0030] Preferably, in some possible implementations of the embodiments of the present invention, the method for obtaining a normal medication event sequence includes: arranging the event types of each behavioral meta-event in the behavioral meta-event sequence to obtain a type label sequence; using a sliding window with a length equal to that of the standard medication template sequence, sliding through the type label sequence with a step size of 1; when the order of event types in the sliding window is consistent with the standard medication template sequence, arranging the behavioral meta-events corresponding to the event types in the sliding window to form a basic medication event sequence; obtaining the basic medication event sequence marked as normal within a preset calibration period, and recording it as a normal medication event sequence.

[0031] It should be noted that, in order to accurately locate and extract segments that conform to normal human medication logic from a chaotic event stream, it is necessary to determine whether the order of event types within the sliding window is consistent with the standard medication template sequence. When they are consistent, it indicates that the local event stream within the sliding window conforms to normal medication logic, and a basic medication event sequence is constructed. The labeling method for the basic medication event sequence has been described in the data acquisition module and will not be repeated here.

[0032] In one implementation of this invention, the standard medication template sequence specifies the simplest sequence of event types that must be followed to complete a standard medication process, from front to back: entry area event, medicine box interaction event, and drinking water event, that is, the length of the standard medication template sequence is 3.

[0033] Preferably, in some possible implementations of the embodiments of the present invention, the method for obtaining the benchmark behavioral paradigm includes: constructing an inter-step period observation vector from the time interval between the trigger times of every two adjacent behavioral meta-events in the normal medication event sequence, and constructing an action duration observation vector from the duration of each behavioral meta-event in the normal medication event sequence; arranging the normal medication event sequence within a preset calibration period in chronological order to obtain a normal behavioral sequence; constructing an initial inter-step period covariance matrix and an action duration covariance matrix, wherein the main diagonal elements of the two matrices are preset variance values, and the remaining elements are all zero; and combining the inter-step period observation vector and action duration covariance matrix of the first normal medication event sequence in the normal behavioral sequence. The duration observation vectors are denoted as the initial step-interval vector and action duration vector, respectively. The initial medication behavior paradigm is formed by the two initial vectors and two matrices. Starting from the second normal medication event sequence in the normal behavior sequence, the normal behavior sequence is traversed, and an iterative update operation is performed: based on the step-interval observation vector and action duration observation vector of the normal medication event sequence used in the current iteration, the vectors and matrices in the medication behavior paradigm obtained in the previous iteration are updated using an exponentially weighted moving average algorithm to obtain the medication behavior paradigm updated in the current iteration. The medication behavior paradigm finally obtained after traversing the normal behavior sequence is determined as the baseline behavior paradigm.

[0034] It should be noted that the inter-step observation vector reflects the rhythm of action transitions, while the action duration observation vector reflects the speed of action execution. When initially constructing the paradigm, due to a lack of prior data, the system employs a cold-start strategy: the correlation vector of the first normal medication event sequence in the normal behavior sequence is used as the initial vector in the medication behavior paradigm, and the covariance matrix is ​​initialized as a diagonal matrix with large preset variance values ​​assigned to the diagonal elements. Specifically, the number of rows and columns in the inter-step covariance matrix is ​​equal to the number of elements in the inter-step observation vector, and the number of rows and columns in the action duration covariance matrix is ​​equal to the number of elements in the action duration observation vector.

[0035] In this embodiment of the invention, the preset variance value is set to 900 seconds to express the system's high tolerance for behavioral fluctuations in its initial state. To allow the model to gradually approximate users' actual habits, iterative updates are performed using a sequence of normal medication events within a preset calibration period. The specific update formula is as follows: In the formula, and Let represent the step interval vector and action duration vector in the medication behavior paradigm obtained after the k-th iteration update, respectively; and Let represent the step interval vector and action duration vector in the medication behavior paradigm obtained after the (k-1)th iteration update, respectively; and Let represent the step interval vector and action duration vector of the normal medication event sequence obtained after the k-th iteration update, respectively; The preset learning rate parameter; and Let represent the inter-step covariance matrix and the action duration covariance matrix in the medication behavior paradigm obtained after the k-th iteration update, respectively. and Let represent the step interval covariance matrix and the action duration covariance matrix in the medication behavior paradigm obtained after the (k-1)th iteration update, respectively; This is the transpose operator. , , and This forms the medication behavior paradigm obtained after the k-th iteration update. This update mechanism can not only smooth out the random noise of a single sample, but also dynamically capture the correlation between the time consumption of each step, and finally converge to obtain a robust baseline behavior paradigm.

[0036] As an example, the specific flow of a normal medication event sequence is as follows: Entering the room event: starts at 10:00:00 and lasts for 5 seconds; interval 10 seconds; Taking medication event: starts at 10:00:15 and lasts for 20 seconds; interval 15 seconds; Drinking water event: starts at 10:00:50 and lasts for 8 seconds. The extracted inter-step observation vector is... The action duration observation vector is .

[0037] Preferably, in some possible implementations of the embodiments of the present invention, the method for obtaining the baseline physiological paradigm includes: obtaining physiological data of the user at each time point within a medication observation window after a normal medication event sequence within a preset calibration period; performing linear fitting on the physiological data at each time point within the medication observation window, and using the slope of the obtained fitted line as the physiological change rate; calculating the mean and standard deviation of the physiological change rates corresponding to all normal medication event sequences within the preset calibration period, and constructing the baseline physiological paradigm from the mean and standard deviation.

[0038] It should be noted that, in this embodiment of the invention, the method for linear fitting is as follows: a two-dimensional space is constructed with time as the horizontal axis and physiological data as the vertical axis. Physiological data at each moment within the medication observation window are mapped onto the two-dimensional space to obtain data points. The least squares method is then used to fit linearly to the data points in the two-dimensional space. The slope of the fitted line, i.e., the rate of physiological change, represents the trend of heart rate change over time. If the rate of physiological change is negative and smaller, it indicates that the drug (β-blocker) is effective, inhibiting the heart rate and causing it to gradually decrease from a higher baseline value. If the rate of physiological change is greater than or equal to zero, it indicates that no drug has been ingested, the heart rate is not inhibited, and remains at its original level, or that anxiety or activity has caused the heart rate to rise instead. The mean and standard deviation of the rate of physiological change corresponding to the normal medication event sequence within the preset calibration period together constitute the baseline physiological paradigm, characterizing the standard trajectory of physiological data changes over time after a user ingests a standard dose of medication.

[0039] In one implementation of this invention, the 60-minute window immediately following the end of the last behavioral event in a normal medication event sequence is designated as the medication observation window. During this period, physiological data is significantly affected by the medication. The physiological data depends on the patient's chronic disease type and the acute efficacy characteristics of the corresponding medication, including but not limited to: for coronary heart disease patients taking antihypertensive drugs, the physiological data is heart rate or electrocardiogram data; for diabetic patients taking rapid insulin or secretagogues, the physiological data is blood glucose data; for hypertensive patients taking diuretics, the physiological data is systolic blood pressure data. The physiological data acquisition frequency is set to once per minute. The implementer can adjust the sampling frequency and the duration of the medication observation window according to the real-time performance of the monitoring equipment and the drug's onset speed.

[0040] It is important to note that the medications prescribed for elderly patients with chronic diseases in this protocol should be strictly limited to those with clear acute physiological efficacy indications that can cause a significant and monotonous decrease in specific physiological characteristics within a short period of time (e.g., but not limited to: a decrease in heart rate caused by beta-blockers, a decrease in blood glucose caused by rapid-acting insulin, or a decrease in systolic blood pressure caused by diuretics), to ensure the effectiveness and specificity of the physiological validation logic. It is also important to note that if the sample size is insufficient during the pre-set calibration period, general physiological data or behavioral templates for the elderly based on big data should be used as initial data to construct baseline behavioral and physiological paradigms, avoiding the shock of a complete cold start.

[0041] Preferably, in some possible implementations of the embodiments of the present invention, the method for obtaining the candidate medication intent sequence set includes: arranging the behavioral meta-events within the behavior observation window after the medication trigger event in chronological order to obtain a window event sequence; randomly selecting a behavioral meta-event from the window event sequence as an anchor event, and searching along the forward and backward directions in the window event sequence starting from the anchor event to obtain valid candidate events; the event type of the valid candidate event and the event type of the anchor event are adjacent in the standard medication template sequence and conform to the search direction; determining the step interval observation vector and action duration observation vector of the event sequence composed of the valid candidate event and the anchor event, wherein the Mahalanobis distance between the step interval observation vector and the action duration observation vector and the step interval vector and the action duration vector in the benchmark behavior paradigm are all less than a preset chi-square distribution critical threshold; arranging the anchor event and all valid candidate events in chronological order to obtain the candidate medication intent sequence of the anchor event; and constructing the candidate medication intent sequence set of the medication trigger event from the candidate medication intent sequences of all behavioral meta-events in the window event sequence.

[0042] It should be noted that the event type of the medication trigger event is the same as the first element in the standard medication template sequence. This is intended to provide a definite time reference and causal start for subsequent intent search by forcibly anchoring the logical starting point of the medication process (i.e., the event of the user entering the medication area), thereby avoiding the loss of behavioral semantic context caused by randomly capturing intermediate states. Limiting the trigger time of each behavioral meta-event in the window event sequence to the number of seconds relative to the start event of the behavioral observation window can eliminate the interference of the specific occurrence time on the time-series analysis.

[0043] The forward direction involves finding the medicine box interaction event after the entry into the medication area, and then finding the drinking water event after the medicine box interaction event. The backward direction involves finding the medicine box interaction event after the drinking water event, and then finding the entry into the medication area event after the medicine box interaction event. Valid candidate events and anchor events must be adjacent in the standard medication template sequence to ensure logical coherence between the searched valid candidate events and anchor events. Since user behavior habits (such as speed of action and step intervals) vary individually and have multidimensional correlations, Mahalanobis distance considers both variance and covariance of each dimension, providing a more scientific measure of the deviation between observed data and personal habit benchmarks. When both calculated Mahalanobis distances are less than the preset chi-square distribution critical threshold, it indicates that the valid candidate events do not differ significantly from the user's personal habits in terms of temporal characteristics and can be considered valid candidates, greatly reducing false alarms caused by fluctuations in normal user behavior.

[0044] In this embodiment of the invention, the preset chi-square distribution critical threshold is a specific value obtained from the chi-square distribution table, representing the acceptable probability of normal behavior. The chi-square distribution critical threshold is set as follows: , where m is the dimension of the inter-step observation vector and the action duration observation vector. For example, when the inter-step observation vector is two-dimensional, if a 95% confidence level is selected, the chi-square distribution critical threshold is set to 5.991.

[0045] In this embodiment of the invention, the 300 seconds following the triggering event of the medication triggering event is used as the behavior observation window.

[0046] It is important to note that if a behavioral meta-event has no valid candidate events, indicating that the behavioral meta-event is a discrete sensor false alarm or irrelevant action that cannot form the most basic logical connection with the context, then the event is considered to have no candidate medication intention sequence and should not be included in subsequent analysis. The calculation formula used when calculating the Mahalanobis distance in the above local coherence constraints is consistent with the Mahalanobis distance formula used in the subsequent step of calculating the medication intention cost. In particular, since the extracted candidate medication intention sequences may be incomplete (e.g., only the entry area event and the medicine box interaction event are present, but the drinking water event is missing), when constructing the inter-step period observation vector and action duration observation vector for calculation, for event types not included in the candidate medication intention sequences, the corresponding vector dimension is set to zero during the calculation process, or a dimensionality reduction calculation method is used, only calculating the Mahalanobis distance between the dimensions corresponding to the actual steps in the subsequence, to ensure the mathematical validity of the calculation process.

[0047] Preferably, in some possible implementations of the embodiments of the present invention, the method for generating the optimal interpretation combination based on a set of candidate medication intent sequences using a weighted set coverage algorithm includes: calculating the inter-step observation vector and action duration observation vector of the candidate medication intent sequence, and sequentially recording the Mahalanobis distances between them and the inter-step deviation vector and action duration vector in the baseline behavior paradigm as the inter-step deviation and action duration deviation, respectively; performing a weighted summation of the inter-step deviation and action duration deviation of the candidate medication intent sequence to obtain the medication intent cost of the candidate medication intent sequence; constructing an initial set of events to be covered from all candidate medication intent sequences in the set of candidate medication intent sequences that trigger medication events; and setting an initial result set, which is an empty set. The ratio of the number of behavioral meta-events in each candidate medication intent sequence within the initial event set to be covered that do not exist in the initial result set to the numerator, and the sum of the medication intent cost of the corresponding candidate medication intent sequence and a preset positive number to the denominator, is denoted as the cost-effectiveness ratio. The candidate medication intent sequence with the largest cost-effectiveness ratio is selected from the initial event set to be covered as the optimal subsequence, added to the result set, and removed from the event set to be covered. New optimal subsequences are selected from the updated event set to be covered, and the result set and event set to be covered are updated using the new optimal subsequences until the updated event set to be covered is empty. The updated result set when the event set to be covered is empty is taken as the optimal interpretation combination.

[0048] In this embodiment of the invention, the formula for calculating the drug intention cost of the candidate drug intention sequence is as follows:

[0049] In the formula, This represents the medication intention cost of the nth candidate medication intention sequence in the candidate medication intention sequence set; w is a preset weighting coefficient, which is set to 0.7 in this embodiment to adjust the relative importance of the time rhythm of the steps and the execution characteristics of specific actions in the cost evaluation. This represents the nth candidate drug intention sequence in the candidate drug intention sequence set; and These represent the step interval deviation and action duration deviation of the nth candidate drug intention sequence in the candidate drug intention sequence set, respectively. and These represent the step interval observation vector and action duration observation vector, respectively, of the nth candidate drug intention sequence in the candidate drug intention sequence set; and These represent the step interval vector and action duration vector in the baseline behavior paradigm, respectively. and These represent the inter-step covariance matrix and the action duration covariance matrix in the baseline behavior paradigm, respectively. This is the inverse matrix operator; This is the transpose operator. It should be noted that if... The smaller the value, the stronger the candidate drug intent sequence. The more it aligns with a user's normal habits, the higher its credibility as a legitimate medication intention.

[0050] The number of behavioral meta-events in the candidate medication intent sequence that do not exist in the initial result set represents the marginal contribution of the sequence to the overall explanation task; the medication intent cost plus a preset positive number (divisible-zero correction) represents the degree of deviation from normal behavior required to introduce this explanation, where the preset positive number is set to... A higher cost-effectiveness ratio indicates stronger explanatory power for the candidate drug intention sequence, meaning it covers more new events and better aligns with user habits. Selecting the candidate drug intention sequence with the highest cost-effectiveness ratio as the optimal subsequence ensures that the final optimal explanatory combination is a globally optimal approximate solution that balances explanatory completeness and behavioral rationality. When the set of events to be covered is empty, it indicates that all candidate drug intention sequences have been explained; the result set at this point is taken as the optimal explanatory combination.

[0051] Preferably, in some possible implementations of the embodiments of the present invention, the method for obtaining the behavioral structure vector includes: using the sum of the number of candidate medication intention sequences in the optimal interpretation combination and a constant 1 as the cognitive process interruption index; counting the number of elements in each medication intention sequence in the optimal interpretation combination, selecting the candidate medication intention sequence corresponding to the largest number of elements, and recording it as the sequence to be judged; when the number of sequences to be judged is 1, recording the sequence to be judged as the main intention sequence; when the number of sequences to be judged is greater than 1, selecting the sequence to be judged corresponding to the smallest medication intention cost and recording it as the main intention sequence; recording the step-interval deviation of the idea graph sequence as the main intention interval deviation; using the number of event types in the standard medication template sequence that do not exist in the behavioral meta-events of the idea graph sequence as the idea graph process missing degree; and constructing the behavioral structure vector from the cognitive process interruption index, the idea graph interval deviation, and the idea graph process missing degree.

[0052] It's important to note that the cognitive process interruption index directly quantifies the degree of fragmentation in a user's thinking during task execution, i.e., the number of intention breaks. When the cognitive process interruption index is 0, it indicates that the user's behavioral intention is singular and continuous. The more elements in a medication intention sequence, the more behavior it explains, representing a more complete intention attempt, thus prioritizing the element quantity judgment. When multiple sequences exist, the sequence with the lowest medication intention cost has the highest credibility as a normal medication intention, resulting in the idea graph sequence. The smaller the deviation between idea graph intervals, the lower the degree of disorder in the user's action rhythm during the main attempt. The idea graph process missingness reflects the quality of core task completion; the smaller the value, the higher the quality of core task completion. The behavioral structure vector formed by these three factors provides a structured evidentiary foundation for accurately distinguishing between cognitively impaired repetitions and normal behavioral fluctuations.

[0053] Preferably, in some possible implementations of the embodiments of the present invention, the method for determining the risk type of a medication triggering event includes: weighted summation of elements in the behavioral structure vector to obtain a behavioral structure abnormality index; acquiring physiological data at each time point within the medication observation window after the medication triggering event, and calculating the physiological change rate; using the ratio of the difference between the physiological change rate corresponding to the medication triggering event and the mean in the benchmark physiological paradigm as the numerator, and the sum of the standard deviation and a preset positive number as the denominator, as the physiological response observation value; when the behavioral structure abnormality index is greater than a preset behavioral threshold and the physiological response observation value is greater than the upper limit of a preset normal physiological range, it is determined to be a confirmatory check event; when the behavioral structure abnormality index is greater than the preset behavioral threshold and the physiological response observation value is lower than the lower limit of a preset normal physiological range, it is determined to be a repeated medication event; when the behavioral structure abnormality index is greater than the preset behavioral threshold and the physiological response observation value is within a preset normal physiological range, it is determined to be a behavioral abnormal event; when the behavioral structure abnormality index is less than the preset behavioral threshold and the physiological response observation value is within a preset normal physiological range, it is determined to be a normal medication event. The preset positive number is used to prevent the denominator from being zero, thus rendering the fraction meaningless, and is set to... The physiological rate of change of the medication observation window after the medication triggering event is obtained in the same way as the physiological rate of change of the medication observation window after the normal medication event sequence within the preset calibration period.

[0054] It should be noted that the behavioral structure abnormality index In the formula, The cognitive process interruption index in the behavioral structure vector; The deviation of the main graph from the behavioral structure vector; The scaling factor for normalizing the Mahalanobis distance is a preset reference distance constant, used to eliminate dimensional differences. In this embodiment, it is set to 3. The degree of missing information in the concept graph process within the behavioral structure vector; The preset weighting coefficients are 0.4, 0.3, and 0.3 in this embodiment, respectively. Implementers can set them according to their specific circumstances. The larger the behavioral structure anomaly index, the more chaotic and abnormal the user's medication behavior is structurally.

[0055] The user in this regimen takes a beta-blocker (such as metoprolol). The core function of this type of drug is to inhibit sympathetic nerve excitation and slow down the heart rate. The user's heart rate will show a downward trend when taking the drug.

[0056] When the behavioral structure abnormality index exceeds the preset behavioral threshold and the observed physiological response value exceeds the upper limit of the preset normal physiological range, it indicates behavioral confusion and a heart rate decline rate significantly lower than normal or even unchanged. This is considered a confirmatory check event, indicating the user repeatedly checked without actually taking medication due to forgetfulness, and a medication failure reminder is issued. When the behavioral structure abnormality index exceeds the preset behavioral threshold and the observed physiological response value falls below the lower limit of the preset normal physiological range, it indicates behavioral confusion and drastic changes in physiological indicators far exceeding normal ranges. This is considered a duplicate medication event, indicating the user mistakenly ingested multiple doses during confusion, and an overdose alarm is issued, notifying the caregiver. When the behavioral structure abnormality index exceeds the preset behavioral threshold and the observed physiological response value is within the preset normal physiological range, it indicates the medication was taken correctly but the behavior was confused, a simple behavioral abnormality event, and cognitive decline is recorded. When the behavioral structure abnormality index is less than or equal to the preset behavioral threshold and the observed physiological response value is within the preset normal physiological range, it indicates relatively orderly behavior and a physiological response within a reasonable range of fluctuation, and is considered a normal medication event. When the behavioral structure abnormality index is less than or equal to the preset behavioral threshold and the physiological response observation value is not within the preset normal physiological range, it reflects that the patient can smoothly perform the medication action but has not ingested effective drugs or has taken too much drugs, which means ineffective medication or overdose, and an alarm is required.

[0057] In one implementation of this invention, the preset behavioral threshold is typically set as the sum of the upper quartile of the behavioral structure abnormality index calculated from all normal medication event sequences collected during the calibration period and 1.5 times the interquartile range. Since the physiological response observations have been Z-score standardized, the preset normal physiological interval is set to [-1.96, +1.96], which covers 95% of the confidence interval in the standard normal distribution and can be set in real time according to specific circumstances.

[0058] In this embodiment of the invention, based on the inter-step observation vector and action duration observation vector of the purpose graph sequence corresponding to the medication triggering event, an iterative update method for the medication behavior paradigm during the acquisition of the baseline behavior paradigm is adopted to update the baseline behavior paradigm. The mean and standard deviation of the physiological change rate corresponding to all normal medication event sequences and the physiological change rate of the purpose graph sequence corresponding to the medication triggering event within the preset calibration period are used to construct the updated baseline physiological paradigm.

[0059] This invention is now complete.

[0060] Example 2: This embodiment of the present invention provides a schematic diagram of a computer device for home medication safety data processing for elderly patients with chronic diseases. The computer device includes: a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the computer device can execute any of the aforementioned home medication safety data processing systems for elderly patients with chronic diseases.

[0061] It should be understood that the device provided in this embodiment is used to execute the above-described home medication safety data processing system for elderly patients with chronic diseases, and therefore can achieve the same effect as the above-described implementation method.

Claims

1. A home medication safety data processing system for elderly patients with chronic diseases, characterized in that, The system includes: The data acquisition module is used to acquire the user's behavioral meta-event sequence during the preset calibration period. The behavioral meta-event includes the event type, trigger time, and duration. The paradigm construction module is used to extract normal medication event sequences from the behavioral meta-event sequences and construct a baseline behavioral paradigm based on the normal medication event sequences; and to construct a baseline physiological paradigm based on the changes in physiological data of the user at each time point within the medication observation window after the normal medication event sequences. The behavioral and physiological analysis module is used to determine the optimal explanatory combination from behavioral meta-events within the behavioral observation window after the drug-triggered event, based on the baseline behavioral paradigm, during the unsupervised period; generate a behavioral structure vector based on the optimal explanatory combination; and determine the physiological response observation value based on the degree of deviation of the physiological data within the drug observation window after the drug-triggered event from the baseline physiological paradigm. The risk decision and paradigm update module is used to combine the behavioral structure vector and the physiological response observation value to determine the risk type of the medication trigger event; when the risk type is determined to be normal medication, the baseline behavioral paradigm and baseline physiological paradigm are iteratively updated using the data of the medication trigger event, and the risk type of the next medication trigger event is determined using the updated two paradigms.

2. The home medication safety data processing system for elderly patients with chronic diseases according to claim 1, characterized in that, The extraction of normal medication event sequences includes: Arrange the event types of each behavioral meta-event in the behavioral meta-event sequence to obtain the type label sequence; Using a sliding window with a length equal to that of the standard medication template sequence, the type label sequence is traversed by step size 1; when the order of event types in the sliding window is consistent with the standard medication template sequence, the behavior meta-events corresponding to the event types in the sliding window are arranged to form a basic medication event sequence. Obtain the basic medication event sequence that is marked as normal within the preset calibration period, and denot it as the normal medication event sequence.

3. The home medication safety data processing system for elderly patients with chronic diseases according to claim 1, characterized in that, The construction of the benchmark behavior paradigm includes: The step interval observation vector is formed by the time interval between the triggering times of every two adjacent behavioral meta-events in the normal medication event sequence, and the action duration observation vector is formed by the duration of each behavioral meta-event in the normal medication event sequence. The normal medication event sequence within the preset calibration period is arranged chronologically to obtain the normal behavior sequence; an initial step-interval covariance matrix and an action duration covariance matrix are constructed, with the main diagonal elements of both matrices being preset variance values ​​and the remaining elements being zero; the step-interval observation vector and action duration observation vector of the first normal medication event sequence in the normal behavior sequence are denoted as the initial step-interval vector and action duration vector, respectively; the initial two vectors and two matrices constitute the initial medication behavior paradigm; Starting from the second normal medication event sequence in the normal behavior sequence, traverse the normal behavior sequence and perform an iterative update operation: based on the step interval observation vector and action duration observation vector of the normal medication event sequence used in the current iteration, update the vectors and matrices in the medication behavior paradigm obtained in the previous iteration through the exponentially weighted moving average algorithm to obtain the medication behavior paradigm updated in the current iteration. The medication behavior paradigm obtained after traversing the normal behavior sequence is determined as the baseline behavior paradigm.

4. The home medication safety data processing system for elderly patients with chronic diseases according to claim 3, characterized in that, The obtained medication behavior paradigm after the current iteration update includes: In the formula, and Let represent the step interval vector and action duration vector in the medication behavior paradigm obtained after the k-th iteration update, respectively; and Let represent the step interval vector and action duration vector in the medication behavior paradigm obtained after the (k-1)th iteration update, respectively; and Let represent the step interval vector and action duration vector of the normal medication event sequence obtained after the k-th iteration update, respectively; The preset learning rate parameter; and Let represent the inter-step covariance matrix and the action duration covariance matrix in the medication behavior paradigm obtained after the k-th iteration update, respectively. and Let represent the step interval covariance matrix and the action duration covariance matrix in the medication behavior paradigm obtained after the (k-1)th iteration update, respectively; This is the transpose operator; Depend on , , and This constitutes the medication behavior paradigm obtained after the k-th iteration update.

5. The home medication safety data processing system for elderly patients with chronic diseases according to claim 1, characterized in that, The construction of the baseline physiological paradigm includes: Acquire physiological data of the user at each time point within the medication observation window following the normal medication event sequence within the preset calibration period; The physiological data at each time point within the medication observation window are fitted with a straight line, and the slope of the fitted straight line is taken as the rate of physiological change. The mean and standard deviation of the physiological change rate corresponding to all normal medication event sequences within the preset calibration period are calculated respectively, and the mean and standard deviation constitute the benchmark physiological paradigm.

6. The home medication safety data processing system for elderly patients with chronic diseases according to claim 3, characterized in that, Determining the optimal combination of explanations includes: Arrange the behavioral meta-events within the behavior observation window after the medication trigger event in chronological order to obtain the window event sequence; Select any behavior meta-event from the window event sequence and record it as the anchor event. Starting from the anchor event, search along the forward and backward directions in the window event sequence to obtain valid candidate events. The event types of the valid candidate events and the anchor events are adjacent in the standard medication template sequence and conform to the search direction; the step interval observation vector and action duration observation vector of the event sequence composed of the valid candidate events and the anchor events are determined, and the Mahalanobis distance between the step interval observation vector and the action duration observation vector and the step interval vector and the action duration vector in the benchmark behavior paradigm are all less than the preset chi-square distribution critical threshold. The anchor event and all valid candidate events are arranged in chronological order to obtain the candidate medication intent sequence of the anchor event; the candidate medication intent sequence of all behavioral meta-events in the window event sequence constitutes the candidate medication intent sequence set of the medication trigger event; Based on the candidate drug intention sequence set, the optimal interpretation combination is generated using the weighted set covering algorithm.

7. The home medication safety data processing system for elderly patients with chronic diseases according to claim 6, characterized in that, The step of generating the optimal interpretation combination based on the candidate drug intention sequence set using a weighted set covering algorithm includes: Calculate the Mahalanobis distance between the step interval observation vector and the action duration observation vector of the candidate drug intention sequence and the step interval vector and action duration vector in the baseline behavior paradigm, respectively, and record them as the step interval deviation and the action duration deviation. Then, perform a weighted summation of the step interval deviation and the action duration deviation of the candidate drug intention sequence to obtain the drug intention cost of the candidate drug intention sequence. An initial set of events to be covered is formed by all candidate medication intent sequences in the candidate medication intent sequence set of medication trigger events; an initial result set is set, which is an empty set; The ratio of the number of behavioral meta-events in each candidate medication intent sequence that does not exist in the initial result set within the initial event set to be covered, to the sum of the medication intent cost of the corresponding candidate medication intent sequence and a preset positive number, is denoted as the cost-effectiveness ratio. The candidate medication intent sequence with the largest cost-effectiveness ratio is selected from the initial event set to be covered as the optimal subsequence, the optimal subsequence is added to the result set, and the optimal subsequence is removed from the event set to be covered. Continue selecting new optimal subsequences from the updated set of events to be covered, and use the new optimal subsequences to update the result set and the set of events to be covered respectively, until the updated set of events to be covered is empty; the updated result set when the set of events to be covered is empty is taken as the optimal interpretation combination.

8. The home medication safety data processing system for elderly patients with chronic diseases according to claim 7, characterized in that, The generation of the behavior structure vector based on the optimal interpretation combination includes: The sum of the number of candidate drug intention sequences in the optimal interpretation combination and the constant 1 is used as the cognitive process interruption index. The number of elements in each medication intention sequence in the optimal interpretation combination is counted, and the candidate medication intention sequence corresponding to the largest number of elements is selected and denoted as the sequence to be judged; when the number of the sequence to be judged is 1, the sequence to be judged is denoted as the main intention sequence; when the number of the sequence to be judged is greater than 1, the sequence to be judged corresponding to the smallest medication intention cost is selected and denoted as the main intention sequence; the step interval deviation of the main graph sequence is denoted as the main intention interval deviation. The number of event types in the standard medication template sequence that do not exist in the behavioral meta-events of the concept graph sequence is taken as the concept graph flow missing degree; A behavioral structure vector is constructed from the cognitive process interruption index, the idea graph interval deviation, and the idea graph process missingness.

9. The home medication safety data processing system for elderly patients with chronic diseases according to claim 5, characterized in that, The determination of the risk type of the medication triggering event includes: The behavioral structure anomaly index is obtained by weighted summation of the elements in the behavioral structure vector. Acquire physiological data at each time point within the medication observation window after the medication trigger event, and calculate the rate of physiological change. The ratio of the difference between the rate of physiological change corresponding to the drug-triggered event and the mean in the baseline physiological paradigm is used as the numerator, and the sum of the standard deviation and the preset positive number is used as the denominator, is used as the observed value of the physiological response. When the behavioral structure abnormality index is greater than a preset behavioral threshold and the physiological response observation value is greater than the upper limit of a preset normal physiological range, it is determined to be a confirmatory check event. When the abnormal behavior structure index is greater than a preset behavior threshold and the observed physiological response value is lower than the lower limit of a preset normal physiological range, it is determined to be a repeated medication event. When the behavioral structure abnormality index is greater than a preset behavioral threshold and the physiological response observation value is within a preset normal physiological range, it is determined to be a behavioral abnormality event. When the abnormal behavior structure index is less than or equal to a preset behavior threshold and the physiological response observation value is within a preset normal physiological range, it is determined to be a normal medication event.

10. The home medication safety data processing system for elderly patients with chronic diseases according to claim 1, characterized in that, The event type of the medication triggering event is the same as the first element in the standard medication template sequence.