Psychiatric compliance assessment and intervention system quantifying psychological behavioral characteristics
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-22
- Publication Date
- 2026-08-11
AI Technical Summary
[0002]精神科患者治疗过程中的依从性管控是临床诊疗管理的重要组成部分,现阶段临床对精神科患者依从性的评估方式多依赖医护人员线下问询、人工登记日常行为信息,仅依靠主观经验完成依从性状态判定,缺乏对患者多源行为监测数据的自动化处理与特征量化手段
Smart Images

Figure CN122552045A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent medical monitoring technology, specifically a psychiatric compliance assessment and intervention system that quantifies psychological and behavioral characteristics. Background Technology
[0002] Adherence management in the treatment of psychiatric patients is a crucial component of clinical management. Currently, clinical assessment of adherence in psychiatric patients largely relies on in-person interviews by healthcare professionals and manual recording of daily behavioral information. This subjective assessment of adherence status depends solely on experience and lacks automated processing and quantification methods for multi-source behavioral monitoring data. Conventional data processing methods can only perform simple statistical analysis of surface-level behavioral data, failing to analyze patterns in patient medication use over time or quantify deviations from the rhythms of daily routines and lifestyles, thus hindering the development of standardized behavioral characteristic expressions.
[0003] Current adherence assessments often employ conventional machine learning models for data analysis. However, the algorithmic structure is not adapted to the distribution characteristics of psychiatric patients' behavioral data, and feature analysis is limited to a single data dimension, failing to achieve cross-modal fusion processing of multiple behavioral features. Traditional random forest algorithms lack Gini coefficient adaptation optimization and sample weighting adjustment logic, resulting in coarse-grained stratification of patient adherence risk and difficulty in accurately distinguishing different levels of adherence behavior. Interventions often employ standardized intervention protocols without differentiating individual risk differences to develop corresponding strategies. Furthermore, there is a lack of time-series chronological arrangement of intervention content, hindering the timely and synchronized delivery of intervention information to the corresponding patient and healthcare personnel's devices. Summary of the Invention
[0004] This invention aims to solve at least one of the technical problems existing in the prior art; Therefore, this invention proposes a psychiatric compliance assessment and intervention system that quantifies psychological and behavioral characteristics, including: The feature extraction module acquires a multi-source behavioral monitoring data set of the target patient, processes the multi-source behavioral monitoring data set, and obtains a medication behavior time-series feature vector and a rhythm deviation feature vector. The feature fusion module performs cross-modal feature fusion processing on the medication behavior time-series feature vector and the rhythm deviation feature vector to generate a fused behavior feature set; The compliance assessment module calls an improved random forest algorithm to perform compliance risk stratification on the fused behavioral feature set, generating the compliance risk score and compliance behavior category of the target patient. The improved random forest algorithm is constructed based on the joint optimization of the Gini coefficient and the sample weighting mechanism. The intervention strategy generation module generates a set of personalized intervention strategies based on the compliance risk score and compliance behavior categories. The intervention sequence arrangement module arranges the personalized intervention strategy set according to a preset intervention timeline to generate a compliance intervention execution sequence, and pushes the compliance intervention execution sequence to the target patient's mobile terminal and the medical staff's terminal.
[0005] Further, a multi-source behavioral monitoring data set of the target patient is acquired, and the multi-source behavioral monitoring data set is processed to obtain a medication behavior time-series feature vector and a rhythm deviation feature vector, including: The multi-source behavioral monitoring data set includes medication record data from electronic medication monitoring devices, physiological rhythm data collected by wearable devices, and medication reminder interaction data from mobile terminals; The medication record data is subjected to temporal behavioral feature extraction processing to obtain a medication behavior temporal feature vector, and the physiological rhythm data is subjected to rhythm deviation analysis processing to obtain a rhythm deviation feature vector. The medication record data is subjected to time-series behavioral feature extraction processing to obtain a medication behavior time-series feature vector, specifically including: The medication record data is segmented according to natural days to obtain multiple single-day medication record segments. Each single-day medication record segment contains all medication timestamps and medication dosage values within that day. For each daily medication record segment, calculate the time interval sequence between adjacent medication timestamps within the segment, and calculate the mean and standard deviation of the time interval sequence to generate daily medication rhythm characteristics; For each daily medication record segment, calculate the dose deviation value between the actual medication dose value and the preset standard dose value in that segment, and generate the daily medication dose characteristic. The daily medication rhythm feature and the daily medication dosage feature are concatenated to generate a daily medication feature vector. All daily medication feature vectors are stacked sequentially according to the natural day order to obtain the time-series feature vector of the medication behavior.
[0006] Furthermore, rhythm deviation analysis is performed on the physiological rhythm data to obtain a rhythm deviation feature vector, specifically including: The heart rate variation sequence during sleep and the activity count sequence during wakefulness are extracted from the physiological rhythm data. The heart rate variation sequence is organized with one sampling point per minute, and the activity count sequence is organized with one sampling point per hour. The heart rate variation sequence is compared with the preset individual baseline heart rate curve point by point to obtain the heart rate deviation sequence. The individual baseline heart rate curve is generated by smoothing and filtering the heart rate data collected from the target patient during a historical period of good compliance. The activity count sequence is compared with a preset standard daily activity rhythm template to calculate the absolute value of the deviation between the activity count per hour and the corresponding hour template value in the standard daily activity rhythm template, thus obtaining the activity deviation sequence. The arithmetic mean of all deviations in the heart rate deviation sequence is calculated to obtain the average heart rate deviation. The arithmetic mean of all deviations in the activity deviation sequence is calculated to obtain the average activity deviation. The average heart rate deviation and the average activity deviation are combined as a vector to generate the rhythm deviation feature vector.
[0007] Furthermore, the time-series feature vector of medication behavior and the rhythm deviation feature vector are subjected to cross-modal feature fusion processing to generate a fused behavior feature set, specifically including: The medication behavior time-series feature vector of each day is timestamped with the rhythm deviation value of the corresponding date in the rhythm deviation feature vector to obtain a time-aligned feature pair sequence. For each feature pair in the time-aligned feature pair sequence, calculate the correlation coefficient between the daily medication feature vector and the rhythm deviation value to generate a cross-modal association strength sequence; Based on the correlation strength values in the cross-modal correlation strength sequence, attention weights are assigned to each feature dimension in the daily medication feature vector to generate a weighted medication behavior feature vector. Based on the correlation strength values in the cross-modal correlation strength sequence, dynamic fusion coefficients are assigned to the rhythm deviation values to generate weighted rhythm deviation feature values. The weighted medication behavior feature vector and the weighted rhythm deviation feature value are cascaded and fused to generate the fused behavior feature set.
[0008] Furthermore, when the timestamp alignment operation of the medication record data and the physiological rhythm data exceeds a preset threshold, a sequence alignment method based on the dynamic time warping algorithm is adopted.
[0009] Furthermore, the improved random forest algorithm is invoked to perform adherence risk stratification on the fused behavioral feature set, generating the adherence risk score and adherence behavior category for the target patient, specifically including: The fused behavioral feature set is input into the feature filtering layer of the improved random forest algorithm. The feature filtering layer performs dimensionality reduction filtering on the fused behavioral feature set based on the decrease in the Gini coefficient of each feature dimension in the historical training data, and obtains a filtered feature subset. The filtered feature subset is input into multiple decision trees of the improved random forest algorithm. Each decision tree performs binary recursive partitioning of the filtered feature subset according to the node splitting criterion to generate the leaf node prediction results of each decision tree. The mode of the prediction results of the leaf nodes of all decision trees is counted, and the category corresponding to the mode is taken as the compliance behavior category; The proportion of decision trees whose leaf node predictions belong to the high-risk category is used as the compliance risk score.
[0010] Furthermore, the improved random forest algorithm is constructed based on the joint optimization of the Gini coefficient and the sample weighting mechanism. The working process of the improved random forest algorithm includes: During the training phase, the initial sample weight is calculated for each training sample in the original training sample set according to the inverse frequency distribution of its sample label, wherein the sample label includes a fully compliant label, a partially compliant label, and a non-compliant label. During the training of each decision tree, the initial sample weights are dynamically adjusted based on the out-of-bag prediction error rate of the current decision tree, so that the sample weights of training samples with prediction error rates higher than the average error threshold are increased, thus generating dynamically adjusted sample weights. During the node splitting process of each decision tree, the weighted Gini coefficient of each candidate feature at that node is calculated. The weighted Gini coefficient is calculated by weighting the samples within the node according to the dynamically adjusted sample weights. The candidate feature with the largest decrease in weighted Gini coefficient is selected as the splitting feature of that node. Repeat the node splitting operation until each decision tree reaches the preset maximum depth or the number of samples in a node is less than the preset minimum sample threshold, thus completing the construction of all decision trees.
[0011] Furthermore, a set of personalized intervention strategies is generated based on the compliance risk score and compliance behavior categories, specifically including: The set of personalized intervention strategies includes medication reminder time adjustment parameters, psychological intervention content push strategies, and follow-up visit priority indicators; According to the compliance behavior category, the corresponding intervention strategy template is retrieved from the preset compliance type mapping table. The intervention strategy template includes a medication reminder strategy field, a psychological intervention strategy field, and a follow-up visit management strategy field. The medication reminder strategy field in the intervention strategy template is populated with parameters based on the compliance risk score to generate medication reminder time adjustment parameters. The higher the compliance risk score, the greater the reminder frequency value in the medication reminder time adjustment parameters. Based on the category of compliance behavior, a psychological intervention content push strategy is generated by matching the corresponding psychological intervention content identifier from a preset psychological intervention content library. The priority indicator for follow-up visits is determined based on the risk range in which the compliance risk score is located. The risk range includes low-risk, medium-risk, and high-risk ranges, and each risk range corresponds to a different priority level for follow-up visits. The medication reminder time adjustment parameters, the psychological intervention content push strategy, and the follow-up visit priority identifier are combined and encapsulated to generate the personalized intervention strategy set.
[0012] Furthermore, the personalized intervention strategy set is sequentially arranged according to a preset intervention timeline to generate a compliance intervention execution sequence, specifically including: Obtain the current system time and the list of preset medication time points for the target patient, and use each medication time point in the list of preset medication time points as an anchor point on the intervention time axis; For each anchor point, a medication reminder time adjustment parameter is extracted from the set of personalized intervention strategies. Based on this parameter, the reminder sending time corresponding to the anchor point is determined, and a medication reminder event node is generated. For each anchor point, a psychological intervention content push strategy is extracted from the set of personalized intervention strategies, and the time within the first preset time window before the anchor point is taken as the psychological intervention content push time, thus generating a psychological intervention event node. For each anchor point, the follow-up visit priority identifier is extracted from the set of personalized intervention strategies. The system working day that is closest to the anchor point within the second preset time window after the anchor point is used as the follow-up visit reminder time, and a follow-up visit management event node is generated. All the medication reminder event nodes, psychological intervention event nodes, and follow-up visit management event nodes corresponding to all anchor points are sorted in chronological order to generate the compliance intervention execution sequence.
[0013] Furthermore, the compliance intervention execution sequence is pushed to the target patient's mobile terminal and the medical staff's terminal, specifically including: The event type of each event node in the compliance intervention execution sequence is analyzed, and the event types include medication reminder type, psychological intervention type, and follow-up visit management type; When the event type is a medication reminder, the reminder sending time and medication dosage value are extracted from the event node, a medication reminder push message is generated, and the medication reminder push message is sent to the target patient's mobile terminal at the reminder sending time; When the event type is a psychological intervention type, a psychological intervention content push strategy is extracted from the event node. Based on the strategy, the corresponding intervention content text and intervention content audio are read from the psychological intervention content library to generate a psychological intervention push message package. The psychological intervention push message package is then sent to the target patient's mobile terminal at the time of psychological intervention content push. When the event type is follow-up visit management, the follow-up visit reminder time and follow-up visit priority identifier are extracted from the event node, a follow-up visit reminder push message is generated, and the follow-up visit reminder push message is sent to the target patient's mobile terminal and the medical staff's terminal at the follow-up visit reminder time. After all event nodes in the compliance intervention execution sequence have been pushed, an intervention completion feedback signal is generated and stored in the target patient's electronic health record.
[0014] Compared with the prior art, the beneficial effects of the present invention are: The multi-source behavioral monitoring data set of target patients is professionally processed to construct time-series feature vectors of medication behavior and rhythm deviation feature vectors, and then the two types of feature vectors are fused across modalities. After feature decomposition and vectorization, the fragmented multi-source behavioral monitoring data can be used to uncover the hidden time-series changes and rhythmic fluctuations, transforming the unstructured raw monitoring data into a well-organized and unified set of fused behavioral features. This provides a complete quantitative representation of the patient's psychological behavior, compensating for the inability of single-dimensional data to fully reflect adherence-related behavioral states.
[0015] The random forest algorithm structure was jointly optimized and adjusted based on the Gini coefficient and sample weighting mechanism. The optimized algorithm was used to perform compliance risk stratification calculation on the fused behavioral feature set, outputting the corresponding compliance risk score and compliance behavior category. The algorithm adapts the distribution attributes of behavioral data through feature selection logic and sample weight allocation, refines the risk stratification level division intervals, and ensures that the classification of compliance behavior categories closely matches actual behavioral performance. Based on the stratification results, differentiated intervention strategies are generated. After being arranged chronologically along a timeline, the intervention strategies can be directly distributed and transmitted to patient mobile terminals and medical staff terminals, completing the targeted transmission and orderly execution of intervention content. Attached Figure Description
[0016] Figure 1This is a timeline diagram of the psychiatric compliance assessment and intervention system for quantifying psychological and behavioral characteristics as described in this invention. Figure 2 A flowchart for generating a fused behavioral feature set for cross-modal feature fusion processing; Figure 3 A flowchart for compliance risk stratification processing in the improved random forest algorithm. Detailed Implementation
[0017] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] See Figure 1 This invention provides a psychiatric compliance assessment and intervention system that quantifies psychological and behavioral characteristics. The system includes a feature extraction module, a feature fusion module, a compliance assessment module, an intervention strategy generation module, and an intervention sequence arrangement module.
[0019] The feature extraction module acquires a multi-source behavioral monitoring data set of the target patient, processes the multi-source behavioral monitoring data set to obtain a medication behavior temporal feature vector and a rhythm deviation feature vector. The feature fusion module performs cross-modal feature fusion processing on the medication behavior temporal feature vector and the rhythm deviation feature vector to generate a fused behavioral feature set. The compliance assessment module calls an improved random forest algorithm to perform compliance risk stratification processing on the fused behavioral feature set to generate the target patient's compliance risk score and compliance behavior category. The improved random forest algorithm is constructed based on the joint optimization of the Gini coefficient and the sample weighting mechanism. The intervention strategy generation module generates a personalized intervention strategy set based on the compliance risk score and compliance behavior category. The intervention sequence arrangement module arranges the personalized intervention strategy set according to a preset intervention timeline to generate a compliance intervention execution sequence, and pushes the compliance intervention execution sequence to the target patient's mobile terminal and the medical staff's terminal.
[0020] In one embodiment of the present invention, a multi-source behavioral monitoring data set of the target patient is acquired. This multi-source behavioral monitoring data set includes medication record data from an electronic medication monitoring device, physiological rhythm data collected by a wearable device, and medication reminder interaction data from a mobile terminal. Temporal behavioral feature extraction processing is performed on the medication record data to obtain a medication behavior temporal feature vector. Rhythm deviation analysis processing is performed on the physiological rhythm data to obtain a rhythm deviation feature vector. When performing temporal behavioral feature extraction processing on the medication record data, the medication record data is segmented according to natural days to obtain multiple single-day medication record segments. Each single-day medication record segment contains all medication timestamps and medication dosage values within that day. For each single-day medication record segment, the time interval sequence between adjacent medication timestamps within that segment is calculated, and the mean and standard deviation of the time interval sequence are statistically analyzed to generate a single-day medication rhythm feature. For each single-day medication record segment, the dose deviation value between the actual medication dosage value and the preset standard dosage value within that segment is calculated to generate a single-day medication dosage feature. The daily medication rhythm feature and the daily medication dosage feature are concatenated to generate a daily medication feature vector. All daily medication feature vectors are then stacked sequentially according to the natural day order to obtain the time-series feature vector of the medication behavior.
[0021] When performing rhythm deviation analysis on the physiological rhythm data, the heart rate change sequence during sleep and the activity count sequence during wakefulness are extracted from the physiological rhythm data. The heart rate change sequence is organized with one sampling point per minute, and the activity count sequence is organized with one sampling point per hour. The heart rate change sequence is compared point-by-point with a preset individual baseline heart rate curve to obtain the heart rate deviation sequence. The individual baseline heart rate curve is generated by smoothing and filtering the heart rate data collected from the target patient during a historical period of good compliance. The activity count sequence is compared with a preset standard daily activity rhythm template to calculate the absolute value of the deviation between the hourly activity count and the corresponding hourly template value in the standard daily activity rhythm template, thus obtaining the activity deviation sequence. The arithmetic mean of all deviation values in the heart rate deviation sequence is calculated to obtain the average heart rate deviation, and the arithmetic mean of all deviation values in the activity deviation sequence is calculated to obtain the average activity deviation. The average heart rate deviation and the average activity deviation are vector-combined to generate the rhythm deviation feature vector.
[0022] In the specific implementation, an outpatient diagnosed with schizophrenia is selected as the target patient. The target patient takes olanzapine tablets daily at a prescribed dose of 10 mg at 21:00. The feature extraction module obtains medication record data of the target patient for 30 consecutive calendar days from an electronic medication monitoring device (i.e., a smart pillbox with a drug dispensing sensor), obtains the target patient's circadian rhythm data within the same time window from a wearable device (i.e., a medical-grade smart bracelet), and obtains medication reminder interaction data from a mobile terminal (i.e., a medication reminder application on the patient's smartphone). The above three types of data are combined into a multi-source behavioral monitoring data set.
[0023] In some embodiments, when performing temporal behavior feature extraction processing on the medication record data, the medication record data is segmented according to natural days to obtain 30 single-day medication record segments. Each single-day medication record segment contains all medication timestamps and medication dosage values within that natural day. For each single-day medication record segment, the feature extraction module calculates the time interval sequence between adjacent medication timestamps within the segment and calculates the mean and standard deviation of the time interval sequence to generate single-day medication rhythm features. For example, if the medication record segment of the 3rd natural day contains two medication records with timestamps of 21:03 and 21:05, then the adjacent time interval is 2 minutes, the mean of the time interval sequence is 2 minutes, and the standard deviation is 0 minutes; if the medication record segment of the 15th natural day contains only one medication record, then the time interval sequence is an empty set, and the mean and standard deviation are both marked as missing values. For each daily medication record segment, the feature extraction module calculates the dose deviation between the actual dosage value and the preset standard dosage value within that segment, generating a daily medication dosage feature. The preset standard dosage value is 10 mg; if the actual dosage value is 10 mg, the deviation value is 0; if it is 5 mg, the deviation value is -5 mg; and if it is 20 mg, the deviation value is +10 mg. The daily medication rhythm feature and the daily medication dosage feature are concatenated to generate a daily medication feature vector. Each daily medication feature vector contains three numerical components: the mean of the time interval, the standard deviation of the time interval, and the dose deviation value. All daily medication feature vectors are stacked sequentially according to the natural day order (i.e., from day 1 to day 30) to obtain a 30×3 two-dimensional array, which serves as the temporal feature vector for the medication behavior.
[0024] In specific implementation, when performing rhythm deviation analysis on the physiological rhythm data, the physiological rhythm data is continuously collected by the wearable device (medical-grade smart bracelet), with a sampling frequency of recording heart rate values once per minute and activity count values once per hour. The heart rate change sequence during sleep and the activity count sequence during wakefulness are extracted from the physiological rhythm data. The sleep period is automatically identified based on the body movement recording algorithm built into the wearable device. The heart rate change sequence is organized with one sampling point per minute, and the activity count sequence is organized with one sampling point per hour. The feature extraction module pre-stores heart rate data collected from the target patient during historical periods of good compliance. Good compliance is defined as a deviation of less than 15 minutes between the actual medication time recorded by the electronic medication monitoring device and the preset medication time within 14 consecutive days, and an absolute value of the dose deviation of less than 2 mg. The heart rate values per minute during the daily sleep period within this historical period are processed by low-pass smoothing filtering, and the median is calculated minute by minute to generate the individual baseline heart rate curve. The individual baseline heart rate curve includes the baseline heart rate value per minute from the start of sleep to the end of sleep.
[0025] In some embodiments, when calculating the point-by-point difference between the heart rate change sequence and the individual baseline heart rate curve, the time points of the heart rate change sequence are aligned with the time points of the individual baseline heart rate curve. The alignment is based on the relative minute sequence after the start of sleep. For example, the measured heart rate value at the 5th minute after the start of sleep is subtracted from the baseline heart rate value at the 5th minute after the start of sleep to obtain the heart rate deviation value at that time point. This process is repeated for all minute sampling points throughout the entire sleep period to form the heart rate deviation sequence. The activity count sequence is then compared with a preset standard daily activity rhythm template. The standard daily activity rhythm template is constructed based on large-scale activity count data of individuals of the same age, gender, and without psychiatric disorders in a natural environment. The template contains 24-hour template values, corresponding to the standard activity counts for each hour from 0:00 to 23:00. For each natural day of the target patient, the activity counts for each hour during their waking hours are extracted. The absolute value of the deviation between the hourly activity count and the corresponding hourly template value in the standard daily activity rhythm template is calculated to obtain the hourly activity deviation value. The activity deviation values for all waking hours are arranged in chronological order to form the activity deviation sequence.
[0026] Optionally, the feature extraction module calculates the arithmetic mean of all deviation values in the heart rate deviation sequence to obtain the average heart rate deviation, expressed as:
[0027] in: Indicates the deviation of average heart rate. This indicates the total number of deviation values in the heart rate deviation sequence. In the heart rate change sequence, the first... The measured heart rate values at each time point. This indicates the first individual in the baseline heart rate curve. Heart rate baseline values at each time point Indicates the first The absolute value of heart rate deviation at each time point. The feature extraction module calculates the arithmetic mean of all deviation values in the activity deviation sequence to obtain the average activity deviation, expressed as:
[0028] in: Indicates the average activity deviation. This indicates the total number of deviation values in the activity deviation sequence, which is equivalent to the total number of conscious hours for the target patient within the analysis time window. Indicates the first Actual measured activity count over one hour. This indicates the corresponding number in the standard daily activity rhythm template. Template value per hour Indicates the first The activity level deviates from the absolute value within one hour.
[0029] Optionally, the average heart rate deviation and the average activity deviation are vector-combined to generate the rhythm deviation feature vector. The rhythm deviation feature vector is a two-dimensional vector, with the first component being the average heart rate deviation and the second component being the average activity deviation. For the target patient's circadian rhythm data over 30 consecutive natural days, the feature extraction module outputs 30 rhythm deviation feature vectors, each associated with a corresponding natural day. It can be understood that the medication behavior temporal feature vector is composed of 30 single-day medication feature vectors stacked in chronological order, and the rhythm deviation feature vector is composed of 30 date-specific rhythm deviation feature vectors, perfectly aligned in the date dimension. These quantify the target patient's psychiatric compliance-related psychological and behavioral characteristics from two dimensions: medication behavior regularity and circadian rhythm stability. It can be understood that after the feature extraction module completes the above processing, the obtained medication behavior temporal feature vector and rhythm deviation feature vector are transmitted to the feature fusion module for further processing.
[0030] In one embodiment of the present invention, see [reference] Figure 2The process involves timestamp alignment of each daily medication feature vector in the medication behavior time-series feature vector with the corresponding date's rhythm deviation value in the rhythm deviation feature vector, resulting in a time-aligned feature pair sequence. For each feature pair in the time-aligned feature pair sequence, the correlation coefficient between the daily medication feature vector and the rhythm deviation value is calculated, generating a cross-modal association strength sequence. Based on the association strength values in the cross-modal association strength sequence, attention weights are assigned to each feature dimension in the daily medication feature vector, generating a weighted medication behavior feature vector. Based on the association strength values in the cross-modal association strength sequence, dynamic fusion coefficients are assigned to the rhythm deviation value, generating a weighted rhythm deviation feature value. The weighted medication behavior feature vector and the weighted rhythm deviation feature value are then fused to generate the fused behavior feature set. When the timestamp deviation between the medication record data and the physiological rhythm data exceeds a preset threshold, a sequence alignment method based on a dynamic time warping algorithm is used for the timestamp alignment operation.
[0031] In practice, multi-source behavioral monitoring data of the target patient (diagnosed with schizophrenia, taking olanzapine tablets, 10 mg daily, taken at 21:00) were collected for 30 consecutive natural days. The feature extraction module generated a medication behavior temporal feature vector and a rhythm deviation feature vector. The medication behavior temporal feature vector is a 30×3 two-dimensional array, where the i-th row corresponds to the daily medication feature vector of the i-th natural day, containing three components: the mean time interval, the standard deviation of the time interval, and the dose deviation value. The rhythm deviation feature vector is a 30×2 two-dimensional array, where the i-th row corresponds to the rhythm deviation feature vector of the i-th natural day, containing two components: the mean heart rate deviation and the mean activity deviation. The feature fusion module receives the above two feature vectors and performs cross-modal feature fusion processing to generate a fused behavioral feature set.
[0032] In specific implementation, the feature fusion module performs a timestamp alignment operation on each daily medication feature vector in the medication behavior time-series feature vector and the corresponding date's rhythm deviation value in the rhythm deviation feature vector, resulting in a time-aligned feature pair sequence. Since both the medication behavior time-series feature vector and the rhythm deviation feature vector are arranged in natural day order and each natural day has a record, the timestamp alignment operation directly matches according to the date index: the daily medication feature vector of the first natural day is combined with the rhythm deviation feature vector of the first natural day to form the first feature pair; the daily medication feature vector of the second natural day is combined with the rhythm deviation feature vector of the second natural day to form the second feature pair, and so on until the 30th natural day, forming a feature pair sequence containing 30 feature pairs. In each feature pair, the left side is a three-dimensional daily medication feature vector, and the right side is a two-dimensional rhythm deviation feature vector.
[0033] Optionally, the feature fusion module determines the timestamp deviation between the medication record data and the circadian rhythm data before performing the timestamp alignment operation. The timestamps recorded by the electronic medication monitoring device are accurate to the second, and the timestamps of the heart rate and activity count recorded by the wearable device are accurate to the minute. Matching can be achieved by date alignment within the same natural day. If the deviation between the medication timestamp recorded by the electronic medication monitoring device and the timestamp of the circadian rhythm data recorded by the wearable device exceeds a preset threshold (the preset threshold is 30 minutes) within a certain natural day—for example, if the wearable device loses 6 hours of circadian rhythm data for a certain natural day due to interrupted use—the feature fusion module does not directly discard the data for that natural day. Instead, it uses a sequence alignment method based on a dynamic time warping algorithm: marking the circadian rhythm data for the missing time period of that natural day as invalid values, excluding the sampling points corresponding to invalid values when calculating the correlation coefficient, and only using data within the valid time overlap interval for alignment.
[0034] In specific implementation, for each feature pair in the time-aligned feature pair sequence, the correlation coefficient between the daily medication feature vector and the rhythm deviation value is calculated to generate a cross-modal association strength sequence. For the i-th feature pair, the daily medication feature vector contains three numerical components, denoted as follows: (mean of time interval) (Standard deviation of time interval) (Dose deviation value), the rhythm deviation feature vector contains two numerical components, denoted as... (average heart rate deviation) and (Average activity deviation). The feature fusion module calculates respectively. and Pearson correlation coefficient and Pearson correlation coefficient and Pearson correlation coefficient and Pearson correlation coefficient and Pearson correlation coefficient and The Pearson correlation coefficient is used, and the maximum value among the six correlation coefficients mentioned above is taken as the cross-modal correlation strength value of the i-th feature pair. After traversing 30 feature pairs, a cross-modal correlation strength sequence of length 30 is obtained. .
[0035] In some embodiments, attention weights are assigned to each feature dimension of the daily medication feature vector based on the correlation strength values in the cross-modal correlation strength sequence to generate a weighted medication behavior feature vector. The attention weight assignment method is as follows: for the i-th feature pair, the i-th value in the cross-modal correlation strength sequence is assigned an attention weight. As modulation factors, they are respectively modulated by the three components of the daily medication feature vector. Multiply them to get the three weighted components. These three components form the weighted medication behavior feature vector for the i-th natural day. After performing the same operation on all 30 natural days, 30 weighted medication behavior feature vectors are obtained, each of which is still a three-dimensional vector.
[0036] In some embodiments, dynamic fusion coefficients are assigned to the rhythm deviation values based on the correlation strength values in the cross-modal correlation strength sequence to generate weighted rhythm deviation feature values. The dynamic fusion coefficient assignment method is as follows: for the i-th feature pair, calculate the two components in the rhythm deviation feature vector. and arithmetic mean The i-th value in the cross-modal correlation strength sequence As the fusion coefficient and Multiplying them together yields the weighted rhythm deviation eigenvalues. After performing the same operation on all 30 calendar days, 30 weighted rhythm deviation eigenvalues are obtained, each of which is a scalar.
[0037] It is understood that both the weighted medication behavior feature vector and the weighted rhythm deviation feature value retain the original data's temporal order, and the weighted medication behavior feature vector and the weighted rhythm deviation feature value of the i-th natural day are temporally aligned. Optionally, the weighted medication behavior feature vector and the weighted rhythm deviation feature value are fused through feature concatenation to generate the fused behavior feature set. For the i-th natural day, the three-dimensional weighted medication behavior feature vector... The weighted rhythm of the scalar deviates from the eigenvalue The features are concatenated along the feature dimension to form a four-dimensional feature vector. The above cascaded fusion operation is repeated for all 30 calendar days to obtain a 30×4 two-dimensional array, which serves as the fused behavioral feature set. Each row in the fused behavioral feature set represents the comprehensive behavioral features of a calendar day, fusing medication behavior information and physiological rhythm deviation information, and achieving interactive modulation of the two modalities through cross-modal association strength sequences. It is understood that the fused behavioral feature set is transmitted to the compliance assessment module for subsequent processing. The compliance assessment module receives the fused behavioral feature set as input; each row in the fused behavioral feature set corresponds to a calendar day, with a total of 30 samples, and each sample contains four feature dimensions.
[0038] In one embodiment of the present invention, see [reference] Figure 3 The fused behavioral feature set is input into the feature filtering layer of the improved random forest algorithm. The feature filtering layer performs dimensionality reduction filtering on the fused behavioral feature set based on the decrease in the Gini coefficient of each feature dimension in historical training data, obtaining a filtered feature subset. The filtered feature subset is then input into multiple decision trees of the improved random forest algorithm. Each decision tree performs binary recursive partitioning of the filtered feature subset according to a node splitting criterion, generating leaf node prediction results for each decision tree. The mode of the leaf node prediction results of all decision trees is calculated, and the category corresponding to this mode is taken as the compliance behavior category. The proportion of decision trees whose leaf node prediction results belong to the high-risk category is calculated out of the total number of decision trees, and this proportion is taken as the compliance risk score.
[0039] The improved random forest algorithm is constructed based on the joint optimization of the Gini coefficient and sample weighting mechanism. Its operation includes: During the training phase, calculating the initial sample weight for each training sample in the original training sample set according to the inverse frequency distribution of its sample labels, where the sample labels include labels for full compliance, partial compliance, and non-compliance. During the training of each decision tree, the initial sample weights are dynamically adjusted based on the out-of-bag prediction error rate of the current decision tree, increasing the sample weights of training samples with prediction error rates higher than the average error threshold, thus generating dynamically adjusted sample weights. During the node splitting process of each decision tree, calculating the weighted Gini coefficient of each candidate feature at that node, where the weighted Gini coefficient is calculated based on the dynamically adjusted sample weights of each sample within the node, and selecting the candidate feature with the largest decrease in the weighted Gini coefficient as the splitting feature for that node. The node splitting operation is repeated until each decision tree reaches a preset maximum depth or the number of samples within a node is less than a preset minimum sample threshold, completing the construction of all decision trees.
[0040] In practice, based on the monitoring data of the target patient over 30 consecutive natural days, the feature fusion module generates a fused behavioral feature set. This set is a 30×4 two-dimensional array, where each row represents the comprehensive behavioral characteristics of one natural day, containing four feature dimensions: the weighted mean of the time interval, the weighted standard deviation of the time interval, the weighted dose deviation, and the weighted rhythm deviation. The compliance assessment module uses an improved random forest algorithm to perform compliance risk stratification on the fused behavioral feature set. The improved random forest algorithm was pre-constructed during the historical training phase. The historical training data came from the fusion behavioral characteristic data of 300 psychiatric outpatients for 30 consecutive natural days. Each patient's compliance behavior category was independently labeled by two attending psychiatrists. The labeling results were adopted when the labeling consistency reached 0.90 or higher. The labeling results were divided into three categories: complete compliance label (the actual medication time deviates from the preset medication time by less than 15 minutes and the absolute value of the dose deviation is less than 2 mg, and there are no missed doses within 7 consecutive days), partial compliance label (the actual medication time deviation is between 15 and 60 minutes or the absolute value of the dose deviation is between 2 and 5 mg or there are 1 to 2 missed doses within 7 days), and non-compliance label (the actual medication time deviation is greater than 60 minutes or the absolute value of the dose deviation is greater than 5 mg or there are 3 or more missed doses within 7 days).
[0041] In specific implementation, the fused behavioral feature set is input into the feature filtering layer of the improved random forest algorithm. The feature filtering layer performs dimensionality reduction filtering on the fused behavioral feature set based on the Gini coefficient decrease of each feature dimension in the historical training data, obtaining a filtered feature subset. Specifically, the feature filtering layer reads the four feature dimensions of all samples in the historical training data, calculates the sum of the Gini coefficient decreases generated when all decision tree nodes split in the historical training data for each feature dimension, and retains the two feature dimensions with the largest sum of Gini coefficient decreases, while the remaining feature dimensions are removed. For the fused behavioral feature set of the target patient, the weighted dose deviation component and the weighted rhythm deviation component of the four feature dimensions rank first and second in the sum of Gini coefficient decreases in the historical training data. Therefore, the feature filtering layer retains these two feature dimensions, reducing the comprehensive behavioral features of each natural day from four dimensions to two dimensions, forming a filtered feature subset, which is a 30×2 two-dimensional array.
[0042] In specific implementation, the filtered feature subset is input into multiple decision trees of the improved random forest algorithm. The improved random forest algorithm contains 100 decision trees. Each decision tree performs binary recursive partitioning of the filtered feature subset according to the node splitting criterion, generating the leaf node prediction results for each decision tree. The training data for each decision tree is obtained by randomly sampling the same number of samples with replacement from the historical training data. The node splitting criterion adopts a strategy of maximizing the decrease in the weighted Gini coefficient. For the 30 samples of the target patient (each sample corresponds to a two-dimensional feature vector of a natural day), each decision tree recursively judges according to the node splitting rules learned during the training phase: starting from the root node, according to the splitting feature index and splitting threshold stored in the current node, the sample is assigned to the left child node or the right child node, until the leaf node is reached. Each leaf node stores a category label (fully compliant, partially compliant, or non-compliant). The first to the 100th decision trees predict the 30 samples of the target patient respectively. For each natural day sample, each of the 100 decision trees outputs a leaf node prediction result, so each natural day sample obtains 100 prediction results.
[0043] In some embodiments, the mode of the prediction results of all leaf nodes of the decision trees is counted, and the category corresponding to the mode is taken as the compliance behavior category. For the sample of the target patient on the first natural day, if 65 of the 100 decision tree prediction results output partial compliance label, 20 output full compliance label, and 15 output non-compliance label, then the mode is the partial compliance label, and the compliance assessment module determines the compliance behavior category of the first natural day as partial compliance. For the samples from the second to the 30th natural day, the compliance assessment module repeats the above statistical operation and outputs the compliance behavior category for each natural day.
[0044] In some embodiments, the proportion of decision trees belonging to the high-risk category in the leaf node prediction results of all decision trees is counted to the total number of decision trees, and this proportion is used as the compliance risk score. The high-risk category is defined as the refusal-to-comply label. For the sample of the target patient on the first natural day, if 15 out of 100 decision trees belong to the refusal-to-comply label, then the compliance risk score is 15 / 100 = 0.15. For the sample of the target patient on the 15th natural day, if 82 out of 100 decision trees belong to the refusal-to-comply label, then the compliance risk score is 0.82. For each sample of the target patient over 30 natural days, the compliance risk score is calculated separately, and a risk score sequence of length 30 is output.
[0045] Optionally, the improved random forest algorithm is constructed based on the joint optimization of the Gini coefficient and the sample weighting mechanism. The working process of the improved random forest algorithm includes the initial sample weight allocation during the training phase. For each training sample in the original training sample set, the initial sample weight is calculated according to the inverse frequency distribution of its sample label. The original training sample set contains 9000 samples from 300 patients (30 calendar days per patient), of which 4500 are fully compliant, 3000 are partially compliant, and 1500 are non-compliant. The inverse frequency of the fully compliant label is 1 / 4500, the inverse frequency of the partially compliant label is 1 / 3000, and the inverse frequency of the non-compliant label is 1 / 1500. For each training sample, the inverse frequency value of the corresponding label is taken as the initial sample weight of that sample. The initial sample weights of all samples are normalized so that the sum of the weights equals the total number of samples, 9000. After normalization, each sample labeled as refusing to comply has the highest weight value, each sample labeled as partially compliant has the second highest weight value, and each sample labeled as fully compliant has the lowest weight value.
[0046] Optionally, during the training of each decision tree, the initial sample weights are dynamically adjusted based on the out-of-bag prediction error rate of the current decision tree. This increases the weights of training samples with prediction error rates higher than the average error threshold, generating dynamically adjusted sample weights. For the k-th decision tree, the out-of-bag data consists of samples that did not participate in the training of that tree, accounting for about one-third (approximately 3000 samples) of the original training sample set. The improved random forest algorithm calculates the prediction error rate of the k-th decision tree on the out-of-bag data. If an out-of-bag sample is mispredicted, its prediction error contribution is marked as 1. The average prediction error rate of all out-of-bag samples is calculated as the average error threshold. For sample categories with prediction error rates higher than the average error threshold (i.e., samples that are mispredicted and whose overall prediction error rate is higher than the mean), their current weights are multiplied by a weight increase factor of 2.0. After the weights are increased, all out-of-bag samples are re-normalized to generate dynamically adjusted sample weights. The (k+1)-th decision tree is trained using these dynamically adjusted sample weights.
[0047] In practice, during the node splitting process of each decision tree, the weighted Gini coefficient of each candidate feature at that node is calculated. This weighted Gini coefficient is calculated by weighting the dynamically adjusted sample weights of each sample within the node. The candidate feature with the largest decrease in the weighted Gini coefficient is selected as the splitting feature for that node. For a node containing K samples, each sample has a dynamically adjusted sample weight. The samples within a node are distributed by category. Let the category label of the t-th sample be... The sum of the weights of samples belonging to category c in the node is The total weight of the nodes is The formula for calculating the weighted Gini coefficient is:
[0048] in: This represents the weighted Gini coefficient. These represent the three categories: complete compliance, partial compliance, and non-compliance. This represents the sum of the weights of samples belonging to class c within a node. This represents the sum of the weights of all samples within a node. The improved random forest algorithm attempts all possible split thresholds for each candidate feature and calculates the weighted Gini coefficient of the left child node after the split. The weighted Gini coefficient of the right child node The weighted Gini coefficient before splitting was The weighted Gini coefficient decreased by ,in and represents the sum of sample weights for the left and right child nodes after the split, respectively. The candidate feature with the largest decrease in the weighted Gini coefficient and its corresponding split threshold are selected as the split feature and split threshold for the current node.
[0049] It is understood that the node splitting operation is repeated until each decision tree reaches a preset maximum depth (maximum depth set to 10) or the number of samples within a node is less than a preset minimum sample threshold (minimum sample threshold set to 5), thus completing the construction of all 100 decision trees. After the compliance assessment module calculates the compliance risk score and compliance behavior category for the target patient over 30 calendar days, these results are transmitted to the intervention strategy generation module. It is understood that the compliance risk score ranges from 0 to 1; the closer the score is to 1, the closer the target patient's compliance on that calendar day is to the non-compliance behavior category. The compliance behavior category is the discrete classification result for each calendar day, and both are used together to drive the generation of subsequent personalized intervention strategies.
[0050] In one embodiment of the present invention, the personalized intervention strategy set includes medication reminder time adjustment parameters, psychological intervention content push strategies, and follow-up visit priority identifiers. Based on the compliance behavior category, a corresponding intervention strategy template is retrieved from a preset compliance type mapping table. The intervention strategy template includes a medication reminder strategy field, a psychological intervention strategy field, and a follow-up visit management strategy field. The medication reminder strategy field in the intervention strategy template is populated with parameters based on the compliance risk score to generate medication reminder time adjustment parameters, wherein a higher compliance risk score corresponds to a higher reminder frequency value in the medication reminder time adjustment parameters. Based on the compliance behavior category, a corresponding psychological intervention content identifier is matched from a preset psychological intervention content library to generate a psychological intervention content push strategy. A follow-up visit priority identifier is determined based on the risk range of the compliance risk score, including low-risk, medium-risk, and high-risk ranges, each corresponding to a different follow-up visit priority level. The medication reminder time adjustment parameters, the psychological intervention content push strategies, and the follow-up visit priority identifiers are combined and encapsulated to generate the personalized intervention strategy set.
[0051] In practice, the assessment results of the target patient (diagnosed with schizophrenia, taking olanzapine tablets, 10 mg daily, taken at 21:00) are used for 30 consecutive calendar days. The adherence assessment module outputs the adherence risk score and adherence behavior category for each calendar day. Taking the 15th calendar day as an example, the adherence risk score is 0.82, and the adherence behavior category is labeled as non-adherence. The intervention strategy generation module receives the above assessment results and generates a personalized intervention strategy set. The personalized intervention strategy set includes three components: medication reminder time adjustment parameters, psychological intervention content push strategy, and follow-up visit priority identifier.
[0052] In practice, the corresponding intervention strategy template is retrieved from a pre-defined compliance type mapping table based on the compliance behavior category. This compliance type mapping table is pre-stored in the system database and contains three rows: the first row corresponds to the complete compliance category label, the second row to the partial compliance category label, and the third row to the non-compliance category label. The intervention strategy template corresponding to the non-compliance category label in the third row includes a medication reminder strategy field (field value: "high-frequency reminder interval 30 minutes, maximum daily reminders 6 times"), a psychological intervention strategy field (field value: "crisis intervention and motivational interview content"), and a follow-up visit management strategy field (field value: "priority follow-up visit level two"). The intervention strategy generation module reads the third row template and extracts the original template values for the medication reminder strategy field, the psychological intervention strategy field, and the follow-up visit management strategy field.
[0053] In some embodiments, the medication reminder strategy field in the intervention strategy template is populated with parameters based on the adherence risk score to generate medication reminder time adjustment parameters. The medication reminder time adjustment parameters include a reminder frequency value (unit: times / day) and a reminder interval time (unit: minutes). The intervention strategy generation module uses the adherence risk score (denoted as...) (Values ranging from 0 to 1) are mapped to the frequency of reminders. The mapping relationship uses a linear transformation formula:
[0054] in: This refers to the reminder frequency value in the generated medication reminder time adjustment parameters. This indicates the compliance risk score. This indicates that the minimum reminder frequency is 1 (times / day). This indicates that the maximum reminder frequency is 6 (times / day). This indicates the floor function. For the 15th day, Calculations yielded The reminder frequency is 5 times per day, and the corresponding reminder interval is approximately 4.8 hours (24 hours per day divided by 5 times). The intervention strategy generation module rounds the reminder interval to send a medication reminder every 5 hours. The reminder frequency value of 5 corresponding to the compliance risk score of 0.82 is greater than the reminder frequency value of 1 corresponding to the compliance risk score of 0.15, reflecting the principle that the higher the score, the greater the reminder frequency value.
[0055] In specific implementation, a psychological intervention content push strategy is generated by matching the corresponding psychological intervention content identifier from a preset psychological intervention content library based on the compliance behavior category. The psychological intervention content library is stored on the system server, and each content record contains a psychological intervention content identifier and corresponding intervention content text and audio. The mapping relationship between the psychological intervention content identifier and the compliance behavior category is as follows: Complete compliance tag matches identifier "M_001" (content is positive reinforcement and maintenance treatment strategy); partial compliance tag matches identifier "M_002" (content is cognitive restructuring and habit formation guidance); and non-compliance tag matches identifier "M_003" (content is crisis intervention and motivational interviews). For the non-compliance tag on the 15th calendar day, the intervention strategy generation module matches the psychological intervention content identifier as "M_003," using this identifier as the core information of the psychological intervention content push strategy, and simultaneously recording the push timing parameter as immediately after each medication reminder is sent.
[0056] In some embodiments, a follow-up visit priority indicator is determined based on the risk range of the compliance risk score. The risk range includes low-risk, medium-risk, and high-risk ranges, each corresponding to a different follow-up visit priority level. The criteria for dividing the risk ranges are pre-set as follows: the low-risk range corresponds to... The medium-risk range corresponds to High-risk areas correspond to The adherence risk score on the 15th calendar day is 0.82, which falls within the high-risk range. The corresponding follow-up appointment priority level for this range is "Level 1 Priority," meaning the minimum follow-up appointment interval is within 3 days. The intervention strategy generation module generates a follow-up appointment priority identifier as the string "PRIORITY_LEVEL_1." If the adherence risk score on the 1st calendar day is 0.15, it falls within the low-risk range, and the corresponding follow-up appointment priority level is "Level 3 Priority," with a follow-up appointment priority identifier of "PRIORITY_LEVEL_3."
[0057] Optionally, the medication reminder time adjustment parameters, the psychological intervention content push strategy, and the follow-up visit priority identifier are combined and encapsulated to generate the personalized intervention strategy set. The medication reminder time adjustment parameters include a reminder frequency of 5 times / day and a reminder interval of 5 hours. The psychological intervention content push strategy includes a psychological intervention content identifier "M_003" and a push timing parameter of "push immediately after each medication reminder is sent." The follow-up visit priority identifier is "PRIORITY_LEVEL_1." The above three elements are encapsulated into a JSON format data object, serving as the personalized intervention strategy set corresponding to the evaluation result on the 15th calendar day.
[0058] It is understood that the intervention strategy generation module independently performs the above processing for each of the 30 calendar days of the target patient. For calendar days with partial compliance behavior (e.g., the first calendar day, compliance risk score 0.15), the intervention strategy template corresponding to the partial compliance tag is retrieved from the compliance type mapping table. The original value of the medication reminder strategy field is "medium frequency reminder interval 2 hours", the original value of the psychological intervention strategy field is "cognitive restructuring and habit formation guidance", and the original value of the follow-up visit management strategy field is "routine follow-up visit level three". After filling in the compliance risk score of 0.15, a reminder frequency value of 1 time / day is generated, the psychological intervention content identifier is matched as "M_002", and the follow-up visit priority identifier is determined as "PRIORITY_LEVEL_3". After combination and encapsulation, another personalized intervention strategy set is obtained. It is understood that the personalized intervention strategy set is transmitted to the intervention sequence orchestration module for subsequent processing. The intervention sequence arrangement module receives the personalized intervention strategy set corresponding to each of the 30 natural days output by the intervention strategy generation module. Each personalized intervention strategy set includes medication reminder time adjustment parameters, psychological intervention content push strategy, and follow-up visit priority identifier.
[0059] In one embodiment of the present invention, the current system time and a list of preset medication time points for the target patient are obtained, and each medication time point in the list of preset medication time points is used as an anchor point on the intervention timeline. For each anchor point, a medication reminder time adjustment parameter is extracted from the personalized intervention strategy set, and the reminder sending time corresponding to the anchor point is determined based on the parameter to generate a medication reminder event node. For each anchor point, a psychological intervention content push strategy is extracted from the personalized intervention strategy set, and the time within a first preset time window before the anchor point is used as the psychological intervention content push time to generate a psychological intervention event node. For each anchor point, a follow-up visit priority identifier is extracted from the personalized intervention strategy set, and the system workday closest to the anchor point within a second preset time window after the anchor point is used as the follow-up visit reminder time to generate a follow-up visit management event node. The medication reminder event nodes, psychological intervention event nodes, and follow-up visit management event nodes corresponding to all anchor points are sorted in chronological order to generate the compliance intervention execution sequence.
[0060] When the adherence intervention execution sequence is pushed to the target patient's mobile terminal and the healthcare worker's terminal, the event type of each event node in the adherence intervention execution sequence is parsed. The event types include medication reminder type, psychological intervention type, and follow-up visit management type. When the event type is medication reminder type, the reminder sending time and medication dosage value are extracted from the event node to generate a medication reminder push message, which is then sent to the target patient's mobile terminal at the reminder sending time. When the event type is psychological intervention type, a psychological intervention content push strategy is extracted from the event node. Based on this strategy, the corresponding intervention content text and intervention content audio are read from the psychological intervention content library to generate a psychological intervention push message package, which is then sent to the target patient's mobile terminal at the psychological intervention content push time. When the event type is follow-up visit management type, the follow-up visit reminder time and follow-up visit priority identifier are extracted from the event node to generate a follow-up visit reminder push message, which is then sent to both the target patient's mobile terminal and the healthcare worker's terminal simultaneously at the follow-up visit reminder time. After all event nodes in the compliance intervention execution sequence have been pushed, an intervention completion feedback signal is generated and stored in the target patient's electronic health record.
[0061] In the specific implementation, the assessment and intervention strategy generation results of the target patient (diagnosed with schizophrenia, taking olanzapine tablets, 10 mg daily, taken at 21:00 daily) are continued. The intervention strategy generation module generates a personalized intervention strategy set for the 15th calendar day. The personalized intervention strategy set includes medication reminder time adjustment parameters (reminder frequency of 5 times / day), psychological intervention content push strategy (psychological intervention content is identified as "M_003", and the push timing is immediately after each medication reminder is sent), and follow-up visit priority identifier ("PRIORITY_LEVEL_1"). The intervention sequence arrangement module obtains the current system time, which is 08:00 AM on the 15th calendar day, and reads the target patient's preset medication time point list. The preset medication time point list is pre-stored in the target patient's electronic health record and includes one medication time point, namely 21:00 daily. Each medication time point in the preset medication time point list is used as an anchor point on the intervention time axis. For the 15th natural day, there is only one anchor point on the intervention time axis at 21:00 on that day.
[0062] In specific implementation, for the anchor point (21:00), medication reminder time adjustment parameters are extracted from the personalized intervention strategy set. These parameters include a reminder frequency of 5 times / day and a reminder interval of 5 hours. The reminder sending time corresponding to the anchor point is determined based on these parameters, generating a medication reminder event node. The intervention sequence orchestration module uses the anchor point time 21:00 as a baseline and works backwards according to the 5-hour reminder interval to obtain five reminder sending times: 01:00, 06:00, 11:00, 16:00, and 21:00. Since 01:00 exceeds the current system time of 08:00, the intervention sequence orchestration module removes expired times, retaining the remaining reminder sending times for the day: 11:00, 16:00, and 21:00. A medication reminder event node is generated for each reminder sending time, and each event node includes the event type (medication reminder type), reminder sending time, and medication dosage value (10 mg).
[0063] In specific implementation, for the anchor point (21:00), a psychological intervention content push strategy is extracted from the personalized intervention strategy set. This strategy includes a psychological intervention content identifier "M_003" and a push timing parameter "push immediately after each medication reminder is sent." The time within a first preset time window preceding the anchor point is used as the psychological intervention content push time. This first preset time window is set to the period from 60 minutes before the anchor point to the anchor point itself. The intervention sequence arrangement module selects the psychological intervention content push time corresponding to the reminder sending time of each medication reminder event node within the first preset time window. Specifically: for a medication reminder event node at 11:00, the push time is 11:00; for a medication reminder event node at 16:00, the push time is 16:00; and for a medication reminder event node at 21:00, the push time is 21:00. A psychological intervention event node is generated for each push time. Each psychological intervention event node includes an event type (psychological intervention type), a psychological intervention content push time, and a psychological intervention content identifier "M_003".
[0064] In specific implementation, for the anchor point (21:00), the follow-up visit priority identifier "PRIORITY_LEVEL_1" is extracted from the personalized intervention strategy set. The system working day closest to the anchor point within the second preset time window is used as the follow-up visit reminder time. The second preset time window is set to within 72 hours after the anchor point. The intervention sequence arrangement module reads the system working calendar of the medical institution where the target patient is treated, defining Monday to Friday as working days and Saturday and Sunday as non-working days. The 15th calendar day is Wednesday, and the dates within 72 hours after the anchor point 21:00 are Wednesday, Thursday, Friday, and Saturday. There are no remaining system working days after 21:00 on Wednesday, so Thursday and Friday are system working days, and Saturday is a non-working day. The system workday closest to the anchor point is Thursday. The intervention sequence orchestration module sets 10:00 AM on Thursday as the follow-up visit reminder time and generates a follow-up visit management event node. The follow-up visit management event node includes the event type (follow-up visit management type), the follow-up visit reminder time, and the follow-up visit priority identifier "PRIORITY_LEVEL_1".
[0065] In some embodiments, the medication reminder event nodes, psychological intervention event nodes, and follow-up visit management event nodes corresponding to all anchor points are sorted in chronological order to generate the compliance intervention execution sequence. For the 15th calendar day, the sorted event nodes are as follows: medication reminder event node at 11:00, psychological intervention event node at 11:00, medication reminder event node at 16:00, psychological intervention event node at 16:00, medication reminder event node at 21:00, psychological intervention event node at 21:00, and follow-up visit management event node at 10:00 on Thursday. The intervention sequence orchestration module stores the above event nodes sequentially into a queue structure as the compliance intervention execution sequence.
[0066] In practice, the adherence intervention sequence is pushed to the target patient's mobile terminal and the healthcare worker's terminal. The target patient's mobile terminal is a medication reminder application on their smartphone, and the healthcare worker's terminal is an electronic medical record system on the attending physician's workstation computer. The intervention sequence orchestration module parses the event type of each event node in the adherence intervention sequence. The event types include medication reminder type, psychological intervention type, and follow-up visit management type. For the first medication reminder event node in the adherence intervention sequence, 11:00, the event type is parsed as medication reminder type. The reminder sending time 11:00 and the medication dosage value of 10 mg are extracted from the event node to generate a medication reminder push message. The content of the medication reminder push message is "Please take 10 mg of olanzapine tablets at 11:00". The medication reminder push message is sent to the target patient's mobile terminal at the reminder sending time of 11:00.
[0067] In some embodiments, when the event type is a psychological intervention, a psychological intervention content push strategy is extracted from the event node, and the corresponding intervention content text and intervention content audio are read from the psychological intervention content library according to the strategy. For the psychological intervention event node at 11:00, the psychological intervention content identifier "M_003" is extracted. The record in the psychological intervention content library identified as "M_003" contains intervention content text (approximately 800 words of motivational interview guidance text) and intervention content audio (6 minutes of synthesized speech audio). The intervention sequence orchestration module generates a psychological intervention push message package, which contains the Uniform Resource Locator (URL) of the intervention content text and the intervention content audio, and sends the psychological intervention push message package to the target patient's mobile terminal at the psychological intervention content push time of 11:00.
[0068] Optionally, when the event type is a follow-up visit management type, the follow-up visit reminder time and follow-up visit priority identifier are extracted from the event node. For the follow-up visit management event node at 10:00 AM on Thursday, the follow-up visit reminder time is extracted as 10:00 AM on Thursday, and the follow-up visit priority identifier is "PRIORITY_LEVEL_1". The intervention sequence orchestration module generates a follow-up visit reminder push message, the content of which is "Your compliance assessment is at a high-risk level. Please go to the psychiatric outpatient clinic for a follow-up visit this Thursday". The follow-up visit reminder push message is sent simultaneously to the target patient's mobile terminal and the medical staff's terminal at the follow-up visit reminder time of 10:00 AM on Thursday. After receiving the message, the medical staff's terminal automatically displays the target patient's name and follow-up visit priority identifier in a pop-up window on the attending physician's workstation interface.
[0069] It is understood that after all event nodes in the compliance intervention execution sequence have been pushed, the intervention sequence orchestration module generates an intervention completion feedback signal. For the 15th calendar day, the last event node is the follow-up visit management event node at 10:00 AM on Thursday. After the follow-up visit reminder push message is sent at 10:00 AM on Thursday, the intervention sequence orchestration module generates an intervention completion feedback signal in JSON format. The intervention completion feedback signal includes the target patient's patient identifier, the date identifier of the 15th calendar day, and an execution status field (with a value of "completed"). The intervention completion feedback signal is then stored in the target patient's electronic health record.
[0070] It is understood that for the personalized intervention strategy set for the target patient over 30 consecutive calendar days, the intervention sequence orchestration module performs the same temporal orchestration process to generate a compliance intervention execution sequence for each calendar day, and pushes it sequentially according to the time order of the event nodes in the compliance intervention execution sequence. When the medication reminder event nodes of two adjacent calendar days overlap in time or the interval is less than a preset threshold (the preset threshold is 30 minutes), the intervention sequence orchestration module merges the overlapping event nodes into one, and retains the medication reminder time adjustment parameter corresponding to the higher reminder frequency value of the two.
[0071] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A psychiatric compliance assessment and intervention system that quantifies psychological behavioral characteristics, characterized in that, The system includes: The feature extraction module acquires a multi-source behavioral monitoring data set of the target patient, processes the multi-source behavioral monitoring data set, and obtains a medication behavior time-series feature vector and a rhythm deviation feature vector. The feature fusion module performs cross-modal feature fusion processing on the time-series feature vector of medication behavior and the rhythm deviation feature vector to generate a fused behavior feature set; The compliance assessment module calls an improved random forest algorithm to perform compliance risk stratification on the fused behavioral feature set, generating the compliance risk score and compliance behavior category of the target patient. The improved random forest algorithm is constructed based on the joint optimization of the Gini coefficient and the sample weighting mechanism. The intervention strategy generation module generates a set of personalized intervention strategies based on the compliance risk score and compliance behavior categories. The intervention sequence arrangement module arranges the personalized intervention strategy set according to a preset intervention timeline to generate a compliance intervention execution sequence, and pushes the compliance intervention execution sequence to the target patient's mobile terminal and the medical staff's terminal.
2. The psychiatric assessment and intervention system of claim 1, wherein, A multi-source behavioral monitoring dataset of the target patient is acquired, and the dataset is processed to obtain a medication behavior time-series feature vector and a rhythm deviation feature vector, including: The multi-source behavioral monitoring data set includes medication record data from electronic medication monitoring devices, physiological rhythm data collected by wearable devices, and medication reminder interaction data from mobile terminals; The medication record data is subjected to temporal behavioral feature extraction processing to obtain a medication behavior temporal feature vector, and the physiological rhythm data is subjected to rhythm deviation analysis processing to obtain a rhythm deviation feature vector. The medication record data is subjected to time-series behavioral feature extraction processing to obtain a medication behavior time-series feature vector, specifically including: The medication record data is segmented according to natural days to obtain multiple single-day medication record segments. Each single-day medication record segment contains all medication timestamps and medication dosage values within that day. For each daily medication record segment, calculate the time interval sequence between adjacent medication timestamps within the segment, and calculate the mean and standard deviation of the time interval sequence to generate daily medication rhythm characteristics; For each daily medication record segment, calculate the dose deviation value between the actual medication dose value and the preset standard dose value in that segment, and generate the daily medication dose characteristic. The daily medication rhythm feature and the daily medication dosage feature are concatenated to generate a daily medication feature vector. All daily medication feature vectors are stacked sequentially according to the natural day order to obtain the time-series feature vector of the medication behavior.
3. The psychiatric assessment and intervention system of claim 2, wherein, The physiological rhythm data are subjected to rhythm deviation analysis to obtain a rhythm deviation feature vector, specifically including: The heart rate variation sequence during sleep and the activity count sequence during wakefulness are extracted from the physiological rhythm data. The heart rate variation sequence is organized with one sampling point per minute, and the activity count sequence is organized with one sampling point per hour. The heart rate variation sequence is compared with the preset individual baseline heart rate curve point by point to obtain the heart rate deviation sequence. The individual baseline heart rate curve is generated by smoothing and filtering the heart rate data collected from the target patient during a historical period of good compliance. The activity count sequence is compared with a preset standard daily activity rhythm template to calculate the absolute value of the deviation between the activity count per hour and the corresponding hour template value in the standard daily activity rhythm template, thus obtaining the activity deviation sequence. The arithmetic mean of all deviations in the heart rate deviation sequence is calculated to obtain the average heart rate deviation. The arithmetic mean of all deviations in the activity deviation sequence is calculated to obtain the average activity deviation. The average heart rate deviation and the average activity deviation are combined as a vector to generate the rhythm deviation feature vector.
4. The psychiatric assessment and intervention system of claim 3, wherein, The medication behavior time-series feature vector and the rhythm deviation feature vector are subjected to cross-modal feature fusion processing to generate a fused behavior feature set, specifically including: The medication behavior time-series feature vector of each day is timestamped with the rhythm deviation value of the corresponding date in the rhythm deviation feature vector to obtain a time-aligned feature pair sequence. For each feature pair in the time-aligned feature pair sequence, calculate the correlation coefficient between the daily medication feature vector and the rhythm deviation value to generate a cross-modal association strength sequence; Based on the correlation strength values in the cross-modal correlation strength sequence, attention weights are assigned to each feature dimension in the daily medication feature vector to generate a weighted medication behavior feature vector. Based on the correlation strength values in the cross-modal correlation strength sequence, dynamic fusion coefficients are assigned to the rhythm deviation values to generate weighted rhythm deviation feature values. The weighted medication behavior feature vector and the weighted rhythm deviation feature value are cascaded and fused to generate the fused behavior feature set.
5. The psychiatric compliance assessment and intervention system based on quantitative psychological and behavioral characteristics according to claim 4, characterized in that, The timestamp alignment operation employs a sequence alignment method based on a dynamic time warping algorithm when the timestamp deviation between the medication record data and the physiological rhythm data exceeds a preset threshold.
6. The psychiatric compliance assessment and intervention system based on quantitative psychological and behavioral characteristics according to claim 4, characterized in that, The improved random forest algorithm is invoked to perform adherence risk stratification on the fused behavioral feature set, generating the adherence risk score and adherence behavior category for the target patient, specifically including: The fused behavioral feature set is input into the feature filtering layer of the improved random forest algorithm. The feature filtering layer performs dimensionality reduction filtering on the fused behavioral feature set based on the decrease in the Gini coefficient of each feature dimension in the historical training data, and obtains a filtered feature subset. The filtered feature subset is input into multiple decision trees of the improved random forest algorithm. Each decision tree performs binary recursive partitioning of the filtered feature subset according to the node splitting criterion to generate the leaf node prediction results of each decision tree. The mode of the prediction results of the leaf nodes of all decision trees is counted, and the category corresponding to the mode is taken as the compliance behavior category; The proportion of decision trees whose leaf node predictions belong to the high-risk category is used as the compliance risk score.
7. The psychiatric compliance assessment and intervention system for quantitative psychological and behavioral characteristics according to claim 6, characterized in that, The improved random forest algorithm is constructed based on the joint optimization of the Gini coefficient and the sample weighting mechanism. The working process of the improved random forest algorithm includes: During the training phase, the initial sample weight is calculated for each training sample in the original training sample set according to the inverse frequency distribution of its sample label, wherein the sample label includes a fully compliant label, a partially compliant label, and a non-compliant label. During the training of each decision tree, the initial sample weights are dynamically adjusted based on the out-of-bag prediction error rate of the current decision tree, so that the sample weights of training samples with prediction error rates higher than the average error threshold are increased, thus generating dynamically adjusted sample weights. During the node splitting process of each decision tree, the weighted Gini coefficient of each candidate feature at that node is calculated. The weighted Gini coefficient is calculated by weighting the samples within the node according to the dynamically adjusted sample weights. The candidate feature with the largest decrease in weighted Gini coefficient is selected as the splitting feature of that node. Repeat the node splitting operation until each decision tree reaches the preset maximum depth or the number of samples in a node is less than the preset minimum sample threshold, and complete the construction of all decision trees.
8. The psychiatric compliance assessment and intervention system based on quantitative psychological and behavioral characteristics according to claim 1, characterized in that, A personalized set of intervention strategies is generated based on the compliance risk score and compliance behavior categories, specifically including: The set of personalized intervention strategies includes medication reminder time adjustment parameters, psychological intervention content push strategies, and follow-up visit priority indicators; According to the compliance behavior category, the corresponding intervention strategy template is retrieved from the preset compliance type mapping table. The intervention strategy template includes a medication reminder strategy field, a psychological intervention strategy field, and a follow-up visit management strategy field. The medication reminder strategy field in the intervention strategy template is populated with parameters based on the compliance risk score to generate medication reminder time adjustment parameters. The higher the compliance risk score, the greater the reminder frequency value in the medication reminder time adjustment parameters. Based on the category of compliance behavior, a psychological intervention content push strategy is generated by matching the corresponding psychological intervention content identifier from a preset psychological intervention content library. The priority indicator for follow-up visits is determined based on the risk range in which the compliance risk score is located. The risk range includes low-risk, medium-risk, and high-risk ranges, and each risk range corresponds to a different priority level for follow-up visits. The medication reminder time adjustment parameters, the psychological intervention content push strategy, and the follow-up visit priority identifier are combined and encapsulated to generate the personalized intervention strategy set.
9. The psychiatric compliance assessment and intervention system based on quantitative psychological and behavioral characteristics according to claim 8, characterized in that, The personalized intervention strategy set is arranged chronologically according to a preset intervention timeline to generate a compliance intervention execution sequence, specifically including: Obtain the current system time and the list of preset medication time points for the target patient, and use each medication time point in the list of preset medication time points as an anchor point on the intervention time axis; For each anchor point, a medication reminder time adjustment parameter is extracted from the set of personalized intervention strategies. Based on this parameter, the reminder sending time corresponding to the anchor point is determined, and a medication reminder event node is generated. For each anchor point, a psychological intervention content push strategy is extracted from the set of personalized intervention strategies, and the time within the first preset time window before the anchor point is taken as the psychological intervention content push time, thus generating a psychological intervention event node. For each anchor point, the follow-up visit priority identifier is extracted from the set of personalized intervention strategies. The system working day that is closest to the anchor point within the second preset time window after the anchor point is used as the follow-up visit reminder time, and a follow-up visit management event node is generated. All the medication reminder event nodes, psychological intervention event nodes, and follow-up visit management event nodes corresponding to all anchor points are sorted in chronological order to generate the compliance intervention execution sequence.
10. The psychiatric compliance assessment and intervention system for quantitative psychological and behavioral characteristics according to claim 9, characterized in that, The compliance intervention sequence is pushed to the target patient's mobile terminal and the medical staff's terminal, specifically including: The event type of each event node in the compliance intervention execution sequence is analyzed, and the event types include medication reminder type, psychological intervention type, and follow-up visit management type; When the event type is a medication reminder, the reminder sending time and medication dosage value are extracted from the event node, a medication reminder push message is generated, and the medication reminder push message is sent to the target patient's mobile terminal at the reminder sending time; When the event type is a psychological intervention type, a psychological intervention content push strategy is extracted from the event node. Based on the strategy, the corresponding intervention content text and intervention content audio are read from the psychological intervention content library to generate a psychological intervention push message package. The psychological intervention push message package is then sent to the target patient's mobile terminal at the time of psychological intervention content push. When the event type is follow-up visit management, the follow-up visit reminder time and follow-up visit priority identifier are extracted from the event node, a follow-up visit reminder push message is generated, and the follow-up visit reminder push message is sent to the target patient's mobile terminal and the medical staff's terminal at the follow-up visit reminder time. After all event nodes in the compliance intervention execution sequence have been pushed, an intervention completion feedback signal is generated and stored in the target patient's electronic health record.