Method and device for processing drug purchase behavior data, electronic equipment and storage medium

By analyzing users' medication purchase behavior data and contextual features, personalized medication reminder strategies are generated, which solves the problem of low accuracy in predicting medication status in existing technologies and improves medication adherence and health management effectiveness.

CN120809058BActive Publication Date: 2026-05-05BEIJING YIBAIYISHIYI MEDICINE SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING YIBAIYISHIYI MEDICINE SCI & TECH CO LTD
Filing Date
2025-07-30
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

Existing technologies mainly rely on physiological monitoring indicators or single behavioral rules to predict a user's medication status, resulting in low accuracy in medication status prediction. This makes it impossible to accurately remind users to purchase or take medication in a timely manner, thus affecting medication adherence and treatment effectiveness.

Method used

By collecting users' historical medication purchase behavior data, and using an attention model to encode the data and contextual features, a continuous medication state sequence and user behavior time sequence features are generated. This determines the user's implicit medication status information and generates personalized medication reminder strategies based on this information, including reminder content, timing, and method.

Benefits of technology

It improves the accuracy of medication status prediction, ensures users can purchase and take medication in a timely manner, enhances medication adherence, and reduces health risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120809058B_ABST
    Figure CN120809058B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, electronic device, and storage medium for processing medication purchase behavior data, relating to the field of data management technology. The method includes: collecting historical medication purchase behavior data of users; determining a continuous sequence of user medication use states based on the historical medication purchase behavior data; encoding the historical medication purchase behavior data, contextual features, and user tags using an attention model to obtain user behavior temporal features; and determining the user's implicit medication use state information based on the continuous sequence of medication use states and the user behavior temporal features. The implicit medication use state information includes at least the probability distribution information of the user's various medication use states. This application solves the problem in existing technologies that primarily rely on physiological monitoring indicators or single-action rules to predict a user's medication use state, resulting in low accuracy in predicting the user's medication use state and consequently failing to guarantee accurate reminders to users to purchase or take medication in a timely manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data management technology, and more specifically, to a method, apparatus, electronic device, and storage medium for processing drug purchase behavior data. Background Technology

[0002] In healthcare management, monitoring and reminding users of their medication status primarily relies on physiological indicators or single-dose behavioral rules. While these methods can provide medication reminders to some extent, they have significant limitations. For example, physiological indicators such as heart rate and blood pressure can reflect a user's physical condition, but they cannot directly reflect their medication behavior. Even if a user's heart rate is normal, they may still miss a dose, and physiological indicators cannot directly identify medication behavior deviations.

[0003] Moreover, while existing timed reminders and other single-behavior rules can remind users to take their medication on time, they are difficult to dynamically analyze users' long-term medication behavior. Reminders based on fixed rules are difficult to adapt to users' medication needs in different situations, such as when users miss their medication time due to traveling or being busy at work.

[0004] Furthermore, whether users purchase medication in a timely manner directly affects their ability to continue taking medication. Existing technologies mainly rely on physiological monitoring indicators or single behavioral rules to predict users' medication status, resulting in low accuracy in predicting medication status. This makes it difficult to effectively remind users to purchase medication in a timely manner or take medication on time. Users may interrupt medication due to insufficient drug inventory, thereby affecting users' medication adherence and treatment effectiveness.

[0005] There is currently no effective solution to the above problems. Summary of the Invention

[0006] This application provides a method, apparatus, electronic device, and storage medium for processing drug purchase behavior data, in order to at least solve the problem in the prior art that mainly relies on physiological monitoring indicators or single behavior rules to predict the user's medication status, resulting in low accuracy in predicting the user's medication status, and thus failing to guarantee accurate reminders to the user to purchase or take medication in a timely manner.

[0007] According to one aspect of the embodiments of this application, a method for processing drug purchase behavior data is provided, comprising: collecting historical drug purchase behavior data of a user with the user's authorization; determining a continuous sequence of the user's medication use states based on the historical drug purchase behavior data, wherein the continuous sequence of the medication use states includes the user's remaining medication amount at different times; encoding the historical drug purchase behavior data, contextual features, and user tags through an attention model to obtain user behavior temporal features, wherein the contextual features include at least the drug purchase location, drug type, and drug price, and the user tags include at least the user's disease type, age, and medication adherence level; and determining the user's implicit medication use state information based on the continuous sequence of the medication use states and the user behavior temporal features, wherein the implicit medication use state information includes at least the probability distribution information of the user being in various medication use states.

[0008] Optionally, after determining the user's implicit medication status information based on the continuous medication status sequence and the temporal characteristics of user behavior, the method for processing medication purchase behavior data further includes: generating a medication reminder strategy based on the user's implicit medication status information and the user's historical reminder preference information, wherein the historical reminder preference information includes at least the reminder time and reminder method preferred by the user in the historical time period; the medication reminder strategy includes at least the medication reminder content, the target reminder time, and the target reminder method; and sending the medication reminder content to the user's terminal device at the target reminder time using the target reminder method.

[0009] Optionally, after sending the medication reminder content to the user's terminal device using the target reminder method at the target reminder time, the method for processing the medication purchase behavior data further includes: collecting the user's response information to the medication reminder content; and adjusting the user's historical reminder preference information and / or medication continuous status sequence based on the response information.

[0010] Optionally, the user's continuous medication state sequence is determined based on historical medication purchase behavior data, including: determining the user's remaining medication quantity and medication adherence coefficient at a historical time based on historical medication purchase behavior data; detecting whether the user purchased medication at a target time and obtaining the detection result, wherein the target time is later than the historical time; predicting the user's remaining medication quantity at the target time based on the detection result, the user's remaining medication quantity at the historical time, and the user's medication adherence coefficient; and using the user's remaining medication quantity at the target time as an element in the continuous medication state sequence.

[0011] Optionally, based on the detection results, the user's remaining drug quantity at historical times, and the user's medication adherence coefficient, the user's remaining drug quantity at a target time can be predicted, including: obtaining the user's purchased drug quantity at the target time, the recommended dosage of the drug, the preset perturbation factor, and the preset noise factor; and predicting the user's remaining drug quantity at the target time based on the user's purchased drug quantity at the target time, the recommended dosage of the drug, the preset perturbation factor, the preset noise factor, the detection results, the user's remaining drug quantity at historical times, and the user's medication adherence coefficient.

[0012] Optionally, based on the continuous medication state sequence and the temporal characteristics of user behavior, the implicit medication state information of the user is determined, including: defining a state set, wherein the state set represents multiple potential medication states of the user when using medication; constructing a state transition probability matrix that is logically related to the state set, wherein the state transition probability matrix is ​​used to represent the transition probability between various medication states; determining an observation probability distribution based on the state set, wherein the observation probability distribution is used to quantify the probability of observing the target medication behavior in any state in the state set; determining an observation sequence based on the continuous medication state sequence and the temporal characteristics of user behavior, wherein each element in the observation sequence includes the corresponding continuous medication state sequence and the temporal characteristics of user behavior at a certain time; and determining the implicit medication state information of the user at each time point in the observation sequence based on the observation probability distribution and the state transition probability matrix.

[0013] Optionally, the method for processing drug purchase behavior data further includes: determining model parameters based on the observed probability distribution, the state transition probability matrix, and the initial state distribution, wherein the initial state distribution is used to characterize the prior probability distribution information of the user in various medication states at the time of initial modeling; updating the model parameters by determining the probability of the user in each medication state and the state transition probability at each time point in the observation sequence, until a predetermined convergence condition is met, and ending the model parameter update process, wherein the state transition probability is used to characterize the probability of the user transitioning from a first medication state to a second medication state within adjacent time intervals, and the first medication state and the second medication state are two different medication states.

[0014] Optionally, the model parameters are updated by determining the probability of a user being in each medication state and the state transition probability at each time point in the observation sequence. This includes: updating the initial state distribution in the model parameters based on the probability of a user being in each medication state at each time point; updating the state transition probability matrix in the model parameters based on the state transition probability and the expected change of the current medication state at each time point; and updating the observation probability distribution in the model parameters based on the maximum likelihood estimate of each medication state in the state set at each time point.

[0015] Optionally, determining the observation probability distribution based on the state set includes: determining the number of Gaussian mixture components for each medication state in the state set; determining the weight of each Gaussian mixture component for each medication state; determining the multivariate Gaussian distribution corresponding to each Gaussian mixture component; and determining the observation probability distribution based on the number of Gaussian mixture components for each medication state, the weight of each Gaussian mixture component, and the multivariate Gaussian distribution corresponding to each Gaussian mixture component.

[0016] According to another aspect of the embodiments of this application, a processing apparatus for drug purchase behavior data is also provided, comprising: a collection unit, configured to collect historical drug purchase behavior data of a user with the user's authorization; a first determination unit, configured to determine a continuous sequence of the user's medication use states based on the historical drug purchase behavior data, wherein the continuous sequence of the medication use states includes the user's remaining medication amount at different times; an encoding unit, configured to encode the historical drug purchase behavior data, contextual features, and user tags through an attention model to obtain user behavior temporal features, wherein the contextual features include at least the drug purchase location, drug type, and drug price, and the user tags include at least the user's disease type, age, and medication adherence level; and a second determination unit, configured to determine the user's implicit medication use state information based on the continuous sequence of the medication use states and the user behavior temporal features, wherein the implicit medication use state information includes at least the probability distribution information of the user being in various medication use states.

[0017] According to another aspect of the embodiments of this application, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when one or more programs are executed by one or more processors, the one or more processors cause the one or more processors to perform the above-described method for processing drug purchase behavior data.

[0018] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, which stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located performs the above-described method for processing drug purchase behavior data.

[0019] In this embodiment, firstly, with user authorization, historical medication purchase behavior data is collected, and a continuous medication state sequence is determined based on this data. This sequence includes the user's remaining medication amount at different times. Then, an attention model is used to encode the historical medication purchase behavior data, contextual features, and user tags to obtain user behavior temporal features. The contextual features include at least the purchase location, medication type, and medication price, while the user tags include at least the user's disease type, age, and medication adherence level. Based on the continuous medication state sequence and the user behavior temporal features, implicit medication state information is determined, including at least the probability distribution information of the user's various medication states.

[0020] As described above, by analyzing users' historical medication purchase behavior data and contextual characteristics, the medical management system can gain a more comprehensive understanding of users' medication habits and patterns. Furthermore, based on the continuous sequence of users' medication use and the temporal characteristics of their behavior, the medical management system can easily determine the probability distribution information of users' various medication states, thereby providing personalized medication reminders. Reminders based on multiple user behavioral data are more accurate and timely than traditional physiological monitoring or single-action rules. This application, by accurately predicting users' medication states and providing timely reminders, helps improve users' medication adherence and reduces health risks caused by forgetting to take medication or irregular medication use. This solves the problem in existing technologies that primarily rely on physiological monitoring indicators or single-action rules to predict users' medication states, resulting in low accuracy in predicting user medication states and thus failing to guarantee accurate reminders for timely medication purchase or administration. Attached Figure Description

[0021] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0022] Figure 1 This is a flowchart of an optional method for processing drug purchase behavior data according to an embodiment of this application;

[0023] Figure 2 This is a schematic diagram of an optional drug purchase behavior data processing device according to an embodiment of this application. Detailed Implementation

[0024] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0025] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0026] According to an embodiment of this application, a method embodiment for processing drug purchase behavior data is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0027] According to the embodiments of this application, a medical management system can be used as the execution subject of the method for processing drug purchase behavior data in the embodiments of this application. The system can be a software system or an embedded system combining software and hardware. Of course, the execution subject of the method in the embodiments of this application can also be other forms of execution subject, such as devices, equipment, etc. It should be known by those skilled in the art that this application does not particularly limit the specific form of the execution subject.

[0028] Figure 1 This is a method for processing drug purchase behavior data according to embodiments of this application, such as... Figure 1 As shown, the method includes the following steps:

[0029] Step S101: With the user's authorization, collect the user's historical drug purchase behavior data.

[0030] In step S101, user authorization can refer to the user's explicit consent to the medical management system collecting and using their personal data, facilitating data privacy protection and user control over their personal information. Historical medication purchase behavior data can refer to all records related to medication purchases within a past period, including information such as purchase time, type of medication, quantity, and location, which facilitates analysis of user medication habits and prediction of future medication behavior.

[0031] By collecting users' historical medication purchase behavior data, the medical management system can obtain users' medication purchase behavior records, which can provide accurate input information for subsequent medication status analysis, enabling the medical management system to more accurately predict users' remaining medication, medication adherence, and future medication needs.

[0032] Step S102: Determine the user's continuous medication status sequence based on historical drug purchase behavior data, wherein the continuous medication status sequence includes the user's remaining drug quantity at different times.

[0033] Optionally, a continuous medication status sequence can refer to a continuous record of the remaining amount of medication for a user at different times. The continuous medication status sequence can reflect the user's medication consumption and the continuity of medication use.

[0034] By analyzing users' historical medication purchase records and usage habits, the remaining medication amount at different times can be determined. This not only helps the healthcare management system predict when a user might run out of medication but also assesses medication adherence. For example, the healthcare management system can calculate the current remaining medication amount based on the time and quantity of the user's last purchase, as well as their usual dosage. If the user purchases medication at a certain time, the healthcare management system will update the remaining amount based on the purchased quantity; if the user does not purchase medication, the healthcare management system will decrease the remaining amount based on the dosage rate. If the remaining medication amount continuously decreases and remains within the recommended dosage range, it indicates high medication adherence; if the remaining amount decreases abnormally, it may indicate irregular medication use.

[0035] Step S103: Encode historical drug purchase behavior data, contextual features and user tags using an attention model to obtain user behavior time-series features. The contextual features include at least the drug purchase location, drug type and drug price, and the user tags include at least the user's disease type, age and medication adherence level.

[0036] Optionally, the attention model is a deep learning model that can automatically learn the importance weights of different parts of the input data, thereby extracting key information more effectively. In this application, the attention model can be used to encode historical drug purchase behavior data, contextual features, and user tags.

[0037] Optionally, contextual features can refer to external information related to a user's medication purchase behavior, such as the purchase location, drug type, and drug price, reflecting the environmental context of the user's medication purchase behavior. User tags can refer to the user's own attribute information, such as disease type, age, and medication adherence level, reflecting the user's health status and medication habits.

[0038] Optionally, user behavior time-series features can refer to feature vectors obtained by encoding historical drug purchase behavior data, contextual features, and user tags, which can reflect the user's drug purchase behavior patterns at different points in time.

[0039] In this embodiment, the medical management system can transform complex user medication purchase behavior data, contextual features, and user tags into a structured feature vector. The attention model can automatically identify which features are more important in predicting medication status. For example, for some users, the location of medication purchase may have a significant impact on their purchasing behavior, while for others, drug price may be a key factor. The system not only captures user purchasing behavior patterns at different times but also combines contextual features and user tags to provide a more comprehensive user behavior analysis. For instance, by analyzing user purchasing behavior in different locations, the medical management system can infer whether users have changed their medication purchase habits due to work or travel. By combining drug types and prices, the system can predict user preferences for different drugs. By considering the user's disease type and age, the system can more accurately assess the user's medication needs.

[0040] Step S104: Based on the continuous sequence of medication use states and the temporal characteristics of user behavior, determine the implicit medication use state information of the user, wherein the implicit medication use state information includes at least the probability distribution information of the user in various medication use states.

[0041] Optionally, the implicit medication status information may refer to the probability distribution information of various potential medication statuses that a user may be in at different points in time, including normal medication, irregular medication, about to discontinue medication, discontinue medication, etc.

[0042] In this embodiment, the medical management system can comprehensively analyze the user's continuous medication status sequence and the temporal characteristics of user behavior to understand the user's remaining medication and medication purchase behavior patterns, thereby inferring the user's current and future medication status. For example, the medical management system can calculate the probability that the user is in a state of "normal medication use," "about to discontinue medication," or "discontinue medication" based on the changing trend of the remaining medication and the user's behavioral characteristics, facilitating a more comprehensive analysis of user medication behavior. For instance, if the medical management system finds that the user's remaining medication is continuously decreasing but meets the recommended dosage, and the user's medication purchase behavior is regular, then the probability that the user is in a state of "normal medication use" is relatively high. If the remaining medication suddenly decreases or increases, it may indicate that the user's medication use is irregular or that they are about to discontinue medication, enabling the medical management system to more accurately predict the user's medication behavior and take measures in advance, such as reminding the user to purchase medication or adjusting the medication plan, to improve the user's medication adherence and health management effectiveness.

[0043] In an optional embodiment, after determining the user's implicit medication status information based on the continuous medication status sequence and the temporal characteristics of user behavior, the method for processing medication purchase behavior data further includes: the medical management system can generate a medication reminder strategy based on the user's implicit medication status information and the user's historical reminder preference information, wherein the historical reminder preference information includes at least the reminder time and reminder method preferred by the user in the historical time period; the medication reminder strategy includes at least the medication reminder content, the target reminder time, and the target reminder method, and the medication reminder content is sent to the user's terminal device at the target reminder time using the target reminder method.

[0044] Optionally, historical reminder preference information may refer to the reminder time and reminder method preferred by the user in the past time period, such as the user preferring to receive an SMS reminder at 8 am or a voice reminder at 9 pm.

[0045] Optionally, the medication reminder strategy can refer to a personalized reminder scheme generated by the medical management system based on the user's implicit medication status information and historical reminder preferences. This may include the medication reminder content, the target reminder time, and the target reminder method. The target reminder time can refer to the optimal reminder time determined by the medical management system based on the user's medication status and preferences. The target reminder method can refer to the reminder method selected by the medical management system based on the user's preferences, such as SMS, voice, or application notifications. The terminal device can refer to the device on which the user receives the reminder; the terminal device may be, but is not limited to, a smartphone, tablet, or smartwatch.

[0046] The medical management system in this embodiment can provide users with personalized medication reminder services, enabling reminder information to be delivered at a more appropriate time and in a manner preferred by the user, thereby improving the effectiveness of reminders and user satisfaction. This not only enhances the user experience but also reduces the health risks caused by forgetting to take medication or discontinuing medication through accurate reminders.

[0047] For example, if the medical management system detects that a user's remaining medication is insufficient and the user is in a "about to run out of medication" state, and the user prefers to receive an SMS reminder at 8:00 AM, the medical management system will send an SMS reminder at 8:00 AM stating "Your medication is about to run out, please purchase medication in time." This can improve the user's medication adherence and make it easier for the user to take medication on time and purchase medication promptly.

[0048] In an optional embodiment, after sending the medication reminder content to the user's terminal device using the target reminder method at the target reminder time, the method for processing medication purchase behavior data further includes: the medical management system can collect the user's response information to the medication reminder content, and then adjust the user's historical reminder preference information and / or medication continuous status sequence according to the response information.

[0049] Optionally, the user's response to the medication reminder content can refer to the user's feedback on the medication reminder content, such as whether the user has confirmed receiving the reminder, whether they have taken the medication, or whether they have purchased the medication.

[0050] In this embodiment, the medical management system collects user response information after sending a medication reminder. For example, if the user confirms that they have taken or purchased the medication, the medical management system updates the user's medication status sequence to ensure accurate recording of remaining medication. Furthermore, the medical management system can adjust its reminder strategy based on user responses. If a user frequently ignores a particular reminder method, the medical management system can change the reminder method or adjust the reminder time to improve the effectiveness of the reminders, ensuring that the reminder strategy always meets the user's actual needs and preferences, thereby improving user medication adherence and satisfaction. For example, if a user frequently replies "taken medication" after receiving an SMS reminder, the medical management system records this positive response and continues to use SMS in subsequent reminders. If a user frequently ignores voice reminders, the medical management system can switch to sending application notifications to improve reminder delivery rates.

[0051] In one optional embodiment, determining a user's continuous medication status sequence based on historical medication purchase behavior data includes: the medical management system determining the user's remaining medication quantity and medication adherence coefficient at a historical time based on the historical medication purchase behavior data, then detecting whether the user will purchase medication at a target time, obtaining a detection result, wherein the target time is later than the historical time, and predicting the user's remaining medication quantity at the target time based on the detection result, the user's remaining medication quantity at the historical time, and the user's medication adherence coefficient, and using the user's remaining medication quantity at the target time as an element in the continuous medication status sequence.

[0052] Optionally, the medication adherence coefficient can reflect the regularity of a user's medication adherence to medical advice and can be determined based on the user's historical medication behavior. For example, if a user frequently takes medication on time, the adherence coefficient will be higher; conversely, it will be lower.

[0053] In this embodiment, the medical management system determines the user's remaining medication quantity at a historical time and the user's medication adherence coefficient, and detects whether the user will purchase medication at a target time. The medical management system needs to predict the user's remaining medication quantity at the target time, and the detection result affects the prediction of the remaining medication quantity. If the user purchases medication at the target time, the medical management system will add the purchased quantity to the calculation of the remaining medication quantity; if the user does not purchase medication, the remaining medication quantity is estimated based on the historical remaining quantity and the medication adherence coefficient. Based on the detection results, the remaining medication quantity at a historical time, and the medication adherence coefficient, the medical management system predicts the user's remaining medication quantity at the target time and uses the predicted value of the remaining medication quantity as an element in the continuous medication state sequence. The continuous medication state sequence records the user's remaining medication quantity at different time points, which helps the medical management system dynamically monitor the user's medication behavior. This embodiment improves the accuracy of reminders and suggestions by updating the user's remaining medication quantity in a timely manner.

[0054] It should be noted that the update formula for the continuous drug use sequence is based on formula (1):

[0055]

[0056] Where, x t This can refer to the user's remaining medication at the target time, i.e., the estimated remaining medication for the user on day t; t can refer to the target time; x t-1 t-1 can refer to the remaining amount of medicine at a historical moment; t-1 can refer to a historical moment; u t This can refer to the estimated daily average rate of medication use currently employed by the user; y t This can refer to the test result, i.e., whether the medicine was purchased on day t. For example, 1 indicates that the medicine was purchased, and 0 indicates that the medicine was not purchased; q t It can refer to the number of medications a user purchases at a target time; a tThis can refer to the user's medication adherence coefficient, which can be determined through historical behavior; This can refer to the recommended dosage of a medication, which can be determined according to the medication's instructions; t This can refer to a preset disturbance factor, which is a disturbance term added by the system based on the actual situation, and a feedback state adjustment factor; δ t It can refer to the preset noise factor, which is the noise term in the state estimation process.

[0057] If a user takes multiple medications simultaneously, the bit vector form can be extended, as shown in the following formula (2):

[0058]

[0059] In one optional embodiment, the remaining amount of medication for a user at a target time is predicted based on the detection results, the user's remaining medication amount at historical times, and the user's medication adherence coefficient. This includes: the medical management system can obtain the number of medications purchased by the user at the target time, the recommended dosage of the medication, a preset perturbation factor, and a preset noise factor, and then predict the remaining amount of medication for the user at the target time based on the number of medications purchased by the user at the target time, the recommended dosage of the medication, the preset perturbation factor, the preset noise factor, the detection results, the remaining amount of medication for the user at historical times, and the user's medication adherence coefficient.

[0060] Optionally, the preset disturbance factor can refer to the adjustment factor added by the medical management system based on actual conditions, used to simulate possible deviations in user medication behavior. The preset noise factor can refer to the random error term set by the medical management system, used to simulate uncertainties that may occur during actual medication use.

[0061] By acquiring information such as the quantity of medication purchased by a user at a target time, the recommended dosage, preset perturbation factors, and preset noise factors, and combining this information with monitoring results, historical medication remaining quantities, and medication adherence coefficients, the healthcare management system can more accurately estimate the remaining medication quantity for a user at a target time. For example, if a user purchases medication at the target time, the healthcare management system will consider the quantity purchased and the recommended dosage, combined with preset perturbation factors and preset noise factors, to predict the remaining medication quantity; if the user does not purchase medication, the healthcare management system will predict based on the user's historical medication remaining quantities and medication adherence coefficients. This allows the healthcare management system to dynamically monitor the user's medication behavior and provide more accurate data support for subsequent medication reminders and purchase suggestions.

[0062] In one optional embodiment, the implicit medication state information of a user is determined based on a continuous sequence of medication states and temporal characteristics of user behavior. This includes: the medical management system can define a set of states, where the set of states represents multiple potential medication states of a user when using medication, and construct a state transition probability matrix logically associated with the set of states, where the state transition probability matrix is ​​used to characterize the transition probabilities between various medication states. Then, an observation probability distribution is determined based on the set of states, where the observation probability distribution is used to quantify the probability of observing the target medication behavior in any state in the set of states. An observation sequence is determined based on the continuous sequence of medication states and temporal characteristics of user behavior, where each element in the observation sequence includes the continuous sequence of medication states and the temporal characteristics of user behavior at a given time. Based on the observation probability distribution and the state transition probability matrix, the implicit medication state information of the user at each time point in the observation sequence is determined.

[0063] Optionally, the state set can refer to the various potential medication states a user may be in when using medication, such as "taking medication regularly," "irregular medication use," "about to discontinue medication," or "discontinue medication." The state transition probability matrix can describe the probability of a user transitioning between different medication states, such as the probability of transitioning from the "taking medication regularly" state to the "about to discontinue medication" state. The observation probability distribution can refer to the probability distribution of observing a specific medication behavior under a certain medication state, such as the probability of observing timely medication use under the "taking medication regularly" state.

[0064] By defining a set of states and constructing a state transition probability matrix, the healthcare management system can comprehensively and dynamically monitor and predict users' medication behavior. The state set encompasses various potential states of a user when using medication, while the state transition probability matrix describes the probability of transitions between different medication states, enabling the healthcare management system to capture the dynamic changes in user medication behavior. The healthcare management system determines the observation probability distribution based on the state set, facilitating the quantification of the probability of observing specific target medication behaviors under different states. For example, in the "normal medication" state, the probability of a user taking medication on time is high; while in the "discontinued medication" state, the user may completely stop taking medication. Quantitative analysis allows the healthcare management system to more accurately assess the user's current medication status. By combining continuous medication state sequences and temporal characteristics of user behavior, the healthcare management system determines observation sequences. The remaining medication quantity and user behavior characteristics at multiple times provide a large data foundation for the healthcare management system. For example, the healthcare management system records that a user has 10 tablets remaining at a certain time, while the user's medication purchase behavior at that time shows a low purchase frequency. By combining observation probability distribution and state transition probability matrix, the medical management system can more accurately predict the implicit medication status information of users at various time points, which can improve the effectiveness of reminders and the medication adherence of users.

[0065] For example, the set of states can be represented as S = {s1, s2, ... s}. n The latent state represents a potential, unobservable stage or pattern of medication use behavior. For example: s1 can refer to normal medication use (stable drug consumption and high user compliance); s2 can refer to irregular medication use (unstable drug consumption and decreased user compliance); s3 can refer to impending discontinuation of medication (very low remaining drug levels); s4 can refer to discontinuation of medication (the drug has been exhausted and has not been replenished for a long time, or the patient has completely stopped taking the medication); s n It can refer to other possible states.

[0066] The state transition probability matrix can be represented by A, where A = {a ij}, where a ij =P(q) t+1 =s j |q t =s i ), indicating that at time t, the state is s. i At time t+1, the state transitions to state s. j The probability of a. ij It can describe the dynamic changes of a user's hidden state over time. For example: a 正常用药,正常用药 It could be very high, and users tend to maintain a good state. 用药不规律,断药 It could be very high. The state transition probability matrix can be learned from large-scale user data.

[0067] The observation at the target time t can be represented as O. t =[h t ,x t ].

[0068] Among them, h t Contextual features can include the location of purchase, type of drug, and price of drug; x t It can refer to the amount of medicine remaining for the user at the target time, and can be derived from the update formula of the continuous medication state sequence;

[0069] The probability distribution of observations can be represented by B, where B = {b} j (O t )}, where b j (O t )=P(O t |q t =s j ), indicating that at the target time t, the state is in the hidden state s. j Under the condition of observation, the observed value O was observed. t The probability of q; t This can refer to the number of drugs a user purchases at a target time.

[0070] In an optional embodiment, the method for processing drug purchase behavior data further includes: the medical management system can determine model parameters based on the observed probability distribution, the state transition probability matrix, and the initial state distribution, wherein the initial state distribution is used to characterize the prior probability distribution information of the user being in various medication states at the time of initial modeling. Then, the model parameters are updated by determining the probability of the user being in each medication state and the state transition probability at each time point in the observation sequence, until a predetermined convergence condition is met, and the model parameter update process ends, wherein the state transition probability is used to characterize the probability of the user transitioning from a first medication state to a second medication state within adjacent time intervals, and the first medication state and the second medication state are two different medication states.

[0071] Optionally, the initial state distribution can refer to the prior probability distribution information of the user in various medication states during the initial modeling, which can be represented as π, π={π i}, where π i =P(q1=S) i This can refer to the state S of the medical management system at the beginning of the sequence. i The probability. For example, a medical management system can preset that the probability of a user initially being in a "normal medication" state is relatively high.

[0072] Optionally, model parameters can refer to model parameters describing user medication behavior, and may include the initial state distribution, state transition probability matrix, and observation probability distribution. Convergence conditions can refer to the termination conditions of the model parameter update process, such as the change in model parameters being less than a preset change threshold or reaching a preset number of iterations.

[0073] In this embodiment, the initial state distribution provides the model with prior probability distribution information about the user's various medication states during initial modeling, facilitating reasonable initialization of model parameters in the absence of sufficient historical data. The state transition probability matrix describes the probability of a user transitioning between different medication states. By dynamically updating the state transition probabilities, the changing trends of user medication behavior can be captured. For example, if a user frequently delays purchasing medication, the medical management system can automatically adjust the state transition probabilities, increasing the probability of transitioning from "normal medication use" to "about to discontinue medication," thereby more accurately predicting the user's future medication state. The medical management system quantifies the probability of observing a specific medication behavior under a given medication state through the observation probability distribution. For example, in the "normal medication use" state, the probability of a user taking medication on time is relatively high. Combining the observation sequence, the medical management system can dynamically calculate the probability of a user being in each medication state at each time point, enabling the medical management system to monitor user medication behavior in real time and adjust model parameters based on the latest behavioral data until the predetermined convergence condition is met, thus more closely reflecting the user's actual medication behavior and improving the model's predictive accuracy and reliability, thereby enhancing the medical management system's monitoring and prediction accuracy of user medication behavior.

[0074] In an optional embodiment, the model parameters are updated by determining the probability of a user being in each medication state and the state transition probability at each time point in the observation sequence. This includes: the medical management system updates the initial state distribution in the model parameters based on the probability of a user being in each medication state at each time point, updates the state transition probability matrix in the model parameters based on the state transition probability and the expected change value of the current medication state at each time point, and then updates the observation probability distribution in the model parameters based on the maximum likelihood estimate value corresponding to each medication state in the state set at each time point.

[0075] Optionally, the medical management system dynamically adjusts the initial state distribution based on the probability of the user being in each medication state at each time point. For example, if the medical management system finds that the user is more inclined to the "normal medication" state at the initial moment, it will increase the prior probability of the "normal medication" state accordingly. Based on the user's actual behavior data, it can more accurately reflect the user's medication state in the early stage of modeling, thereby providing a more reasonable starting point for subsequent predictions.

[0076] Optionally, the healthcare management system dynamically adjusts the state transition probability matrix based on the state transition probabilities determined at each time point and the expected change in the current medication status. For example, if a user frequently transitions from a "normal medication" state to a "soon-to-discontinue" state, the healthcare management system will increase the transition probability from "normal medication" to "soon-to-discontinue" state. By using dynamic user behavior data, it can more accurately reflect the changing trends in user medication behavior, thereby improving the model's predictive ability. This allows the healthcare management system to better capture changes in user behavior and predict potential medication discontinuation risks in advance.

[0077] Optionally, the healthcare management system dynamically adjusts the observed probability distribution based on the maximum likelihood estimate of each medication state at each time point in the state set. For example, in the "normal medication" state, the user is more likely to take medication on time; while in the "discontinued medication" state, the user may completely stop taking medication. Through maximum likelihood estimation, the healthcare management system can adjust the observed probabilities based on actual observation data, making them more consistent with the user's actual behavior patterns. This improves the model's ability to interpret user behavior and thus more accurately predicts the user's medication behavior.

[0078] By dynamically updating the initial state distribution, state transition probability matrix, and observation probability distribution, the medical management system can more accurately predict users' medication status, identify potential problems in advance, facilitate the generation of more personalized medication reminder strategies, and improve the effectiveness of reminders and users' medication adherence.

[0079] For example, we can give the model parameters λ = (A, B, π) and the observation sequence O = (O1, O2, ..., O2). t The probability P(O|λ) of the observed sequence is maximized. Specifically, the model parameters are optimized by repeatedly performing the expectation calculation and parameter update steps until the model parameters meet the predetermined convergence conditions.

[0080] Optionally, the expected value can be calculated using a forward-backward algorithm to calculate the probability γ of the user being in a certain state (such as normal medication state) at each time step. t (i) and state transition probability ξ t (i,j) (e.g., how likely is it to transition from "normal medication use" to "about to discontinue medication", and how likely is it to transition from "about to discontinue medication" to "discontinue medication"), in order to model the temporal distribution of hidden behavioral states. For example, when there are consecutive instances of delayed medication purchases, the model will increase the posterior probability of the "about to discontinue medication" state.

[0081] γ t (i) can refer to the state S at the target time t given the observation sequence O and the current model parameters λ. i The probability of is shown in the following formula (3):

[0082] γ t (i)=P(q t =S i |O,λ) (3)

[0083] Where, q t It can refer to the quantity of medicine purchased by a user at the target time t; S i It can refer to the i-th state in the set of states.

[0084] ξ t (i,j) can refer to the state S at the target time t, given the observation sequence O and the current model parameters λ. i And at time t+1, the state transitions to state S. j The probability of is shown in the following formula (4):

[0085] ξ t (i,j)=P(q t =S i ,q t+1 =S j |O,λ) (4)

[0086] Among them, S j It is the j-th state in the set of states.

[0087] Optionally, parameter updates can utilize the predicted results from expected calculations to correct model parameters. Based on the estimated values ​​of γ and ξ, the initial state distribution, state transition probability matrix, and observation probability distribution are updated, thereby enabling the model to better match users' actual medication usage patterns. For example, if a large number of users enter a "discontinuation" state after a "decreased compliance" state, the transition probability α... ij This will be increased, thereby enhancing the model's ability to predict medication interruption sharing.

[0088] The initial state distribution in the updated model parameters can be expressed as formula (5):

[0089]

[0090] Formula (5) represents the updated initial state probability that time 1 is in state S. i The expected probability, i.e., the user is in state S at time 1. i The probability of.

[0091] The updated state transition probability matrix A can be expressed as formula (6):

[0092]

[0093] Wherein, formula (6) represents the updated state transition probability from state S. i Transition to state S jThe expectation divided by the value from state S i The expectation of leaving. ξ t (i,j) is in state S at the target time t. i And at time t+1, the state transitions to state S. j The probability of γ, and γ t (i) is in state S at time t. i The probability of.

[0094] During the process of updating the observation probability distribution B, for state S j The parameter (c) jk μ jk , Σ jk It can be updated through weighted maximum likelihood estimation, where the observation O t Belongs to state S j The weights can be determined by γ t (j) is given.

[0095] Repeat the expectation calculation and parameter update until the model parameters meet the predetermined convergence conditions.

[0096] In one optional embodiment, determining the observation probability distribution based on the state set includes: the medical management system can determine the number of Gaussian mixture components in each medication state in the state set, determine the weight of each Gaussian mixture component in each medication state, determine the multivariate Gaussian distribution corresponding to each Gaussian mixture component, and then determine the observation probability distribution based on the number of Gaussian mixture components in each medication state, the weight of each Gaussian mixture component, and the multivariate Gaussian distribution corresponding to each Gaussian mixture component.

[0097] Optionally, the number of Gaussian mixture components can refer to the number of components (i.e., Gaussian distributions) in the Gaussian mixture model used to describe the observed data at each medication state. The weight of each Gaussian mixture component can refer to the weight of each Gaussian mixture component in the mixture model, indicating the importance of that Gaussian mixture component to the overall observed data. The multivariate Gaussian distribution can refer to the specific distribution of each Gaussian mixture component, which can be defined by the mean vector and covariance matrix.

[0098] The healthcare management system determines the number of Gaussian distributions needed to describe observed data for each medication state. For example, in the "normal medication" state, two Gaussian distributions might be needed to describe the behavior patterns of taking medication on time and occasionally delaying medication, respectively. The healthcare management system calculates the weight of each Gaussian mixture component, indicating the importance of that component in the overall observed data. For example, if a Gaussian component describes the behavior of taking medication on time, its weight may be higher; while the weight describing the behavior of occasionally delaying medication may be lower. The healthcare management system defines a specific multivariate Gaussian distribution for each Gaussian mixture component, which can describe the specific behavioral patterns of users in a given medication state. For example, the mean vector can represent the average daily medication time for users, and the covariance matrix can describe the fluctuations in medication time. Based on the number of Gaussian mixture components for each medication state, the weight of each Gaussian mixture component, and the corresponding multivariate Gaussian distribution, the healthcare management system comprehensively calculates the probability distribution of observed specific medication behaviors in each medication state, enabling a more accurate description and quantification of the complex behavioral patterns of users in different medication states. Compared to a single Gaussian distribution, it can more accurately capture the diversity of user behavior.

[0099] The observation probability distribution B can also be expressed as the following formula (7):

[0100]

[0101] Among them, M ij Pointable state S j The number of Gaussian mixture components under c; j k can refer to the hidden state S j The weight of the k-th Gaussian component and Can refer to μ jk Let Σ be the mean vector. jk Let be a multivariate Gaussian distribution of the matrix.

[0102] Figure 2 This is a processing device for drug purchase behavior data according to embodiments of this application, such as... Figure 2 As shown, according to another aspect of the embodiments of this application, a processing device for drug purchase behavior data is also provided, including a collection unit 21, a first determination unit 22, an encoding unit 23, and a second determination unit 24.

[0103] The system includes: a collection unit 21, used to collect historical medication purchase behavior data of a user with user authorization; a first determination unit 22, used to determine the user's continuous medication state sequence based on the historical medication purchase behavior data, wherein the continuous medication state sequence includes the user's remaining medication amount at different times; an encoding unit 23, used to encode the historical medication purchase behavior data, contextual features, and user tags through an attention model to obtain user behavior temporal features, wherein the contextual features include at least the medication purchase location, medication type, and medication price, and the user tags include at least the user's disease type, age, and medication adherence level; and a second determination unit 24, used to determine the user's implicit medication state information based on the continuous medication state sequence and user behavior temporal features, wherein the implicit medication state information includes at least the probability distribution information of the user being in various medication states.

[0104] Optionally, the device for processing the drug purchase behavior data further includes: a reminder strategy generation unit, used to generate a medication reminder strategy based on the user's implicit medication status information and the user's historical reminder preference information, wherein the historical reminder preference information includes at least the reminder time and reminder method preferred by the user in a historical time period; the medication reminder strategy includes at least medication reminder content, a target reminder time, and a target reminder method; and a reminder content sending unit, used to send the medication reminder content to the user's terminal device at the target reminder time using the target reminder method.

[0105] Optionally, after sending the medication reminder content to the user's terminal device using the target reminder method at the target reminder time, the medication purchase behavior data processing device further includes: a response acquisition unit 21, used to acquire the user's response information to the medication reminder content; and an adjustment unit, used to adjust the user's historical reminder preference information and / or medication continuous status sequence according to the response information.

[0106] Optionally, the first determining unit 22 includes: a medication parameter determining subunit, which determines the user's remaining medication quantity at a historical time and the user's medication adherence coefficient based on the historical medication purchase behavior data; a medication purchase detection subunit, which detects whether the user purchases medication at a target time and obtains a detection result, wherein the target time is later than the historical time; a remaining medication prediction subunit, which predicts the user's remaining medication quantity at the target time based on the detection result, the user's remaining medication quantity at the historical time, and the user's medication adherence coefficient; and a remaining medication processing subunit, which uses the user's remaining medication quantity at the target time as an element in the medication continuous state sequence.

[0107] Optionally, the remaining medication prediction subunit includes: an acquisition module, used to acquire the number of medications purchased by the user at the target time, the recommended dosage of the medication, a preset disturbance factor, and a preset noise factor; and a remaining medication prediction module, used to predict the remaining medication quantity of the user at the target time based on the number of medications purchased by the user at the target time, the recommended dosage of the medication, the preset disturbance factor, the preset noise factor, the detection results, the remaining medication quantity of the user at historical times, and the user's medication adherence coefficient.

[0108] Optionally, the second determining unit 24 includes: a set configuration subunit for defining a state set, wherein the state set represents multiple potential medication states of a user when using medication; a transition matrix construction subunit for constructing a state transition probability matrix logically associated with the state set, wherein the state transition probability matrix represents the transition probability between various medication states; an observation probability determination subunit for determining an observation probability distribution based on the state set, wherein the observation probability distribution quantifies the probability of observing the target medication behavior in any state in the state set; an observation sequence determination subunit for determining an observation sequence based on the continuous medication state sequence and the user behavior temporal characteristics, wherein each element in the observation sequence includes the continuous medication state sequence and the user behavior temporal characteristics corresponding to a certain moment; and an implicit medication determination subunit for determining the implicit medication state information of the user at each time point in the observation sequence based on the observation probability distribution and the state transition probability matrix.

[0109] Optionally, the device for processing the drug purchase behavior data further includes: a model parameter determination unit, used to determine model parameters based on the observed probability distribution, the state transition probability matrix, and the initial state distribution, wherein the initial state distribution is used to characterize the prior probability distribution information of the user in various medication states at the time of initial modeling; and a parameter update unit, used to update the model parameters by determining the probability of the user in each medication state and the state transition probability at each time point in the observed sequence, until a predetermined convergence condition is met, and the update process of the model parameters ends, wherein the state transition probability is used to characterize the probability of the user transitioning from a first medication state to a second medication state within adjacent time intervals, and the first medication state and the second medication state are two different medication states.

[0110] Optionally, the parameter update unit includes: an initial state update subunit, used to update the initial state distribution in the model parameters based on the probability of the user being in each medication state determined at each time point; a transition matrix update subunit, used to update the state transition probability matrix in the model parameters based on the state transition probabilities determined at each time point and the expected change value of the current medication state determined at each time point; and an observation probability update subunit, used to update the observation probability distribution in the model parameters based on the maximum likelihood estimate value corresponding to each medication state in the state set at each time point.

[0111] Optionally, the observation probability determination subunit includes: a quantity determination module, used to determine the quantity of Gaussian mixture components in each medication state in the state set; a weight determination module, used to determine the weight of each Gaussian mixture component in each medication state; a distribution determination module, used to determine the multivariate Gaussian distribution corresponding to each Gaussian mixture component; and an observation probability determination module, used to determine the observation probability distribution based on the quantity of Gaussian mixture components in each medication state, the weight of each Gaussian mixture component, and the multivariate Gaussian distribution corresponding to each Gaussian mixture component.

[0112] According to another aspect of the embodiments of this application, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when one or more programs are executed by one or more processors, the one or more processors cause the one or more processors to perform the above-described method for processing drug purchase behavior data.

[0113] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, which stores a computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located performs the above-described method for processing drug purchase behavior data.

[0114] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0115] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0116] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0117] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0118] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0119] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0120] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for processing drug purchase behavior data, characterized in that, include: With user authorization, historical drug purchase behavior data of users will be collected; The user's continuous medication status sequence is determined based on the historical medication purchase behavior data, wherein the continuous medication status sequence includes the user's remaining medication amount at different times; The historical drug purchase behavior data, context features, and user tags are encoded using an attention model to obtain user behavior time-series features. The context features include at least the location of drug purchase, drug type, and drug price, and the user tags include at least the user's disease type, age, and medication adherence level. Based on the continuous sequence of medication states and the temporal characteristics of user behavior, the implicit medication state information of the user is determined, wherein the implicit medication state information includes at least the probability distribution information of the user in various medication states; Determining the user's implicit medication state information based on the continuous medication state sequence and the user behavior time-series characteristics includes: defining a state set, wherein the state set represents multiple potential medication states of the user when using medication; constructing a state transition probability matrix logically associated with the state set, wherein the state transition probability matrix is ​​used to characterize the transition probabilities between various medication states; determining an observation probability distribution based on the state set, wherein the observation probability distribution is used to quantify the probability of observing the target medication behavior in any state in the state set; determining an observation sequence based on the continuous medication state sequence and the user behavior time-series characteristics, wherein each element in the observation sequence includes the corresponding continuous medication state sequence and user behavior time-series characteristics at a given time; and determining the user's implicit medication state information at each time point in the observation sequence based on the observation probability distribution and the state transition probability matrix.

2. The method for processing drug purchase behavior data according to claim 1, characterized in that, After determining the user's implicit medication status information based on the continuous medication status sequence and the time-series characteristics of user behavior, the method for processing the medication purchase behavior data further includes: Based on the user's implicit medication status information and the user's historical reminder preference information, a medication reminder strategy is generated. The historical reminder preference information includes at least the reminder time and reminder method preferred by the user within a historical time period. The medication reminder strategy includes at least the medication reminder content, the target reminder time, and the target reminder method. At the specified target reminder time, the medication reminder content is sent to the user's terminal device using the specified target reminder method.

3. The method for processing drug purchase behavior data according to claim 2, characterized in that, After sending the medication reminder content to the user's terminal device using the target reminder method at the target reminder time, the method for processing the medication purchase behavior data further includes: Collect the user's response information to the medication reminder content; The user's historical reminder preferences and / or medication continuity sequence are adjusted based on the response information.

4. The method for processing drug purchase behavior data according to claim 1, characterized in that, Determining the user's continuous medication usage sequence based on the historical medication purchase behavior data includes: The remaining amount of medicine for the user at a historical time and the user's medication adherence coefficient are determined based on the historical drug purchase behavior data. The system detects whether the user purchased medicine at a target time and obtains the detection result, wherein the target time is later than the historical time. Based on the detection results, the user's remaining medication at historical times, and the user's medication adherence coefficient, predict the user's remaining medication at the target time. The remaining amount of medicine for the user at the target time is used as an element in the continuous medication state sequence.

5. The method for processing drug purchase behavior data according to claim 4, characterized in that, Based on the detection results, the user's remaining medication at historical times, and the user's medication adherence coefficient, predict the user's remaining medication at a target time, including: The system obtains the number of drugs purchased by the user at the target time, the recommended dosage of the drugs, the preset disturbance factor, and the preset noise factor. Based on the user's purchase quantity at the target time, the recommended dosage of the drug, the preset disturbance factor, the preset noise factor, the detection results, the user's remaining drug quantity at historical times, and the user's medication adherence coefficient, the user's remaining drug quantity at the target time is predicted.

6. The method for processing drug purchase behavior data according to claim 1, characterized in that, The method for processing the drug purchase behavior data also includes: Based on the observed probability distribution, the state transition probability matrix, and the initial state distribution, the model parameters are determined, wherein the initial state distribution is used to characterize the prior probability distribution information of the user in various medication states during the initial modeling. The model parameters are updated by determining the probability of a user being in each medication state and the state transition probability at each time point in the observation sequence until a predetermined convergence condition is met, at which point the update process of the model parameters ends. The state transition probability is used to characterize the probability that a user will transition from a first medication state to a second medication state within an adjacent time interval. The first medication state and the second medication state are two different medication states.

7. The method for processing drug purchase behavior data according to claim 6, characterized in that, The model parameters are updated by determining the probability of a user being in each medication state and the state transition probability at each time point in the observation sequence, including: The initial state distribution in the model parameters is updated based on the probability of the user being in each medication state determined at each time point. The state transition probability matrix in the model parameters is updated based on the state transition probabilities determined at each time point and the expected change value of the current medication status determined at each time point. The observation probability distribution in the model parameters is updated based on the maximum likelihood estimate of each medication state in the state set at each time point.

8. The method for processing drug purchase behavior data according to claim 1, characterized in that, Determining the observation probability distribution based on the set of states includes: Determine the number of Gaussian mixture components for each medication state in the state set; Determine the weight of each Gaussian mixture component under each medication state; Determine the multivariate Gaussian distribution corresponding to each Gaussian mixture component; The observation probability distribution is determined based on the number of Gaussian mixture components in each medication state, the weight of each Gaussian mixture component, and the multivariate Gaussian distribution corresponding to each Gaussian mixture component.

9. A device for processing drug purchase behavior data, used to implement the drug purchase behavior data processing method according to any one of claims 1 to 8, characterized in that, include: The data collection unit is used to collect users' historical drug purchase behavior data when authorized by the user. The first determining unit is configured to determine the user's continuous medication status sequence based on the historical drug purchase behavior data, wherein the continuous medication status sequence includes the user's remaining drug quantity at different times; The encoding unit is used to encode the historical drug purchase behavior data, context features and user tags through an attention model to obtain user behavior time-series features. The context features include at least the drug purchase location, drug type and drug price, and the user tags include at least the user's disease type, age and medication adherence level. The second determining unit is used to determine the implicit medication status information of the user based on the continuous medication status sequence and the temporal characteristics of the user behavior, wherein the implicit medication status information includes at least the probability distribution information of the user being in various medication statuses; The second determining unit includes: a set configuration subunit for defining a set of states, wherein the set of states represents multiple potential medication states of a user when using medication; a transition matrix construction subunit for constructing a state transition probability matrix logically associated with the set of states, wherein the state transition probability matrix represents the transition probability between various medication states; an observation probability determination subunit for determining an observation probability distribution based on the set of states, wherein the observation probability distribution quantifies the probability of observing the target medication behavior in any state of the set of states; an observation sequence determination subunit for determining an observation sequence based on the continuous medication state sequence and the temporal characteristics of the user behavior, wherein each element in the observation sequence includes the continuous medication state sequence and the temporal characteristics of the user behavior at a given time; and a latent medication determination subunit for determining the latent medication state information of the user at each time point in the observation sequence based on the observation probability distribution and the state transition probability matrix.

10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to perform the method for processing drug purchase behavior data as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed, the device containing the computer-readable storage medium performs the method for processing drug purchase behavior data as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Intelligent reminding method, system and equipment for patient medicine dispensing and storage medium

    CN120280077A