Method and device for reminding people to take medicine on time

By obtaining users' multi-dimensional medication information data, adopting multi-level particle filtering algorithm and Bayesian optimization, and dynamically selecting the optimal reminder strategy, the problem that the existing medication reminder system cannot adapt to users' dynamic situations is solved, and medication compliance is improved.

CN120809070APending Publication Date: 2025-10-17TUBERCULOSIS PROVINCIAL TUBERCULOSIS PREVENTION & CONTROL INST (HUNAN PROVINCIAL CHEST HOSPITAL)
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510934934.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-08
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing medication reminder systems fail to fully consider the user's dynamic context, resulting in limited effectiveness of reminder strategies and the problem of medication non-compliance remains widespread.

Method used

By obtaining the user's multi-dimensional medication information data, a multi-level particle filtering algorithm is used for data preprocessing and status prediction, and Bayesian optimization is combined to dynamically select the optimal reminder strategy to generate personalized reminders.

Benefits of technology

It predicts the probability of missed doses based on the user's dynamic context and generates personalized reminders, thereby minimizing the probability of missed doses and maximizing user response rates, improving the efficiency of medication reminders.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120809070A_ABST
    Figure CN120809070A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a method and device for reminding a user to take medicine on time, and the method comprises the steps: obtaining multi-dimensional medicine taking information data of a user, and generating a multi-modal sequence according to the multi-dimensional medicine taking information data; obtaining an observation sequence by using a first-level particle filtering algorithm; a second-level particle filtering algorithm is utilized, a first particle group is generated according to the observation sequence, and particles in the first particle group represent the possible medicine taking state and context of the user; a second particle group is generated by using a third-level particle filtering algorithm according to the missed service probability and the context state distribution, and each particle in the second particle group represents a reminding strategy; calculating a strategy success rate by simulating an expected medicine taking probability of a reminding strategy in context state distribution, and dynamically selecting an optimal reminding strategy in combination with Bayesian optimization; according to the optimal reminding strategy, medicine taking reminding is sent to the user. According to the method, personalized medicine taking reminding is generated, and the efficiency of medicine taking reminding is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical fields of medical health, data processing and artificial intelligence, and particularly relates to a method and device for reminding taking medicine on time. BACKGROUND

[0002] Medication adherence is a major challenge in the medical field. Non-adherence to medication can lead to worsening health conditions, increased healthcare costs, and reduced treatment effectiveness. Existing medication reminder systems are usually based on fixed schedules or simple trigger mechanisms, lacking the ability to adapt to users' dynamic contexts such as activity status, physiological state, or social interactions. These systems fail to fully consider users' complex behavioral patterns, resulting in limited effectiveness of reminder strategies and the persistence of non-adherence to medication.

[0003] Therefore, there is an urgent need for a data-driven and adaptive medication reminder method that predicts the risk of non-adherence to medication by integrating multiple data sources and provides personalized reminders. SUMMARY

[0004] The present application provides a method for reminding users to take medicine on time, achieving timely and personalized reminders.

[0005] The present application provides the following solutions:

[0006] According to a first aspect, a method for reminding taking medicine on time is provided, the method comprising: obtaining multi-dimensional medication information data of a user, the multi-dimensional medication information data comprising medication data, activity status data, physiological data and social data, generating a multi-modal sequence according to the multi-dimensional medication information data; preprocessing the multi-modal sequence using a first-level particle filter algorithm to obtain an observation sequence; generating a first particle group according to the observation sequence using a second-level particle filter algorithm, the particles in the first particle group representing possible medication states and contexts of the user, the medication states comprising on-time medication, delayed medication, missed medication, busy state and social support state; updating the weights of the particles in the first particle group according to the observation sequence and a pre-trained state transition model, predicting the probability of missed medication of the user at a future time point according to the weights, and generating a context state distribution; generating a second particle group according to the probability of missed medication and the context state distribution using a third-level particle filter algorithm, each particle in the second particle group representing a reminder strategy, the reminder strategy comprising reminder time, manner and intensity; calculating the success rate of the strategy by simulating the expected medication probability of the reminder strategy in the context state distribution, and dynamically selecting the optimal reminder strategy with the objective function of minimizing the probability of missed medication and maximizing the user response rate in combination with Bayesian optimization; sending a medication reminder to the user according to the optimal reminder strategy.

[0007] According to an implementable manner in the embodiments of the present application, the generating a multi-modal sequence according to the multi-dimensional medication information data comprises: performing time synchronization on the multi-dimensional medication information data, aligning time sequences of each data source based on timestamps, and generating a unified time axis observation sequence; fusing the time axis observation sequence by using a dynamic weighting mechanism, the dynamic weighting mechanism adaptively adjusting weights of each data source according to reliability of the data source and a user behavior mode; identifying and eliminating abnormal values in the time axis observation sequence by using an abnormality detection algorithm, the abnormality detection algorithm generating a preliminary multi-modal sequence based on a statistical threshold and context correlation; and performing standardization and dimension reduction processing on the preliminary multi-modal sequence, filling in missing data by using principal component analysis or time sequence interpolation, and generating a final multi-modal sequence, the multi-modal sequence comprising a joint representation of a medication state, an activity state, a physiological state and a social support state.

[0008] According to an implementable manner in the embodiments of the present application, the preprocessing the multi-modal observation sequence by using the first-level particle filter algorithm to generate an observation sequence comprises: generating a group of preprocessed particles by simulating nonlinear and non-Gaussian data distribution by using the first-level particle filter algorithm; and performing smoothing sensor noise and missing data filling processing on the preprocessed particles to generate an observation sequence, wherein the first-level particle filter algorithm uses 20 to 50 particles.

[0009] According to an implementable manner in the embodiments of the present application, the second-level particle filter algorithm uses 50 to 200 particles, and dynamically adjusts the number of particles and the sampling frequency of the first particle group by using Bayesian optimization; and the pre-trained state transition model is generated by hidden Markov model and multi-modal data fusion training.

[0010] According to an implementable manner in the embodiments of the present application, the pre-trained state transition model is generated by hidden Markov model and multi-modal data fusion training comprises: constructing a multi-modal training data set based on user historical data and public medical data sets, the training data set comprising a medication state sequence, an activity state sequence, a physiological state sequence and a social support sequence; estimating an initial state transition probability matrix based on the multi-modal training data set by using a Baum-Welch algorithm of a hidden Markov model, the matrix representing transition probabilities from one medication state and context combination to another state; optimizing the state transition probability matrix by multi-modal data fusion, combining dynamic weighting of medication data, activity state data, physiological data and social data, the dynamic weighting adaptively adjusting according to reliability of the data source and context correlation of the user behavior mode; and training a shallow neural network to predict a dynamic adjustment factor of the state transition probability based on user historical response data and context features by using a supervised learning method, and further optimizing the state transition probability matrix.

[0011] According to an implementable manner in embodiments of the present application, the calculating the strategy success rate by simulating the expected medication probability of the reminding strategy in the context state distribution comprises: deriving a baseline medication probability according to the context state distribution; constructing an utility model according to the baseline medication probability and the reminding strategy, and obtaining an expected medication probability by using the utility model; and obtaining the strategy success rate according to the expected medication probability and an interference cost.

[0012] According to an implementable manner in embodiments of the present application, the method further comprises: receiving user response data, updating the weights of the first particle group, the pre-trained state transition model and the strategy distribution of the second particle group based on the response data, and adjusting the particle number and sampling frequency of the first particle group and the second particle group by Bayesian optimization.

[0013] According to a second aspect, a device for reminding medication on time is provided, the device comprising: a user data acquisition unit configured to acquire multi-dimensional medication information data of a user, the multi-dimensional medication information data comprising medication data, activity state data, physiological data and social data, and generate a multi-modal sequence according to the multi-dimensional medication information data; a first particle filtering unit configured to preprocess the multi-modal sequence by using a first-level particle filtering algorithm to obtain an observation sequence; a second particle filtering unit configured to generate a first particle group according to the observation sequence by using a second-level particle filtering algorithm, a particle in the first particle group representing a possible medication state and a context of the user, the medication state comprising medication on time, delayed medication, missed medication, a busy state and a social support state; update the weight of the particle in the first particle group according to the observation sequence and a pre-trained state transition model, predict a missed medication probability of the user at a future time point according to the weight, and generate a context state distribution; a third particle filtering unit configured to generate a second particle group according to the missed medication probability and the context state distribution by using a third-level particle filtering algorithm, each particle in the second particle group representing a reminding strategy, the reminding strategy comprising a reminding time, a reminding manner and a reminding intensity; calculate a strategy success rate by simulating the expected medication probability of the reminding strategy in the context state distribution, and dynamically select an optimal reminding strategy by taking minimizing the missed medication probability and maximizing a user response rate as an objective function in combination with Bayesian optimization; and a medication reminding sending unit configured to send a medication reminding to the user according to the optimal reminding strategy.

[0014] According to a third aspect, a computer-readable storage medium is provided, having stored thereon a computer program, which, when executed by a processor, implements the steps of the method of any one of the first aspect.

[0015] According to a fourth aspect, an electronic device is provided, comprising:

[0016] one or more processors; and

[0017] a memory associated with the one or more processors, the memory for storing program instructions that, when read and executed by the one or more processors, perform the steps of the method of any one of the first aspect.

[0018] According to the specific embodiments provided in the present application, the following technical effects are disclosed:

[0019] The present application generates a multi-modal sequence by acquiring the medication data, activity state data, physiological data and social data of the user, performs data preprocessing and state prediction by using a multi-level particle filtering algorithm, and dynamically selects an optimal reminding strategy in combination with Bayesian optimization. The method can predict the missed medication probability according to the dynamic context of the user, and generate personalized reminders, thereby minimizing the missed medication probability and maximizing the user response rate, and improving the efficiency of medication reminders.

[0020] Of course, implementing any product of the present application does not necessarily require all the advantages described above to be achieved at the same time. BRIEF DESCRIPTION OF DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0022] Figure 1 System architecture diagram applicable to the embodiments of the present application;

[0023] Figure 2 Flowchart of the method for reminding to take medicine on time provided by the embodiments of the present application;

[0024] Figure 3 Structural block diagram of the device for reminding to take medicine on time provided by the embodiments of the present application;

[0025] Figure 4 Schematic block diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art belong to the scope of protection of the present application.

[0027] The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the description of the application and the appended claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0028] It should be understood that the term "and / or" as used herein merely describes associated objects, and can exist in three forms, for example, A and / or B can mean that A exists alone, A and B exist together, or B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the front and rear associated objects.

[0029] Depending on context, the word "if" as used herein can be interpreted to mean "when" or "while" or "in response to determining" or "in response to detecting." Similarly, the phrase "if it is determined" or "if [a stated condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the stated condition or event]" or "in response to detecting [the stated condition or event]."

[0030] There are currently some technologies for reminding taking medicine on time, which are based on fixed time schedules or simple trigger mechanisms, and cannot fully consider the complex behavior patterns of users, resulting in limited effectiveness of the reminding strategies and lack of adaptability to dynamic situations of users.

[0031] In view of this, the present application provides a new idea. In order to facilitate the understanding of the present application, first, the system architecture based on the present application is described. Figure 1 An exemplary system architecture to which embodiments of the present application can be applied is shown, as shown in Figure 1 The system architecture can include a user device and a device for reminding taking medicine on time located at a server end.

[0032] The user can input multi-dimensional medicine taking information data through the user device, and the user device sends it to the device for reminding taking medicine on time at the server end. The device for reminding taking medicine on time can adopt the method provided in the embodiments of the present application to obtain medicine taking reminders. The server end can send the medicine taking reminders to the user terminal, and the user terminal reminds the user to take medicine by using the medicine taking reminders.

[0033] The user equipment can include, but is not limited to, a smart mobile terminal, a smart home device, a wearable device, a PC (Personal Computer), and the like. The smart mobile device can include a mobile phone, a tablet computer, a notebook computer, a PDA (Personal Digital Assistant), an Internet car, and the like. The smart home device can include a smart television, a smart refrigerator, and the like. The wearable device can include a smart watch, smart glasses, a virtual reality device, an augmented reality device, a mixed reality device, and the like.

[0034] The device for reminding to take medicine on time can be set as an independent server, a server group, or a cloud server. The cloud server, also known as a cloud computing server or a cloud host, is a host product in a cloud computing service system, which is used to solve the defects of large management difficulty and weak service scalability in traditional physical hosts and virtual private server (VPS) services. In addition to the architecture shown in the figure, the device for reminding to take medicine on time can also be set in a computer terminal with strong computing power. Figure 1

[0035] It should be understood that the user equipment and the device for reminding to take medicine on time in the figure are only illustrative. According to the implementation needs, there can be any number of user equipment and devices for reminding to take medicine on time. Figure 1

[0036] Figure 2 A method flowchart for reminding to take medicine on time is provided for the embodiments of the present application. The method can be executed by the device for reminding to take medicine on time in the system shown in the figure. As shown in the figure, the method can include the following steps: Figure 1 Figure 2

[0037] Step 201: Obtain multi-dimensional medicine taking information data of a user, wherein the multi-dimensional medicine taking information data includes medicine taking data, activity state data, physiological data, and social data, and generate a multi-modal sequence according to the multi-dimensional medicine taking information data.

[0038] Step 202: Preprocess the multi-modal sequence by using a first-level particle filtering algorithm to obtain an observation sequence.

[0039] ​​​​Step 203: generating a first particle set according to the observation sequence by using a second-level particle filtering algorithm, wherein the particles in the first particle set represent possible medication states and contexts of the user, and the medication states include on-time medication, delayed medication, missed medication, busy state and social support state; updating the weights of the particles in the first particle set according to the observation sequence and a pre-trained state transition model, predicting the missed medication probability of the user at a future time point according to the weights, and generating a context state distribution.

[0040] Step 204: generating a second particle set according to the missed medication probability and the context state distribution by using a third-level particle filtering algorithm, wherein each particle in the second particle set represents a reminding strategy, and the reminding strategy includes reminding time, manner and intensity; calculating a strategy success rate by simulating the expected medication probability of the reminding strategy in the context state distribution, and dynamically selecting an optimal reminding strategy as an objective function for minimizing the missed medication probability and maximizing the user response rate in combination with Bayesian optimization.

[0041] Step 205: sending a medication reminding to the user according to the optimal reminding strategy.

[0042] As can be seen from the above process, the present application generates a multi-modal sequence by acquiring medication data, activity state data, physiological data and social data of the user, performs data preprocessing and state prediction by using a multi-level particle filtering algorithm, and dynamically selects an optimal reminding strategy in combination with Bayesian optimization. The method can predict the missed medication probability according to the dynamic situation of the user, and generate a personalized reminding, so as to minimize the missed medication probability and maximize the user response rate, thereby improving the efficiency of medication reminding.

[0043] The steps in the above process and the effects that can be further produced will be described in detail below in combination with embodiments. It should be noted that the "first", "second" and the like involved in the present disclosure do not have the limitations of size, order and quantity, and are only used to distinguish in name, for example, "first particle set" and "second particle set" are used to distinguish two particle sets.

[0044] First, the above step 201, i.e., "acquiring multi-dimensional medication information data of the user, the multi-dimensional medication information data including medication data, activity state data, physiological data and social data, and generating a multi-modal sequence according to the multi-dimensional medication information data", will be described in detail in combination with an embodiment.

[0045] Acquiring multi-dimensional medication information data of a user refers to collecting various types of data related to the user's medication behavior from multiple sources to comprehensively describe the user's health status, behavior patterns and external environment. Multi-dimensional data includes medication data, activity state data, physiological data and social data. Medication data usually includes the user's medication records, such as medication time, dosage and drug type, which are usually obtained through electronic pillboxes, smartphone applications or user manual input. Activity state data reflects the user's daily activity level, such as step count, exercise intensity or stationary time, which is usually collected by sensors of wearable devices such as smartwatches or fitness trackers. Physiological data covers the user's health indicators, such as heart rate, blood pressure or blood glucose level, which are recorded by wearable health monitoring devices or medical instruments. Social data relates to the user's social interactions and support network, such as communication frequency or schedule with family and friends, which is usually extracted from the phone's calendar, message records or social media activities. These multi-dimensional data collectively constitute a comprehensive background of the user's medication behavior, providing a rich information base for subsequent analysis.

[0046] Generating multi-modal sequences from multi-dimensional medication information data is to integrate the above different types of data into a unified time series representation to capture the dynamic changes and contextual relationships of the user's medication behavior. Multi-modal sequences can be generated in various ways, such as using deep learning models to map multi-dimensional medication information data to a unified feature space to generate multi-modal sequences, or using time series clustering techniques to generate multi-modal sequences, etc.

[0047] As an implementable way, generating multi-modal sequences from multi-dimensional medication information data includes: time synchronization of the multi-dimensional medication information data, aligning the time series of each data source based on timestamps to generate a unified time axis observation sequence; using a dynamic weighting mechanism to fuse the time axis observation sequence, the dynamic weighting mechanism adaptively adjusts the weight of each data source according to the reliability of the data source and the user behavior pattern; identifying and removing outliers in the time axis observation sequence through an anomaly detection algorithm, the anomaly detection algorithm generates a preliminary multi-modal sequence based on statistical thresholds and contextual correlations; standardizing and dimensionality reducing the preliminary multi-modal sequence, filling missing data through principal component analysis or time series interpolation, generating the final multi-modal sequence, the multi-modal sequence includes the joint representation of medication state, activity state, physiological state and social support state.

[0048] This process first aligns the timestamps of each data source through time synchronization, ensuring that medication data, activity state data, physiological data, and social data are aligned on the same timeline, forming a unified time series observation. Next, a dynamic weighting mechanism is used to integrate these data, with weights adjusted adaptively based on the reliability of each data source and the importance of user behavior patterns. For example, when the user is in a high-intensity activity state, the weight of activity data may increase to reflect its impact on medication behavior. Subsequently, an anomaly detection algorithm is used to identify and remove outliers in the data, such as sensor errors or unreasonable heart rate readings, to ensure the accuracy of the sequence. Finally, through standardization and dimensionality reduction processing, such as principal component analysis or time series interpolation, missing data is filled and data complexity is reduced, generating the final multi-modal sequence. This sequence represents the joint features of medication status, activity status, physiological status, and social support status in a structured form, providing reliable input for subsequent prediction and decision-making.

[0049] The following describes the step 202, i.e., "preprocessing the multi-modal sequence using a first-level particle filter algorithm to obtain an observation sequence", in detail with reference to an embodiment.

[0050] Preprocessing the multi-modal sequence using a first-level particle filter algorithm to obtain an observation sequence refers to processing the multi-modal sequence containing medication data, activity state data, physiological data, and social data through particle filter technology to eliminate noise, fill in missing data, and generate high-quality observation sequences suitable for subsequent analysis.

[0051] Particle filter algorithm is a probability inference technology based on Monte Carlo method, which is particularly suitable for processing non-linear and non-Gaussian distributed data, and can effectively deal with the time dynamics and complexity of multi-modal data. The core idea of particle filter algorithm is to approximate the probability distribution of data by a set of random samples (called particles), each particle corresponds to a possible state hypothesis and carries a weight to represent its likelihood.

[0052] In the first-level processing, the algorithm takes the multi-modal sequence as input and generates multiple particles that simulate the potential distribution of the data, capturing the joint features of medication status, activity status, physiological status, and social support status. By sampling and updating these particles, the algorithm can smooth the noise in sensor data, such as false heart rate readings caused by motion interference of wearable devices, or missing records caused by connection problems of electronic medicine boxes. This smoothing process reduces data fluctuations through weighted averaging or state estimation, ensuring the continuity and consistency of the sequence.

[0053] In addition, the first-level particle filter algorithm further improves the quality of the multi-modal sequence by imputing missing data. In real-world scenarios, data missing can be caused by device malfunction, signal interruption, or user not recording information. The algorithm utilizes the state transition model of particles, combines historical data and contextual information, predicts the data value at the missing time point, and integrates it into the sequence.

[0054] As an implementable manner, the first-level particle filter algorithm is used to preprocess the multi-modal observation sequence to generate an observation sequence, including: using the first-level particle filter algorithm to generate a set of preprocessed particles by simulating a nonlinear and non-Gaussian data distribution; performing smoothing sensor noise and imputing missing data processing on the preprocessed particles to generate an observation sequence; wherein the first-level particle filter algorithm uses 20 to 50 particles.

[0055] Specifically, the first-level particle filter algorithm generates a set of preprocessed particles by simulating a nonlinear and non-Gaussian data distribution. First, the particle filter algorithm simulates the probability distribution of the multi-modal observation sequence through the Monte Carlo method. Nonlinear and non-Gaussian data distribution refers to the complex relationship between medication data, activity state data, physiological data, and social data in the multi-modal sequence, which cannot be accurately described by a simple linear model or Gaussian distribution. For example, the user's medication behavior may exhibit nonlinear changes due to activity intensity or physiological state (such as heart rate fluctuations), while social data (such as temporary schedule changes) may introduce non-Gaussian distribution randomness. The algorithm approximates these complex probability distributions by generating a set of preprocessed particles, each particle being a state vector containing a joint representation of medication state, activity state, physiological state, and social support state.

[0056] wherein a uniform distribution or an empirical distribution based on historical data can be used to assign initial values to each state (such as medication time, exercise intensity, heart rate value, and social interaction frequency) during initialization. Next, the algorithm updates the state of the particles through a state transition model to simulate the dynamic evolution of the data. The state transition model describes the variation of each state over time in the multi-modal sequence, usually constructed based on physical or behavioral constraints. To ensure that the particles can reflect the non-Gaussian distribution characteristics, the algorithm introduces importance sampling technology in the sampling process. Specifically, the algorithm calculates the likelihood value of each particle according to the current data of the observation sequence, and updates its weight.

[0057] These particles are randomly sampled, each representing a possible state of the multi-modal sequence at a certain time point, covering the joint characteristics of medication status, activity status, physiological status, and social support status. The number of particles is chosen to balance the computational complexity and prediction accuracy, with a range of 20 to 50 particles effectively capturing the diversity of data distribution while maintaining the efficiency of the algorithm in real-time application scenarios such as mobile health platforms. Through sampling and updating these particles, the algorithm can simulate the potential probability distribution of the data, providing a basis for subsequent noise smoothing and missing data filling.

[0058] During processing, the algorithm performs operations on pre-processed particles to smooth sensor noise, eliminating abnormal fluctuations in the data. For example, a wearable device may produce inaccurate heart rate readings due to user movement or device errors, or an electronic pillbox may have incomplete medication records due to signal interruptions. The particle filtering algorithm smooths these noises based on the distribution characteristics of the particles through weighted averaging or state estimation, generating more continuous and consistent sequences. At the same time, the algorithm fills in missing data, using the state transition model of the particles and contextual information to infer the data values at missing time points. For example, if activity data is missing at a certain time point, the algorithm can infer a reasonable value based on the movement trend and physiological data at the previous and subsequent time points, ensuring the integrity of the sequence.

[0059] The following describes the above step 203, i.e., "using a second-level particle filtering algorithm, generating a first particle group from the observation sequence, the particles in the first particle group representing the user's possible medication status and context, the medication status including on-time medication, delayed medication, missed medication, busy status, and social support status; updating the weights of the particles in the first particle group according to the observation sequence and the pre-trained state transition model, predicting the missed medication probability of the user at future time points according to the weights, and generating a context state distribution", in conjunction with an embodiment.

[0060] Generating a first particle group from the observation sequence using a second-level particle filtering algorithm refers to processing the observation sequence generated by the first-level particle filtering algorithm through particle filtering technology to construct a group of particles to represent the user's possible medication status and context. This process is the core analysis step in the medication reminder method, aiming to predict the user's medication behavior and assess their dynamic situation through probabilistic modeling. Each particle in the first particle group represents a possible state combination, including medication status and context, where the medication status covers on-time medication, delayed medication, missed medication, busy status, and social support status. These states reflect the user's behavior tendencies and environmental factors at a specific time point, such as whether medication is delayed due to being busy, or whether social support promotes adherence.

[0061] The process of generating the first particle set first involves the initialization of particles. The algorithm, based on the initial data of the observation sequence and prior knowledge, randomly samples a set of particles, each being a multi-dimensional state vector containing a joint representation of medication adherence status and context. For example, one particle might represent a user taking medication on time at a certain time point and being in a low activity state, while another particle might represent missing medication and being in a high social activity state. The number of particles can be a fixed value or dynamically adjusted through optimization during the process to balance computational efficiency and accuracy of state representation. After initialization, the algorithm predicts the state evolution of each particle using the state transition model, simulating the change of user behavior over time, such as the transition from busy state to the possibility of taking medication on time.

[0062] Subsequently, the algorithm updates the weights of the particles in the first particle set according to the observation sequence and the pre-trained state transition model. The observation sequence provides real-time user data, such as medication time recorded by the electronic pillbox or activity level detected by the wearable device. The algorithm updates the weights by calculating the likelihood value of each particle (i.e. the degree of matching between the particle state and the observation data). For example, if the observation sequence shows that the user did not take medication at a certain time point, and a certain particle assumes that the user took medication on time, the weight of that particle will be reduced. The pre-trained state transition model further guides the weight update by providing transition probabilities between states (e.g. the probability of transitioning from busy state to missing medication) to correct the likelihood of the particles.

[0063] Based on the updated particle weights, the algorithm predicts the probability of missing medication by the user at future time points. By weighted averaging of the particles in the first particle set, the algorithm estimates the probability distribution of the missing medication state. For example, if most of the high-weight particles represent the missing medication state, the algorithm will predict a higher risk of missing medication. At the same time, the algorithm generates a context state distribution describing the probability distribution of the user's activity state, physiological state and social support state, such as the probability of the user being in a busy state or the possibility of insufficient social support. This distribution is calculated by the set of state vectors of the particles, providing a comprehensive representation of the user's dynamic situation. The context state distribution not only supports the prediction of the probability of missing medication, but also provides key information for the subsequent optimization of the reminder strategy.

[0064] The probability of missing medication is calculated by a second-level particle filter algorithm based on the weighted average of the first particle set. The specific format can be a time series, where each time point corresponds to a probability value. For example, time point: 2024-07-03 12:00, probability of missing medication: 0.15; time point: 2024-07-03 13:00, probability of missing medication: 0.20.

[0065] The context state distribution is generated from a set of state vectors of particles in a first particle group, each particle representing a possible state combination, such as taking medication on time and being at low activity intensity. The distribution format can be a multi-dimensional probability table listing the probability value of each state category. Assuming the state categories include medication state (on time, delayed, missed), activity state (high intensity, low intensity), physiological state (normal, abnormal), and social support state (high support, low support), the distribution format is as follows:

[0066] Time point: 2025-07-03 12:00

[0067] Medication state:

[0068] On time: 0.60

[0069] Delayed: 0.25

[0070] Missed: 0.15

[0071] Activity state:

[0072] High intensity: 0.30

[0073] Low intensity: 0.70

[0074] Physiological state:

[0075] Normal: 0.85

[0076] Abnormal: 0.15

[0077] Social support state:

[0078] High support: 0.65

[0079] Low support: 0.35

[0080] As an implementable way, the second-level particle filtering algorithm of the present application uses 50 to 200 particles and dynamically adjusts the number of particles and sampling frequency of the first particle group through Bayesian optimization; the pre-trained state transition model is generated by hidden Markov model and multi-modal data fusion training.

[0081] The second-level particle filter algorithm uses 50 to 200 particles and dynamically adjusts the number of particles and sampling frequency of the first particle set through Bayesian optimization. This means that when processing the observation sequence to predict the user's medication state and context, the algorithm balances computational efficiency and prediction accuracy through flexible particle size and sampling strategies. The dynamic adjustment of the number of particles is achieved through Bayesian optimization, which is a probability model-based optimization method used to find the optimal solution in a complex parameter space. In the second-level particle filter, Bayesian optimization dynamically selects the number of particles based on the characteristics of the observation sequence (such as data noise level or state change frequency) and system performance requirements (such as computational speed or prediction accuracy). For example, when the user's behavior pattern is relatively stable, the algorithm may use fewer particles (such as 50) to reduce computational overhead; while in complex behavior patterns or large data fluctuations, the number of particles is increased (such as close to 200) to improve the accuracy of state representation. The adjustment of the sampling frequency determines the time interval of the particle state update, and Bayesian optimization selects the appropriate sampling frequency based on the time resolution of the data and real-time requirements. For example, in a rapidly changing scenario (such as the user suddenly entering a busy state), a high sampling frequency can capture fine-grained state changes, while in a stable scenario, the frequency can be reduced to save computational resources. This dynamic adjustment mechanism improves the adaptability and efficiency of the algorithm, ensuring reliable prediction results in different scenarios.

[0082] The pre-trained state transition model is generated through hidden Markov model and multi-modal data fusion training, and is a key component of the second-level particle filter algorithm, used to guide the state update and weight calculation of particles. Hidden Markov model is a probability model that assumes the user's state (such as on-time medication, missed medication, or busy state) is hidden and can only be inferred indirectly through observation sequences. The model describes the probability of transitioning from one state to another through a state transition probability matrix, for example, the likelihood of transitioning from a busy state to a missed medication state. The training process uses user historical data and public medical data sets to construct a multi-modal training data set containing medication state, activity state, physiological state, and social support state.

[0083] The multi-modal data fusion further enhances the accuracy of the state transition model. During the training process, medication data, activity state data, physiological data, and social data are integrated through a dynamic weighting mechanism, with the weights being self-adaptively adjusted according to the reliability of the data sources and the context relevance of the user behavior patterns. For example, the medication records from the electronic pillbox may have a higher weight due to their high reliability, while the social data may have a lower weight due to their indirectness. In addition, the training process incorporates a shallow neural network to predict the dynamic adjustment factor of the state transition probability based on the user's historical response data and context features through a supervised learning method, further optimizing the model. This multi-modal fusion method enables the state transition model to consider the interactive effects between multiple data sources, such as the promoting effect of social support on medication adherence, thereby improving the robustness and personalization of the prediction.

[0084] Furthermore, the pre-trained state transition model is generated through a hidden Markov model and multi-modal data fusion training, including: based on user historical data and public medical data sets, constructing a multi-modal training data set, the training data set includes medication state sequence, activity state sequence, physiological state sequence and social support sequence; using the Baum-Welch algorithm of the hidden Markov model, estimating the initial state transition probability matrix based on the multi-modal training data set, the matrix represents the transition probability from one medication state and context combination to another state; through multi-modal data fusion, combining the dynamic weighting of medication data, activity state data, physiological data and social data, optimizing the state transition probability matrix, the dynamic weighting is self-adaptively adjusted according to the reliability of the data sources and the context relevance of the user behavior patterns; using a supervised learning method, based on user historical response data and context features, training a shallow neural network to predict the dynamic adjustment factor of the state transition probability, further optimizing the state transition probability matrix.

[0085] First, the training process starts with constructing a multi-modal training data set. This data set is based on user historical data and public medical data sets, containing medication state sequence, activity state sequence, physiological state sequence and social support sequence. The medication state sequence records the user's past medication behavior, such as taking medication on time, delaying medication or missing medication, usually obtained from electronic pillboxes or user self-report data. The activity state sequence describes the user's daily activity patterns, such as step count or exercise intensity, derived from wearable device sensor data. The physiological state sequence includes health indicators such as heart rate and blood pressure, provided by health monitoring devices. The social support sequence reflects the user's social interactions, such as the frequency of communication with family or friends, extracted from calendars or message records. These sequences are integrated into a multi-modal data set through time synchronization, ensuring that each state sequence is aligned on a unified time axis, providing a comprehensive data foundation for subsequent model training.

[0086] Next, the Baum-Welch algorithm of Hidden Markov Model is utilized to estimate the initial state transition probability matrix based on the multi-modal training dataset. Hidden Markov Model assumes that the user's state (e.g., on-time medication or busy state) is hidden and can only be inferred indirectly through observation data. The state transition probability matrix defines the probability of transitioning from one state and context combination to another, for example, the likelihood of transitioning from a busy state to a missed dose state. The Baum-Welch algorithm is an expectation-maximization method that iteratively optimizes the estimated transition probabilities to enable the model to maximize the likelihood of the observed data. For example, the algorithm might discover an association between high activity intensity and missed doses, adjusting the transition probabilities to reflect this pattern. The generation of the initial matrix relies on the statistical regularities in the dataset, ensuring that the model can initially capture the dynamic relationship between user behavior and context.

[0087] Through multi-modal data fusion, the state transition probability matrix is further optimized by dynamically weighting medication data, activity state data, physiological data, and social data. The dynamic weighting mechanism adaptively adjusts the influence weight of each data source based on its reliability and the context relevance of user behavior patterns. For example, the medication records of the electronic pillbox may have a higher weight due to their high reliability, while social data may have a lower weight due to their indirectness. The weighting process dynamically updates the weight values by analyzing the signal quality of the data sources and their relevance to medication behavior. For example, when the user is in a high-stress physiological state, the weight of physiological data may increase to emphasize its impact on the risk of missed doses. This fusion method enables the model to consider the interactive effects of multiple data sources, improving the accuracy and adaptability of the state transition probability.

[0088] Finally, a shallow neural network is trained to predict the dynamic adjustment factor of the state transition probability based on user historical response data and context features using a supervised learning method, further optimizing the state transition probability matrix. The shallow neural network takes historical response data (e.g., whether the user responds to reminders) and context features (e.g., activity level or social support) as input, learning the dynamic variation law of the state transition probability. For example, the network may find that certain social support patterns significantly reduce the probability of missed doses, generating adjustment factors to correct the transition probabilities. The training process optimizes network parameters by minimizing prediction errors, ensuring that the model can adapt to individual differences and behavior changes of users. The final optimized state transition probability matrix combines the advantages of statistical modeling and machine learning, accurately describing the dynamic evolution of user states.

[0089] Specifically, the state transition probability matrix A is an N × N matrix, whose elements a ij represent the probability of transitioning from state s i to state s j . The mathematical expression of the matrix is:

[0090]

[0091] Among them, s t represents the state at time t, P(s t =s j |s t-1 =s i ) indicates that it is in state s at time t-1 i Under the condition of j The probability of state s i It can be a combination of medication status and context, such as s i =(taking medication on time, low activity intensity, normal heart rate, high social support).

[0092] The initial estimate of the matrix is ​​calculated using the Baum-Welch algorithm based on a multimodal training dataset. The dataset contains a sequence of medication states, activity states, physiological states, and social support states. The algorithm estimates a through iterative optimization. ij Specifically, the Baum-Welch algorithm uses the forward-backward algorithm to calculate the expected frequency of each state transition, and the update formula is:

[0093]

[0094] Among them, ξ t (i,j)=P(s t =s i ,s t+1 =s j |O,θ) is the time t from state s i Transfer to state s at time t+1 j where O is the observation sequence and θ is the model parameters (including the initial transition probabilities). The denominator sums over all possible target states to ensure normalization. This formula estimates the initial transition probability matrix based on the statistical properties of the multimodal dataset.

[0095] To optimize the matrix, the patent introduces a dynamic weighting mechanism through multimodal data fusion. The weights of medication data, activity status data, physiological data, and social data are set as w1, w2, w3, and w4 respectively. These weights are adaptively adjusted based on the reliability of the data source and the context relevance. The optimized transition probability a ij ' can be expressed as:

[0096]

[0097] Among them, M=4 represents four data sources, P m is the estimated transition probability based on the mth data source, w m is the corresponding weight, satisfying Weight w mThe data reliability (e.g., sensor accuracy) or context relevance can be calculated, for example, using an entropy method or a regression model based on user historical responses.

[0098] Further, a shallow neural network is used to predict a dynamic adjustment factor for the state transition probability. Let the adjustment factor be δ ij , the neural network takes historical response data and context features as input, and outputs a correction value for a ij . The final transition probability is:

[0099]

[0100] where δ ij = f(x; θ NN ), f is a shallow neural network, x is the input feature (e.g., activity level, social support intensity), θ NN is the network parameter, which is trained by minimizing the prediction error.

[0101] The above step 204, i.e., "using a third-level particle filtering algorithm to generate a second particle set according to the missed dose probability and the context state distribution, each particle in the second particle set representing a reminder strategy, the reminder strategy including reminder time, method and intensity; calculating the success rate of the strategy by simulating the expected medication probability of the reminder strategy in the context state distribution, and combining Bayesian optimization to dynamically select the optimal reminder strategy with the objective function of minimizing the missed dose probability and maximizing the user response rate", will be described in detail below in conjunction with embodiments.

[0102] Using a third-level particle filtering algorithm to generate a second particle set according to the missed dose probability and the context state distribution means that the particle filtering technology is used to take the missed dose probability and the context state distribution output by the second-level algorithm as input, and generate a set of particles to represent possible reminder strategies. Each particle in the second particle set represents a reminder strategy, including a specific combination of reminder time, method and intensity. For example, a particle can represent sending a high-intensity reminder through vibration at 2 pm. The third-level particle filtering algorithm calculates the success rate of each strategy by simulating the effect of these strategies in the dynamic context, and selects the optimal strategy by combining Bayesian optimization, to ensure that both the missed dose probability and the user response rate are minimized.

[0103] As an implementable way, the reminding mode of the application includes: regular reminding, enhanced reminding and emergency intervention. Specifically, based on the probability of missed medication and the context state distribution, a multi-level threshold is dynamically generated, including a low-risk threshold, a medium-risk threshold and a high-risk threshold; when the probability of missed medication is lower than the low-risk threshold, a regular reminder is triggered, which includes sending a single push notification according to the optimal reminding strategy; when the probability of missed medication is within the medium-risk threshold range, an enhanced reminder is triggered, which includes sending multiple vibration or voice reminders according to the optimal reminding strategy; when the probability of missed medication exceeds the high-risk threshold, an emergency intervention is triggered, which includes sending an alarm to a pre-set contact according to the optimal reminding strategy, and selecting a high-intensity reminding mode in combination with the dynamic context.

[0104] The process of generating the second particle group first involves the initialization of particles. The algorithm randomly samples a set of particles based on the probability of missed medication and the context state distribution, each particle defining a feature vector of a reminding strategy. The reminding time refers to the specific time of sending the reminder, for example, based on the highest predicted time point of the probability of missed medication. The reminding mode includes push notifications, vibrations, voices or lights, etc., suitable for different devices such as smartphones or wearable devices. The reminding intensity reflects the urgency of the reminder, for example, low intensity for single notification, and high intensity for multiple vibrations or voice repetition. The number of particles is usually within a reasonable range, for example, 50 to 100, dynamically adjusted through Bayesian optimization to balance the computational complexity and the diversity of strategy coverage. During initialization, the algorithm assigns initial weights to the particles according to the context state distribution, for example, in a high activity intensity scenario, particles of high intensity reminding strategies are preferentially generated.

[0105] Subsequently, the algorithm calculates the success rate of the strategy by simulating the expected medication probability of each reminding strategy in the dynamic context. The dynamic context is provided by the context state distribution, for example, the probability of the user being in a busy state or a low social support state. Simulating the expected medication probability of the reminding strategy involves building an utility model to predict the user's response to the reminding strategy in a specific context. The dynamic context is defined by the context state distribution generated by the second-level particle filter algorithm, for example, the probability of the user being in a high activity intensity, low social support or abnormal physiological state. The reminding strategy is represented by the particles in the second particle group, each particle defining a combination of reminding time, mode and intensity, for example, sending a high-intensity reminder through vibration at 2 pm. The utility model is based on historical data or behavior models to estimate the user's medication behavior under the current context and the reminding strategy. For example, a high-intensity vibration reminder may be more effective in a busy state as it can attract the user's attention, while a push notification may be more suitable in a quiet environment. The expected medication probability is calculated by simulating the user's response, usually a value between 0 and 1, indicating the likelihood of taking medication on time.

[0106] The success rate of a strategy is a function of the expected medication probability, which is used to quantify the effectiveness of a reminder strategy. The success rate can be directly defined as the expected medication probability, or weighted by other factors (e.g., user response time or the cost of interruption by a reminder). For example, a strategy might increase the medication probability, but if its high-intensity reminders frequently interrupt the user, it might decrease the overall success rate. The algorithm updates the weights of the particles in the second particle set by comparing the success rates of different particles, with particles of higher success rates obtaining higher weights. This process is achieved through the iterative updates of particle filtering, ensuring that the particle set focuses on more effective strategies, providing a basis for selecting the optimal strategy for subsequent Bayesian optimization.

[0107] As an implementable way, a utility model is constructed to estimate the expected medication probability of each reminder strategy under the current context. The utility model is trained based on historical data, for example, using logistic regression or a simple probability table, which maps the context state and reminder strategy to the medication probability. Suppose the historical data shows that:

[0108] Under high activity intensity, the medication probability of a vibration reminder is 0.8, and that of a push notification is 0.5.

[0109] Under low social support, the medication probability of a high-intensity reminder is 10% higher than that of a low-intensity reminder. The utility model can be represented as:

[0110] P med (s,r)=f(C,R;θ) (5)

[0111] where P med is the expected medication probability, C is the context state distribution, R is the reminder strategy (time, method, intensity), and θ is the model parameter. In a simple implementation, the model can be a weighted linear combination:

[0112] P med =w c ·P c +w r ·P r (6)

[0113] where P c is the baseline medication probability based on the context state (derived from the context state distribution), which is the probability that the user will take medication on time based on the current context state without any reminder strategy being applied. This probability reflects the user's natural medication tendency in a specific behavioral scenario and environmental condition, serving as a benchmark for evaluating the effectiveness of a reminder strategy; P r is the gain of the reminder strategy; w c ,w r are the weights, which are obtained by regression from historical data.

[0114] The success rate of a strategy is defined as a function of the expected probability of taking the medication, taking into account the reduction of the probability of missing a dose and the feasibility of the user response. In a simple implementation, the success rate is directly: S = P med In a more complex case, the cost of interference can be introduced, for example, a high intensity reminder can reduce user acceptance, the success rate is adjusted to:

[0115] S = P med - a C intrusion (7)

[0116] where C intrusion is the cost of interference, a is the weight, the success rate of each particle is used to update its weight, and the weight of a particle with high success rate is increased.

[0117] The present application combines Bayesian optimization, the algorithm takes minimizing the probability of missing a dose and maximizing the user response rate as the objective function, and dynamically selects the optimal reminder strategy. Bayesian optimization is an efficient global optimization method that searches the strategy space by building a proxy model of the objective function to find the optimal solution. The objective function considers the probability of missing a dose and the user response rate, for example, defined as a weighted sum: f = w1 · (1 - P miss ) + w2 · P response , where P miss is the probability of missing a dose, P response is the probability of user response, and w1, w2 are weights. The algorithm iteratively evaluates the particles of different reminder strategies, updates the proxy model, and preferentially explores high-potential areas. For example, if a high-intensity vibration reminder significantly reduces the probability of missing a dose in a busy state, the algorithm will tend to choose such a strategy. Bayesian optimization improves search efficiency in complex strategy space by reducing the number of evaluations.

[0118] The following embodiments will be described in detail below.

[0119] The process of sending a medication reminder is first based on the definition of the optimal reminder strategy. The optimal reminder strategy is represented by the particle with the highest weight in the second particle group, which contains three core elements: reminder time, reminder method, and reminder intensity. The sending of the reminder is realized through the user's mobile terminal, such as a smartphone, a wearable device, or a dedicated medical device. The system converts the optimal reminder strategy into device-executable instructions, such as calling the phone's push notification service or vibration module through the application program interface. In actual scenarios, the reminder content may include customized text or voice prompts, such as "Please take your medication at 10:35 to maintain your health" or "You have not taken your medication today" played through a voice assistant. The execution of the reminder takes into account device characteristics, such as screen brightness, vibration capability, or audio output quality, to ensure that the prompt is clearly perceptible in the user's current environment. For example, in a noisy environment, the system may prefer to select a high-intensity vibration rather than an audio reminder.

[0120] After sending the reminder, the system monitors the user's response behavior, such as whether to click confirm medication, ignore the reminder, or delay the response. These response data are recorded through the mobile terminal and fed back to the system to update the weights of the first particle group, the state transition model, and the strategy distribution of the second particle group, and to adjust the particle number and sampling frequency of the first and second particle groups through Bayesian optimization. This closed-loop mechanism ensures that the reminder strategy can be continuously optimized as the user's behavior changes.

[0121] Specifically, the response data are used to recalculate the likelihood value of each particle. For example, if the user confirms medication, the particle weight representing on-time medication increases, while the particle weight representing missed medication decreases. The update formula is based on the Bayesian rule, and the weight w i is updated as:

[0122] w i ' = w i · P(O response | s i ) / ∑ j w j · P(O response | s j ) (8)

[0123] where O response is the response data, s i is the particle state, and P(O response | s j ) is the likelihood value of the response data. This process optimizes the particle distribution through resampling, ensuring that high-weight particles dominate subsequent predictions and improving the accuracy of missed medication probability and context state distribution.

[0124] The update of the pre-trained state transition model refines the state transition probability matrix of the hidden Markov model using response data. The response data provide new state transition instances, such as actual transitions from a busy state to on-time medication. The algorithm updates the transition probability matrix through the incremental Baum-Welch algorithm to re-estimate the accuracy of the probability a i from state s j to s ij . For example, if the response data indicate that the user is more likely to take medication on time under high social support, the model will increase the weight of the relevant transition probability. The update formula is:

[0125]

[0126] where, is the new transition probability estimated based on the response data, a is the learning rate, and controls the balance between the historical model and the new data. In addition, the dynamic weighting mechanism of multi-modal data fusion adjusts the data source weights according to the response data, for example, increasing the weight of the electronic pillbox data when the user confirms taking the medicine.

[0127] The particle number and sampling frequency of the first particle group and the second particle group are adjusted by Bayesian optimization to optimize the computational efficiency and prediction accuracy of the algorithm. Bayesian optimization evaluates the model performance, such as prediction accuracy or reminder success rate, based on response data, and dynamically selects the particle number (e.g., the first particle group is adjusted from 50 to 100) or the sampling frequency (e.g., from updating once per minute to updating every 30 seconds). The optimization objective function can be defined as:

[0128] f = w1 Accuracy - w2 Computational Cost (10)

[0129] where Accuracy is the prediction accuracy, Computational Cost is the computational cost, and w1, w2 are weights. Bayesian optimization models the parameter space through Gaussian processes, preferentially exploring high-potential areas, such as increasing the number of particles to improve accuracy or reducing the sampling frequency to save resources.

[0130] The above method provided by the embodiments of the present application can be applied to various application scenarios, including but not limited to: first, in chronic disease management, such as diabetes or hypertension users, the system integrates medication records, activity data (such as smart watch steps), physiological data (such as blood glucose or blood pressure), and social data (such as scheduling), predicts the risk of missed medication, and sends personalized reminders, such as vibration reminders when the user is busy, to ensure timely medication. Second, in elderly care, the method can monitor the activities and heart rate of the elderly through wearable devices, combine with family interaction data, generate customized voice reminders, and notify the caregiver when the risk of missed medication is high. In addition, in the remote medical scene, the system analyzes user data through a cloud platform to provide real-time reminders for users in remote areas, reducing the problem of missed medication due to lack of medical support. These scenarios use multi-modal data and dynamic optimization to ensure accurate and effective reminders, suitable for mobile health platform applications.

[0131] The above describes specific embodiments of the present specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different than the order in the embodiments and still achieve the desired result. In addition, the processes depicted in the accompanying drawings do not necessarily require the particular order shown or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing are also possible or advantageous.

[0132] According to another aspect, embodiments provide a device for reminding taking medicine on time. Figure 3 A schematic block diagram of the device for reminding taking medicine on time according to an embodiment is shown. As shown, the device 300 comprises: Figure 3

[0133] a user data acquisition unit 301 configured to acquire multi-dimensional medicine information data of a user, the multi-dimensional medicine information data comprising medicine data, activity state data, physiological data and social data, and generate a multi-modal sequence according to the multi-dimensional medicine information data;

[0134] a first particle filter unit 302 configured to preprocess the multi-modal sequence by using a first-level particle filtering algorithm to obtain an observation sequence;

[0135] a second particle filter unit 303 configured to generate a first particle group according to the observation sequence by using a second-level particle filtering algorithm, each particle in the first particle group representing a possible medicine state and context of the user, the medicine state comprising taking medicine on time, delaying taking medicine, missing taking medicine, a busy state and a social support state, update the weight of each particle in the first particle group according to the observation sequence and a pre-trained state transition model, predict a missing taking medicine probability of the user at a future time point according to the weight, and generate a context state distribution;

[0136] a third particle filter unit 304 configured to generate a second particle group according to the missing taking medicine probability and the context state distribution by using a third-level particle filtering algorithm, each particle in the second particle group representing a reminding strategy, the reminding strategy comprising a reminding time, a reminding manner and a reminding intensity, calculate a strategy success rate by simulating an expected taking medicine probability of the reminding strategy in the context state distribution, and dynamically select an optimal reminding strategy as an objective function of minimizing the missing taking medicine probability and maximizing a user response rate in combination with Bayesian optimization;

[0137] a medicine reminding sending unit 305 configured to send a medicine reminding to the user according to the optimal reminding strategy.

[0138] ​As an implementable manner, the user data acquisition unit 301 can be configured to, when generating a multi-modal sequence according to the multi-dimensional medication information data: time-synchronize the multi-dimensional medication information data, align the time sequences of each data source based on timestamps, and generate a unified time-axis observation sequence; fuse the time-axis observation sequence by using a dynamic weighting mechanism, the dynamic weighting mechanism adaptively adjusts the weight of each data source according to the reliability of the data source and the user behavior pattern; identify and eliminate outliers in the time-axis observation sequence by using an anomaly detection algorithm, the anomaly detection algorithm generates a preliminary multi-modal sequence based on statistical thresholds and context correlation; standardize and reduce the dimension of the preliminary multi-modal sequence, fill in missing data by using principal component analysis or time series interpolation, and generate a final multi-modal sequence, the multi-modal sequence includes a joint representation of medication state, activity state, physiological state and social support state.

[0139] As an implementable manner, the first particle filter unit 302 can be configured to, when generating an observation sequence by using a first-level particle filter algorithm to preprocess the multi-modal observation sequence: generate a set of preprocessed particles by simulating nonlinear and non-Gaussian data distribution by using the first-level particle filter algorithm; and perform smoothing sensor noise and missing data filling processing on the preprocessed particles to generate an observation sequence, wherein the first-level particle filter algorithm uses 20 to 50 particles.

[0140] As an implementable manner, the second particle filter unit 303 can be configured to use 50 to 200 particles for a second-level particle filter algorithm, and dynamically adjust the number of particles and the sampling frequency of the first particle set by using Bayesian optimization; and the pre-trained state transition model is generated by hidden Markov model and multi-modal data fusion training.

[0141] As an implementable manner, the second particle filter unit 303 can be configured to, in the pre-training state transition model generation, generate a multi-modal training data set based on user historical data and public medical data sets, the training data set including medication state sequences, activity state sequences, physiological state sequences and social support sequences; estimate an initial state transition probability matrix based on the multi-modal training data set using the Baum-Welch algorithm of the hidden Markov model, the matrix representing the transition probability from one medication state and context combination to another state; optimize the state transition probability matrix through multi-modal data fusion, combining dynamic weighting of medication data, activity state data, physiological data and social data, the dynamic weighting being adaptively adjusted according to the reliability of the data source and the context correlation of the user behavior pattern; and train a shallow neural network to predict the dynamic adjustment factor of the state transition probability based on user historical response data and context features, further optimizing the state transition probability matrix.

[0142] As an implementable manner, the third particle filter unit 304 can be configured to, in the calculation of the strategy success rate by simulating the expected medication probability of the reminder strategy in the context state distribution, derive a baseline medication probability according to the context state distribution; construct an utility model according to the baseline medication probability and the reminder strategy, and obtain the expected medication probability using the utility model; and obtain the strategy success rate according to the expected medication probability and the interference cost.

[0143] As an implementable manner, the device can also be configured to receive user response data, update the weights of the first particle group, the pre-trained state transition model and the strategy distribution of the second particle group based on the response data, and adjust the particle number and sampling frequency of the first particle group and the second particle group through Bayesian optimization.

[0144] Each of the embodiments in the specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, it is described more simply, and the relevant part can be referred to the part of the method embodiment. The device embodiment described above is only schematic, and the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e. they can be located in one place, or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment. Those skilled in the art can understand and implement it without creative labor.

[0145] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.

[0146] In addition, the embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the steps of the method in any one of the preceding method embodiments.

[0147] And an electronic device, comprising: one or more processors; and a memory associated with the one or more processors, the memory being configured to store program instructions that, when executed by the one or more processors, perform the steps of the method in any one of the preceding method embodiments.

[0148] The present application also provides a computer program product, comprising a computer program, which, when executed by a processor, realizes the steps of the method in any one of the preceding method embodiments.

[0149] Among them, Figure 4 The exemplary display shows the architecture of the electronic device, which can specifically include a processor 410, a video display adapter 411, a disk drive 412, an input / output interface 413, a network interface 414, and a memory 420. The above-mentioned processor 410, video display adapter 411, disk drive 412, input / output interface 413, network interface 414, and memory 420 can be connected by a communication bus 430.

[0150] Among them, the processor 410 can be implemented by a general-purpose CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., for executing related programs to realize the technical solutions provided by the present application.

[0151] The memory 420 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 420 can store an operating system 421 for controlling the operation of the electronic device 400, a basic input / output system (BIOS) 422 for controlling the low-level operation of the electronic device 400. In addition, a web browser 423, a data storage management system 424, and a reminder to take medicine on time 425, etc. can also be stored. The above-mentioned reminder to take medicine on time 425 can be an application program that specifically implements the foregoing steps in the embodiments of the present application. In summary, when the technical solutions provided by the present application are implemented by software or firmware, the relevant program codes are stored in the memory 420 and executed by the processor 410.

[0152] The input / output interface 413 is used to connect the input / output module to realize information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. The input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.

[0153] The network interface 414 is used to connect the communication module (not shown in the figure) to realize the communication interaction between the device and other devices. The communication module can realize communication through wired means (such as USB, network cable, etc.) or through wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0154] The bus 430 includes a channel for transmitting information between various components (such as the processor 410, the video display adapter 411, the disk drive 412, the input / output interface 413, the network interface 414, and the memory 420) of the device.

[0155] It should be noted that although the above device only shows the processor 410, the video display adapter 411, the disk drive 412, the input / output interface 413, the network interface 414, the memory 420, the bus 430, etc., in the specific implementation process, the device can also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device can also only contain the components necessary to implement the solutions of the present application, and does not have to contain all the components shown in the figure.

[0156] Those skilled in the art can clearly understand the application by the description of the above embodiments that the application can be implemented by means of software and the necessary universal hardware platform. Based on such an understanding, the technical solutions of the application can be embodied in the form of a computer program product, which can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and include a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in various embodiments or some parts of the embodiments of the application.

[0157] The technical solutions provided by the application are described in detail above, and the principles and implementation manners of the application are described by applying specific examples. The above description of the embodiments is only used to help understand the methods and core ideas of the application. Meanwhile, for those skilled in the art, the specific implementation manners and application ranges can be changed according to the ideas of the application. In conclusion, the content of the specification should not be understood as a limitation of the application.

Claims

1. A method for reminding patients to take medicine on time, characterized in that: The method comprises: Acquiring multi-dimensional medication information data of a user, the multi-dimensional medication information data including medication data, activity status data, physiological data, and social data, and generating a multimodal sequence based on the multi-dimensional medication information data; Preprocessing the multimodal sequence using a first-level particle filter algorithm to obtain an observation sequence; A second-level particle filter algorithm is used to generate a first particle group based on the observation sequence. Particles in the first particle group represent the user's possible medication status and context. The medication status includes on-time medication, delayed medication, missed medication, busy status, and social support status. The weights of the particles in the first particle group are updated based on the observation sequence and a pre-trained state transition model. The probability of the user missing a medication at a future time point is predicted based on the weights, and a contextual state distribution is generated. A third-level particle filtering algorithm is used to generate a second particle group based on the missed dose probability and the context state distribution. Each particle in the second particle group represents a reminder strategy, including reminder time, method, and intensity. The strategy success rate is calculated by simulating the expected medication taking probability of the reminder strategy under the context state distribution. In combination with Bayesian optimization, the optimal reminder strategy is dynamically selected with the objective functions of minimizing the missed dose probability and maximizing the user response rate. According to the optimal reminder strategy, a medication reminder is sent to the user.

2. The method according to claim 1, wherein generating a multimodal sequence based on the multi-dimensional medication information data comprises: Time synchronization is performed on the multi-dimensional medication information data, and the time series of each data source are aligned based on the timestamp to generate a unified time axis observation sequence; The timeline observation sequences are fused using a dynamic weighting mechanism that adaptively adjusts the weight of each data source based on the reliability of the data source and user behavior patterns; Identifying and removing outliers in the timeline observation sequence using an anomaly detection algorithm, wherein the anomaly detection algorithm generates a preliminary multimodal sequence based on statistical thresholds and contextual relevance; The preliminary multimodal sequence is normalized and dimensionally reduced, and missing data is filled through principal component analysis or time series interpolation to generate a final multimodal sequence, which includes a joint representation of medication status, activity status, physiological status, and social support status.

3. The method according to claim 1, characterized in that The preprocessing of the multimodal observation sequence by using the first-level particle filter algorithm to generate the observation sequence includes: Using the first-level particle filter algorithm, a set of preprocessed particles is generated by simulating nonlinear and non-Gaussian data distribution; The pre-processed particles are processed to smooth sensor noise and fill missing data to generate an observation sequence, wherein the first-level particle filter algorithm uses 20 to 50 particles.

4. The method according to claim 1, wherein The second-level particle filter algorithm uses 50 to 200 particles and dynamically adjusts the number of particles and sampling frequency of the first particle group through Bayesian optimization; The pre-trained state transfer model is generated by training a hidden Markov model and multimodal data fusion.

5. The method according to claim 4, characterized in that The pre-trained state transfer model is generated by a hidden Markov model and multimodal data fusion training, including: Constructing a multimodal training dataset based on user historical data and public medical datasets, wherein the training dataset includes a medication state sequence, an activity state sequence, a physiological state sequence, and a social support sequence; estimating an initial state transition probability matrix based on the multimodal training dataset using a Baum-Welch algorithm of a hidden Markov model, wherein the matrix represents a transition probability from one medication state and context combination to another state; Optimizing the state transition probability matrix through multimodal data fusion, combining dynamic weighting of medication data, activity status data, physiological data, and social data, where the dynamic weighting is adaptively adjusted based on the reliability of the data source and the contextual relevance of the user's behavior pattern; By using supervised learning methods, based on user historical response data and contextual features, a shallow neural network is trained to predict the dynamic adjustment factor of the state transition probability, and the state transition probability matrix is ​​further optimized.

6. The method according to claim 1, wherein calculating the strategy success rate by simulating the expected medication taking probability of the reminder strategy in the context state comprises: Derived according to the context state distribution, a baseline medication taking probability is obtained; constructing a utility model based on the baseline medication taking probability and the reminder strategy, and obtaining an expected medication taking probability using the utility model; The strategy success rate is obtained according to the expected medication taking probability and the interference cost.

7. The method according to claim 1, further comprising: Receive response data from the user, update the weight of the first particle group, the pre-trained state transition model, and the policy distribution of the second particle group based on the response data, and adjust the number of particles and sampling frequency of the first particle group and the second particle group through Bayesian optimization.

8. A device for reminding people to take medicine on time, characterized in that: The device comprises: A user data acquisition unit is configured to acquire multi-dimensional medication information data of a user, wherein the multi-dimensional medication information data includes medication data, activity status data, physiological data, and social data, and generate a multimodal sequence according to the multi-dimensional medication information data; a first particle filtering unit configured to preprocess the multimodal sequence using a first-level particle filtering algorithm to obtain an observation sequence; The second particle filtering unit is configured to generate a first particle group based on the observation sequence using a second-level particle filtering algorithm, wherein the particles in the first particle group represent possible medication states and contexts of the user, wherein the medication states include taking medication on time, taking medication late, missing medication, being busy, and being in a social support state; update the weights of the particles in the first particle group based on the observation sequence and a pre-trained state transition model, predict the probability of missing medication at a future time point based on the weights, and generate a context state distribution; a third particle filtering unit configured to generate a second particle group based on the missed dose probability and the context state distribution using a third-level particle filtering algorithm, wherein each particle in the second particle group represents a reminder strategy, wherein the reminder strategy includes a reminder time, method, and intensity; calculate a strategy success rate by simulating an expected medication taking probability of the reminder strategy under the context state distribution, and dynamically select an optimal reminder strategy by combining Bayesian optimization with minimizing the missed dose probability and maximizing the user response rate as objective functions; The medication reminder sending unit is configured to send a medication reminder to the user according to the optimal reminder strategy.

9. An electronic device, characterized in that: include: one or more processors; and a memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.