Medicine purchasing behavior data processing method and device, electronic equipment and storage medium
By collecting and analyzing users' medication purchase behavior data, 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.
Patent Information
- Application Number
- CN202511060941.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-30
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-07-30
AI Technical Summary
Existing technologies mainly rely on physiological monitoring indicators or single behavioral rules to predict users' medication status, resulting in low accuracy in medication status prediction and inability to effectively remind users to purchase or take medicines in a timely manner, affecting medication compliance and treatment effects.
Collect users' historical medication purchase behavior data, encode medication purchase behavior, contextual features and user tags through attention model, generate continuous medication state sequence and user behavior time sequence features, determine users' implicit medication status information, and generate personalized medication reminder strategies based on this, including reminder content, time and method.
It improves the accuracy of medication status prediction, ensures users purchase and take medication in a timely manner, enhances medication adherence, and reduces health risks caused by forgetting to take medication or irregular medication use.
Smart Images

Figure CN120809058A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data management, in particular to a method and device for processing drug purchase behavior data, an electronic device and a storage medium. BACKGROUND
[0002] In medical health management, the monitoring and reminding of the user's medication state mainly rely on physiological monitoring indicators or single behavior rules. Although the medication reminders can be provided to a certain extent, there are obvious limitations. For example, although physiological monitoring indicators such as heart rate and blood pressure can reflect the user's physical condition, they cannot directly reflect the user's medication behavior. Even if the user's heart rate is normal, there may be a situation of missing medication, and physiological monitoring indicators are difficult to directly identify the deviation of medication behavior.
[0003] Moreover, although the existing single behavior rules such as time reminders can remind the user to take medicine on time, they are difficult to dynamically analyze the user's long-term medication behavior. The reminding method based on fixed rules is difficult to adapt to the user's medication needs in different situations. For example, the user may miss the medication time due to travel or busy work.
[0004] Moreover, whether the user purchases medicine in time directly affects whether he or she can continue to take medicine. The existing technology mainly relies on physiological monitoring indicators or single behavior rules to predict the user's medication state, resulting in low accuracy of medication state prediction. It is difficult to effectively remind the user to purchase medicine in time or take medicine on time. The user may interrupt the medication due to insufficient drug inventory, thereby affecting the user's medication compliance and treatment effect.
[0005] In view of the above problems, no effective solution has been proposed so far. SUMMARY
[0006] The embodiments of the present application provide a method and device for processing drug purchase behavior data, an electronic device and a storage medium, to at least solve the problem that the existing technology mainly relies on physiological monitoring indicators or single behavior rules to predict the user's medication state, thereby resulting in low accuracy of medication state prediction for the user, and further failing to guarantee the technical problem of accurately reminding the user to purchase medicine in time or take medicine.
[0007] According to an aspect of the embodiments of the present application, a method for processing drug purchase behavior data is provided, including: collecting historical drug purchase behavior data of a user under the condition that the user authorizes; determining a drug use continuity state sequence of the user according to the historical drug purchase behavior data, wherein the drug use continuity state sequence includes drug remaining amounts of the user at different time points; encoding the historical drug purchase behavior data, context features and user labels by using an attention model to obtain user behavior time sequence features, wherein the context features at least include a drug purchase location, a drug type and a drug price, and the user labels at least include a disease type, an age and a drug use compliance level of the user; determining implicit drug use state information of the user according to the drug use continuity state sequence and the user behavior time sequence features, wherein the implicit drug use state information at least includes probability distribution information of the user in various drug use states.
[0008] Optionally, after determining the implicit drug use state information of the user according to the drug use continuity state sequence and the user behavior time sequence features, the method for processing drug purchase behavior data further includes: generating a drug use reminding strategy according to the implicit drug use state information of the user and historical reminding preference information of the user, wherein the historical reminding preference information at least includes a reminding time and a reminding manner preferred by the user in a historical time period; the drug use reminding strategy at least includes drug use reminding content, a target reminding time point and a target reminding manner; and the drug use reminding content is sent to a terminal device of the user at the target reminding time point by using the target reminding manner.
[0009] Optionally, after sending the drug use reminding content to the terminal device of the user at the target reminding time point by using the target reminding manner, the method for processing drug purchase behavior data further includes: collecting response information of the user to the drug use reminding content; and adjusting the historical reminding preference information of the user and / or the drug use continuity state sequence according to the response information.
[0010] Optionally, determining the drug use continuity state sequence of the user according to the historical drug purchase behavior data includes: determining a drug remaining amount of the user at a historical time point and a drug use compliance coefficient of the user according to the historical drug purchase behavior data; detecting whether the user purchases a drug at a target time point to obtain a detection result, wherein the target time point is later than the historical time point; predicting a drug remaining amount of the user at the target time point according to the detection result, the drug remaining amount of the user at the historical time point and the drug use compliance coefficient of the user; and taking the drug remaining amount of the user at the target time point as an element in the drug use continuity state sequence.
[0011] Optionally, the method further comprises: predicting the drug remaining amount of the user at the target time point according to the detection result, the drug remaining amount of the user at the historical time point, and the medication adherence coefficient of the user, including: obtaining the drug purchase quantity of the user at the target time point, the recommended dosage of the drug, a preset disturbance factor, and a preset noise factor; and predicting the drug remaining amount of the user at the target time point according to the drug purchase quantity of the user at the target time point, the recommended dosage of the drug, the preset disturbance factor, the preset noise factor, the detection result, the drug remaining amount of the user at the historical time point, and the medication adherence coefficient of the user.
[0012] Optionally, the method further comprises: determining the implicit medication state information of the user according to the medication continuous state sequence and the user behavior time sequence feature, including: defining a state set, wherein the state set represents a plurality of potential medication states of the user when using the drug; constructing a state transition probability matrix having a logical association with 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 according to the state set, wherein the observation probability distribution is used to quantify the probability of observing the target medication behavior under any one state in the state set; determining an observation sequence according to the medication continuous state sequence and the user behavior time sequence feature, wherein each element in the observation sequence includes the corresponding medication continuous state sequence and the user behavior time sequence feature at a time point; and determining the implicit medication state information of the user at each time point in the observation sequence according to the observation probability distribution and the state transition probability matrix.
[0013] Optionally, the method further comprises: determining the model parameter according to the observation probability distribution, the state transition probability matrix, and an initial state distribution, wherein the initial state distribution is used to represent the prior probability distribution information of the user in various medication states at the initial modeling; and updating the model parameter by using the probability of the user in each medication state at each time point in the observation sequence and the state transition probability until a predetermined convergence condition is met, thereby ending the updating process of the model parameter, wherein the state transition probability is used to represent the probability of the user transitioning from a first medication state to a second medication state within an adjacent time interval, and the first medication state and the second medication state are two different medication states.
[0014] Optionally, the method further comprises: updating the model parameter by using the probability of the user in each medication state at each time point in the observation sequence and the state transition probability, including: updating the initial state distribution in the model parameter according to the probability of the user in each medication state at each time point; updating the state transition probability matrix in the model parameter according to the state transition probability at each time point and the change expectation value of the current medication state at each time point; and updating the observation probability distribution in the model parameter according to the maximum likelihood estimation value of each medication state in the state set at each time point.
[0015] Optionally, determining the observation probability distribution according to the state set comprises: determining a number of Gaussian mixture components in each medication state in the state set; determining a weight of each Gaussian mixture component in each medication state; determining a multivariate Gaussian distribution corresponding to each Gaussian mixture component; and determining the observation probability distribution according to 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.
[0016] According to another aspect of the embodiments of the present application, a processing device for medication behavior data is further provided, comprising: a collection unit configured to collect historical medication behavior data of a user under authorization of the user; a first determination unit configured to determine a medication continuity state sequence of the user according to the historical medication behavior data, wherein the medication continuity state sequence comprises residual amounts of drugs of the user at different time points; an encoding unit configured to encode the historical medication behavior data, context features, and user labels by using an attention model to obtain user behavior time sequence features, wherein the context features at least comprise a medication location, a drug category, and a drug price, and the user labels at least comprise a disease type, an age, and a medication compliance level of the user; and a second determination unit configured to determine implicit medication state information of the user according to the medication continuity state sequence and the user behavior time sequence features, wherein the implicit medication state information at least comprises probability distribution information of the user in various medication states.
[0017] According to another aspect of the embodiments of the present application, an electronic device is further provided, comprising one or more processors and a memory, the memory being configured 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 perform the above-mentioned processing method for medication behavior data.
[0018] According to another aspect of the embodiments of the present application, a computer readable storage medium is further provided, the computer readable storage medium storing a computer program, wherein when the computer program is running, the computer readable storage medium makes a device in which the computer readable storage medium is located perform the above-mentioned processing method for medication behavior data.
[0019] In the embodiment of the present application, first, the historical drug purchase behavior data of the user is collected under the condition of user authorization, and the medication continuity state sequence of the user is determined according to the historical drug purchase behavior data, wherein the medication continuity state sequence includes the drug remaining amount of the user at different times. Then the historical drug purchase behavior data, the context features and the user label are encoded by the attention model to obtain the user behavior time sequence features, wherein the context features at least include the drug purchase location, the drug category and the drug price, and the user label at least includes the disease type, the age and the medication compliance level of the user, and the implicit medication state information of the user is determined according to the medication continuity state sequence and the user behavior time sequence features, wherein the implicit medication state information at least includes the probability distribution information of the user in various medication states.
[0020] From the above, by analyzing the historical drug purchase behavior data and the context features of the user, the medical management system can more comprehensively understand the medication habits and patterns of the user, and according to the medication continuity state sequence of the user and the user behavior time sequence features, the probability distribution information of the user in various medication states can be determined, so as to provide personalized medication reminders for the user. The reminder based on multiple behavior data of the user is more accurate and timely than the traditional physiological monitoring or single behavior rule. The present application can accurately predict the medication state of the user and timely remind, which helps to improve the medication compliance of the user, reduce the health risks caused by forgetting to take medicine or irregular medication, and thus solves the problem in the prior art that the medication state of the user is mainly predicted by relying on physiological monitoring indicators or single behavior rules, thereby resulting in low prediction accuracy of the medication state of the user, and thus cannot guarantee to accurately remind the user to purchase or take medicine in time. BRIEF DESCRIPTION OF DRAWINGS
[0021] The accompanying drawings, which are included to provide a further understanding of the present application, constitute a part of the present application and illustrate the illustrative embodiments of the present application and their description serve to explain the present application, and do not constitute improper limitations on the present application. In the drawings:
[0022] Figure 1 is a flowchart of an optional drug purchase behavior data processing method according to an embodiment of the present application;
[0023] Figure 2 is a schematic diagram of an optional drug purchase behavior data processing device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In the following, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings in the embodiments of the present application, and obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall into the protection scope of the present application.
[0025] It should be noted that the terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in other than the order illustrated or described herein. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a list of steps or units does not necessarily limit to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0026] According to the embodiments of the present application, a method embodiment of a drug purchase behavior data processing method is provided. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0027] According to the embodiments of the present application, a medical management system can be used as the execution subject of the drug purchase behavior data processing method of the embodiments of the present application, wherein the system can be a software system or a combination of software and hardware embedded system. Of course, the method execution subject in the embodiments of the present application can also be other forms of execution subject, such as device, equipment, etc. Those skilled in the art should know that the specific form of the method execution subject is not particularly limited in the present application.
[0028] Figure 1 The drug purchase behavior data processing method according to the embodiments of the present application, as shown in Figure 1 includes the following steps:
[0029] Step S101, under the condition of user authorization, collecting the user's historical drug purchase behavior data.
[0030] In step S101, the user authorization can refer to the behavior of the user explicitly agreeing that the medical management system collects and uses his / her personal data, facilitating data privacy protection and the user's control over his / her personal information. The historical drug purchase behavior data can refer to all records related to drug purchase of the user in the past period of time, which can include information such as drug purchase time, drug type, drug purchase quantity, drug purchase location, etc., facilitating the analysis of the user's drug use habits and the prediction of future drug use behavior.
[0031] By collecting the historical drug purchase behavior data of the user, the medical management system can obtain the drug purchase behavior records of the user, facilitating the provision of accurate input information for subsequent drug use state analysis, so that the medical management system can more accurately predict the drug remaining amount, drug use compliance and future drug purchase demand of the user.
[0032] In step S102, the drug use continuity state sequence of the user is determined according to the historical drug purchase behavior data, wherein the drug use continuity state sequence includes the drug remaining amount of the user at different time points.
[0033] Optionally, the drug use continuity state sequence can refer to the continuous record of the drug remaining amount of the user at different time points, and the drug use continuity state sequence can reflect the consumption of the drug of the user and the continuity of drug use.
[0034] By analyzing the historical drug purchase records and drug use habits of the user, the drug remaining amount of the user at different time points is determined, which not only helps the medical management system to predict when the user may run out of drugs, but also assesses the drug use compliance of the user. For example, the medical management system can calculate the current drug remaining amount according to the time, quantity of the last drug purchase and the daily drug dose. If the user purchases drugs at a certain time point, the medical management system will update the remaining amount according to the drug purchase quantity; if the user does not purchase drugs, the medical management system will decrease the remaining amount according to the drug use rate. If the drug remaining amount continuously decreases and meets the recommended dose, it indicates that the user has high drug use compliance; if the remaining amount decreases abnormally, it may indicate that the user does not use drugs regularly.
[0035] In step S103, the historical drug purchase behavior data, context features and user labels are encoded by an attention model to obtain user behavior time sequence features, wherein the context features at least include the drug purchase location, drug type and drug price, and the user labels at least include the disease type, age and drug use compliance level of the user, etc.
[0036] Optionally, the attention model is a deep learning model that can automatically learn the importance weight of different parts of the input data, thereby more effectively extracting key information. In the present application, the attention model can be used to encode the historical drug purchase behavior data, context features and user labels.
[0037] Optionally, the context features can refer to external information related to the user's drug purchase behavior, and can include drug purchase location, drug category, drug price, and can reflect the environmental background of the user's drug purchase behavior. The user label can refer to the attribute information of the user himself, and can include disease type, age, drug use compliance level, and can reflect the health status and drug use habit of the user.
[0038] Optionally, the user behavior time sequence feature can refer to a feature vector obtained by encoding the historical drug purchase behavior data, the context feature and the user label, and can reflect the drug purchase behavior mode of the user at different time points.
[0039] In the embodiments of the present application, the medical management system can convert the complex drug purchase behavior data and the related features such as the context features and the user label of the user into a structured feature vector. The attention model can automatically identify which features are more important in predicting the drug use state. For example, for some users, the drug purchase location may have a greater impact on the drug purchase behavior, while for other users, the drug price may be the key factor. Not only can the user's drug purchase behavior mode at different time points be captured, but also the context features and the user label can be combined to provide more comprehensive user behavior analysis. For example, by analyzing the user's drug purchase behavior at different locations, the medical management system can infer whether the user changes the drug use habit due to work or travel. By combining the drug category and the price, the medical management system can predict the user's preference for different drugs. By considering the user's disease type and age, the medical management system can more accurately assess the user's drug use demand.
[0040] In step S104, the implicit drug use state information of the user is determined according to the drug use continuous state sequence and the user behavior time sequence feature, wherein the implicit drug use state information at least includes probability distribution information of the user in various drug use states.
[0041] Optionally, the implicit drug use state information can refer to the probability distribution information of the user in various potential drug use states at different time points, and can include normal drug use, irregular drug use, impending drug discontinuation, drug discontinuation, etc.
[0042] The medical management system in the embodiments of the present application can comprehensively analyze the user's medication continuous state sequence and user behavior time sequence characteristics, so as to understand the user's drug remaining amount and drug purchase behavior mode, and thus infer the user's current and future possible medication state. For example, the medical management system can calculate the probability of the user being in a "normal medication", "about to run out of medication" or "running out of medication" state according to the change trend of the drug remaining amount and the user's behavior characteristics, so as to provide a more comprehensive analysis of the user's medication behavior for the medical management system. For example, if the medical management system finds that the user's drug remaining amount is continuously decreasing and meets the recommended dose, and the drug purchase behavior is regular, the probability of the user being in a "normal medication" state is higher; if the drug remaining amount suddenly decreases or increases, it may indicate that the user's medication is irregular or about to run out, so as to enable the medical management system to more accurately predict the user's medication behavior, and thus take measures such as reminding the user to purchase drugs or adjusting the medication plan in advance, so as to improve the user's medication compliance and health management effect.
[0043] In an optional embodiment, after determining the user's implicit medication state information according to the medication continuous state sequence and the user behavior time sequence characteristics, the processing method of the drug purchase behavior data further includes: the medical management system can generate a medication reminder strategy according to the user's implicit medication state information and the user's historical reminder preference information, wherein the historical reminder preference information at least includes the reminder time and the reminder mode preferred by the user in the historical time period; the medication reminder strategy at least includes the medication reminder content, the target reminding time and the target reminding mode, and the medication reminder content is sent to the terminal device of the user at the target reminding time using the target reminding mode.
[0044] Optionally, the historical reminder preference information can refer to the reminder time and the reminder mode preferred by the user in the past time period, for example, the user prefers to receive a short message reminder at 8 am or a voice reminder at 9 pm.
[0045] Optionally, the medication reminder strategy can refer to the personalized reminder scheme generated by the medical management system according to the user's implicit medication state information and the historical reminder preference information, and can include the medication reminder content, the target reminding time and the target reminding mode. The target reminding time can refer to the best reminding time point determined by the medical management system according to the user's medication state and preference. The target reminding mode can refer to the reminding mode selected by the medical management system according to the user's preference, such as short message, voice, application notification, etc. The terminal device can refer to the device used by the user to receive the reminder, and the terminal device can be but not limited to a smart phone, a tablet computer or a smart watch.
[0046] The medical management system in the embodiments of the present application can provide personalized medication reminding service for users, can make the reminding information arrive at a more suitable time in a more preferred way of the user, thereby improving the effectiveness of the reminding and the satisfaction of the user, not only improving the user experience, but also reducing the health risks caused by forgetting to take medicine or discontinuing medication through accurate reminding.
[0047] For example, if the medical management system finds that the user's medicine remaining amount is insufficient and is in the "imminent discontinuation" state, and the user prefers to receive SMS reminders at 8 am, the medical management system will send the reminder content "your medicine is about to run out, please purchase medicine in time" through SMS at 8 am, which can improve the user's medication compliance and facilitate the user to take medicine on time and purchase medicine in time.
[0048] In an optional embodiment, after the medication reminding content is sent to the terminal device of the user at the target reminding time using the target reminding way, the processing method of the purchase behavior data further includes that the medical management system can collect the response information of the user to the medication reminding content, and then adjust the historical reminding preference information and / or the medication continuous state sequence of the user according to the response information.
[0049] Optionally, the response information of the user to the medication reminding content can refer to the feedback of the user to the medication reminding content, such as whether the user confirms to receive the reminder, whether the user has taken medicine, whether the user has purchased medicine, etc.
[0050] In the embodiments of the present application, the medical management system will collect the response information of the user after sending the medication reminding. For example, if the user confirms to have taken medicine or purchased medicine, the medical management system will update the medication continuous state sequence of the user to make the record of the medicine remaining amount accurate. Moreover, the medical management system can also adjust the reminding strategy according to the response of the user. If the user often ignores a certain reminding way, the medical management system can change the reminding way or adjust the reminding time to improve the effectiveness of the reminding, which can ensure that the reminding strategy always meets the actual needs and preferences of the user, thereby improving the medication compliance and satisfaction of the user. For example, if the user often replies "has taken medicine" after receiving the SMS reminder, the medical management system will record this positive response and continue to use the SMS way in subsequent reminders. If the user often ignores the voice reminder, the medical management system can send an application notification instead to improve the arrival rate of the reminding.
[0051] In an optional embodiment, the sequence of medication continuity states of the user is determined according to the historical medication purchase behavior data, including: the medical management system determines the drug remaining amount of the user at a historical time and the medication adherence coefficient of the user according to the historical medication purchase behavior data, then detects whether the user purchases the drug at a target time to obtain a detection result, wherein the target time is later than the historical time, and predicts the drug remaining amount of the user at the target time according to the detection result, the drug remaining amount of the user at the historical time, and the medication adherence coefficient of the user, and takes the drug remaining amount of the user at the target time as an element in the sequence of medication continuity states.
[0052] Optionally, the medication adherence coefficient can reflect the regularity of the user taking the medicine according to the medical order, and can be determined based on the historical medication behavior of the user. For example, if the user often takes the medicine on time, the adherence coefficient will be higher; otherwise, it will be lower.
[0053] In the embodiment of the application, the medical management system determines the drug remaining amount of the user at a historical time and the medication adherence coefficient of the user, and detects whether the user purchases the drug at a target time, so that the medical management system needs to predict the drug remaining amount of the user at the target time, and the detection result will affect the prediction of the drug remaining amount. If the user purchases the drug at the target time, the medical management system will add the purchase quantity to the calculation of the drug remaining amount; if the user does not purchase the drug, the drug remaining amount will be calculated according to the historical remaining amount and the medication adherence coefficient. The medical management system predicts the drug remaining amount of the user at the target time according to the detection result, the drug remaining amount at the historical time, and the medication adherence coefficient, and takes the predicted value of the drug remaining amount as an element in the sequence of medication continuity states. The sequence of medication continuity states records the drug remaining amount of the user at different time points, which can help the medical management system to dynamically monitor the medication behavior of the user. The embodiment of the application updates the drug remaining amount of the user in time, which facilitates to improve the accuracy of the reminders and suggestions.
[0054] It should be noted that the update formula of the sequence of medication continuity states refers to formula (1):
[0055]
[0056] Wherein, x t may refer to the drug remaining amount of the user at the target time, i.e. the estimated drug remaining amount of the user on the tth day; t may refer to the target time; x t-1 may refer to the drug remaining amount at the historical time; t-1 may refer to the historical time; u t may refer to the current daily rate estimate of the user taking the medicine; y t may refer to the detection result, i.e. whether the drug is purchased on the tth day, for example, 1 indicates that the drug is purchased, and 0 indicates that the drug is not purchased; q t may refer to the purchase quantity of the user at the target time; a tThe medication adherence coefficient of the user can be determined by historical behavior. The recommended dosage of the medicine can be determined according to the medicine instructions. t The preset disturbance factor is a disturbance term added by the system according to the actual situation, and is a feedback state adjustment factor. t The preset noise factor is a noise term in the state estimation process.
[0057] If the user takes multiple medicines at the same time, the bit vector form can be expanded, as shown in the following formula (2):
[0058]
[0059] In an optional embodiment, the medication remaining amount of the user at the target time is predicted according to the detection result, the medication remaining amount of the user at the historical time, and the medication adherence coefficient of the user, including: the medical management system can obtain the purchase quantity of the user at the target time, the recommended dosage of the medicine, the preset disturbance factor, and the preset noise factor, and then predict the medication remaining amount of the user at the target time according to the purchase quantity of the user at the target time, the recommended dosage of the medicine, the preset disturbance factor, the preset noise factor, the detection result, the medication remaining amount of the user at the historical time, and the medication adherence coefficient of the user.
[0060] Optionally, the preset disturbance factor can refer to an adjustment factor added by the medical management system according to the actual situation, which is used to simulate the possible medication behavior deviation of the user. The preset noise factor can refer to a random error term set by the medical management system, which is used to simulate the uncertainty that may occur in the actual medication process.
[0061] The medical management system can more accurately estimate the medication remaining amount of the user at the target time by obtaining the purchase quantity of the user at the target time, the recommended dosage, the preset disturbance factor, the preset noise factor, and other information, and combining the detection result, the historical medication remaining amount, and the medication adherence coefficient for comprehensive prediction. For example, if the user purchases medicine at the target time, the medical management system will consider the purchase quantity and the recommended dosage, and combine the preset disturbance factor and the preset noise factor to predict the medication remaining amount; if the user does not purchase medicine, the medical management system will predict according to the medication remaining amount of the user at the historical time and the medication adherence coefficient, which can help the medical management system dynamically monitor the medication behavior of the user, and provide more accurate data support for subsequent medication reminders and purchase suggestions.
[0062] In an optional embodiment, the implicit medication state information of the user is determined according to the medication continuous state sequence and the user behavior time sequence feature, including: the medical management system can define a state set, wherein the state set represents a plurality of potential medication states of the user when using the medicine, and a state transition probability matrix having a logical association with the state set is constructed, wherein the state transition probability matrix is used to represent the transition probability between various medication states. Then, the observation probability distribution is determined according to the state set, wherein the observation probability distribution is used to quantify the probability of observing the target medication behavior in any one state in the state set. The observation sequence is determined according to the medication continuous state sequence and the user behavior time sequence feature, wherein each element in the observation sequence includes the corresponding medication continuous state sequence and the user behavior time sequence feature at a time. The implicit medication state information of the user at each time point under the observation sequence is determined according to the observation probability distribution and the state transition probability matrix.
[0063] Optionally, the state set can refer to a plurality of potential medication states that the user can be in when using the medicine, such as "normal medication", "irregular medication", "about to discontinue medication", or "discontinued medication", etc. The state transition probability matrix can describe the probability of the user transitioning between different medication states, such as the probability of transitioning from the "normal medication" state to the "about to discontinue medication" state. The observation probability distribution can refer to the probability distribution of observing a specific medication behavior in a certain medication state, such as the probability of observing timely medication in the "normal medication" state.
[0064] The medical management system can comprehensively and dynamically monitor and predict the user's medication behavior by defining the state set and constructing the state transition probability matrix. The state set covers a plurality of potential states of the user when using the medicine, and the state transition probability matrix describes the transition probability between different medication states, which facilitates the medical management system to capture the dynamic change rule of the user's medication behavior. The medical management system determines the observation probability distribution according to the state set, which facilitates the quantification of the probability of observing a specific target medication behavior in different states. For example, in the "normal medication" state, the user has a high probability of taking medication on time; while in the "discontinued medication" state, the user may completely stop taking medication, and through quantitative analysis, the medical management system can more accurately assess the current medication state of the user. The medical management system determines the observation sequence by combining the medication continuous state sequence and the user behavior time sequence feature, and the drug remaining amount and the user behavior feature at multiple time points can provide a large amount of data basis for the medical management system, for example, the medical management system records that the drug remaining amount of the user at a certain time is 10, and the drug purchase behavior feature of the user at that time shows that the drug purchase frequency is low. The medical management system can more accurately predict the implicit medication state information of the user at each time point by combining the observation probability distribution and the state transition probability matrix, which facilitates to improve the effectiveness of the reminder and the medication compliance of the user.
[0065] For example, the state set can be expressed as S = {s1, s2, ...s n Hidden states represent potential, non-directly observable stages or patterns of concurrent medication behavior. For example, s1 can refer to regular medication use (stable medication consumption and high user compliance); s2 can refer to irregular medication use (unstable medication consumption and low user compliance); s3 can refer to impending medication withdrawal (very low medication remaining); s4 can refer to medication withdrawal (drugs have been used up and not been replenished for a long time, or the patient has completely stopped taking the medication); n May refer to other possible states.
[0066] The state transition probability matrix can be represented by A, A={a ij}, where a ij =P(q t+1 =s j |q t =s i ), indicating that time t is in state s i Next, at time t+1, it transitions to state s j The probability of a. ij It can describe the dynamic law of user hidden state changing over time. For example: a 正常用药,正常用药 Can be high, users tend to stay in good shape. 用药不规律,断药 The state transition probability matrix can be learned from large-scale user data.
[0067] The observed value at the target time t can be expressed as O t =[h t ,x t ].
[0068] Among them, h t Can refer to contextual features, including the place where the medicine is purchased, the type of medicine, and the price of the medicine; x t It can refer to the remaining amount of the user's medicine at the target time, and can be derived from the update formula of the continuous state sequence of medication;
[0069] The observed probability distribution can be expressed by B, B = {b j (O t )}, where b j (O t )=P(O t |q t =s j ), indicating that it is in the hidden state s at the target time t j The observed value O is observed under the condition t The probability of q t It can refer to the quantity of medicine purchased by the user at the target time.
[0070] In an optional embodiment, the method for processing the drug purchase behavior data further comprises: the medical management system determines the model parameters according to the observation probability distribution, the state transition probability matrix and the initial state distribution, wherein the initial state distribution is used to represent the prior probability distribution information of the user in various medication states at the initial modeling. Then the model parameters are updated by the probability of the user in each medication state at each time point determined under the observation sequence and the state transition probability, until the predetermined convergence condition is met, and the updating process of the model parameters is ended, wherein the state transition probability is used to represent the probability of the user transferring 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 at the initial modeling, which can be represented as π, π = {π i}, wherein π i = P (q1 = S i ), which can refer to the probability of the medical management system in state S i at the beginning of the sequence. For example, the medical management system can preset that the probability of the user initially being in the "normal medication" state is high.
[0072] Optionally, the model parameters can refer to the model parameters describing the medication behavior of the user, which can include the initial state distribution, the state transition probability matrix and the observation probability distribution. The convergence condition can refer to the termination condition of the model parameter updating process, which can refer to that the change of the model parameters is less than a certain preset change threshold or reaches a preset iteration number.
[0073] In the embodiments of the present application, the initial state distribution can provide the model with the prior probability distribution information of the user in various medication states at the initial modeling, so as to facilitate reasonable initialization of the model parameters in the case of lack of sufficient historical data. The state transition probability matrix describes the transition probability of the user between different medication states, and by dynamically updating the state transition probability, the change trend of the user's medication behavior can be captured. For example, if the user frequently appears the behavior of drug purchase delay, the medical management system can automatically adjust the state transition probability, and increase the transition probability from "normal medication" to "imminent drug discontinuation", so as to more accurately predict the future medication state of the user. The medical management system quantifies the probability of observing a specific medication behavior in a certain medication state through the observation probability distribution. For example, in the "normal medication" state, the probability of the user taking medication on time is relatively high. In combination with the observation sequence, the medical management system can dynamically calculate the probability of the user being in each medication state at each time point, so as to facilitate the medical management system to monitor the user's medication behavior in real time, and adjust the model parameters according to the latest behavior data until the predetermined convergence condition is met, so as to be closer to the actual medication behavior of the user, thereby improving the prediction accuracy and reliability of the model and improving the monitoring and prediction accuracy of the medical management system on the user's medication behavior.
[0074] In an optional embodiment, the model parameters are updated by the probability of the user being in each medication state determined at each time point in the observation sequence and the state transition probability, including that the medical management system can update the initial state distribution in the model parameters according to the probability of the user being in each medication state determined at each time point, and update the state transition probability matrix in the model parameters according to the state transition probability determined at each time point and the change expectation value of the current medication state determined at each time point, and then update the observation probability distribution in the model parameters according to the maximum likelihood estimation 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 according to the probability of the user being in each medication state determined 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 time, the prior probability of the "normal medication" state is correspondingly increased, which can be based on the actual behavior data of the user, so as to more accurately reflect the medication state of the user at the initial modeling, thereby providing a more reasonable starting point for subsequent prediction.
[0076] Optionally, the medical management system dynamically adjusts the state transition probability matrix according to the state transition probabilities determined at each time point and the change expectation of the current medication state. For example, if the user frequently transitions from the "normal medication" state to the "imminent medication discontinuation" state, the medical management system increases the transition probability from the "normal medication" state to the "imminent medication discontinuation" state, thereby facilitating more accurate reflection of the change trend of the user's medication behavior based on the user's dynamic behavior data, thereby improving the prediction capability of the model, so that the medical management system can better capture the changes in the user's behavior and predict potential medication discontinuation risks in advance.
[0077] Optionally, the medical management system dynamically adjusts the observation probability distribution according to the maximum likelihood estimate value of each medication state in the state set at each time point. For example, in the "normal medication" state, the user has a high probability of taking medication on time; while in the "medication discontinuation" state, the user may completely stop taking medication. Through the maximum likelihood estimation method, the medical management system can adjust the observation probability according to the actual observation data, so that it is more consistent with the user's real behavior pattern, thereby facilitating the improvement of the model's explanation capability for the user's behavior, and thus more accurately predicting the user's medication behavior.
[0078] By dynamically updating the initial state distribution, the state transition probability matrix and the observation probability distribution, the medical management system can more accurately predict the user's medication state, discover potential problems in advance, facilitate the generation of more personalized medication reminder strategies, and improve the effectiveness of the reminder and the user's medication compliance.
[0079] For example, given the model parameters λ = (A, B, π) and the observation sequence O = (O1, O2, …, O t , the probability P(O|λ) of the observation sequence is maximized. Specifically, the model parameters can be optimized by repeatedly performing the two steps of expectation calculation and parameter update in sequence until the model parameters meet the predetermined convergence condition.
[0080] Optionally, the expectation calculation can use the forward-backward algorithm to calculate the probability γ t (i) of the user being in a certain state (such as the normal medication state) at each time step and the state transition probability ξ t (i,j) (such as the likelihood of transitioning from "normal medication" to "imminent medication discontinuation" and the likelihood of transitioning from "imminent medication discontinuation" to "medication discontinuation") to achieve time series distribution modeling of the hidden behavior state. For example, when consecutive medication delay behaviors occur, the model will increase the posterior probability of the "imminent medication discontinuation" state.
[0081] γ t (i) can refer to the probability of being in state S i at time t given the observation sequence O and the current model parameters λ, as shown in the following formula (3):
[0082] γ t (i) = P(q t =S i |O,λ) (3)
[0083] Among them, q t It can refer to the quantity of medicine purchased by the user at the target time t; S i May refer to the i-th state in the state set.
[0084] ξ t (i, j) refers to the state S at the target time t under the given observation sequence O and the current model parameter λ. i And time t+1 transfers to state S j The probability is as 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 is the jth state in the state set.
[0087] Optionally, parameter updates can use the inferred results of the expected calculation to modify the model parameters. Based on the estimated values of γ and ξ, the initial state distribution, state transition probability matrix, and observation probability distribution are updated to make the model better match the user's actual medication habits. For example, if a large number of users enter the "drug withdrawal" state after the "compliance decline" state, the transition probability a ij It will be adjusted higher, thereby enhancing the model's ability to predict medication interruption sharing.
[0088] The initial state distribution in updating model parameters can be expressed as formula (5):
[0089]
[0090] Among them, formula (5) indicates that the updated initial state probability is that time 1 is in state S i The expected probability of the user being in state S at time 1 i probability.
[0091] The updated state transition probability matrix A can be expressed as formula (6):
[0092]
[0093] Among them, formula (6) shows that the updated state transition probability is from state S i Transfer to state S jthe expectation of leaving state S i at time t+1. ξ t (i,j) is the probability of being in state S i at target time t and transitioning to state S j at time t+1, while γ t (i) is the probability of being in state S i at time t.
[0094] In updating the observation probability distribution B, the parameters (c j , μ jk , Σ jk ) for state S jk can be updated by weighted maximum likelihood estimation, where the weight of observation O t belonging to state S j is given by γ t (j).
[0095] The expectation calculation and parameter updating are repeated until the model parameters satisfy a predetermined convergence condition.
[0096] In an alternative embodiment, determining the observation probability distribution according to the state set comprises: 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 according to 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 observation data in each medication state. The weight of the Gaussian mixture component can refer to the weight of each Gaussian mixture component in the mixture model, indicating the importance of the Gaussian mixture component to the overall observation data. The multivariate Gaussian distribution can refer to the specific distribution of each Gaussian mixture component, which can be defined by a mean vector and a covariance matrix.
[0098] The medical management system describes the observation data by determining how many Gaussian distributions are needed for each medication state. For example, in the "normal medication" state, two Gaussian distributions can be needed to describe the behavior patterns of taking medication on time and occasionally delaying medication, respectively. The medical management system calculates the weight of each Gaussian mixture component, which represents the importance of the component in the overall observation data. For example, if a Gaussian component describes the behavior of taking medication on time, its weight can be higher; while the weight of the component describing the behavior of occasionally delaying medication can be lower. The medical management system defines a specific multivariate Gaussian distribution for each Gaussian mixture component, which can describe the specific behavior pattern of the user in a certain medication state. For example, the mean vector can represent the average time of the user taking medication per day, and the covariance matrix can describe the fluctuation of the time of taking medication. The medical management system calculates the probability distribution of observing a specific medication behavior in each medication state according to 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, which can more accurately describe and quantify the complex behavior patterns of the user in different medication states. Compared with a single Gaussian distribution, the diversity of the user behavior can be more accurately captured.
[0099] The observation probability distribution B can also be represented as the following formula (7):
[0100]
[0101] wherein M ij may represent the number of Gaussian mixture components in the state S j ; c j k may represent the weight of the kth Gaussian component in the hidden state S j ; and may represent a multivariate Gaussian distribution with the mean vector μ jk and the matrix Σ jk .
[0102] Figure 2 According to an embodiment of the present application, a processing device for medication behavior data is provided, as shown in Figure 2 According to another aspect of the present application, a processing device for medication behavior data is also provided, which comprises a collection unit 21, a first determination unit 22, an encoding unit 23, and a second determination unit 24.
[0103] The collection unit 21 is configured to collect historical drug purchase behavior data of a user under authorization of the user; the first determination unit 22 is configured to determine a drug use continuity state sequence of the user according to the historical drug purchase behavior data, wherein the drug use continuity state sequence comprises drug remaining amounts of the user at different time points; the encoding unit 23 is configured to encode the historical drug purchase behavior data, context features and user labels by using an attention model to obtain user behavior time sequence features, wherein the context features at least comprise a drug purchase location, a drug type and a drug price, and the user labels at least comprise a disease type, an age and a drug use compliance level of the user; and the second determination unit 24 is configured to determine implicit drug use state information of the user according to the drug use continuity state sequence and the user behavior time sequence features, wherein the implicit drug use state information at least comprises probability distribution information of the user in various drug use states.
[0104] Optionally, the drug purchase behavior data processing apparatus further comprises: a reminding strategy generation unit configured to generate a drug use reminding strategy according to the implicit drug use state information of the user and historical reminding preference information of the user, wherein the historical reminding preference information at least comprises reminding time and a reminding manner preferred by the user in a historical time period; the drug use reminding strategy at least comprises drug use reminding content, a target reminding time and a target reminding manner; and a reminding content sending unit configured to send the drug use reminding content to a terminal device of the user at the target reminding time by using the target reminding manner.
[0105] Optionally, after the drug use reminding content is sent to the terminal device of the user at the target reminding time by using the target reminding manner, the drug purchase behavior data processing apparatus further comprises: a response collection unit 21 configured to collect response information of the user to the drug use reminding content; and an adjustment unit configured to adjust the historical reminding preference information of the user and / or the drug use continuity state sequence according to the response information.
[0106] Optionally, the first determination unit 22 comprises: a drug use parameter determination subunit configured to determine a drug remaining amount of the user at a historical time point and a drug use compliance coefficient of the user according to the historical drug purchase behavior data; a drug purchase detection subunit configured to detect whether the user purchases a drug at a target time point to obtain a detection result, wherein the target time point is later than the historical time point; a remaining drug prediction subunit configured to predict a drug remaining amount of the user at the target time point according to the detection result, the drug remaining amount of the user at the historical time point and the drug use compliance coefficient of the user; and a remaining drug processing subunit configured to take the drug remaining amount of the user at the target time point as an element in the drug use continuity state sequence.
[0107] Optionally, the remaining drug predictor unit comprises: an acquisition module configured to acquire the number of purchased drugs of the user at the target time, the recommended dosage of the drug, a preset perturbation factor, and a preset noise factor; and a remaining drug prediction module configured to predict the remaining amount of the drug of the user at the target time according to the number of purchased drugs of the user at the target time, the recommended dosage of the drug, the preset perturbation factor, the preset noise factor, the detection result, the remaining amount of the drug of the user at the historical time, and the drug-taking compliance coefficient of the user.
[0108] Optionally, the second determination unit 24 comprises: a set configuration subunit configured to define a state set, wherein the state set represents a plurality of potential drug-taking states of the user when using the drug; a transition matrix construction subunit configured to construct a state transition probability matrix having a logical association with the state set, wherein the state transition probability matrix is used to represent the transition probability between various drug-taking states; an observation probability determination subunit configured to determine an observation probability distribution according to the state set, wherein the observation probability distribution is used to quantify the probability of observing the target drug-taking behavior in any one state of the state set; an observation sequence determination subunit configured to determine an observation sequence according to the drug-taking continuous state sequence and the user behavior time sequence feature, wherein each element in the observation sequence comprises the corresponding drug-taking continuous state sequence and user behavior time sequence feature at a time; and an implicit drug-taking determination subunit configured to determine the implicit drug-taking state information of the user at each time point in the observation sequence according to the observation probability distribution and the state transition probability matrix.
[0109] Optionally, the processing device of the drug purchasing behavior data further comprises: a model parameter determination unit configured to determine a model parameter according to the observation probability distribution, the state transition probability matrix, and an initial state distribution, wherein the initial state distribution is used to represent the prior probability distribution information of the user in various drug-taking states at the initial modeling; and a parameter updating unit configured to update the model parameter by using the probability of the user in each drug-taking state and the state transition probability determined at each time point in the observation sequence until a predetermined convergence condition is met, and ending the updating process of the model parameter, wherein the state transition probability is used to represent the probability of the user transitioning from a first drug-taking state to a second drug-taking state within an adjacent time interval, and the first drug-taking state and the second drug-taking state are two different drug-taking states.
[0110] Optionally, the parameter updating unit comprises: an initial state updating subunit configured to update an initial state distribution in the model parameters according to the probability of the user being in each medication state determined at each time point; a transition matrix updating subunit configured to update a state transition probability matrix in the model parameters according to the state transition probability determined at each time point and the expected value of the change in the current medication state determined at each time point; and an observation probability updating subunit configured to update an observation probability distribution in the model parameters according to the maximum likelihood estimation value corresponding to each medication state in the state set at each time point.
[0111] Optionally, the observation probability determining subunit comprises: a quantity determining module configured to determine the number of Gaussian mixture components in each medication state in the state set; a weight determining module configured to determine the weight of each Gaussian mixture component in each medication state; a distribution determining module configured to determine a multivariate Gaussian distribution corresponding to each Gaussian mixture component; and an observation probability determining module configured to determine the observation probability distribution according to the number of Gaussian mixture components in each medication state, the weight of each Gaussian mixture component in each medication state, and the multivariate Gaussian distribution corresponding to each Gaussian mixture component.
[0112] According to another aspect of the embodiments of the present application, an electronic device is also provided, which comprises one or more processors and a memory, the memory being configured 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 are caused to perform the above-mentioned processing method of medication behavior data.
[0113] According to another aspect of the embodiments of the present application, a computer readable storage medium is also provided, which stores a computer program, wherein when the computer program is run, the device where the computer readable storage medium is located performs the above-mentioned processing method of medication behavior data.
[0114] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0115] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0116] In several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented by other ways. Among them, the above-described device embodiments are only schematic, for example, the division of the units can be a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, units or modules, and can be electrical or other forms.
[0117] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e. can be located in one place or can be distributed to multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0118] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0119] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and various program codes that can be stored in the medium.
[0120] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. A method for processing drug purchase behavior data, characterized in that: include: With the user's authorization, collect the user's historical drug purchasing behavior data; Determining a continuous medication state sequence of the user based on the historical medication purchase behavior data, wherein the continuous medication state sequence includes the remaining amount of medication of the user at different times; The historical drug purchase behavior data, contextual features, and user tags are encoded using an attention model to obtain user behavior time series 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 compliance level; According to the medication continuous state sequence and the user behavior temporal characteristics, implicit medication state information of the user is determined, wherein the implicit medication state information at least includes probability distribution information of the user being in various medication states.
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 medication continuous status sequence and the user behavior time series characteristics, the method for processing medication purchase behavior data further includes: 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 at least includes the reminder time and reminder method preferred by the user in a historical time period; the medication reminder strategy at least includes medication reminder content, target reminder time, and target reminder method; The target reminder method is used at the target reminder time to send the medication reminder content to the user's terminal device.
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: collecting the user's response information to the medication reminder content; The user's historical reminder preference information and / or medication continuous status sequence is adjusted according to the response information.
4. The method for processing drug purchase behavior data according to claim 1, characterized in that: Determining the user's medication continuous state sequence based on the historical medication purchase behavior data includes: Determining the remaining amount of medicines of the user at a historical moment and the medication compliance coefficient of the user based on the historical medicine purchasing behavior data; Detecting whether the user purchases the drug at a target time, and obtaining a detection result, wherein the target time is later than the historical time; Predicting the remaining amount of the user's medicine at a target time based on the test results, the remaining amount of the user's medicine at a historical time, and the user's medication compliance coefficient; The remaining amount of the user's medicine at the target moment is used as an element in the continuous state sequence of the medication.
5. The method for processing drug purchase behavior data according to claim 4, characterized in that: Predicting the remaining amount of the user's medicine at a target time based on the test result, the remaining amount of the user's medicine at a historical time, and the user's medication compliance coefficient, including: Obtaining the quantity of medicines purchased by the user at the target time, the recommended dosage of the medicines, a preset disturbance factor, and a preset noise factor; The remaining amount of medicine for the user at the target time is predicted based on the quantity of medicine purchased by the user at the target time, the recommended dosage of the medicine, the preset disturbance factor, the preset noise factor, the detection result, the remaining amount of medicine for the user at the historical time, and the medication compliance coefficient of the user.
6. The method for processing drug purchase behavior data according to claim 1, characterized in that: Determining the user's implicit medication status information based on the medication continuous status sequence and the user behavior temporal characteristics includes: defining a state set, wherein the state set represents a plurality of potential drug use states of a user when using a drug; Constructing a state transition probability matrix that is logically associated with 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 according to 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 according to the medication continuous state sequence and the user behavior time series feature, wherein each element in the observation sequence includes the medication continuous state sequence and the user behavior time series feature corresponding to a moment; According to 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.
7. The method for processing drug purchase behavior data according to claim 6, characterized in that: The method for processing drug purchasing behavior data further includes: Determining model parameters based on the observation probability distribution, the state transition probability matrix, and the initial state distribution, wherein the initial state distribution is used to represent prior probability distribution information of the user in various medication states during initial modeling; 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 under the observation sequence until a predetermined convergence condition is met, and the updating process of the model parameters is terminated, wherein the state transition probability is used to characterize the probability of the user transferring 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.
8. The method for processing drug purchase behavior data according to claim 7, characterized in that: The model parameters are updated based on the probability of the user being in each medication state and the state transition probability determined at each time point in the observation sequence, including: updating the initial state distribution in the model parameters according to the probability of the user being in each medication state determined at each time point; updating a state transition probability matrix in the model parameters according to the state transition probabilities determined at each time point and the expected value of the change in the current medication state determined at each time point; The observation probability distribution in the model parameters is updated according to the maximum likelihood estimate corresponding to each medication state in the state set at each time point.
9. The method for processing drug purchase behavior data according to claim 6, characterized in that: Determining an observation probability distribution according to the state set includes: determining the number of Gaussian mixture components under each medication state in the set of states; Determining the weight of each Gaussian mixture component under each medication state; Determining a multivariate Gaussian distribution corresponding to each Gaussian mixture component; The observation probability distribution is determined according to the number of Gaussian mixture components under each medication state, the weight of each Gaussian mixture component, and the multivariate Gaussian distribution corresponding to each Gaussian mixture component.
10. A device for processing drug purchase behavior data, characterized in that: include: The collection unit is used to collect the user's historical drug purchase behavior data with the user's authorization; a first determining unit, configured to determine a medication continuous state sequence of the user based on the historical medication purchase behavior data, wherein the medication continuous state sequence includes the remaining amount of medication of the user at different times; an encoding unit, configured to encode the historical drug purchase behavior data, contextual features, and user tags using an attention model to obtain user behavior time series features, wherein the contextual features include at least drug purchase location, drug type, and drug price, and the user tags include at least the user's disease type, age, and medication compliance level; The second determining unit is configured to determine the implicit medication status information of the user based on the medication continuous status sequence and the user behavior temporal characteristics, wherein the implicit medication status information at least includes probability distribution information of the user being in various medication statuses.
11. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is 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 execute the method for processing drug purchasing behavior data as described in any one of claims 1 to 9.
12. 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 where the computer-readable storage medium is located executes the method for processing drug purchase behavior data according to any one of claims 1 to 9.
Citation Information
Patent Citations
User interest discovering method with ontology situation blended in
CN104008203A
Medicine-taking management system and method based on user model
CN111899875A
Medicine purchasing reminding method and device
CN112397175A
Cerebral hemorrhage personalized treatment scheme optimization method and system based on big data analysis
CN119153117A
Intelligent reminding method, system and equipment for patient medicine dispensing and storage medium
CN120280077A
Cited By
Medication status calibration method, device and electronic equipment based on interactive feedback
CN122369785A