Intelligent medicine reminding method for the elderly and intelligent medicine box

By acquiring the initial characteristics of elderly people during medication use, constructing a state vector, and adopting a two-level behavior indexing mechanism, the optimal reminder path is dynamically generated. This solves the adaptability problem of existing intelligent medication reminder systems, realizes personalized and dynamically optimized medication reminders, and improves medication adherence and safety.

CN120732701BActive Publication Date: 2025-11-18ANHUI LEADER TECHNOLOGY INNOVATION DEVELOPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511234026.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-01
Publication Date
2025-11-18
Estimated Expiration
2045-09-01

AI Technical Summary

Technical Problem

Existing smart medication reminder systems lack personalization, resulting in poor reminder effectiveness and a high risk of missed or duplicate medications. They also fail to dynamically adjust based on the elderly person's physical condition and environmental circumstances.

Method used

By acquiring initial features such as the elderly person's hand tremor index, the distance between their hand and the medicine box, the ambient light intensity, and the noise level, a state vector is constructed. A two-level behavior indexing mechanism is used to calculate hash values ​​and index behavior chains, dynamically generating the optimal reminder path and adjusting the reminder method in real time.

Benefits of technology

It improves medication adherence and safety, reduces the risk of missed or incorrect doses, and enables intelligent, personalized, and dynamically optimized medication reminders. It also reduces computational overhead and latency, and features low latency and high scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120732701B_ABST
    Figure CN120732701B_ABST
Patent Text Reader

Abstract

The application is suitable for the field of intelligent medical technology, and particularly relates to an old person intelligent medicine reminding method and an intelligent medicine box. The method comprises the following steps: acquiring initial motion features, initial interaction features and initial environment information, and constructing an initial state vector based on the initial motion features, the initial interaction features and the initial environment information; performing hash value calculation on the initial state vector to determine a state code, and performing a first-level behavior index on the state code to obtain a behavior chain identifier set; performing a second-level behavior index on the behavior chain identifier set to obtain a behavior chain candidate set; dynamically generating an optimal reminding path based on the behavior chain candidate set, and performing real-time medicine reminding for the old person based on the optimal reminding path. The method can realize intelligent, personalized and dynamically optimized medicine reminding based on the real-time state of the old person, and improve the medicine compliance and safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of intelligent medical technology, and in particular relates to intelligent medication reminder methods and intelligent pillboxes for the elderly. Background Technology

[0002] With the accelerating aging of my country's population, the coexistence of multiple diseases and long-term medication use among the elderly is becoming increasingly common, significantly increasing the complexity of medication management. However, the elderly often experience missed doses, duplicate medications, or even medication errors due to memory decline, cognitive impairment, or a lack of health management awareness, increasing medication risks and healthcare burden. Traditional methods relying on manual reminders or paper records are insufficient to meet practical needs. Therefore, intelligent medication reminder systems based on the Internet of Things (IoT), mobile internet, and artificial intelligence (AI) technologies have emerged. These systems utilize wearable devices, smart pillboxes, mobile applications, or voice assistants, combined with big data analysis and personalized management, to achieve medication plan development, medication reminders, abnormal warnings, and data sharing. This helps the elderly improve medication adherence, reduce medication risks, and enhance their quality of life.

[0003] In existing technologies, most intelligent medication reminder methods rely on fixed audio or simple visual cues, lacking the ability to personalize reminders based on different user characteristics. Elderly individuals exhibit significant differences in physical function; for example, some may have unsteady hand movements, slow movements, or weakened visual or auditory functions. Existing systems typically provide reminders at uniform intervals and intensity, failing to dynamically adapt to the actual operational abilities and reaction speeds of the elderly. This results in unsatisfactory reminder effects and even situations where medication is missed or taken twice.

[0004] In summary, the effectiveness of intelligent reminders for elderly medication use is poor due to the limited variety and lack of adaptability of the reminder methods. Summary of the Invention

[0005] This application provides a smart medication reminder method and a smart pillbox for the elderly, which can solve the problem in related technologies where the reminder method is singular and lacks adaptability, resulting in poor reminder effect.

[0006] In a first aspect, embodiments of this application provide a method for providing intelligent medication reminders for the elderly, including:

[0007] Initial motion features, initial interaction features, and initial environmental information are acquired, and an initial state vector is constructed based on the initial motion features, the initial interaction features, and the initial environmental information; wherein, the initial motion features are used to characterize the tremor index of the elderly person's hand, the initial interaction features are used to characterize the distance between the elderly person's hand and the medicine box, and the initial environmental information includes the initial ambient light intensity and the initial ambient noise decibels;

[0008] The initial state vector is hashed to determine the state code, and a first-level behavior index is performed on the state code to obtain a set of behavior chain identifiers; wherein, the first-level behavior index is obtained by looking up the behavior chain identifier corresponding to the state code through the first-level behavior index table.

[0009] A secondary behavior index is performed on the behavior chain identifier set to obtain a candidate behavior chain set; wherein, the secondary behavior index is used to find the behavior chain corresponding to the behavior chain identifier through the secondary behavior index table. The behavior chain is a series of reminders to guide the elderly to take medication. The behavior chain includes a series of behavior nodes for medication reminders, the preset time for completing the action corresponding to each behavior node, and prompt parameters.

[0010] Based on the candidate set of behavior chains, an optimal reminder path is dynamically generated, and based on the optimal reminder path, medication reminders are given to the elderly in real time.

[0011] The technical solutions described in this application embodiment have at least the following technical effects:

[0012] The intelligent medication reminder method for the elderly provided in this application first acquires initial motion features (characterizing the tremor index of the elderly person's hands), initial interaction features (characterizing the distance between the elderly person's hands and the medicine box), and initial environmental information (initial ambient light intensity and initial ambient noise decibels). Based on the initial motion features, initial interaction features, and initial environmental information, an initial state vector is constructed. Then, a hash value is calculated on the initial state vector to determine the state code. A first-level behavior index is applied to the state code (by looking up the behavior chain identifier corresponding to the state code in the first-level behavior index table) to obtain a set of behavior chain identifiers. A second-level behavior index is then applied to the set of behavior chain identifiers (by looking up the behavior chain corresponding to the behavior chain identifier in the second-level behavior index table) to obtain a candidate set of behavior chains. (A behavior chain is a series of reminders to guide the elderly person in taking medication. A behavior chain includes a series of medication reminder behavior nodes, a preset duration for completing the action corresponding to each behavior node, and prompt parameters.) Finally, based on the candidate set of behavior chains, an optimal reminder path is dynamically generated, and medication reminders are provided to the elderly person in real time based on the optimal reminder path. This method adopts a two-level behavior indexing mechanism, which can significantly reduce the computational overhead of state matching and behavior chain retrieval, and improve the system response speed. This method employs a two-level behavioral indexing mechanism to accurately locate the corresponding complete medication reminder chain, improving retrieval speed and accuracy. Based on candidate behavioral chains, it dynamically generates the optimal path, allowing for timely adjustments to the reminder method according to real-time status changes, thereby reducing invalid or interfering prompts. During medication administration, this method updates the reminder path in real-time based on the environment and the elderly person's condition, achieving continuous adaptation rather than a fixed, rigid reminder mode. This improves medication adherence in different environments and physical states, reducing the risk of missed or incorrect doses. This method enables intelligent, personalized, and dynamically optimized medication reminders based on the elderly person's real-time status, improving medication adherence and safety. It facilitates efficient adaptation of reminder strategies to various environments and physical states, reducing cognitive burden and interference, and possesses the advantages of low latency and high scalability.

[0013] Secondly, embodiments of this application provide a smart medication reminder device for the elderly, comprising:

[0014] The acquisition unit acquires initial motion features, initial interaction features, and initial environmental information, and constructs an initial state vector based on the initial motion features, initial interaction features, and initial environmental information; wherein, the initial motion features are used to characterize the tremor index of the elderly person's hand, the initial interaction features are used to characterize the distance between the elderly person's hand and the medicine box, and the initial environmental information includes the initial ambient light intensity and the initial ambient noise decibels;

[0015] A first-level behavior index unit is used to calculate the hash value of the initial state vector, determine the state code, and perform a first-level behavior index on the state code to obtain a behavior chain identifier set; wherein, the first-level behavior index is used to look up the behavior chain identifier corresponding to the state code through the first-level behavior index table.

[0016] The secondary behavior index unit is used to perform secondary behavior indexing on the behavior chain identifier set to obtain a candidate set of behavior chains. The secondary behavior index is used to find the behavior chain corresponding to the behavior chain identifier through the secondary behavior index table. The behavior chain is a series of reminders to guide the elderly to take medication. The behavior chain includes a series of behavior nodes for medication reminders, the preset time for completing the action corresponding to each behavior node, and prompt parameters.

[0017] The medication reminder unit is used to dynamically generate the optimal reminder path based on the candidate set of behavior chains, and to provide medication reminders to the elderly in real time based on the optimal reminder path.

[0018] Thirdly, embodiments of this application provide a smart pillbox, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in any of the embodiments of the first aspect.

[0019] It is understood that the beneficial effects of the second and third aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a flowchart illustrating an embodiment of the intelligent medication reminder method for the elderly provided in this application;

[0022] Figure 2 This is an example diagram of the secondary behavior index table in the intelligent medication reminder method for the elderly provided in this application embodiment;

[0023] Figure 3 This is an example diagram of the primary behavior index table of the intelligent medication reminder method for the elderly provided in the embodiments of this application;

[0024] Figure 4 This is a schematic diagram of the structure of the smart pillbox provided in the embodiments of this application. Detailed Implementation

[0025] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0026] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0027] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0028] In related technologies, most intelligent medication reminder methods use fixed sound prompts or simple visual prompts, lacking the ability to personalize reminders based on different user characteristics. Elderly people exhibit significant differences in physical function; for example, some elderly people have unsteady hand movements, slow movements, or weakened visual and auditory functions. Existing systems typically provide reminders at uniform time intervals and with uniform intensity, failing to dynamically adapt to the actual operational abilities and reaction speeds of the elderly, resulting in unsatisfactory reminder effects and even missed or duplicate medication doses.

[0029] Existing reminder mechanisms do not track whether the user has actually retrieved or taken their medication after issuing a reminder signal. If an elderly person fails to take their medication after the initial reminder, the system will continue to repeat the same reminder in a fixed pattern, lacking multi-stage management and optimization based on user behavior feedback. This not only reduces the effectiveness of the reminders but may also increase the psychological burden on the elderly, decreasing their dependence on and enthusiasm for using smart reminder devices.

[0030] During medication reminders, the collection of behavioral information from the elderly is limited, making it difficult to obtain key status information that directly affects the reminder results. For example, it is impossible to identify the elderly person's body movements when retrieving medication, or to accurately determine their operational relationship with the medication's location. Furthermore, they lack the ability to perceive external factors such as ambient light and noise. This information deficiency leads to an inaccurate assessment of the elderly person's true state during reminders, hindering the implementation of more effective reminder strategies.

[0031] To address the aforementioned issues, this application provides a method for intelligent medication reminders for the elderly and an intelligent medicine box. The method first acquires initial motion characteristics (characterizing the tremor index of the elderly person's hand), initial interaction characteristics (characterizing the distance between the elderly person's hand and the medicine box), and initial environmental information (initial ambient light intensity and initial ambient noise decibels). Based on these initial motion characteristics, initial interaction characteristics, and initial environmental information, an initial state vector is constructed. Then, a hash value is calculated on the initial state vector to determine the state code. A first-level behavior index is applied to the state code (by searching for the behavior chain identifier corresponding to the state code in the first-level behavior index table), resulting in a set of behavior chain identifiers. A second-level behavior index is then applied to the behavior chain identifier set (by searching for the behavior chain corresponding to the behavior chain identifier in the second-level behavior index table), resulting in a candidate set of behavior chains (a behavior chain is a series of reminders to guide the elderly person in taking medication; the behavior chain includes a series of medication reminder behavior nodes, a preset duration for completing each behavior node, and prompt parameters). Finally, based on the candidate set of behavior chains, an optimal reminder path is dynamically generated, and based on the optimal reminder path, medication reminders are provided to the elderly person in real time. This method employs a two-level behavioral indexing mechanism, significantly reducing the computational overhead of state matching and behavioral chain retrieval, improving system response speed, and allowing for scalable index tables to facilitate the addition of new state features or reminder strategies in the future, enabling long-term system iteration. Through this two-level behavioral indexing mechanism, the method can accurately locate the corresponding complete medication reminder chain, improving retrieval speed and accuracy. Based on candidate behavioral chains, it dynamically generates the optimal path, allowing for timely adjustments to the reminder method according to real-time state changes, thereby reducing invalid or interfering prompts. During medication administration, this method can update the reminder path in real-time based on the environment and the elderly person's condition, achieving continuous adaptation rather than a fixed, rigid reminder mode. This improves medication adherence in different environments and physical states, reducing the risk of missed or incorrect doses. This method enables intelligent, personalized, and dynamically optimized medication reminders based on the elderly person's real-time state, improving medication adherence and safety, while ensuring that the reminder strategy adapts efficiently to various environments and physical states, reducing cognitive burden and interference, and possessing the advantages of low latency and high scalability.

[0032] The intelligent medication reminder method for the elderly provided in this application embodiment can be applied to intelligent pillboxes. In this case, the intelligent pillbox is the executing entity of the intelligent medication reminder method for the elderly provided in this application embodiment. This application embodiment does not impose any restrictions on the specific type of intelligent pillbox.

[0033] For example, please refer to Figure 4The smart pillbox may include a data acquisition device, a reminder device, and a control device that communicates with the data acquisition device and the reminder device. The data acquisition device may include a tremor index acquisition device, a distance acquisition device, an ambient light acquisition device, and a noise acquisition device. The tremor index acquisition device is a device that can wirelessly connect to a wearable wristband to acquire hand movement data and calculate the hand tremor index based on this data. The wearable wristband has a built-in inertial measurement unit (IMU) that can collect the elderly person's hand movement data and transmit the hand movement data to the tremor index acquisition device via wireless communication methods (such as Bluetooth, Zigbee, or WiFi).

[0034] The distance acquisition device is a device that can detect the distance between a hand and a smart pillbox. It can use ultra-wideband (UWB) technology. A UWB radio frequency transceiver module (such as a UWB chip supporting IEEE 802.15.4z), an antenna, and a microcontroller (MCU) are installed inside the wristband as a tag (mobile terminal). The distance acquisition device is equipped with the same or compatible UWB transceiver module, antenna, and microcontroller as an anchor (base station). The wristband sends UWB pulses to the distance acquisition device, and the distance acquisition device sends UWB pulses back to the wristband after receiving them. The wristband then sends UWB pulses back to the distance acquisition device after receiving them. The distance acquisition device calculates the distance between the hand and the smart pillbox by the round-trip time of the pulses.

[0035] An ambient light acquisition device is a device that can collect the intensity of visible light in the environment, and can be an ambient light sensor (such as a photoresistor (LDR), photodiode, or IC-type ambient light sensor). A noise acquisition device is a device that can collect the level of noise in the environment, and can be a noise sensor (such as a capacitive noise sensor, piezoelectric noise sensor, or resistive noise sensor).

[0036] A reminder device is a device that can provide real-time reminders during the medication process for the elderly. It may include a voice reminder module (such as a speaker and voice chip), a light reminder module (such as LED lights (monochrome or multicolor)), a vibration reminder module (such as a miniature vibration motor, which can be installed at the bottom of the medicine box or on a wristband), and a display reminder module (such as an OLED / LCD display screen, which can display prompt information).

[0037] The control device is a device capable of controlling the data acquisition device and the reminder device, as well as performing data processing. It may include a main control module (such as ESP32 (series), Raspberry Pi Zero, STM32F4 / F7 series, Arduino Nano 33 BLESense), a data acquisition device control module (such as an I2C / SPI controller for controlling the ambient light sensor and noise sensor, and a GPIO / ADC interface for controlling the distance acquisition device), and a reminder device control module (such as a DAC and amplifier for controlling the voice reminder module, a GPIO interface for controlling the light reminder module, a motor drive unit (such as L298N, MOSFET, etc.) for controlling the vibration reminder module, and an I2C / SPI controller for controlling the display reminder module).

[0038] Optionally, the smart pillbox may also include a power module, which can be a rechargeable battery (such as a lithium-ion battery or a lithium polymer battery) or USB direct power (powered via a USB interface (Micro-USB / Type-C)). The power module is connected to the control device, and its output directly powers the control device through a power management chip (PMIC).

[0039] To better understand the intelligent medication reminder method for the elderly provided in the embodiments of this application, the specific implementation process of the intelligent medication reminder method for the elderly provided in the embodiments of this application will be described by way of example below.

[0040] Figure 1 This paper presents a schematic flowchart of a smart medication reminder method for the elderly provided in an embodiment of this application. The smart medication reminder method for the elderly includes:

[0041] S100: Acquire initial motion features, initial interaction features, and initial environmental information, and construct an initial state vector based on these features. The initial motion features characterize the tremor index of the elderly person's hand, the initial interaction features characterize the distance between the elderly person's hand and the medicine box, and the initial environmental information includes the initial ambient light intensity and the initial ambient noise level in decibels.

[0042] It is understandable that initial motor characteristics are used to reflect the stability of the elderly's hand movements. The core indicator is the tremor index, which is a quantitative indicator of the degree of hand tremors. The higher the tremor index, the greater the instability of the hand, which may affect the smooth execution of medication.

[0043] Initial interaction features are used to describe the spatial relationship between the elderly person's hand and the smart pillbox, that is, the distance between the hand and the smart pillbox. This distance can reflect whether the user has approached the pillbox, thereby determining whether to enter the preparation stage for medication.

[0044] The initial ambient light intensity is the light intensity in the surrounding environment. It can be used to determine whether the current environment is too dark or too bright, thus providing a basis for selecting a reminder method (such as adjusting the brightness of visual cues).

[0045] The initial ambient noise level (in decibels) is the background noise level in the surrounding environment. It can be used to determine the effectiveness of using sound prompts in the current environment. Excessive noise may prevent the voice prompts from being heard clearly.

[0046] For example, the acceleration of an elderly person's hand over a short period of time can be detected by an inertial measurement unit (IMU) built into a wristband. The detected acceleration data is transmitted wirelessly (such as via Bluetooth or WiFi) to a tremor index acquisition device in a smart pillbox for tremor index (initial motion characteristic) calculation. The amplitude can be calculated based on the three-axis components (x-axis, y-axis, z-axis) of the acceleration data. A Fast Fourier Transform (FFT) is performed on the amplitude within a time window (e.g., 2s~5s) to obtain the spectrum. The spectrum can be integrated over the total frequency range (e.g., 0.5Hz~20Hz) to obtain the total energy. Medical research shows that hand tremors are mainly concentrated in the 4~12Hz range (physiological / pathological tremors), so this frequency band can be taken as the tremor frequency range. The spectrum can be integrated over the tremor frequency range to obtain the tremor energy. The ratio of tremor energy to total energy is the tremor index.

[0047] The distance acquisition device can detect whether a hand is approaching the medicine box and calculate the actual distance between the hand and the medicine box (initial interaction feature) in real time.

[0048] An ambient light sensor can be used to collect the brightness values ​​of the surrounding environment to obtain the initial ambient light intensity; a noise sensor can be used to collect the background noise intensity of the surrounding environment to obtain the initial ambient noise in decibels.

[0049] The initial motion features, initial interaction features, initial ambient light intensity, and initial ambient noise decibels can be normalized and concatenated into an initial state vector, i.e. ,in, Indicates initial motion characteristics, Indicates initial interaction features, Indicates the initial ambient light intensity, This represents the initial ambient noise level in decibels.

[0050] This step provides accurate and comprehensive basic data for subsequent status analysis and reminder strategy optimization, thereby enabling targeted adaptive adjustments during the reminder process.

[0051] S200: Calculate the hash value of the initial state vector to determine the state code, and perform a first-level behavior index on the state code to obtain a set of behavior chain identifiers. The first-level behavior index is obtained by looking up the behavior chain identifier corresponding to the state code in the first-level behavior index table.

[0052] For example, based on business needs and feature sensitivity, the bucket width or threshold range (bucketing rules) can be predefined for each component (initial motion feature, initial interaction feature, initial ambient light intensity, and initial ambient noise decibels). For example, initial motion characteristics can be categorized by medical level: 0.0~0.2 is categorized as ...

[0053] According to the bucketing rules, each component in the initial state vector can be mapped to the corresponding bucket number to form the bucketed state label vector. For example, if the initial state vector is F=[0.25, 45cm, 250lux, 55dB], then the binning result of the initial state vector is K=[2, 2, 2, 2].

[0054] The benefits of bucketing can include noise immunity, as small fluctuations in values ​​will not cause changes in bucket numbers, thus avoiding frequent switching of alert strategies; simplified index table size, as continuous infinite value states can be compressed into a finite number of bucket combinations, reducing the size of the first-level behavior index table; and controllable precision, as the bucket width can be adjusted to balance precision and system response stability.

[0055] Stable, fast, and low-collision-rate non-cryptographic hash functions (such as XXH3 and MurmurHash3) can be selected, or cryptographic hash functions (such as SHA-256) can be used when security is required. Based on the hash function, the hash value of each component in the bucketing result K can be calculated, and the hash values ​​are combined to form a hash key, which is the state code. ,in, Indicates the status code. The hash value representing the initial motion characteristics. The hash value representing the initial interaction characteristics. A hash value representing the initial ambient light intensity. The hash value represents the initial ambient noise level in decibels.

[0056] The structure of the first-level behavior index table is state-coded. The correspondence between ChainID and behavior chain identifiers can be established. A lookup can be performed in the first-level behavior index table using the status code (SC). If a match is found, the corresponding set of behavior chain identifiers is returned. If no match is found, the search can be downgraded to subkey matching (e.g., ignoring noise components or merging neighboring buckets), or the nearest neighbor code can be found based on similarity (e.g., Hamming distance, edit distance) to ensure that a candidate set is returned even in boundary conditions. If no match is found, the default behavior chain identifier (e.g., a backup path for general speech and high-contrast visual cues) can be returned.

[0057] This step efficiently maps multidimensional continuous state features into compact and unique state codes by bucketing the initial state vector and calculating hash values. Then, it uses a first-level behavior index table to achieve fast matching of state to behavior chain identifiers. This enables low-latency, low-storage-overhead, noise-resistant, and scalable state retrieval in a massive state space, providing high-quality candidate inputs for subsequent second-level behavior index filtering and optimal alert path generation.

[0058] S300, perform secondary behavior indexing on the behavior chain identifier set to obtain a candidate set of behavior chains. The secondary behavior indexing involves finding the behavior chain corresponding to the behavior chain identifier using a secondary behavior index table. The behavior chain is a series of reminders guiding the elderly to take medication. The behavior chain includes a series of medication reminder behavior nodes, the preset duration for completing each behavior node, and prompt parameters.

[0059] It can be understood that the structure of the secondary behavior index table is the correspondence between the behavior chain identifier ChainID and the behavior chain. The behavior chain can include a sequence of behavior nodes, each behavior node corresponding to a medication reminder operation (reminder method and prompt action). The behavior nodes are arranged in execution order to form a complete reminder process (e.g., voice prompt to approach the medicine box → voice prompt to open the medicine box → voice prompt to take the medicine → voice prompt to take the medicine and confirm swallowing). The preset duration for completing the action corresponding to each behavior node refers to the time the system waits for the elderly to complete the corresponding action at that behavior node. For example, the preset time for taking the medicine is 5 seconds, and the preset time for taking the medicine is 10 seconds. The preset duration can be adjusted according to the evaluation results of the elderly's operation speed. The prompt parameters are the intensity of the reminder method, such as voice volume, light color and frequency, screen text size, etc.

[0060] The secondary behavior index table can be traversed to find the behavior chain corresponding to each ChainID in the behavior chain identifier set, and all the matched behavior chains can be combined to form a candidate set of behavior chains.

[0061] This step allows abstract chain identifiers to be mapped into a complete, multimodal, multi-node medication reminder solution that can be executed directly within milliseconds. This ensures retrieval efficiency while making the strategy content flexible and scalable, providing a foundation for subsequent dynamic optimization and personalized adaptation.

[0062] It's understandable that in resource-constrained embedded medication reminder devices (smart pillboxes), the generation of reminder strategies must meet the requirements of low latency, high reliability, and pass security certifications in medical scenarios. While methods like deep learning for dynamically generating reminder strategies directly on the device side offer some flexibility under ideal conditions, they present three main problems in practical implementation:

[0063] First, the computational and response latency cannot meet real-time requirements. When generating a complete medication behavior chain, deep learning models need to perform multi-layer feature extraction and sequence planning on the input state vector. Even after lightweighting and pruning, the inference process still takes hundreds of milliseconds on low-power MCUs like the Cortex-M series, consuming a significant amount of computing power and electrical energy. This not only delays the notification time but also affects battery life, making it difficult to meet the power consumption requirements for more than a year of maintenance-free operation. In contrast, the two-level behavior indexing mechanism advances the generation and verification of the behavior chain to the offline stage. The device only needs to look up the corresponding behavior chain based on the state code to obtain the corresponding behavior chain. The entire process takes only 0.5~2ms, significantly reducing computational overhead and power consumption.

[0064] Secondly, medical certification and interpretability requirements dictate that black-box generation cannot be relied upon entirely. In medical and elderly care scenarios, alert strategies must be reviewed by clinical experts, simulated, and subjected to Failure Mode and Effects Analysis (FMEA) to ensure that no erroneous or potentially risky alerts are triggered under any circumstances. Dynamically generated models, however, output behavior chains determined by internal weights and non-linear calculations, lacking interpretability and predictability. They cannot complete medical safety verification at the moment of generation, thus making certification difficult. Under the two-level behavior indexing mechanism, each behavior chain entered into the database is a white-box rule chain that has undergone offline verification. The content and execution logic of the chain are fully traceable, directly meeting the requirements of medical safety supervision.

[0065] Furthermore, the cost and coverage of behavioral data acquisition limit the feasibility of dynamic generation. Deep learning generation schemes rely on tens of thousands of labeled elderly medication behavior data for training to cover different tremor levels, interaction habits, and environmental conditions. However, the acquisition of real-world behavioral data from the elderly is constrained by ethical and privacy protection concerns, and the collection cycle is long and costly, making it difficult to form sufficient training samples. In contrast, the two-level indexing scheme only needs to collect a limited number of typical medication trajectories. Through state binning and index mapping, it can cover most scenarios. When encountering a very small number of unmatched states, it can also be handled through a safe default path degradation, and the index library can be updated after subsequent offline verification.

[0066] For the reasons mentioned above, a two-level behavioral indexing mechanism can balance low latency (millisecond-level table lookup), high interpretability (auditable links), and low data requirements (only a few typical trajectories are needed) on embedded devices, while also meeting hardware cost and power consumption constraints. This two-level behavioral indexing mechanism effectively avoids the bottlenecks faced by dynamic generation schemes in medical scenarios, such as real-time performance, authentication difficulties, and data scarcity, ensuring the system remains stable, efficient, and secure during long-term operation.

[0067] In one possible implementation, a two-level behavior index table is constructed, including:

[0068] S101, Obtain the historical medication dataset. The historical medication dataset includes a large amount of action path data, historical action duration, and historical state vectors of the elderly during medication use.

[0069] As can be understood, action path data describes the sequence of actions an elderly person takes to complete a full medication process, such as approaching the medicine box → opening the medicine box → taking the medicine → taking the medicine → swallowing. Each action can include the action type (e.g., taking the medicine, taking the medicine, etc.), the timestamp of the action, the trajectory of the action, and a marker indicating whether the action was completed. Historical action duration is the time required for the elderly person to complete each action, and historical state vector is the state at which each action node was executed, which can include motion characteristics, interaction characteristics, ambient light intensity, and ambient noise decibels.

[0070] For example, devices such as accelerometers, gyroscopes, or wearable wristbands can be used to capture the intensity, trajectory, duration, and frequency of hand tremors in the elderly. Cameras or infrared sensors can be used to monitor changes in the distance between the hand and the pillbox, as well as whether the elderly person is taking medication as instructed, such as whether they have opened the pillbox or correctly retrieved the medication, noting the timing and sequence of these actions. Smart pillboxes equipped with RFID or Bluetooth technology can acquire the movement path by sensing whether the elderly person has successfully opened the pillbox or retrieved the medication.

[0071] Motion characteristics were acquired by wearing a wristband and a tremor index acquisition device, interaction characteristics were acquired by a distance acquisition device, ambient light intensity was acquired by an ambient light acquisition device, and ambient noise decibels were acquired by a noise acquisition device.

[0072] After data collection, the collected data can be transmitted in real time to the cloud or local server for further processing and storage. Wireless communication technologies such as WiFi, Bluetooth, or Internet of Things (IoT) can be used to ensure the real-time nature and reliability of the data.

[0073] Based on a unified clock reference, data from different devices can be aligned along the timeline, deleting records with abnormal acquisition or severe missing data, and filling in slightly lost frames. Based on sensor triggering logic and timing rules, action events are automatically labeled, and action sequences are segmented using rules or models to form complete medication action paths. The motion characteristics, interaction characteristics, ambient light intensity, and ambient noise decibels at each action node's corresponding time point are concatenated into a state vector. This state vector is then normalized (e.g., min-max normalization) to unify numerical dimensions for easier subsequent calculations. Each complete medication process can be recorded as a triplet structure of action sequence, duration sequence, and state sequence for subsequent analysis. For example, medication time: 2025-07-01, action sequence: [approach, take medication, ...], duration sequence: [0s, 4.5s, ...], state sequence: [[Ti, D, L, N], ...]. Data can be stored using structured databases (such as PostgreSQL) or serialized storage formats (such as Parquet).

[0074] This step, through multi-source sensing, unified data collection, structured modeling, and quality assurance, constructs the foundational data resources for subsequent behavior chain modeling and reminder strategy optimization. The historical medication dataset not only comprehensively reflects the elderly's medication behavior in real-world scenarios but also provides solid support for the system to achieve a personalized, dynamic, and highly reliable reminder mechanism.

[0075] S201, perform action thinning on the historical medication dataset to obtain an action chain set.

[0076] As we can understand, a action chain refers to a series of actions an elderly person goes through to complete a medication task. For example, this might include taking the medication from the box, putting it in their mouth, and drinking water. Action descaling aims to reduce redundant operational information by merging or simplifying common repetitive actions, making the subsequent construction of the action chain more efficient.

[0077] For example, feature extraction methods, such as acceleration, angular velocity, and positional changes, can be used to identify the specific actions performed by the elderly. For instance, opening a medicine box might involve a certain rotation angle and force variation, while taking medicine involves moving the hand upwards or forwards. The extracted action features are categorized and mapped to specific actions based on predefined labels (such as taking medicine, drinking water, etc.), with each action labeled manually or automatically. Labeling transforms the raw data into structured action information, facilitating subsequent analysis.

[0078] Each individual action in the elderly person's medication process can be extracted from the labeled data. Each action has a specific time, duration, and sequence. Based on the extracted individual actions, a complete action chain can be formed. During the extraction process, some repetitive actions or operations may occur, such as redundant operations like reopening the lid or re-fetching medication. By setting thresholds, repetitive and irrelevant actions can be removed. For example, if the time interval between two medication dispensing actions is less than a certain threshold, they can be combined into one action.

[0079] To reduce data redundancy, similar action chains can be deduplicated. Clustering algorithms (such as K-means) or time-series-based similarity calculations (such as Dynamic Time Warping (DTW)) can be used to identify similar action chains and group them into one category.

[0080] The action chains after completing the above operations are summarized into an action chain collection. The action chain collection includes different types of action chains, describing the typical behavioral paths of various elderly people in the process of taking medication. The content of the action chain collection includes information such as the sequence of a series of medication actions, the time period of each action, and the duration of each action for each action.

[0081] The action chain collection provides basic data support for the subsequent intelligent medication reminder system, which can help the system better understand the elderly's medication behavior and customize personalized medication reminder paths for each elderly person.

[0082] Optionally, in S201, action thinning is performed on the historical medication dataset to obtain a set of action chains, including:

[0083] S2011, the action path data in the historical medication dataset is segmented and labeled to obtain the initial set of action chains.

[0084] For example, action path data can be segmented according to set segmentation rules. For instance, actions can be reasonably segmented based on time periods, changes in the action, or changes in the external environment (such as tremor index, changes in lighting, etc.). Action segmentation rules could be as follows: the start mark is when the distance between the hand and the medicine box detected by the data acquisition device is less than 20cm, indicating that the medicine box has begun to contact the user; the end mark is when the swallowing action is detected by the camera, or when the elderly person presses an interactive button or module to indicate that the medication has been taken; and timeout segmentation is when the person remains still for more than 45 seconds. These conditions can be used as markers for action segmentation.

[0085] By centralizing the occurrence time and duration of actions in historical medication data, a continuous event flow graph can be constructed. This graph connects each action in chronological order, forming a trajectory of the medication process. Each action can be assigned a corresponding label based on its specific characteristics. Action labels can use encoding methods, such as labeling opening a lid as A03 and taking medication as A04. Labeling can consider action characteristics such as duration, direction, and environmental conditions.

[0086] All labeled actions are arranged chronologically to form a complete action chain. The initial set of action chains includes different action chains from the historical medication dataset. Each action chain represents the entire process of an elderly person completing a medication task. This set provides the basic data for subsequent action chain generation.

[0087] These labeled and segmented data can clearly record every step of the elderly person's medication process, thus providing data support for subsequent behavior chain generation and personalized medication reminders.

[0088] S2012, perform motion thinning on each motion chain in the initial set of motion chains to obtain the second set of motion chains.

[0089] It is understandable that the initial set of action chains includes a complete record of all actions taken during each elderly person's medication process. The action chains in the initial set of action chains may include redundant, repetitive, or irrelevant actions. Therefore, action chains can be simplified through thinning operations (time dimension thinning and spatial dimension thinning) to improve the efficiency of subsequent processing and action chain generation.

[0090] For example, time-dimensional thinning simplifies the action chain structure by analyzing the time interval of each action node in the action chain and eliminating overly short and unnecessary actions. Time-dimensional thinning removes unnecessary repetitive actions while retaining the essential action nodes for the elderly during medication use.

[0091] A time interval threshold (e.g., 2 seconds) can be set. When the time interval between two adjacent actions is less than the threshold, the two adjacent actions can be identified as belonging to the same action process. In each action chain, the time difference between adjacent actions can be checked sequentially. If the time interval between two adjacent actions is less than the set time interval threshold, and there is no significant spatial change between the two adjacent actions, the two adjacent actions can be considered redundant, and the two actions can be merged into one action, or one of the actions can be deleted. If the time interval between consecutive actions is very short (e.g., 1 second), and the action content is highly similar (e.g., opening a medicine box multiple times), these actions can be merged into a simpler action.

[0092] Spatial dimension thinning involves analyzing the spatial displacement of each action in a motion chain and eliminating redundant actions with minimal spatial changes. Spatial dimension thinning removes repetitive actions with minimal spatial changes, retaining key steps in the medication process and reducing unnecessary operations, thus making the motion chain simpler and more efficient.

[0093] A spatial displacement threshold (e.g., 5cm) can be set. If the spatial displacement between two consecutive actions is less than the threshold, the two actions are considered redundant. For each action chain, the spatial displacement between each action can be calculated using the motion trajectory in the action path data. If the spatial displacement between two adjacent actions is less than the set threshold, these two adjacent actions can be merged. If the spatial displacement between adjacent actions is small and the action types are repeated (e.g., between adjusting a medicine box and opening a medicine box), adjacent actions can be merged or deleted.

[0094] The action chains that have been thinned out in terms of time and space are combined to form a new dataset, namely the second set of action chains. This set includes the simplified action chains, which represent the most important and concise action paths in the process of medication use in the elderly.

[0095] This step, by thinning through time and space dimensions, not only reduces redundant actions and irrelevant operations, but also retains the most critical parts of each action chain, providing an optimized data foundation for subsequent behavior chain generation and personalized medication reminders.

[0096] For example, in S2012, each action chain in the initial set of action chains is subjected to action thinning to obtain a second set of action chains, including:

[0097] S20121, based on the historical state vector in the historical medication dataset, key nodes are selected for each action chain in the initial action chain set, and the weight of the key nodes of each action chain in the initial action chain set is calculated based on the historical action duration in the historical medication dataset.

[0098] For example, key medical nodes can be predefined, forming the immutable skeleton of the medication action chain. These key medical nodes can be forcibly retained to facilitate the basic execution of the entire medication process. For instance, key medical nodes may include actions such as touching the pillbox (the distance between the hand and the pillbox can be confirmed by a distance acquisition device), taking the pill (the removal of the pill from the pillbox can be confirmed by visual recognition technology or a pressure sensor), and swallowing (the swallowing action can be confirmed by visual recognition technology or by recognizing swallowing sound features).

[0099] In addition to medical critical nodes, dynamically changing nodes (critical nodes) can be selected from each action chain in the initial set of action chains. These dynamically changing nodes help the system adjust its reminder strategy based on actual conditions, enhancing the intelligence of the medication process. Based on action path data in historical medication datasets, the differential rate of change of hand movement acceleration can be calculated. When the rate of change exceeds a set threshold (e.g., 2 m / s²), it can be marked as a critical turning point (i.e., a critical node). For example, an elderly person's hand may experience severe tremors, triggering a special reminder for that action. Based on historical state vectors in historical medication datasets, step changes in motion characteristics (tremor index (TI)) between adjacent actions (e.g., ΔTI > 0.15), as well as drastic changes in ambient light and noise, can be calculated. For example, when ambient light changes significantly, the reminder method or frequency may need to be adjusted.

[0100] The historical action durations in the historical medication dataset include the action durations of key nodes selected using the methods described above. For each action chain in the initial set of action chains, the weight of each key node can be calculated based on its action duration, medical weight, and whether the action of the key node has been completed. The medical weight of a key node that is a medical key node can be set to 1.0, and the medical weight of a key node that is not a medical key node can be set to 0.3, which helps to retain medical key nodes in subsequent weight filtering and thinning.

[0101] S20122, based on the weights of the key nodes of each action chain in the initial action chain set and the historical state vectors in the historical medication dataset, hierarchical thinning is performed on the key nodes of each action chain in the initial action chain set to obtain the second action chain set. Hierarchical thinning includes weight filtering thinning, topology optimization, and state merging.

[0102] For example, weighted filtering thinning filters nodes based on their weights, removing redundant nodes with lower weights. By using the weights of the key nodes in each action chain in the initial set of action chains, key nodes with weights below a threshold (e.g., 0.65) are removed. This eliminates action nodes that contribute little to the medication process, such as transitional actions (e.g., minor adjustments to the medication box), while retaining action nodes that are crucial to medication administration. After weighted filtering, each action chain will retain only the important key nodes, thus simplifying the original action chain and removing redundant parts.

[0103] Topology optimization aims to adjust the structure of action chains, making them more concise and consistent with the logic of medication administration. Based on the key nodes retained in each action chain after weighted filtering and thinning, a graph representing the relationships between key nodes can be constructed. Each key node acts as a node in the graph, and the edges between nodes represent their temporal and sequential relationships in the medication administration process. Shortest path algorithms (such as Dijkstra's algorithm) can be used to optimize the node relationship graph, removing unnecessary redundant nodes and paths, ensuring that the action chain covers all key nodes in the shortest path. For nodes with close sequential relationships and almost synchronous operation in actual medication administration, they can be merged into a simpler action node. For example, if the time interval between opening the medicine box and picking up the medicine is extremely short, these two nodes can be merged into a single medicine picking node. Topology optimization reduces irrelevant nodes and redundant paths, improving the conciseness and execution efficiency of the action chains.

[0104] By using historical state vectors from historical medication datasets, the Euclidean distance between the state vectors of consecutive nodes in the node relationship graph can be calculated. When the distance between two nodes is less than a set threshold (e.g., less than 0.1), the two nodes can be considered to represent the same or similar medication behaviors and can be merged into one node. Through state merging, duplicate state change nodes are reduced, making the action chain more concise, while retaining key nodes with significant state changes, thus avoiding the omission of important medication information.

[0105] Through three steps—weighted filtering and thinning, topology optimization, and state merging—the final generated second set of action chains includes simpler and more efficient action chains.

[0106] These steps not only simplify the action chain and reduce redundant nodes, but also optimize the structure of the action chain while ensuring the integrity of the medication process.

[0107] S2013, calculate the similarity between each action chain in the second action chain set, and based on the similarity between each action chain in the second action chain set, perform an aggregation operation on the action chains in the second action chain set to obtain the action chain set.

[0108] For example, the similarity between each action chain can be calculated based on time. By calculating the time interval difference between corresponding action nodes in the action chain, it can be determined whether the action chains are similar.

[0109] The similarity between each action chain can be calculated based on the action type, and the overlap of action types in the action chain can be analyzed. For example, if two action chains both contain the action sequence of opening a medicine box, taking medicine, and taking medicine, they may have a high degree of similarity.

[0110] The similarity between each action chain can be calculated based on edit distance. The similarity between two action chains can be measured by calculating the edit distance between them (such as the Levenshtein distance). For example, two action chains that can be transformed into each other with only a few insertions, deletions, or replacements are considered to have a high similarity.

[0111] The total similarity can be calculated by weighted averaging the similarities of time, action type, and edit distance.

[0112] A similarity threshold (e.g., 0.8) can be set. If the similarity between two action chains is higher than this threshold, they are considered similar action patterns and can be aggregated. Action chains with a similarity lower than this threshold are considered different action patterns and will not be aggregated.

[0113] Clustering algorithms such as hierarchical clustering, K-means clustering, or DBSCAN can be used to cluster action chains based on similarity. These algorithms group action chains with high similarity into a single class, thus obtaining multiple action patterns. For example, the distance between each pair of action chains can be calculated based on similarity, and hierarchical clustering can be used to progressively merge similar action chains until all action chains belong to the same class, ultimately determining which action chains can be aggregated.

[0114] For each action chain, the time points, action types, and weights can be combined using a weighted average. For example, averaging the time points of similar action chains yields a unified action chain representing that action pattern.

[0115] Alternatively, you can select the most representative action chain from multiple action chains in the cluster as the merged result. For example, you can choose the action chain that is executed the most times, or the action chain that best represents the cluster as the final result.

[0116] After the aggregation operation is complete, a set of action chains is obtained. The aggregated action chains can be validated to check whether they accurately describe the action paths that different elderly individuals might exhibit during medication use. If the aggregation results are unsatisfactory, the similarity threshold or clustering method can be adjusted to further optimize the aggregation effect.

[0117] This step reduces unnecessary complexity by removing redundancy and merging similar action chains, providing streamlined and effective data support for subsequent behavior chain generation and personalized medication reminders.

[0118] S301 generates a set of behavior chains based on the action chain set and historical medication dataset.

[0119] As we can understand, the behavior chain is a series of reminders that guide the elderly through the entire medication process. It includes not only the actions the elderly need to perform, but also external cues on how to perform these actions, such as voice prompts, light indicators, or vibration alerts. The goal of the behavior chain is to enable the elderly to complete each action accurately and promptly through diverse reminder methods.

[0120] For example, for each action chain, a corresponding reminder strategy can be added to each action node. Based on historical medication datasets, it can be analyzed which actions require external prompts, such as needing a light prompt to open a medicine box, or needing a voice prompt when the elderly person has tremors. Appropriate reminder actions are added after each action node. Reminder actions are not limited to voice or light signals; vibration or reminder buttons can also be added to increase guidance and assistance for the elderly.

[0121] When generating the behavior chain, the dynamic changes during medication administration in the elderly can be considered. For example, hand tremors or changes in ambient light may affect the speed or accuracy of movement. Therefore, conditional decision nodes can be introduced into the behavior chain. For instance, if the tremor index (motor characteristic) exceeds a certain threshold, additional reminders or assistive actions can be triggered, such as reminding the elderly to slow down their movements or suggesting additional assistance. If a delay occurs during medication administration, the behavior chain can be adjusted based on the delay time, repeating reminders or providing stronger prompts.

[0122] Combine all action nodes, reminder nodes, and conditional decision nodes into a complete behavior chain according to the order of the action chain. For example, the behavior chain is: Action node: Open medicine box; Reminder node: Voice prompt: Please open medicine box → Action node: Take medicine; Conditional decision node: Check hand tremor index, if tremor is strong, trigger prompt: Please stabilize hand → Action node: Take medicine; Reminder node: Voice prompt: Please take medicine → Action node: Drink water; Conditional decision node: Adjust visual cue intensity according to ambient light intensity.

[0123] All action chains and their corresponding behavior chains are aggregated into a behavior chain collection, which will be integrated into the intelligent medication reminder system. The system can select the most suitable behavior chain for reminders and guidance in real time based on the elderly person's current state.

[0124] This step enables the behavior chain to respond to different medication scenarios and the different needs of the elderly, thereby providing personalized and accurate medication reminder services.

[0125] Optionally, S301, based on the action chain set and the historical medication dataset, a behavior chain set is generated, including:

[0126] S3011, based on the historical action duration of the historical medication dataset, calculate the difficulty coefficient of each action in each action chain.

[0127] For example, the average action duration for each action type can be calculated based on the action duration of each action in each action chain within the action chain set. The ratio between the action duration of each action in each action chain and the average action duration of the corresponding action type can be calculated; this ratio represents the difficulty coefficient of each action in each action chain. A difficulty coefficient less than 1 indicates that the action's execution time is less than the average action duration, suggesting the action is relatively simple; a difficulty coefficient of 1 indicates that the action's execution time is equal to the average action duration, suggesting the action meets the average level; a difficulty coefficient greater than 1 indicates that the action's execution time is greater than the average action duration, suggesting the action is relatively complex.

[0128] S3012, based on the strategy mapping rules, determine the reminder strategy corresponding to the difficulty coefficient of each action in each action chain, and combine each action in each action chain with the reminder strategy corresponding to each action to generate the behavior chain corresponding to each action chain.

[0129] For example, different modal reminder strategies can be pre-defined for different difficulty ranges. For instance, the strategy mapping rule could be: for a difficulty range of [0, 0.8), use a single-modal reminder strategy, such as voice reminder, light reminder, or vibration reminder; for a difficulty range of [0.8, 1.5), use a dual-modal reminder strategy, such as voice and light or voice and vibration; and for a difficulty range ≥1.5, use a trimodal reminder strategy, such as voice, vibration, and light.

[0130] By using preset strategy mapping rules, a reminder strategy corresponding to the difficulty coefficient of each action in each action chain can be matched, and the actions in each action chain can be merged with their corresponding reminder strategies to obtain the behavior chain corresponding to each action chain.

[0131] This step transforms the physical action nodes in the action chain into a multimodal reminder behavior chain, providing data support for subsequent medication reminders and personalized suggestions, which helps the elderly receive timely and appropriate medication reminders.

[0132] S3013, based on the difficulty coefficient of each action in each action chain and the reminder strategy corresponding to each action, calculate the similarity between the behavior chains corresponding to each action chain, and based on the similarity between the behavior chains corresponding to each action chain, merge the behavior chains with similarity exceeding the similarity threshold to obtain a behavior chain set.

[0133] For example, for each behavior chain, the number of common actions between each pair of behavior chains is calculated, where the number of common actions refers to the number of identical actions in two behavior chains. For each common action, the difference in difficulty coefficient between the two behavior chains can be calculated, which is the difference in difficulty coefficient of the identical actions in the two behavior chains, and the average of the difficulty differences of all common actions can be calculated.

[0134] For each common action, calculate the alert policy difference for each identical action. If the identical action in two behavior chains uses the same alert policy, the alert policy difference can be 0; if the identical action in two behavior chains uses different alert policies, the alert policy difference can be 1; or it can be set as a decay coefficient to represent the impact of policy difference on similarity. Calculate the average of the alert policy differences for all common actions.

[0135] Each behavior chain consists of several actions. The total number of actions in each behavior chain can be obtained by counting the number of actions in the behavior chain.

[0136] The similarity between any two behavioral chains can be calculated based on the number of common actions, differences in difficulty levels, differences in reminder strategies, and the total number of actions in the behavioral chains. The total number of actions is the total number of actions corresponding to the action chain with more total actions among the two action chains.

[0137] A similarity threshold, such as 0.85, can be set. Clustering algorithms (such as hierarchical clustering, K-means clustering, etc.) can be used to cluster the behavior chains, grouping those with similarity greater than the threshold into the same category. For each cluster, a representative behavior chain is selected as the representative of that category. If multiple behavior chains have small differences, they can be merged into a new behavior chain, retaining its main action nodes and alert strategies.

[0138] After the above similarity calculation and aggregation, the final set of behavior chains is obtained. Each behavior chain in the set includes a series of reminder actions, the reminder strategy and preset duration for each reminder action, and the state range.

[0139] These steps quantify the difficulty of each action and, combined with strategy mapping rules, match the most suitable reminder method for actions of varying difficulty, thereby generating precise and targeted behavior chains. By calculating the similarity between behavior chains using both difficulty coefficients and reminder strategies, and merging highly similar behavior chains, the number of redundant behavior chains is reduced, lowering storage and retrieval costs while retaining the core medication reminder pattern. This allows the system to more efficiently match appropriate reminder schemes in subsequent operation, achieving personalized, simplified, and highly efficient reminder strategies, thus improving medication adherence and reminder accuracy for the elderly.

[0140] S3014. Based on the historical state vectors and historical action durations in the historical medication dataset, determine the state range and preset duration of each behavior chain in the behavior chain set.

[0141] For example, the historical action duration and historical state vector of each action node in each action chain of the initial set of action chains can be directly read from the historical medication dataset. When each action chain performs action thinning, the retained action nodes inherit their historical action duration and historical state vector intact.

[0142] The state range of an action chain that does not undergo aggregation can be formed by the union of the state vectors of each retained action node. Robust intervals are given for three dimensions (tremor index, ambient light intensity, and ambient noise decibels): interval = [p5, p95] (the 5th and 95th percentiles calculated on this dimension for all retained nodes in the chain), and the action duration of each action remains unchanged.

[0143] Align the nodes of the aggregated action chains (aligning by action type and sequence; branches that cannot be aligned are grouped separately or skipped). Perform a robust aggregation of the duration sets of all nodes of the same type participating in the aggregation, such as a weighted truncated mean. The weights can be the frequency of occurrence of the node in each chain or the overall quality score (success rate) of the chain. The truncation ratio is, for example, 5% for each. This yields the aggregated action duration. The state range of the action chain can be generated using a weighted quantile envelope, which covers individual differences while avoiding infinite expansion. Specifically, weighted quantile intervals are calculated in three dimensions: [P5, P95], with the same weights as above. The aggregated action chain has a unified state range and the action duration of each action.

[0144] The state range of each action chain can be directly mapped to the state range of the corresponding behavior chain, and the action duration of each action can be mapped to the preset duration of the corresponding behavior node in the behavior chain. When multiple behavior chains are merged into one behavior chain, the robust fusion principle consistent with action chain aggregation can be used to calculate the weighted quantile envelope for each of the three dimensions to obtain the state range of the behavior chain (the core range and buffer range can also be output). The weighted truncated mean / weighted median of the preset duration set of the same behavior node (already aligned) is then calculated to obtain the preset duration of the merged behavior node.

[0145] This step, while ensuring data traceability and statistical robustness, processes the state vectors and action durations from historical medication data through thinning, aggregation, and one-to-one mapping to accurately generate the state range of the behavior chain and the preset duration of each behavior node. This not only ensures the adaptability of the final behavior chain to elderly individuals under different tremor indices, environmental noise, and lighting conditions, but also provides a reliable basis for the precise arrangement of reminder rhythms, thereby achieving personalized, environmentally adaptive, and highly successful medication reminder path generation.

[0146] S401, assign a unique identifier to each behavior chain in the behavior chain set to obtain a behavior chain identifier set.

[0147] For example, each behavior chain can be assigned a unique identifier. These identifiers can uniquely represent each behavior chain, facilitating quick retrieval and retrieval of the corresponding behavior chain within the system. The identifiers not only simplify subsequent operations but also provide an efficient mechanism for the management, querying, and updating of behavior chains.

[0148] S501, construct a secondary behavior index table based on the behavior chain identifier set and the behavior chain set.

[0149] For example, a secondary behavior index table can be constructed using a set of behavior chain identifiers and a set of behavior chains. This table maps the unique identifiers of behavior chains to specific behavior chains, forming an efficient lookup structure. The main function of the secondary behavior index table is to quickly find the corresponding behavior chain based on a given behavior chain identifier. For instance, when receiving an elderly person's initial state vector, the behavior chain identifier set can be obtained through the primary behavior index, and then the corresponding behavior chain can be found through the secondary behavior index. This dual index structure improves query efficiency and facilitates rapid response to the elderly person's medication needs in real-time applications. See the example of a secondary behavior index table. Figure 2 .

[0150] Through these steps, the secondary behavior index table can effectively organize various action chains and behavior chains in historical medication data, and associate them with behavior chains through unique identifiers, providing accurate and personalized reminder services for subsequent medication reminder systems.

[0151] In one possible implementation, a first-level behavior index table is constructed, including:

[0152] S10: Based on the historical state vectors in the historical medication dataset, calculate the hash value of each component in each historical state vector, and combine the hash values ​​of each component into a state code to obtain the state code of each historical state vector.

[0153] For example, the implementation method of this step is the same as step S200. By using the bucketing rule, each component in each historical state vector is mapped to the corresponding bucket number to form a historical state label vector. The hash value of each component in the historical state label vector is calculated according to the hash function. The hash values ​​of each component are combined to form a state code, thus obtaining the state code of each historical state vector.

[0154] S20. Based on the historical state vectors and secondary behavior index table in the historical medication dataset, determine the behavior chain identifier corresponding to each historical state vector.

[0155] For example, each behavior chain in the secondary behavior index table has a corresponding state range. For each historical state vector, it can be determined whether each component of the historical state vector falls within the state range of a certain behavior chain. If each component of the historical state vector falls within the state range of the behavior chain, then the historical state vector is bound to the behavior chain identifier of the behavior chain. If each component of the historical state vector falls within the state range of multiple behavior chains, the optimal behavior chain can be selected according to priority, nearest neighbor principle, etc., and its identifier can be bound.

[0156] S30. Construct a first-level behavior index table based on the state code of each historical state vector and the behavior chain identifier corresponding to each historical state vector.

[0157] For example, a mapping relationship can be established between the state code of each historical state vector and its corresponding behavior chain identifier to construct a first-level behavior index table. See the example of a first-level behavior index table. Figure 3 .

[0158] This step can significantly improve the system's efficiency in processing the relationship between state vectors and behavior chains, supporting fast and accurate matching and retrieval of corresponding behavior chain identifiers, and providing a precise data foundation for subsequent personalized reminders and behavior prediction.

[0159] The S400 dynamically generates the optimal reminder path based on the candidate set of behavior chains, and provides real-time medication reminders to the elderly based on the optimal reminder path.

[0160] For example, each behavior chain in the candidate set of behavior chains can be comprehensively evaluated. Evaluation indicators may include: fit score, which can be calculated based on the degree of matching between the initial state vector and the execution conditions and prompt parameters of each behavior node in the behavior chain; execution cost, which may include the total time required to execute the behavior chain and the energy consumption and occupation of the hardware resources involved (such as voice broadcast, LED flashing, screen display, etc.); perceptibility and attainability, which can be obtained from the system logs by extracting the elderly’s past reactions to the behavior chain in similar states (such as whether it was completed in one go, whether repeated prompts were required, etc.), and combined with the current environmental noise and lighting conditions, to predict the probability of the elderly perceiving the prompts and the success rate of completing the prompt actions.

[0161] During the evaluation process, multi-objective optimization methods (such as weighted scoring models or heuristic search) can be employed to comprehensively calculate the aforementioned evaluation indicators according to preset weights, obtaining a comprehensive priority score for each candidate behavior chain. The behavior chain with the highest priority score can be determined as the current optimal reminder path. In cases of conflicting indicators, medication safety and adherence can be prioritized based on strategy rules. For example, when environmental noise is too high, light or vibration-based reminder paths can be prioritized, even if the implementation cost is slightly higher.

[0162] The first behavior node of the optimal reminder path can be used as the current node. Its prompting method, action, parameters, and preset duration can be read, and a reminder can be issued through the corresponding output channel, such as a voice announcement to approach the medicine box, LED flashing, or text popping up on the screen. During the prompting process, sensors can monitor the elderly person's progress in real time to determine whether the action corresponding to the current behavior node has been completed. If the action is not detected within the preset duration, a secondary prompt can be triggered according to the link configuration (e.g., increasing volume or flashing frequency) or a fallback strategy can be implemented (e.g., switching to a more easily perceived prompting method). After the current behavior node is completed, the execution pointer automatically points to the next behavior node, repeating the prompting, detection, and confirmation process until the entire behavior chain is completed. During the link execution, if a significant change in the state vector is detected in real time (e.g., a sudden increase in environmental noise or a rise in the tremor index), the current link can be immediately interrupted, and the candidate set evaluation stage can be re-entered to generate a new optimal reminder path and continue execution, thus ensuring that the strategy continuously matches the elderly person's state. The completion time, number of prompts, success or failure of each behavior node can be recorded in the execution log, providing data support for subsequent behavior chain optimization and adaptive weight adjustment.

[0163] This step enables millisecond-level response to changes in the elderly person's condition, achieving closed-loop control from candidate link evaluation, optimal path generation, real-time reminders, and dynamic adjustments. This not only ensures that the reminder strategy always aligns with the elderly person's current physical condition and environmental conditions, but also significantly improves the success rate and adherence of medication reminders.

[0164] In one possible implementation, S400 dynamically generates the optimal alert path based on the candidate set of behavior chains, including:

[0165] S410: Select the optimal behavior chain from the candidate set of behavior chains.

[0166] For example, the total cost of each behavior chain in the candidate set of behavior chains can be evaluated using a cost function, all behavior chains can be sorted in ascending order of total cost, and the one with the lowest total cost can be selected as the optimal behavior chain.

[0167] The cost function measures the overall execution cost of each action chain. A smaller value indicates a better action chain, and it can include execution time, resource consumption, and environmental adaptability. ,in, Represents the cost function, Indicates the execution time. Indicates resource consumption. Indicates environmental adaptability. , , These represent the weights corresponding to execution time, resource consumption, and environment adaptability, respectively (which can be dynamically adjusted based on initial environment information and initial motion characteristics).

[0168] Execution duration represents the total time required to complete the actions corresponding to all behavior nodes in the behavior chain. It can be used to calculate the preset duration for completing all behavior nodes in the behavior chain. Resource consumption is used to measure the number and type of reminder resources (such as lights, voice, vibration, etc.) required to execute the behavior chain. Consumption scores can be set for different resources, such as setting voice reminders to 1 point, light reminders to 1.5 points, and vibration reminders to 2 points (high power consumption, high device requirements).

[0169] Environmental fit is used to measure the suitability of a behavior chain under initial environmental information and initial motion characteristics. It compares the initial environmental information and initial motion characteristics with the state range of the behavior chain, determining whether the initial ambient light intensity, initial ambient noise level, and initial motion characteristics are within the state range of the behavior chain. If within the state range, the deviation is 0; if below the lower limit of the state range, the deviation is calculated as (lower limit of state range - initial value) / lower limit of state range; if above the upper limit of the state range, the deviation is calculated as (initial value - upper limit of state range) / upper limit of state range. Based on the above deviation calculation method, light deviation, noise deviation, and tremor index deviation are calculated, and environmental fit is calculated using a weighted average based on these deviations.

[0170] This step comprehensively considers factors such as execution time, resource consumption, and environmental adaptability to select the most suitable behavior chain in different environments and the elderly's condition, thereby improving the effectiveness, personalization, and operability of the reminder strategy and reducing execution time and resource waste.

[0171] S420: Obtain current environmental information and current action duration. The current environmental information includes current ambient light intensity and current ambient noise level (decibels). The current action duration represents the time taken for the elderly person to perform an action corresponding to a specific node in the optimal behavior chain.

[0172] For example, once the optimal behavior chain is determined, reminders are issued sequentially according to the behavior nodes in the optimal behavior chain, and the system waits for the elderly to perform the corresponding actions. During the execution of each behavior node, current environmental information and the duration of the current action can be collected in parallel to provide data support for subsequent dynamic adjustment of strategies.

[0173] Current environmental information includes current ambient light intensity and current ambient noise decibels, which can be collected separately by ambient light acquisition devices and noise acquisition devices.

[0174] The execution duration of each action can be timed from the moment the corresponding behavior node begins execution. For example, if the behavior node is a voice prompt to retrieve medication, the timer starts immediately when the system issues the voice prompt. This helps to cover the entire reaction and execution time of the elderly person after receiving the reminder. Different types of actions can be timed by different sensors or devices to detect whether the action is completed, thus obtaining the current action duration. For example, a pressure sensor (detecting a decrease in the amount of medication in the pillbox) or an RFID tag (detecting that a pill has been removed) can be used to detect whether the medication retrieval action is completed; a microphone (detecting swallowing sounds) or visual recognition technology (detecting swallowing movements) can be used to detect whether the swallowing action is completed.

[0175] If no completion signal is detected within the preset time (e.g., 15 seconds), the timer can automatically stop at the timeout point, record the action as incomplete, and mark its duration as timeout. Subsequent reminder strategies can trigger remedial reminders (e.g., another voice prompt, or switching to a stronger reminder mode).

[0176] S430 dynamically adjusts the optimal behavior chain based on current environmental information and current action duration to generate the optimal reminder path.

[0177] For example, the current ambient light intensity can be compared with the ideal light range in the state range of the optimal behavior chain, and the brightness of the indicator light can be appropriately reduced or increased; the current ambient noise decibels can be compared with the ideal noise range in the state range of the optimal behavior chain, and the volume of the indicator sound can be appropriately reduced or increased.

[0178] When the duration of the current action exceeds the preset duration, the waiting time between the current action node and the next action node can be extended to prevent the elderly from receiving the next reminder before completing the current action. Repeated reminders or stronger reminders can be added to the current action node.

[0179] Based on the above dynamic adjustment method, the reminder strategy and execution rhythm of each behavior node can be adjusted according to the real-time situation to form the optimal reminder path.

[0180] The above steps enable adaptive optimization of reminder methods, intensity, and rhythm, improving the effectiveness and operability of reminders, reducing the risk of missed or incorrect doses due to environmental interference or slow movements, and significantly improving medication adherence and safety in the elderly.

[0181] Optionally, S430 dynamically adjusts the optimal behavior chain based on current environmental information and current action duration to generate an optimal reminder path, including:

[0182] S431, based on the current environmental information, optimize the prompt parameters in the optimal behavior chain. These prompt parameters include the brightness of the prompt light and the volume of the prompt.

[0183] It is understandable that during the execution of the optimal behavior chain, the prompt parameters of the currently executed behavior node can be dynamically optimized based on the current environmental information. This allows for adaptive adjustments based on changes in the environment, enhancing the effectiveness and comfort of the prompts, thereby improving medication adherence among the elderly.

[0184] For example, if the current ambient light intensity is within the ideal light range of the optimal behavior chain's state range, the brightness of the indicator light remains unchanged; if the current ambient light intensity exceeds the upper limit of the ideal light range of the optimal behavior chain's state range, the brightness of the indicator light can be reduced to avoid excessive interference; if the current ambient light intensity is below the lower limit of the ideal light range of the optimal behavior chain's state range, the brightness of the indicator light can be increased to help the elderly see the light indicator even in darker environments.

[0185] The adjustment method can be ,in, This indicates the adjusted brightness of the indicator light. Indicates the baseline indicator light brightness (e.g., 100 units of illuminance). The coefficient representing the influence of control deviation can be set as a constant (such as 0.5). This represents the median of the ideal lighting range. For example, if the ideal lighting range is 100~300 lux, then the median of the ideal lighting range is 200 lux. Indicates the current ambient light intensity. This indicates the width of the ideal illumination range. For example, if the ideal illumination range is 100~300 lux, then the width of the ideal illumination range is 200 lux.

[0186] Similarly, if the current ambient noise level is within the ideal noise range of the optimal behavior chain, the prompt volume should remain unchanged; if the current ambient noise level exceeds the upper limit of the ideal noise range of the optimal behavior chain, the volume can be increased so that the elderly can hear the prompt clearly; if the current ambient noise level is below the lower limit of the ideal noise range of the optimal behavior chain, the volume can be reduced to avoid discomfort caused by excessive sound.

[0187] The adjustment method can be ,in, This indicates the adjusted prompt volume. Indicates the baseline volume (e.g., 50 units). This indicates the magnitude of the impact of the noise deviation, and can be set to a constant (such as 0.5). This represents the median of the ideal noise range. For example, if the ideal noise range is 40~60 dB, then the median of the ideal noise range is 50 dB. This indicates the current ambient noise level in decibels. This indicates the width of the ideal noise range. For example, if the ideal noise range is 40~60 dB, then the width of the ideal noise range is 20 dB.

[0188] By monitoring ambient light intensity and noise levels in real time and adjusting the brightness and volume of the indicator lights accordingly, medication reminder parameters can be automatically optimized. This ensures that elderly people receive clear and easily perceptible reminders under various environmental conditions, thereby improving medication adherence and accuracy.

[0189] S432, if the duration of the current action exceeds the preset duration of the current action node, insert an auxiliary sub-chain corresponding to the current action node after the current action node in the optimal action chain. Here, the current action node represents a specific action node in the optimal action chain currently providing medication reminders, and the auxiliary sub-chain helps the elderly person complete the action corresponding to the current action node.

[0190] For example, if the duration of the current action exceeds a preset duration and a set threshold (e.g., 20% of the preset duration), it indicates that the elderly person may be experiencing difficulties, and the logic for inserting an auxiliary subchain can be triggered. For instance, if the preset duration is 5 seconds and the threshold is 20%, and the actual execution time exceeds 6 seconds (i.e., 120% of 5 seconds), then an auxiliary subchain is inserted.

[0191] Once it's determined that an auxiliary subchain needs to be inserted, you can select the auxiliary subchain corresponding to the current action node. The auxiliary subchain can include additional helpful actions or guidance to assist the elderly person in completing the action corresponding to the current action node. The content of the auxiliary subchain can be selected according to the specific context, ensuring that the elderly person receives appropriate assistance when performing the current action.

[0192] An auxiliary subchain can be inserted after the current action node so that the elderly person can continue with the next medication administration step after the action corresponding to the current action node is completed. The insertion of the auxiliary subchain does not interrupt the execution of the optimal action chain, but rather serves as a supplement to the current action node.

[0193] After inserting the auxiliary subchain, the execution progress of the current behavior node can be continuously monitored. If the elderly person completes the action smoothly, the next behavior node will be automatically entered. If the preset time of the auxiliary subchain is exceeded, the prompts of the auxiliary subchain can be adjusted again according to the actual progress. If the prompts in the auxiliary subchain (such as voice, visual or tactile prompts) do not elicit a response from the elderly person, the prompt frequency can be automatically increased until the elderly person completes the operation.

[0194] This step optimizes the execution of each medication behavior node by inserting auxiliary subchains in real time, enabling the system to maintain high efficiency and reliability even in the face of complex or changing environmental conditions. Through dynamic optimization and strategy adjustment, the system can continuously generate the optimal medication reminder path best suited to the current environment and the elderly person's condition, improving the system's intelligence and responsiveness.

[0195] In one possible implementation, the smart medication reminder method for the elderly also includes:

[0196] S4001: Calculate the current execution time based on the current execution time and the total preset time. The current execution time represents the time consumed by the elderly person from the beginning to the current execution of the action corresponding to the optimal behavior chain. The total preset time is the sum of the preset times of all behavior nodes in the optimal behavior chain.

[0197] For example, during the execution of the optimal behavior chain, the execution status of each behavior node can be tracked in real time, and the current elapsed time can be calculated. The total preset time can be obtained by calculating the sum of the preset times of all behavior nodes in the optimal behavior chain.

[0198] The ratio between the current execution time and the total preset time is the current execution progress. The current execution time can be continuously updated and the current execution progress calculated in real time during the execution of each action node. This allows the system to dynamically understand the elderly person's progress at each stage and make corresponding adjustments.

[0199] S4002, when it is determined that the current execution degree is lower than the execution degree threshold, a behavior chain switch is triggered.

[0200] For example, an execution threshold (such as 70%) can be predefined. If the current execution rate is lower than the execution threshold, it can be considered that the optimal behavior chain is not effective in reminding the elderly during medication use, and the behavior chain can be switched.

[0201] Optionally, behavior chain switching includes:

[0202] S4002A: Obtain current motion features and current interaction features, and construct the current state vector based on the current motion features, current interaction features, and current environmental information; S4002B: Based on the current state vector, re-select a new behavior chain through the first-level behavior index and the second-level behavior index; S4002C: Based on the new behavior chain and the optimal behavior chain, determine the switching node of the new behavior chain, and switch the optimal behavior chain to the new behavior chain according to the switching node, and execute the medication reminder from the switching node.

[0203] For example, the implementation method of step S4002A is the same as that of step S100, and will not be repeated here. The set of behavior chain identifiers that match the current state vector can be found through the first-level behavior index table, the set of behavior chains that match the set of behavior chain identifiers can be found through the second-level behavior index table, and a new optimal behavior chain (new behavior chain) can be selected from the set of behavior chains through the cost function.

[0204] It can detect whether the optimal behavior chain and the new behavior chain have common nodes (behavior nodes corresponding to the same actions). If a common node exists and is the current behavior node, it can be identified as the switching node for the new behavior chain, and the system can directly switch to the new behavior chain at the switching node. During the switch, the state of the current behavior node can be preserved to ensure a smooth transition between the optimal and new behavior chains.

[0205] If a common node exists and is located before the current action node, execution can begin from the common node (switching node) of the new action chain, ignoring the execution of the current action node, and continuing to execute the subsequent nodes of the new action chain; if a common node exists and is located after the current action node, the current action node can be executed first, until the current action node is completed, then jump to the common node of the new action chain, and continue to execute the subsequent nodes of the new action chain.

[0206] If no common nodes exist, direct switching is not possible. A transition node can be introduced to make the switching of behavior chains more logical. The transition node helps the system establish a connection between two behavior chains, ensuring a smooth transition. A transition node is a node that simultaneously satisfies the requirements of both the optimal behavior chain and the new behavior chain, or it can be a standard node automatically generated by the system. For example, between two completely different behavior chains, a unified transition node, such as a confirmation of medication status or a completion prompt, can be generated to identify the start and end of the behavior chain switch.

[0207] Alternatively, switching nodes can be determined by defining preconditions and postconditions for each behavior node. For example, if the starting node of the new behavior chain is taking medicine and the current node of the optimal behavior chain is opening the lid, then the completion state of opening the lid can be used as the precondition for the taking medicine node, and a smooth transition can be made.

[0208] By determining whether to switch behavior chains based on the current level of execution, the optimal behavior chain can be adjusted in real time. This ensures that the elderly person always follows the appropriate behavior chain for their current state when taking medication reminders. This helps the system adapt to individual differences and execution abilities among elderly people, avoiding reminder failures or delays caused by adhering to a single behavior chain. These steps not only help the elderly person complete the nodes in the current behavior chain but also allow for dynamic evaluation and adjustment of the behavior chain, achieving smooth switching. The system can adaptively adjust in complex or changing environments, not relying on fixed behavior chains but flexibly switching based on real-time feedback, thereby improving the system's robustness and stability.

[0209] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0210] Corresponding to the intelligent medication reminder method for the elderly described in the above embodiments, this application also provides an intelligent medication reminder device for the elderly, the various units of which can realize the various steps of the intelligent medication reminder method for the elderly.

[0211] The device includes:

[0212] The acquisition unit is used to acquire initial motion features, initial interaction features, and initial environmental information, and to construct an initial state vector based on these features. The initial motion features characterize the tremor index of the elderly person's hand, the initial interaction features characterize the distance between the elderly person's hand and the medicine box, and the initial environmental information includes the initial ambient light intensity and the initial ambient noise level in decibels.

[0213] The first-level behavior index unit is used to calculate the hash value of the initial state vector, determine the state code, and perform a first-level behavior index on the state code to obtain a set of behavior chain identifiers. Specifically, the first-level behavior index is used to look up the behavior chain identifier corresponding to the state code through the first-level behavior index table.

[0214] The secondary behavior index unit is used to perform secondary behavior indexing on the behavior chain identifier set to obtain a candidate set of behavior chains. Specifically, the secondary behavior index searches for the behavior chain corresponding to the behavior chain identifier through the secondary behavior index table. The behavior chain is a series of reminders guiding the elderly to take medication. The behavior chain includes a series of medication reminder behavior nodes, the preset duration for completing the action corresponding to each behavior node, and prompt parameters.

[0215] The medication reminder unit is used to dynamically generate the optimal reminder path based on the candidate set of behavior chains, and to provide medication reminders to the elderly in real time based on the optimal reminder path.

[0216] It should be noted that the information interaction and execution process between the above-mentioned units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0217] This application also provides a smart pillbox. Figure 4 This is a schematic diagram of a smart pillbox provided in one embodiment of this application. The smart pillbox may include a data acquisition device, an alert device, and a control device communicatively connected to the data acquisition device and the alert device. Figure 4 As shown, the control device 6 of the smart pillbox in this embodiment includes: at least one processor 60 ( Figure 4 Only one is shown in the image), at least one memory 61 ( Figure 4 (Only one is shown in the image) and a computer program 62 stored in the at least one memory 61 and executable on the at least one processor 60. When the processor 60 executes the computer program 62, it causes the smart pillbox to perform the steps in any of the above embodiments of the smart medication reminder method for the elderly, or causes the smart pillbox to perform the functions of each unit in the above embodiments of the device.

[0218] For example, the computer program 62 can be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 62 in the control device 6 of the smart pillbox.

[0219] The smart pillbox may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that... Figure 4 This is merely an example of a smart pillbox and does not constitute a limitation on smart pillboxes. It may include more or fewer components than shown in the illustration, or combine certain components, or different components, such as input / output devices, network access devices, buses, etc.

[0220] The processor 60 can be a Central Processing Unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0221] In some embodiments, the memory 61 may be an internal storage unit of the control device 6 of the smart pillbox, such as the hard drive or memory of the smart pillbox. In other embodiments, the memory 61 may be an external storage device of the smart pillbox, such as a plug-in hard drive, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the smart pillbox. Furthermore, the memory 61 may include both internal storage units and external storage devices of the smart pillbox. The memory 61 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 61 can also be used to temporarily store data that has been output or will be output.

[0222] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0223] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A smart medication reminder method for the elderly, characterized in that, include: Initial motion features, initial interaction features, and initial environmental information are acquired, and an initial state vector is constructed based on the initial motion features, the initial interaction features, and the initial environmental information; wherein, the initial motion features are used to characterize the tremor index of the elderly person's hand, the initial interaction features are used to characterize the distance between the elderly person's hand and the medicine box, and the initial environmental information includes the initial ambient light intensity and the initial ambient noise decibels; The initial state vector is hashed to determine the state code, and a first-level behavior index is performed on the state code to obtain a set of behavior chain identifiers; wherein, the first-level behavior index is obtained by looking up the behavior chain identifier corresponding to the state code through the first-level behavior index table. A secondary behavior index is performed on the behavior chain identifier set to obtain a candidate behavior chain set; wherein, the secondary behavior index is used to find the behavior chain corresponding to the behavior chain identifier through the secondary behavior index table. The behavior chain is a series of reminders to guide the elderly to take medication. The behavior chain includes a series of behavior nodes for medication reminders, the preset time for completing the action corresponding to each behavior node, and prompt parameters. Based on the candidate set of behavior chains, an optimal reminder path is dynamically generated, and based on the optimal reminder path, medication reminders are given to the elderly in real time. The step of dynamically generating the optimal reminder path based on the candidate set of behavior chains includes: The optimal behavior chain is selected from the candidate behavior chain set; Obtain current environmental information and current action duration; wherein, the current environmental information includes current ambient light intensity and current ambient noise decibels, and the current action duration is used to characterize the time taken by the elderly to perform the action corresponding to a certain action node in the optimal behavior chain; Based on the current environmental information and the current action duration, the optimal behavior chain is dynamically adjusted to generate the optimal reminder path; The step of dynamically adjusting the optimal behavior chain based on the current environment information and the current action duration to generate the optimal reminder path includes: Based on the current environmental information, the prompting parameters in the optimal behavior chain are optimized; wherein, the prompting parameters include the brightness of the prompting light and the prompting volume; If the duration of the current action exceeds the preset duration of the current behavior node, an auxiliary sub-chain corresponding to the current behavior node is inserted after the current behavior node in the optimal behavior chain; wherein, the current behavior node is used to represent a behavior node in the optimal behavior chain that is currently providing medication reminders, and the auxiliary sub-chain is used to help the elderly complete the action corresponding to the current behavior node.

2. The intelligent medication reminder method for the elderly as described in claim 1, characterized in that, Constructing the secondary behavior index table includes: Obtain historical medication dataset; wherein, the historical medication dataset includes a large amount of action path data, historical action duration, and historical state vector of the elderly medication process; The historical medication dataset is subjected to action thinning to obtain an action chain set; Based on the action chain set and the historical medication dataset, a behavior chain set is generated; Each behavior chain in the behavior chain set is assigned a unique identifier to obtain a behavior chain identifier set. Based on the set of behavior chain identifiers and the set of behavior chains, construct the secondary behavior index table.

3. The intelligent medication reminder method for the elderly as described in claim 2, characterized in that, The action thinning process performed on the historical medication dataset to obtain an action chain set includes: The action path data in the historical medication dataset is segmented and labeled to obtain an initial set of action chains. The action chain in the initial set of action chains is thinned out to obtain the second set of action chains; Calculate the similarity between each action chain in the second action chain set, and based on the similarity between each action chain in the second action chain set, perform an aggregation operation on the action chains in the second action chain set to obtain the action chain set.

4. The intelligent medication reminder method for the elderly as described in claim 3, characterized in that, The process of thinning the action chains in the initial set of action chains to obtain the second set of action chains includes: Based on the historical state vector in the historical medication dataset, key nodes are filtered for each action chain in the initial action chain set, and the weight of the key nodes in each action chain in the initial action chain set is calculated based on the historical action duration in the historical medication dataset. Based on the weights of the key nodes of each action chain in the initial action chain set and the historical state vectors in the historical medication dataset, the key nodes of each action chain in the initial action chain set are subjected to hierarchical thinning to obtain the second action chain set; wherein, the hierarchical thinning includes weight filtering thinning, topology optimization, and state merging.

5. The intelligent medication reminder method for the elderly as described in claim 2, characterized in that, The generation of a behavior chain set based on the action chain set and the historical medication dataset includes: Based on the historical action duration of the historical medication dataset, the difficulty coefficient of each action in each action chain is calculated; Based on the strategy mapping rules, the reminder strategy corresponding to the difficulty coefficient of each action in each action chain is determined, and each action in each action chain is combined with the reminder strategy corresponding to each action to generate the behavior chain corresponding to each action chain; Based on the difficulty coefficient of each action in each action chain and the reminder strategy corresponding to each action, the similarity between the behavior chains corresponding to each action chain is calculated. Based on the similarity between the behavior chains corresponding to each action chain, the behavior chains with similarity exceeding the similarity threshold are merged to obtain the behavior chain set. Based on the historical state vectors and historical action durations in the historical medication dataset, the state range and preset duration of each behavior chain in the behavior chain set are determined.

6. The intelligent medication reminder method for the elderly as described in claim 5, characterized in that, Constructing the first-level behavior index table includes: Based on the historical state vectors in the historical medication dataset, calculate the hash value of each component in each historical state vector, and combine the hash values ​​of each component into a state code to obtain the state code of each historical state vector. Based on the historical state vectors in the historical medication dataset and the secondary behavior index table, determine the behavior chain identifier corresponding to each historical state vector; The first-level behavior index table is constructed based on the state code of each historical state vector and the behavior chain identifier corresponding to each historical state vector.

7. The intelligent medication reminder method for the elderly as described in claim 1, characterized in that, The method further includes: The current time elapsed is counted, and the current execution degree is calculated based on the current time elapsed and the total preset time. The current time elapsed is used to characterize the time consumed by the elderly from the beginning to the current execution of the action corresponding to the optimal behavior chain, and the total preset time is the sum of the preset times of all behavior nodes in the optimal behavior chain. When the current execution level is determined to be lower than the execution level threshold, a behavior chain switch is triggered; The behavior chain switching includes: Obtain current motion features and current interaction features, and construct a current state vector based on the current motion features, the current interaction features, and the current environment information; Based on the current state vector, new behavior chains are re-selected using the first-level behavior index and the second-level behavior index; Based on the new behavior chain and the optimal behavior chain, a switching node for the new behavior chain is determined, and the optimal behavior chain is switched to the new behavior chain according to the switching node, and medication reminders are executed from the switching node.

8. A smart pillbox, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for improving medicine taking health of old people living alone by employing Petri network technology

    CN106021883A

  • Action guidance method and device based on action capture

    CN110045823A