Artificial intelligence-based internet hospital whole-process intelligent diagnosis and treatment service management system
By employing multi-source data feature aggregation and autoencoder models in internet hospitals, disease activity and compliance probability are separated to generate crisis circuit breaker signals, which are then inserted into emergency pathways. This addresses the issues of insufficient temporal resolution and missing data in acute crisis detection and response in internet hospitals, enabling emergency pathway switching and resource integration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- JILIN BAIYI MEDICAL MANAGEMENT CO LTD
- Filing Date
- 2026-03-10
- Publication Date
- 2026-06-05
Smart Images

Figure CN122158079A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of internet healthcare and artificial intelligence technology, and more specifically, to an intelligent management system for the entire process of diagnosis and treatment services in internet hospitals based on artificial intelligence. Background Technology
[0002] In the post-diagnosis management scenario of the psychiatric department of an internet hospital, after patients complete online treatment, they enter a daily home management period. The system passively collects multi-source digital phenotypic data via smartphones and performs daily-granular aggregation analysis for daily management and intervention strategy matching. Existing digital phenotypic analysis technologies output disease activity scores as daily-granular slow variables with a time resolution of only days. Psychiatric patients often do not open the app for extended periods when symptoms worsen, resulting in extremely sparse explicit interaction events. Analysis based on app behavior fails due to missing input sequences. Disease deterioration and decreased adherence are highly coupled in behavioral manifestations; without decoupling, the cause of the crisis cannot be accurately determined. Existing daily-granular digital phenotypic analysis also lacks channels to trigger emergency pathway switching and pre-connection to emergency resources. These deficiencies lead to four technical problems in the rapid identification and emergency response to acute psychiatric crises outside the treatment period: insufficient time resolution, fragile and missing data, confusion of causal coupling, and lack of response channels. Summary of the Invention
[0003] This invention provides an intelligent diagnosis and treatment service management system for the entire process of Internet hospitals based on artificial intelligence, which solves the technical problems in related technologies such as the difficulty in real-time detection of acute crises in patients after diagnosis in psychiatric departments, the inability to automatically disconnect and reconstruct post-diagnosis management paths after a crisis is triggered, and the low efficiency in the generation of crisis intervention resource matching and handover information.
[0004] This invention discloses a method for managing the entire process of intelligent diagnosis and treatment services in an internet hospital based on artificial intelligence, comprising: The multi-source digital phenotypic data stream passively collected from patients' smartphones after diagnosis was acquired, and the data was aggregated at the daily granularity and calculated at the hourly sliding window to generate daily digital phenotypic feature vector time series and high-frequency phenotypic mutation feature sequence. The daily digital phenotypic feature vector time series is fused with the APP explicit interactive behavior event sequence, and input into the time series representation learning model based on mask autoencoder for encoding to generate a continuous representation sequence of patient behavior status. The continuous representation sequence of the patient's behavioral state is input into a causal decoupled dual-branch network, and disease activity score and compliance probability score are generated through adversarial training. The high-frequency phenotypic mutation feature sequence and disease activity score are input into the mental health crisis early warning network to calculate the crisis urgency score. When the crisis urgency score exceeds the adaptive circuit breaker threshold determined based on the disease activity score, a crisis circuit breaker trigger signal is generated. In response to the crisis circuit breaker trigger signal, the pending link nodes in the current post-diagnosis management path are frozen, a psychiatric crisis intervention bridging node is inserted and connected to the offline psychiatric emergency treatment path subgraph, and a hybrid post-diagnosis management status diagram after the circuit breaker is generated. Based on the crisis type and patient location, crisis intervention resources are matched, a crisis intervention resource docking plan and a psychiatric crisis handover information package are generated and pushed to multiple receiving terminals, and the post-diagnosis management path is restored after the crisis is handled.
[0005] Furthermore, the daily feature vectors in the daily digital phenotypic feature vector time series include the average daily activity level, social communication frequency, sleep regularity index, and activity range entropy. The activity range entropy is calculated according to the information entropy formula, and the probability value is the ratio of the dwell time in each dwell area obtained by dividing the GPS trajectory into spatial grids on the day to the total dwell time on the day. The feature vector of each sliding window in the high-frequency phenotypic mutation feature sequence includes the activity level variability rate, social communication abrupt stop marker, GPS abnormal dwell time detection result, and nighttime abnormal activity frequency. The activity level variability rate is the ratio obtained by dividing the difference between the mean activity level in the current window and the mean activity level in the previous window by the sum of the absolute value of the mean activity level in the previous window and a minimum constant. The social communication abrupt stop marker is set to 1 when the frequency of calls and text messages in the window drops below a preset proportion of the patient's individual baseline, and 0 otherwise. The GPS abnormal dwell time detection result is set to 1 when the patient's dwell time in unconventional locations in the window exceeds a preset time threshold, and 0 otherwise.
[0006] Furthermore, the temporal representation learning model based on mask autoencoder includes a mask generator, a temporal encoder, and a reconstruction decoder, wherein: The mask generator performs a two-dimensional random masking operation on the fused multi-source time series data. It randomly selects some time steps for masking in the time dimension and randomly selects some feature channels for masking in the feature dimension. It applies a higher masking probability to the channel where the APP display interaction features are located than to other channels, and generates the masked input sequence. The time encoder applies periodic positional encoding, which includes intraday time period encoding components and intraweek date encoding components, to the masked input sequence. It then performs context-related encoding on the unmasked time steps and feature channels through a multi-layer self-attention mechanism to generate a continuous representation sequence. The reconstruction decoder performs reconstruction on the masked time step and feature channel, with the training objective being to minimize the mean square error between the reconstructed value and the original value at the masked location.
[0007] Furthermore, the masking operation of the mask generator is implemented as follows: for each time step, a Bernoulli random variable is independently sampled to determine whether the time step is masked; for each feature channel, a Bernoulli random variable is independently sampled to determine whether the channel is masked; the masked position is replaced with the original feature value by the zero vector and then passed to the timing encoder. The intraday time period encoding component of the periodic location encoding takes the hour of the day as input and uses a combination of sine and cosine functions to map the hour into a fixed-dimensional periodic vector. The intraweek date encoding component takes the day of the week as input and uses a combination of sine and cosine functions to map into a fixed-dimensional periodic vector. The two components are concatenated and added to the input feature vector as the input of the self-attention layer of the temporal encoder.
[0008] Furthermore, the causal decoupling dual-branch network includes a disease state change branch, a compliance behavior change branch, and an adversarial discriminator, wherein: The disease state change branch extracts behavioral features related to disease activity from the continuous representation sequence of the patient's behavioral state based on the symptomatology feature template of mental illness, maps them to disease activity scores through a temporal fully connected layer, and passes the intermediate feature representation to the adversarial discriminator. The compliance behavior change branch extracts features related to compliance behavior from the continuous representation sequence of the patient's behavioral state based on medication compliance-related behavioral indicators, maps them to compliance probability scores through a temporal fully connected layer, and passes the intermediate feature representation to the adversarial discriminator. The adversarial discriminator takes the intermediate feature representations output by the disease state change branch and the compliance behavior change branch as input, performs a binary classification task to discriminate the source branch of the intermediate feature representation of the input, and uses a gradient inversion layer connected to the disease state change branch and the compliance behavior change branch. During forward propagation, the intermediate feature representation is normally transmitted, and during backward propagation, the gradient is inverted and then transmitted, constraining the two branches to generate intermediate feature representations that make it difficult for the adversarial discriminator to distinguish the source. The total loss function of the causal decoupled dual-branch network is a weighted combination of the supervision loss of the disease state change branch, the supervision loss of the compliance behavior change branch, and the discriminant loss of the adversarial discriminator, with the discriminant loss term of the adversarial discriminator participating in the combination with a negative sign.
[0009] Furthermore, the mental health crisis early warning network includes a multi-scale feature extraction module, a background risk modulation module, and a crisis scoring output module, wherein: The multi-scale feature extraction module performs convolution operations on the high-frequency phenotypic mutation feature sequence through multiple sets of one-dimensional temporal convolutional layers with different kernel widths in parallel. Each set of convolutional layers captures mutation patterns over different time spans. The outputs of each set of convolutions are concatenated along the feature dimension to generate a multi-scale mutation feature representation. A sensor availability mask is set in the input layer, and the influence of missing channels is compensated by normalizing the number of available channels after convolution calculation. The background risk modulation module calculates the adaptive circuit breaker threshold based on the disease activity score. The adaptive circuit breaker threshold is equal to the standard circuit breaker threshold minus the product of the threshold adjustment coefficient and the portion of the disease activity score that exceeds the median risk threshold. When the disease activity score does not exceed the median risk threshold, the adaptive circuit breaker threshold remains the standard circuit breaker threshold. At the same time, the disease activity score is linearly transformed to generate a modulation vector, which is then element-wise multiplied with the multi-scale mutation feature representation to generate the modulated feature representation. The crisis scoring output module takes the modulated feature representation as input, outputs a crisis urgency score through a fully connected layer, and outputs a probability distribution of crisis types, including self-harm risk, acute agitation risk, and consciousness impairment risk, through an independent multi-classification output head.
[0010] Furthermore, the condition for generating the crisis circuit breaker trigger signal is that the crisis urgency score for a consecutive preset number of time windows all exceeds their respective adaptive circuit breaker thresholds, and the preset number is the time duration constraint parameter for confirming the crisis trigger. The value of the threshold adjustment coefficient satisfies the constraint that it is not greater than the standard circuit breaker threshold, so as to ensure that the adaptive circuit breaker threshold is not lower than zero when the disease activity score reaches its maximum value.
[0011] Furthermore, freezing the pending execution nodes in the current post-diagnosis management path includes: traversing all pending execution nodes in the post-diagnosis management status record, marking the status of each pending execution node as frozen and awaiting recovery, and recording a snapshot of the execution progress of each node at the time of freezing. The execution progress snapshot includes the node's planned execution time, completed preconditions, and associated clinical parameters. The preceding connection of the psychiatric crisis intervention bridging node is the most recently completed link node in the current post-diagnosis management path, and the subsequent connection is to the entry node of the offline psychiatric emergency treatment path subgraph, which includes an emergency triage node, a mental status assessment node, an acute phase treatment node, and a crisis stabilization assessment node. The post-treatment management path restoration after crisis management includes: acquiring emergency treatment result data, re-evaluating each node in the frozen pending recovery state, restoring nodes that do not conflict with the emergency treatment results to the pending execution state and recalculating the planned execution time, marking nodes that conflict with the emergency treatment results as abandoned, and inserting corresponding new node into the hybrid post-treatment management state diagram for any new subsequent requirements added in the emergency treatment results.
[0012] Furthermore, the matching of crisis intervention resources includes: obtaining the patient's current GPS location information based on the preliminary judgment result of the crisis type; querying the real-time resource status data of psychiatric emergency rooms or psychological crisis intervention centers within a preset range; calculating a comprehensive response time score for each candidate resource; the comprehensive response time score is the result of a weighted sum of the normalized value of the arrival time estimated based on the current traffic conditions, the resource matching gap metric, and the normalized value of the current load rate, weighted by a weight coefficient; the resource matching gap metric is the value obtained by subtracting the resource matching degree between the candidate resource and the crisis type from 1; the resource matching degree is the ratio of the number of intersection elements between the set of resource categories required by the crisis type and the set of resource categories that the candidate resource can provide to the number of elements in the set of required resource categories; and selecting the candidate resource with the smallest comprehensive response time score as the optimal docking target. The method for generating the psychiatric crisis handover information package is as follows: traverse the patient's post-diagnosis management longitudinal records, filter and extract the current psychiatric diagnosis, current medication regimen, decoupled disease activity change trajectory and compliance change trajectory, drug allergy information and self-harm history records, high-frequency phenotypic mutation evidence data and crisis urgency score sequence within the trigger window based on the psychiatric emergency information requirement template corresponding to the crisis type, and arrange them in a structured manner according to the priority defined by the psychiatric emergency information requirement template.
[0013] This invention provides an intelligent, end-to-end medical service management system for internet hospitals based on artificial intelligence, comprising: The dual-granularity feature aggregation module is used to acquire multi-source digital phenotypic data streams passively collected from patients' smartphones after diagnosis, and to generate daily digital phenotypic feature vector time series and high-frequency phenotypic mutation feature sequences by daily aggregation and hourly sliding window calculation respectively. The temporal representation learning module is used to fuse the daily digital phenotypic feature vector temporal sequence with the APP explicit interactive behavior event sequence, and encode it using a mask-based autoencoder-based temporal representation learning model to generate a continuous representation sequence of patient behavior status. The causal decoupling module is used to input the continuous representation sequence of the patient's behavioral state into the causal decoupling dual-branch network, and generate disease activity score and compliance probability score through adversarial training. The crisis early warning module is used to input the high-frequency phenotypic mutation feature sequence and the disease activity score into the mental health crisis early warning network, calculate the crisis urgency score, and generate a crisis circuit breaker trigger signal when the crisis urgency score exceeds the adaptive circuit breaker threshold determined based on the disease activity score. The path circuit breaker module is used to respond to the crisis circuit breaker trigger signal, freeze the link nodes to be executed in the current post-diagnosis management path, insert the psychiatric crisis intervention bridging node and connect it to the offline psychiatric emergency treatment path subgraph, and generate a hybrid post-diagnosis management status diagram after the circuit breaker is triggered. The resource matching and push module is used to match crisis intervention resources based on crisis type and patient location, generate crisis intervention resource matching plans and psychiatric crisis handover information packages and push them to multiple receiving terminals, and restore the post-diagnosis management path after the crisis is handled.
[0014] Multi-source digital phenotypic data streams passively collected from patients' smartphones after diagnosis are acquired. These data are aggregated at the daily granularity and calculated using an hourly sliding window to generate daily digital phenotypic feature vector time series and high-frequency phenotypic mutation feature sequences. The daily digital phenotypic feature vector time series are fused with an explicit interaction event sequence from the app and input into a time series representation learning model based on a masked autoencoder for encoding, generating a continuous representation sequence of patient behavior states. This continuous representation sequence of patient behavior states is input into a causal decoupled dual-branch network, and disease activity scores and compliance probability scores are generated through adversarial training. The high-frequency phenotypic mutation feature sequence and the disease activity score are then used to further refine the data. Input the mental health crisis early warning network, calculate the crisis urgency score, and generate a crisis circuit breaker trigger signal when the crisis urgency score exceeds the adaptive circuit breaker threshold determined based on the disease activity score; respond to the crisis circuit breaker trigger signal, freeze the pending link nodes in the current post-diagnosis management path, insert a psychiatric crisis intervention bridging node and connect it to the offline psychiatric emergency treatment path subgraph, and generate a hybrid post-diagnosis management status diagram after the circuit breaker; match crisis intervention resources based on crisis type and patient location, generate a crisis intervention resource docking plan and a psychiatric crisis handover information package and push them to multiple receiving terminals, and restore the post-diagnosis management path after the crisis is handled.
[0015] Furthermore, the daily feature vectors in the daily digital phenotypic feature vector time series include daily average activity level, social communication frequency, sleep regularity index, and activity range entropy. The activity range entropy is calculated using the information entropy formula, with the ratio of the dwell time in each dwell area obtained by dividing the GPS trajectory into spatial grids on that day to the total dwell time on that day as the probability value. The feature vectors of each sliding window in the high-frequency phenotypic mutation feature sequence include activity level variability rate, social communication abrupt stop marker, GPS abnormal dwelling detection result, and nighttime abnormal activity frequency. The activity level variability rate is the ratio obtained by dividing the difference between the average activity level in the current window and the average activity level in the previous window by the sum of the absolute value of the average activity level in the previous window and a minimum constant. The social communication abrupt stop marker is set to 1 when the frequency of calls and text messages in the window drops below a preset proportion of the patient's individual baseline, and 0 otherwise. The GPS abnormal dwelling detection result is set to 1 when the patient's dwell time in unconventional locations in the window exceeds a preset time threshold, and 0 otherwise.
[0016] Furthermore, the temporal representation learning model based on a mask autoencoder includes a mask generator, a temporal encoder, and a reconstruction decoder. Specifically: the mask generator performs a two-dimensional random masking operation on the fused multi-source temporal data, randomly selecting some time steps for masking in the time dimension and randomly selecting some feature channels for masking in the feature dimension. A higher masking probability is applied to the channel containing the APP display interaction features than to other channels, generating a masked input sequence. The temporal encoder applies periodic positional encoding, including intraday time period encoding components and intraweekly date encoding components, to the masked input sequence. A multi-layer self-attention mechanism is used to perform context-related encoding on the unmasked time steps and feature channels, generating a continuous representation sequence. The reconstruction decoder reconstructs the masked time steps and feature channels, using the minimization of the mean square error between the reconstructed value and the original value at the masked position as the training objective.
[0017] Furthermore, the masking operation of the mask generator is implemented as follows: for each time step, a Bernoulli random variable is independently sampled to determine whether the time step is masked; for each feature channel, a Bernoulli random variable is independently sampled to determine whether the channel is masked; the masked position is replaced with a zero vector to replace the original feature value and then fed into the time encoder; the intraday time period encoding component of the periodic position encoding takes the hour of the day as input and uses a combination of sine and cosine functions to map the hour into a fixed-dimensional periodic vector; the intraweek date encoding component takes the day of the week as input and uses a combination of sine and cosine functions to map into a fixed-dimensional periodic vector; the two components are concatenated and added to the input feature vector as the input of the self-attention layer of the time encoder.
[0018] Furthermore, the causal decoupling dual-branch network includes a disease state change branch, a compliance behavior change branch, and an adversarial discriminator, wherein: the disease state change branch extracts behavioral features related to disease activity from the continuous representation sequence of the patient's behavioral state based on a symptomatological feature template for mental illnesses, maps them to disease activity scores through a temporally fully connected layer, and passes the intermediate feature representation to the adversarial discriminator; the compliance behavior change branch extracts features related to compliance behavior from the continuous representation sequence of the patient's behavioral state based on medication compliance-related behavioral indicators, maps them to compliance probability scores through a temporally fully connected layer, and passes the intermediate feature representation to the adversarial discriminator; the adversarial discriminator uses the... The intermediate feature representations output by the disease state change branch and the compliance behavior change branch are used as inputs. A binary classification task is performed to discriminate the source of the intermediate feature representations of the input. A gradient inversion layer is used to connect with the disease state change branch and the compliance behavior change branch. During forward propagation, the intermediate feature representations are transmitted normally, and during backward propagation, the gradients are inverted before transmission, constraining the two branches to generate intermediate feature representations that make it difficult for the adversarial discriminator to distinguish the source. The total loss function of the causal decoupled dual-branch network is a weighted combination of the supervision loss of the disease state change branch, the supervision loss of the compliance behavior change branch, and the discriminant loss of the adversarial discriminator, with the discriminant loss term of the adversarial discriminator participating in the combination with a negative sign.
[0019] Furthermore, the mental health crisis early warning network includes a multi-scale feature extraction module, a background risk modulation module, and a crisis scoring output module. Specifically: the multi-scale feature extraction module performs convolution operations on the high-frequency phenotypic mutation feature sequence using multiple parallel sets of one-dimensional temporal convolutional layers with different kernel widths. Each set of convolutional layers captures mutation patterns over different time spans. The outputs of each set of convolutions are concatenated along the feature dimension to generate a multi-scale mutation feature representation. A sensor availability mask is set at the input layer, and the impact of missing channels is compensated by normalizing the number of available channels after convolution calculation. The background risk modulation module calculates the adaptive circuit breaker threshold based on the disease activity score. The adaptive circuit breaker threshold is equal to the standard circuit breaker threshold minus the product of the threshold adjustment coefficient and the portion of the disease activity score that exceeds the median risk threshold. When the disease activity score does not exceed the median risk threshold, the adaptive circuit breaker threshold remains the standard circuit breaker threshold. Simultaneously, the disease activity score is linearly transformed to generate a modulation vector, which is then element-wise multiplied with the multi-scale mutation feature representation to generate a modulated feature representation. The crisis scoring output module takes the modulated feature representation as input, outputs a crisis urgency score through a fully connected layer, and outputs a crisis type probability distribution including self-injury risk, acute agitation risk, and consciousness impairment risk through an independent multi-class output head.
[0020] Furthermore, the condition for generating the crisis circuit breaker trigger signal is that the crisis urgency score for a consecutive preset number of time windows all exceeds their respective adaptive circuit breaker thresholds, where the preset number is a time duration constraint parameter for confirming the crisis trigger; the value of the threshold adjustment coefficient satisfies the constraint that it is not greater than the standard circuit breaker threshold, so as to ensure that the adaptive circuit breaker threshold is not lower than zero when the disease activity score reaches its maximum value.
[0021] Furthermore, freezing the pending execution nodes in the current post-diagnosis management path includes: traversing all pending execution nodes in the post-diagnosis management status record, marking the status of each pending execution node as frozen and awaiting recovery, and recording a snapshot of the execution progress of each node at the time of freezing. The execution progress snapshot includes the node's planned execution time, completed preconditions, and associated clinical parameters. The predecessor connection of the psychiatric crisis intervention bridging node is the most recently completed node in the current post-diagnosis management path, and the subsequent connection is to the entry node of the offline psychiatric emergency treatment path subgraph. The emergency treatment path sub-graph includes emergency triage nodes, mental status assessment nodes, acute phase treatment nodes, and crisis stabilization assessment nodes. The restoration of the post-treatment management path after crisis treatment includes: obtaining emergency treatment result data, re-evaluating each node in the frozen pending recovery state, restoring nodes that do not conflict with the emergency treatment results to the pending execution state and recalculating the planned execution time, marking nodes that conflict with the emergency treatment results as abandoned, and inserting corresponding new node segments for any new follow-up requirements added in the emergency treatment results into the hybrid post-treatment management state graph.
[0022] Furthermore, the matching of crisis intervention resources includes: obtaining the patient's current GPS location information based on the preliminary judgment of the crisis type; querying real-time resource status data of psychiatric emergency rooms or psychological crisis intervention centers within a preset range; calculating a comprehensive response time score for each candidate resource. The comprehensive response time score is the weighted sum of a normalized value of the arrival time estimated based on current traffic conditions, a resource matching gap metric, and a normalized value of the current load rate, weighted by a weighting coefficient. The resource matching gap metric is 1 minus the resource matching degree between the candidate resource and the crisis type. The resource matching degree is the ratio of the set of resource categories required by the crisis type to the available resources of the candidate resource. The ratio of the number of elements in the intersection of the resource category sets to the number of elements in the required resource category sets is used to select the candidate resource with the smallest comprehensive response time score as the optimal docking target. The generation method of the psychiatric crisis handover information package is as follows: traverse the longitudinal records of post-diagnosis management of patients, and filter and extract the current psychiatric diagnosis, current medication regimen, decoupled disease activity change trajectory and compliance change trajectory, drug allergy information and self-harm history records, high-frequency phenotypic mutation evidence data and crisis urgency score sequence within the trigger window based on the psychiatric emergency information requirement template corresponding to the crisis type. The data is then arranged in a structured manner according to the priority defined by the psychiatric emergency information requirement template.
[0023] This invention discloses an AI-based intelligent full-process diagnosis and treatment service management system for internet hospitals, comprising: a dual-granularity feature aggregation module, used to acquire multi-source digital phenotypic data streams passively collected from patients' smartphones after diagnosis, and to generate daily digital phenotypic feature vector time series and high-frequency phenotypic mutation feature sequences by daily aggregation and hourly sliding window calculation respectively; a time series representation learning module, used to fuse the daily digital phenotypic feature vector time series with the APP explicit interaction behavior event sequence, and to encode it using a time series representation learning model based on a mask autoencoder to generate a continuous representation sequence of patient behavior states; a causal decoupling module, used to input the continuous representation sequence of patient behavior states into a causal decoupling dual-branch network, and to separate and generate disease activity scores and compliance probability scores through adversarial training; and a crisis early warning module. The module is used to input the high-frequency phenotypic mutation feature sequence and the disease activity score into the mental health crisis early warning network, calculate the crisis urgency score, and generate a crisis circuit breaker trigger signal when the crisis urgency score exceeds the adaptive circuit breaker threshold determined based on the disease activity score; the path circuit breaker module is used to respond to the crisis circuit breaker trigger signal, freeze the pending link nodes in the current post-diagnosis management path, insert a psychiatric crisis intervention bridging node and connect it to the offline psychiatric emergency treatment path subgraph, and generate a hybrid post-diagnosis management status diagram after the circuit breaker; the resource docking and push module is used to match crisis intervention resources based on crisis type and patient location, generate a crisis intervention resource docking plan and a psychiatric crisis handover information package and push it to multiple receiving terminals, and restore the post-diagnosis management path after the crisis is handled.
[0024] This invention improves the temporal resolution of digital phenotypic data from daily to hourly levels through a dual-granularity aggregation strategy, solving the problem of insufficient temporal resolution in detecting acute mutations when relying solely on daily-granularity slow variables. It achieves the technical effect of covering acute crisis mutation features on a minute-to-hour timescale. By simulating data loss scenarios during the training phase using a time-series representation learning model based on a masked autoencoder, it addresses the vulnerability of analysis due to data loss caused by the sparsity of explicit interaction events during the APP's silent period. This achieves the technical effect of robustness to the loss of explicit interaction features during the inference phase and maintaining the continuity of behavioral state representation. Through adversarial training of a causal decoupling dual-branch network to constrain the feature separation of disease activity scores and compliance probability scores, it solves the problem of etiological confusion caused by the high coupling between disease deterioration and compliance decline. This achieves the technical effect of providing accurate disease background signals for subsequent crisis early warning networks and avoiding interference from coupled signals in threshold adjustment. By performing a circuit breaker operation on post-diagnosis management status records and dynamically inserting psychiatric crisis intervention bridging nodes, it solves the problem of daily-granularity digital phenotypic analysis lacking an emergency response channel. This achieves the technical effect of triggering emergency path switching and emergency resource docking when an acute crisis is detected outside of treatment periods. Attached Figure Description
[0025] Figure 1 This is a flowchart of the intelligent diagnosis and treatment service management method for the entire process of Internet hospitals based on artificial intelligence, provided in an embodiment of the present invention. Detailed Implementation
[0026] In the post-diagnosis management scenario of the psychiatric department of an internet hospital, after completing online treatment, patients enter a period of daily home management. The system passively collects multi-source digital phenotypic data via smartphones and performs daily-granular aggregation analysis for daily management and intervention strategy matching. However, the vast majority of acute crisis events (self-harm behavior, suicide attempts, acute psychotic episodes) for psychiatric patients occur outside of the treatment process in their daily lives, when they are not in the online treatment phase. Continuous monitoring of emergency states cannot operate due to the lack of real-time data streams. Although existing digital phenotypic analyses run continuously daily, their output disease activity scores are daily-granular slow variables with a time resolution of only days, lacking the ability to detect acute crisis mutations on a minute to hourly timescale. Furthermore, psychiatric patients often do not open the app for extended periods when their symptoms worsen, resulting in extremely sparse explicit interaction events. Analysis based on app behavior fails due to missing input sequences. Meanwhile, the behavioral manifestations of disease exacerbation and decreased adherence in psychiatric settings are highly coupled (e.g., both worsening depression and discontinuation of medication manifest as decreased activity and reduced social interaction). Without decoupling, it is impossible to accurately determine the cause of the crisis, leading to misjudgments due to interference from coupled signals on the crisis warning threshold. Daily-granular digital phenotypic analysis also lacks channels to trigger emergency pathway switching and pre-connection to emergency resources, resulting in four major difficulties in the rapid identification and emergency response to acute mental health crises outside of treatment periods: insufficient temporal resolution, fragile and missing data, confusion of etiological coupling, and lack of response channels.
[0027] At least one embodiment of the present invention discloses a method for managing the entire process of intelligent diagnosis and treatment services in an internet hospital based on artificial intelligence, such as... Figure 1 As shown, it includes the following steps: Step 1: Obtain multi-source digital phenotypic data streams, and calculate the daily granularity phenotypic feature vector time series and high-frequency phenotypic mutation feature sequence respectively according to the dual-granularity aggregation strategy; We continuously acquire multi-source digital phenotype data streams passively collected from the smartphones of patients after their visits to the Department of Psychiatry and Mental Health. We aggregate and calculate feature indicators for each data stream at the daily granularity to generate daily digital phenotype feature vector time series. At the same time, we calculate high-frequency phenotype change rate indicators for each data stream using an hourly sliding window to generate high-frequency phenotype mutation feature sequences.
[0028] Specifically, the multi-source digital phenotypic data stream includes the following data types: daily screen usage duration distribution, APP usage category distribution, call and SMS frequency, GPS movement trajectory radius and dwell point pattern, activity time series inferred from accelerometers, and sleep-wake rhythms inferred from light sensors.
[0029] Before feature calculation, data preprocessing is performed on each raw data stream: continuous numerical indicators such as daily average activity, social communication frequency, and nighttime abnormal activity frequency are standardized using Z-score to eliminate the dimensional differences between indicators from different sensor sources; categorized data such as APP usage category distribution are converted into numerical representation using one-hot encoding.
[0030] The characteristic metrics for daily granular aggregation calculation include average daily activity level, frequency of social communication, sleep regularity index, and activity range entropy. Let the... The eigenvector of day is ,in For the first Daily average activity level For the first Daily social communication frequency For the first Daily sleep regularity index For the first Entropy of the celestial range. Entropy of the celestial range. Calculated using the information entropy formula: in This represents the total number of stay areas determined on that day. For the first The ratio of the time spent in each designated area to the total time spent in that area on that day. The designated areas are determined by dividing the GPS trajectory for that day into spatial grids.
[0031] High-frequency phenotypic rate of change in hourly sliding window calculations include abrupt changes in activity levels, social communication abrupt cessation markers, GPS anomalous dwell times, and frequency of anomalous nighttime activity. The feature vectors of the sliding windows are The components are defined as follows: The rate of abrupt change in activity within this window relative to the previous window is calculated as follows: in For the first Average activity level within each window For the first Average activity level within each window To prevent division by zero of extremely small constants; The social communication abruptly stops flagged when the frequency of calls and text messages within the window drops below a preset proportion of the patient's individual baseline; otherwise, the value is 0. The result is the GPS abnormal stay detection result. When the patient stays in an unconventional location within the window for a period of time exceeding a preset time threshold, the value is 1; otherwise, it is 0. This refers to the frequency of abnormal nighttime activity, i.e., the number of activity events detected by the accelerometer during the nighttime period. The above... In and All are dimensionless activity mean values after Z-score standardization, with consistent dimensions in the numerator and denominator, allowing for direct division.
[0032] Furthermore, The "preset proportion of the patient's individual baseline" refers to using the average call and text message frequency during the same period in the patient's historical stable period as the individual baseline. When the call and text message frequency within the window is less than 50% of the individual baseline, The value is 1 otherwise; this ratio threshold is a configurable parameter that can be adjusted according to individual patient differences. "Unconventional locations" refer to locations that appear in the patient's historical GPS trajectory with a frequency lower than a preset frequency threshold. The "preset time threshold" is a configurable parameter, which is set to a continuous stay of more than 2 hours by default.
[0033] The window width and sliding step size of the aforementioned hourly sliding window are configurable parameters. One specific form is to set the window width to 2 hours and the sliding step size to 1 hour, meaning there is a 1-hour overlap between adjacent windows to achieve sufficient temporal resolution while maintaining computational efficiency. Another specific form is to set the window width to 1 hour and the sliding step size to 30 minutes, suitable for scenarios with higher temporal resolution requirements for crisis detection.
[0034] Step 2: Time-aligned fusion of daily digital phenotypic feature vector time series and APP explicit interactive behavior event sequence, and encoding of fused multi-source time series data using a mask autoencoder-based time series representation learning model to generate a continuous representation sequence of patient behavior status. The system acquires explicit interactive event sequences of patients' mobile apps. These sequences record the actions and timestamps performed by patients on the app, including logging in, browsing health content, completing questionnaires, and confirming medication use. These app-displayed interactive events are aggregated daily into daily interactive event features (distribution of interaction frequency, interaction type, and interaction time period). These features are then concatenated into the corresponding date's numerical phenotypic feature vector to generate fused multi-source time-series data. ,in For the first The fusion feature vector of the sky, This represents the total number of days currently observed.
[0035] The fused multi-source time series data The input is fed into a temporal representation learning model based on a mask autoencoder. This model is an unconventional algorithm, comprising three units: a mask generator, a temporal encoder, and a reconstruction decoder. The processing steps for each unit are as follows: (1) The mask generator performs a two-dimensional random masking operation on the fused multi-source time series data: it randomly selects some time steps for masking in the time dimension and randomly selects some feature channels for masking in the feature dimension. It applies a higher masking probability to the channel where the APP display interaction features are located than other channels, and generates the input sequence after masking. and the masked input sequence It is passed to the timing encoder.
[0036] Furthermore, the specific implementation of the masking operation is as follows: for each time step A Bernoulli random variable is independently sampled to determine whether a time step is masked. Similarly, a Bernoulli random variable is independently sampled for each feature channel to determine whether that channel is masked. The masked position is replaced with the original feature value by a zero vector and then fed into the time encoder. The Bernoulli sampling probability of the channel where the APP display interaction feature is located is higher than that of other channels to simulate the real scenario where a large area of such features is missing due to the patient's APP silence period.
[0037] (2) Input sequence after receiving mask by the timing encoder Before the self-attention layer, the masked input sequence is processed. Periodic positional encoding is applied, comprising two components: intraday time period encoding and intraweekly date encoding. This enables the time-series encoder to distinguish behavioral pattern differences between weekdays and weekends, and between daytime and nighttime. Subsequently, a multi-layer self-attention mechanism is used to perform context-related encoding on the unmasked time steps and feature channels in the sequence, generating a continuous representation sequence. and will represent the continuous sequence Passed to the reconstruction decoder.
[0038] Furthermore, the intraday time period encoding component of the periodic location encoding takes the hour of the day as input and uses a combination of sine and cosine functions to map the hour into a fixed-dimensional periodic vector, so that the encoding of adjacent time periods maintains continuity in the vector space; the intraweek date encoding component takes the day of the week as input and also uses a combination of sine and cosine functions to map into a fixed-dimensional periodic vector; the two components are concatenated and added to the input feature vector, which serves as the actual input to the self-attention layer of the temporal encoder.
[0039] (3) The reconstruction decoder receives a continuous representation sequence Reconstruction is performed on the masked time steps and feature channels to generate a reconstruction sequence. The reconstruction decoder consists of multiple fully connected layers to continuously represent sequences. As input, the output is a reconstructed sequence with the same dimensions as the original fused feature vector. The output layer does not apply an activation function and directly outputs the reconstructed values of each feature dimension.
[0040] The temporal representation learning model based on masked autoencoders employs a self-supervised training approach, with the training objective being to minimize the reconstruction loss at the masked positions. in The set of all masked positions. Indicates the first Heavenly The masked positions corresponding to each feature dimension This is the original value at that position. The reconstructed value at the corresponding position. Given the total number of masked positions, the Adam optimization algorithm is used to optimize the parameters of the temporal representation learning model based on the masked autoencoder.
[0041] After training and convergence, the sequential encoder outputs a continuous representation sequence. This is a continuous representation sequence of patient behavior. Because the mask generator simulates data loss during training (including time steps where all display interaction features are zero during the APP silence period), the temporal encoder is robust to data loss during the APP silence period during the inference phase and can maintain the continuity of representation based on passively collected digital phenotypic data that is not missing.
[0042] The temporal and feature-dimensional mask ratios of the aforementioned mask generator are both adjustable parameters. One specific approach is to set the temporal mask ratio to a random value between 30% and 50%, and the feature-dimensional mask ratio to a random value between 20% and 40%. Furthermore, an additional 20% mask probability is added to the channel containing the APP display interaction features, enhancing the adaptability of the mask autoencoder-based temporal representation learning model to situations with large-scale missing explicit interaction data. Another specific approach is to set the mask probability of the channel containing the APP display interaction features to a fixed value, while setting the mask probabilities of other feature channels to random values. This ensures adaptability to the APP's silent period while maintaining generalization ability to situations with missing other feature channels.
[0043] Step 3: Input the continuous representation sequence of the patient's behavioral state into the causal decoupling dual-branch network to separate and generate disease activity score and compliance probability score; Continuous representation sequence of patient behavioral state The input is fed into the causal decoupling dual-branch network. The causal decoupling dual-branch network is an unconventional algorithm, comprising three components: a disease state change branch, a compliance behavior change branch, and an adversarial discriminator. The processing steps for each unit are as follows: (1) The disease state change branch is represented by a continuous sequence of patient behavioral states. As input, behavioral features related to disease activity are extracted based on the symptomatology feature template of mental illness. The extracted features are then mapped to a sequence of disease activity scores through a temporal fully connected layer. The temporally fully connected layer takes the behavioral features of the current time step as input, performs a linear transformation, and then connects to a Sigmoid activation function to output... , indicating the first The disease activity score is calculated daily, and the intermediate feature representations before the temporally fully connected layer are passed to the adversarial discriminator. The above-mentioned symptomatological feature templates of mental illnesses encode typical numerical phenotypic patterns of various mental illnesses, including typical patterns of depressive episodes (a combined trend of persistently decreasing activity levels, reduced social frequency, disrupted sleep patterns, and abnormally increased screen time), typical patterns of manic episodes (abnormally increased activity levels, a sudden increase in social frequency, and a sudden decrease in sleep duration), and typical patterns of psychotic episodes (abnormal GPS trajectory wandering, abnormally increased nighttime activity frequency, and periodic breakdown of behavioral patterns).
[0044] Furthermore, the use of symptomatological feature templates for mental illnesses takes two specific forms. One form involves expressing each typical pattern as a combination of a set of feature dimensions' direction vectors and ranges of variation. Disease state change branches are then used to extract disease-related features by calculating a weighted aggregation of cosine similarity between the current behavioral representation and each symptomatological feature template. The other form involves encoding typical patterns into learnable attention query vectors and retrieving disease-state-related feature components from behavioral representations using a cross-attention mechanism.
[0045] (2) The compliance behavior change branch is represented by a sequence of patient behavioral states. As input, features related to medication adherence behavior are extracted based on medication adherence-related behavioral indicators. The extracted features are then mapped to a sequence of adherence probability scores through a temporal fully connected layer. The temporally fully connected layer takes the compliance behavior features of the current time step as input, performs a linear transformation, and then connects to a Sigmoid activation function to output... , indicating the first The daily adherence probability score is used, and the intermediate feature representation before the temporally fully connected layer is passed to the adversarial discriminator. The aforementioned medication adherence-related behavioral indicators include the regularity of mobile phone usage patterns around the medication time point, changes in behavior patterns after medication delivery confirmation, and the changing trends of APP interaction behavior before and after the follow-up visit date.
[0046] (3) The adversarial discriminator takes the intermediate feature representations output by the disease state change branch and the compliance behavior change branch as input and performs a binary classification task—determining which branch the input intermediate feature representation comes from, and outputting the discrimination probability through a fully connected layer connected to a Sigmoid activation function. The optimization objective of the adversarial discriminator is to maximize the discrimination accuracy, while the optimization objectives of the disease state change branch and the compliance behavior change branch, in addition to their respective main task losses, also include minimizing the discrimination accuracy of the adversarial discriminator. The discrimination results are backpropagated to the disease state change branch and the compliance behavior change branch to separate the constraint features. To improve the stability of adversarial training, the adversarial discriminator uses a gradient inversion layer connected to the disease state change branch and the compliance behavior change branch. During forward propagation, the intermediate feature representation is normally transmitted, and during backpropagation, the gradient is inverted and then transmitted to the disease state change branch and the compliance behavior change branch. This allows the disease state change branch and the compliance behavior change branch to complete the main task learning and adversarial constraints simultaneously in one optimization step, avoiding the convergence instability caused by alternating training.
[0047] The total loss function of the causal decoupling two-branch network is: in The supervised loss for the disease state change branch, The supervisory loss for the compliance behavior change branch, To counteract the discriminant's discrimination loss, The weighting coefficients are used to counteract the loss and balance the strength of the main task learning and feature decoupling constraints. and Both methods employ the binary cross-entropy loss function, using clinically labeled disease activity tags and compliance tags as supervisory signals. A binary cross-entropy loss function is used, with the source branch labels represented by intermediate features serving as the supervision signal. In the total loss function... The negative sign of the term reflects the adversarial objective of the disease state change branch and the compliance behavior change branch against the adversarial discriminator. Specifically, the gradient directions received by the disease state change branch and the compliance behavior change branch through the gradient inversion layer are opposite to the gradient directions that maximize the discrimination accuracy of the adversarial discriminator. This drives the disease state change branch and the compliance behavior change branch to generate intermediate feature representations that are difficult for the adversarial discriminator to distinguish, thus achieving feature decoupling. The disease state change branch, the compliance behavior change branch, and the adversarial discriminator are optimized using the Adam optimization algorithm to optimize their respective parameters. Through this adversarial training constraint, the disease state change branch and the compliance behavior change branch are forced to focus on different behavioral feature dimensions, generating decoupled disease activity scores and compliance probability scores.
[0048] Furthermore, Each loss term in the model applies to all time steps within the current observation window in the time dimension. to The progressive losses are averaged and then used in a weighted summation, where and The binary cross-entropy was calculated for all time steps with clinical labels, and the mean value was taken. The discrimination loss is averaged over all time steps, thus ensuring that the magnitude of the total loss function does not change with the observation window length. The system drifts due to changes in the loss term, ensuring that the relative weights of each loss term remain consistent across observation sequences of different lengths during training.
[0049] Step 4: Input the high-frequency phenotypic mutation feature sequence and disease activity score into the mental health crisis early warning network, calculate the crisis urgency score sequence, and generate a crisis circuit breaker trigger signal when the score exceeds the adaptive circuit breaker threshold; High-frequency phenotypic mutation feature sequences Disease activity score (The latest value of the day) is input into the mental health crisis early warning network. The mental health crisis early warning network is an unconventional algorithm based on a multi-scale temporal convolutional architecture, comprising three units: a multi-scale feature extraction module, a background risk modulation module, and a crisis scoring output module. The processing steps of each unit are as follows: (1) The multi-scale feature extraction module uses high-frequency phenotypic mutation feature sequences. As input, multiple parallel sets of one-dimensional temporal convolutional layers with different kernel widths are used to process high-frequency phenotypic mutation feature sequences. Convolutional operations are performed, with each group of convolutional layers capturing abrupt change patterns over different time spans (short-term windows capture minute-level sudden changes, medium-term windows capture hour-level sustained anomalies, and long-term windows capture cumulative trends across days). The outputs of each group of convolutions are concatenated along the feature dimension to generate a multi-scale abrupt change feature representation. And represent the multi-scale mutation features The data is then passed to the background risk modulation module. A sensor availability mask is added to the input layer to zero-padded feature channels corresponding to missing sensors. After convolution calculation, the impact of missing channels is compensated by normalizing the number of available channels, ensuring that the crisis urgency score does not experience a systematic shift due to the lack of partial sensor data.
[0050] Furthermore, the parallel convolution kernel width settings of multi-scale temporal convolution reflect the need to cover abrupt change patterns across different time spans: short-time convolution kernel widths correspond to 2 to 3 sliding window strides, used to capture minute-level abrupt changes occurring between adjacent windows; medium-time convolution kernel widths correspond to 4 to 6 sliding window strides, used to capture anomalous states lasting several hours; long-time convolution kernel widths correspond to 12 to 24 sliding window strides, used to capture cumulative trend changes spanning half a day to a day; the outputs of the three sets of convolution kernels are concatenated along the feature dimension to form a multi-scale abrupt change feature representation. This enables subsequent modules to simultaneously sense mutation signals at different time scales.
[0051] (2) The background risk modulation module receives the latest disease activity score for the day. and multi-scale mutation feature representation Based on disease activity score Calculate the adaptive circuit breaker threshold : in The standard circuit breaker threshold, This is the threshold adjustment coefficient. This represents the median risk cutoff value for disease activity. , , and All Dimensionless fractions within an interval, with all terms having the same dimension, can be directly added or subtracted; when Exceed hour Correspondingly lower, that is, lower the crisis trigger threshold during periods of high disease activity, when No more than hour Keep as .
[0052] Furthermore, to ensure the adaptive circuit breaker threshold In any The threshold adjustment coefficient remains within a meaningful range for all values. The value of should satisfy the constraints Thus ensuring exist The minimum value at that time is not lower than Avoid adaptive circuit breaker threshold A drop to zero or a negative value can cause the circuit breaker to be falsely triggered repeatedly.
[0053] Furthermore, the aforementioned adaptive circuit breaker threshold In The value is taken from the disease state change branch in step 3 at the ... The disease activity score output daily, of which Corresponding to the The calendar date of each sliding window, that is, for all sliding windows on the same day. The background risk modulation module uses the same Value calculation of adaptive circuit breaker threshold This value is refreshed after the daily granular disease activity score is updated, thus connecting the daily granular disease background risk assessment with the hourly high-frequency mutation detection in the time dimension.
[0054] At the same time, After linear transformation, a modulation vector is generated. Specifically, the modulation vector is converted into a scalar vector by a fully connected layer. Mapping to multi-scale mutation feature representation Vectors of the same dimension are then combined with multi-scale mutation feature representations. Element-wise multiplication is performed to generate a modulated feature representation, which is then passed to the crisis scoring output module.
[0055] (3) The crisis scoring output module takes the modulated feature representation as input, and outputs the crisis urgency score through a fully connected layer and a Sigmoid activation function. Simultaneously, a multi-class fully connected output header is connected to a Softmax activation function to output the crisis type probability distribution, including probability values for three types: self-harm risk, acute agitation risk, and loss of consciousness risk. After the crisis type probability distribution is output by the Softmax activation function, the type with the highest probability value is taken as the preliminary crisis type determination result, i.e., the final executable crisis type label.
[0056] The mental health crisis early warning network adopts a supervised training method, using labeled data of historical crisis events as training samples. It uses a binary cross-entropy loss function to train the crisis urgency score output, a multi-class cross-entropy loss function to train the crisis type probability distribution output, and the Adam optimization algorithm to optimize the parameters of the mental health crisis early warning network.
[0057] When continuous The crisis urgency score for each time window exceeded the adaptive circuit breaker threshold (i.e., When a mental health crisis occurs, a circuit breaker signal is generated, and the crisis type with the highest probability is output as the preliminary crisis type determination result. To confirm the time-duration constraint parameters for crisis triggering, one specific form is... This means that the circuit breaker will only be triggered if the crisis urgency score of three consecutive sliding windows exceeds the adaptive circuit breaker threshold, in order to avoid false triggering due to noisy data within a single window. Another specific form is to dynamically adjust based on the crisis type. Value: For self-harm risk type, Set to a smaller value to shorten response time; for the risk type of impaired consciousness, Set to a larger value to improve the reliability of the judgment.
[0058] Step 5: Respond to the crisis circuit breaker trigger signal, execute the circuit breaker operation on the patient's current post-diagnosis management path, and generate a hybrid post-diagnosis management status diagram after the circuit breaker is triggered; In response to the crisis circuit breaker trigger signal, the system retrieves the patient's current post-diagnosis management status record. It iterates through all pending execution nodes in the record (including regular follow-up nodes, medication reminder nodes, and psychological intervention task nodes), marking each node as frozen and awaiting recovery. A snapshot of each node's execution progress at the frozen moment is recorded (including the node's planned execution time, completed preconditions, and associated clinical parameters). A psychiatric crisis intervention bridging node is dynamically inserted at the current time node position in the post-diagnosis management status record. The predecessor of this psychiatric crisis intervention bridging node is the most recently completed node in the current post-diagnosis management path, and its successor is connected to the entry node of a predefined offline psychiatric emergency treatment path subgraph. The offline psychiatric emergency treatment path subgraph includes emergency triage nodes, mental status assessment nodes, acute phase treatment nodes, and crisis stabilization assessment nodes. The psychiatric crisis intervention bridging node and its associated offline psychiatric emergency treatment path subgraph, along with the original set of frozen nodes, are combined to form a hybrid post-diagnosis management status diagram after the circuit breaker and stored.
[0059] The aforementioned execution progress snapshot is a data structure that serializes and stores the complete status information of each frozen node at the time of freezing. One specific form is as follows: for medication reminder nodes, the execution progress snapshot includes the list of drugs in the current medication regimen, the number of days each drug has been taken, the next reminder time, and the history of dosage adjustments; for psychological intervention task nodes, the execution progress snapshot includes the current intervention plan type, the number of completed intervention steps, and the score of the most recent intervention effectiveness evaluation.
[0060] Step 6: Based on the preliminary assessment of the crisis type and the patient's GPS location information, query and match crisis intervention resources, and generate the optimal crisis intervention resource matching plan; Based on the preliminary judgment of the crisis type, the patient's current GPS location information is obtained, and real-time resource status data of psychiatric emergency departments or psychological crisis intervention centers within a preset range around the location is queried. The real-time resource status data includes the on-duty status of psychiatric emergency department doctors, the availability of restraint and protection equipment, the status of psychological crisis hotline operators, and the current waiting load.
[0061] For each candidate resource found Calculate the overall response time score : in Candidate arrival resources estimated based on current traffic conditions Time (normalized to) (interval) Candidate resources Resource matching degree with crisis type (calculated based on the degree of overlap between the resources required by the crisis type and the resources available from candidate resources, with a value range of...). ), Candidate resources Current load factor (normalized to) (interval) , , The weighting coefficients for each indicator satisfy the following conditions: . , and All were normalized to For intervals where all quantities have the same dimensions, weighted summation can be performed directly.
[0062] Furthermore, middle The item transforms resource matching degree into a matching gap metric, so that candidate resources with higher matching degrees correspond to... The smaller the quantity, the more... and The directions are consistent, that is The smaller the value, the better the overall response capability, thus ensuring the consistency of the direction of the three indicators when weighted and summed.
[0063] Furthermore, The calculation method is as follows: Based on the preliminary judgment of the crisis type, determine the set of resource categories required for that crisis type, and then compare this set of resource categories with the candidate resources. The intersection of the actual available resource categories is taken, and the ratio of the number of elements in the intersection to the number of elements in the required resource category set is used as the basis for the determination. The value of is used to quantify the coverage of candidate resources for the current crisis type.
[0064] Select the overall response time score The smallest candidate resource is selected as the optimal docking target, generating the optimal crisis intervention resource docking plan. The optimal crisis intervention resource docking plan includes the target organization name, navigation path, estimated arrival time, and corresponding resource matching information.
[0065] Step 7: Based on the crisis type and the psychiatric emergency information requirement template, extract and arrange key information from the patient's post-diagnosis management longitudinal records to generate a psychiatric crisis handover information package; By traversing the longitudinal records of post-diagnosis management of patients, and based on the psychiatric emergency information requirement template corresponding to the crisis type, the following key information was filtered and extracted: current psychiatric diagnosis, current medication regimen (name, dosage, and recent adjustment records of psychiatric drugs), and decoupled recent disease activity trajectory. and compliance change trajectory Known drug allergy information and self-harm history records, evidence data of high-frequency phenotypic mutations that triggered this crisis (original high-frequency phenotypic mutation characteristic values and corresponding timestamps within the trigger window), and crisis urgency score sequence. The system retrieves the ratings from several windows before the system is triggered. It then arranges the information according to the priority defined in the psychiatric emergency information requirements template (emergency treatment information takes precedence over background reference information) in a structured manner to generate a psychiatric crisis handover information package.
[0066] The aforementioned psychiatric emergency information requirements template is a predefined set of structured information fields categorized by crisis type. Specifically, for the self-harm risk type, the template prioritizes self-harm history records and information on currently administered sedative medications; for the acute agitation risk type, it prioritizes the current antipsychotic medication dosage and recent dosage adjustment records; and for the consciousness impairment risk type, it prioritizes a list of all current medications and recent laboratory test results.
[0067] Step 8: Simultaneously push the crisis intervention resource docking plan and the psychiatric crisis handover information package to multiple receiving terminals, and restore the post-treatment management path based on the emergency treatment results after the crisis is handled, and output the restored post-treatment management path and the complete crisis event log; The optimal crisis intervention resource matching plan and the psychiatric crisis handover information package are simultaneously pushed to three types of receiving terminals: pushed to the patient's emergency contact terminal, displaying the navigation route to the nearest psychiatric emergency room and emergency treatment instructions; pushed to the target psychiatric emergency room terminal, performing operations including pre-creating a crisis reception work order and pre-filling the information from the psychiatric crisis handover information package into the corresponding fields of the work order; and pushed to the attending psychiatrist terminal, displaying the crisis warning notification and the preliminary judgment result of the crisis type.
[0068] After crisis management is completed, emergency treatment outcome data from the target psychiatric emergency department is obtained. Based on this data, the nodes in the frozen, pending recovery state of the hybrid post-treatment management status diagram are reassessed: for nodes that do not conflict with the emergency treatment outcome, they are restored to the pending execution state, and the planned execution time is recalculated based on the frozen duration; for nodes that conflict with the emergency treatment outcome (e.g., medication regimens have been adjusted in the emergency department), they are marked as abandoned; for new follow-up requirements added in the emergency treatment outcome (e.g., new follow-up plans or medication monitoring requirements), corresponding new nodes are inserted into the hybrid post-treatment management status diagram. The recovered post-treatment management path is then output.
[0069] At the same time, the trigger time of this crisis event, the crisis type determination result, the crisis urgency score sequence, the circuit breaker operation record, the resource docking result and the emergency treatment result are summarized and arranged to generate a complete crisis event log and store it in the patient post-diagnosis management longitudinal record.
[0070] To continuously improve the individualized accuracy of crisis detection, the disease activity and compliance change trajectories within a certain period before and after this crisis event were used as new labeled samples to incrementally update and train the parameters of the disease state change branch and compliance behavior change branch in the causal decoupling dual-branch network. At the same time, the high-frequency phenotypic mutation feature pattern that triggered this crisis was incorporated into the patient's individualized crisis pattern feature baseline to adjust the background sensitivity of the mental health crisis early warning network for this patient in subsequent monitoring.
[0071] This implementation improves the temporal resolution of digital phenotypic data from the daily to the hourly level by superimposing the high-frequency phenotypic change rate index of the hourly sliding window on the basis of daily granular digital phenotypic feature aggregation. This enables digital phenotypic analysis to cover the mutation characteristics of acute crisis events on the time scale of minutes to hours, and overcomes the problem that relying solely on daily granular slow variables cannot detect the insufficient temporal resolution of acute mutations.
[0072] This implementation uses a temporal representation learning model based on a masked autoencoder. During the training phase, it randomly masks a portion of the time steps and feature dimensions and learns to reconstruct them. This enables the temporal encoder to learn the ability to complete the representation using contextual information under conditions of partial input loss. During the inference phase, when patients are in an APP silence period, resulting in the loss of explicit interaction features, the temporal encoder can still output continuous behavioral state representations based on continuously available passively collected digital phenotypic data. This overcomes the data loss vulnerability problem caused by the sparsity of explicit interaction events due to the APP silence period of psychiatric patients, which leads to analysis failure.
[0073] This implementation method uses adversarial training of a causal decoupled dual-branch network to constrain the disease state change branch and the compliance behavior change branch to focus on different behavioral feature dimensions. This ensures that the output disease activity score reflects a pure disease state change signal rather than a coupled signal of disease deterioration and decreased compliance. Subsequently, the background risk modulation of the mental health crisis early warning network is based on accurate disease activity estimation to adjust the threshold, avoiding threshold misadjustment and crisis misjudgment caused by coupled signals. This overcomes the problem of etiological confusion caused by the high coupling between disease deterioration and decreased compliance behavior in the mental health setting.
[0074] This implementation introduces disease activity scores into the background risk modulation module of the mental health crisis early warning network. When the disease activity is in the high-risk range, the circuit breaker threshold is automatically lowered, and the standard threshold is maintained in the low-risk range. This allows the crisis trigger sensitivity to be dynamically adjusted with the disease activity, overcoming the problem of missed reports during high-activity periods caused by the mismatch of sensitivity between fixed thresholds and different disease activity periods.
[0075] This implementation method extends the response channel for path circuit breaking and emergency resource pre-connection from the online diagnosis and treatment stage to the post-diagnosis daily management period by performing a circuit breaker operation on the post-diagnosis management status record, dynamically inserting a psychiatric crisis intervention bridging node and connecting it to the offline psychiatric emergency treatment path subgraph. This enables acute mental health crises detected during non-diagnosis and treatment periods to trigger emergency path switching and emergency resource connection, overcoming the problem of missing response channels caused by the lack of emergency response channels in daily granular digital phenotypic analysis.
[0076] The embodiments of the present invention have been described above. However, the embodiments are not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make more equivalent embodiments under the guidance of the present embodiments, and all of them are within the protection scope of the present embodiments.
Claims
1. A method for managing the entire intelligent diagnosis and treatment service process of an internet hospital based on artificial intelligence, characterized in that: Includes the following steps: The multi-source digital phenotypic data stream passively collected from patients' smartphones after diagnosis was acquired, and the data was aggregated at the daily granularity and calculated at the hourly sliding window to generate daily digital phenotypic feature vector time series and high-frequency phenotypic mutation feature sequence. The daily digital phenotypic feature vector time series is fused with the APP explicit interactive behavior event sequence, and input into the time series representation learning model based on mask autoencoder for encoding to generate a continuous representation sequence of patient behavior status. The continuous representation sequence of the patient's behavioral state is input into a causal decoupled dual-branch network, and disease activity score and compliance probability score are generated through adversarial training. The high-frequency phenotypic mutation feature sequence and disease activity score are input into the mental health crisis early warning network to calculate the crisis urgency score. When the crisis urgency score exceeds the adaptive circuit breaker threshold determined based on the disease activity score, a crisis circuit breaker trigger signal is generated. In response to the crisis circuit breaker trigger signal, the pending link nodes in the current post-diagnosis management path are frozen, a psychiatric crisis intervention bridging node is inserted and connected to the offline psychiatric emergency treatment path subgraph, and a hybrid post-diagnosis management status diagram after the circuit breaker is generated. Based on the crisis type and patient location, crisis intervention resources are matched, a crisis intervention resource docking plan and a psychiatric crisis handover information package are generated and pushed to multiple receiving terminals, and the post-diagnosis management path is restored after the crisis is handled.
2. The method for managing the entire process of intelligent diagnosis and treatment services in an internet hospital based on artificial intelligence according to claim 1, characterized in that, The daily feature vectors in the daily digital phenotypic feature vector time series include daily average activity level, social communication frequency, sleep regularity index and activity range entropy. The activity range entropy is calculated according to the information entropy formula, and the probability value is the ratio of the dwell time in each dwell area obtained by dividing the GPS trajectory into spatial grids on the day to the total dwell time on the day. The feature vector of each sliding window in the high-frequency phenotypic mutation feature sequence includes the activity level variability rate, social communication abrupt stop marker, GPS abnormal dwell time detection result, and nighttime abnormal activity frequency. The activity level variability rate is the ratio obtained by dividing the difference between the mean activity level in the current window and the mean activity level in the previous window by the sum of the absolute value of the mean activity level in the previous window and a minimum constant. The social communication abrupt stop marker is set to 1 when the frequency of calls and text messages in the window drops below a preset proportion of the patient's individual baseline, and 0 otherwise. The GPS abnormal dwell time detection result is set to 1 when the patient's dwell time in unconventional locations in the window exceeds a preset time threshold, and 0 otherwise.
3. The method for managing the entire process of intelligent diagnosis and treatment services in an internet hospital based on artificial intelligence as described in claim 1, characterized in that, The temporal representation learning model based on mask autoencoder includes a mask generator, a temporal encoder, and a reconstruction decoder, wherein: The mask generator performs a two-dimensional random masking operation on the fused multi-source time series data. It randomly selects some time steps for masking in the time dimension and randomly selects some feature channels for masking in the feature dimension. It applies a higher masking probability to the channel where the APP display interaction features are located than to other channels, and generates the masked input sequence. The time encoder applies periodic positional encoding, which includes intraday time period encoding components and intraweek date encoding components, to the masked input sequence. It then performs context-related encoding on the unmasked time steps and feature channels through a multi-layer self-attention mechanism to generate a continuous representation sequence. The reconstruction decoder performs reconstruction on the masked time step and feature channel, with the training objective being to minimize the mean square error between the reconstructed value and the original value at the masked location.
4. The method for managing the entire process of intelligent diagnosis and treatment services in an internet hospital based on artificial intelligence according to claim 3, characterized in that, The masking operation of the mask generator is implemented as follows: for each time step, a Bernoulli random variable is independently sampled to determine whether the time step is masked; for each feature channel, a Bernoulli random variable is independently sampled to determine whether the channel is masked; the masked position is replaced with the original feature value by the zero vector and then passed to the timing encoder. The intraday time period encoding component of the periodic location encoding takes the hour of the day as input and uses a combination of sine and cosine functions to map the hour into a fixed-dimensional periodic vector. The intraweek date encoding component takes the day of the week as input and uses a combination of sine and cosine functions to map into a fixed-dimensional periodic vector. The two components are concatenated and added to the input feature vector as the input of the self-attention layer of the temporal encoder.
5. The method for managing the entire process of intelligent diagnosis and treatment services in an internet hospital based on artificial intelligence according to claim 1, characterized in that, The causal decoupling dual-branch network includes a disease state change branch, a compliance behavior change branch, and an adversarial discriminator, wherein: The disease state change branch extracts behavioral features related to disease activity from the continuous representation sequence of the patient's behavioral state based on the symptomatology feature template of mental illness, maps them to disease activity scores through a temporal fully connected layer, and passes the intermediate feature representation to the adversarial discriminator. The compliance behavior change branch extracts features related to compliance behavior from the continuous representation sequence of the patient's behavioral state based on medication compliance-related behavioral indicators, maps them to compliance probability scores through a temporal fully connected layer, and passes the intermediate feature representation to the adversarial discriminator. The adversarial discriminator takes the intermediate feature representations output by the disease state change branch and the compliance behavior change branch as input, performs a binary classification task to discriminate the source branch of the intermediate feature representation of the input, and uses a gradient inversion layer connected to the disease state change branch and the compliance behavior change branch. During forward propagation, the intermediate feature representation is normally transmitted, and during backward propagation, the gradient is inverted and then transmitted, constraining the two branches to generate intermediate feature representations that make it difficult for the adversarial discriminator to distinguish the source. The total loss function of the causal decoupled dual-branch network is a weighted combination of the supervision loss of the disease state change branch, the supervision loss of the compliance behavior change branch, and the discriminant loss of the adversarial discriminator, with the discriminant loss term of the adversarial discriminator participating in the combination with a negative sign.
6. The method for managing the entire process of intelligent diagnosis and treatment services in an internet hospital based on artificial intelligence according to claim 1, characterized in that, The mental health crisis early warning network includes a multi-scale feature extraction module, a background risk modulation module, and a crisis scoring output module, wherein: The multi-scale feature extraction module performs convolution operations on the high-frequency phenotypic mutation feature sequence through multiple sets of one-dimensional temporal convolutional layers with different kernel widths in parallel. Each set of convolutional layers captures mutation patterns over different time spans. The outputs of each set of convolutions are concatenated along the feature dimension to generate a multi-scale mutation feature representation. A sensor availability mask is set in the input layer, and the influence of missing channels is compensated by normalizing the number of available channels after convolution calculation. The background risk modulation module calculates the adaptive circuit breaker threshold based on the disease activity score. The adaptive circuit breaker threshold is equal to the standard circuit breaker threshold minus the product of the threshold adjustment coefficient and the portion of the disease activity score that exceeds the median risk threshold. When the disease activity score does not exceed the median risk threshold, the adaptive circuit breaker threshold remains the standard circuit breaker threshold. At the same time, the disease activity score is linearly transformed to generate a modulation vector, which is then element-wise multiplied with the multi-scale mutation feature representation to generate the modulated feature representation. The crisis scoring output module takes the modulated feature representation as input, outputs a crisis urgency score through a fully connected layer, and outputs a probability distribution of crisis types, including self-harm risk, acute agitation risk, and consciousness impairment risk, through an independent multi-classification output head.
7. The method for managing the entire process of intelligent diagnosis and treatment services in an internet hospital based on artificial intelligence according to claim 6, characterized in that, The condition for generating the crisis circuit breaker trigger signal is that the crisis urgency score of a consecutive preset number of time windows exceeds their respective adaptive circuit breaker thresholds, and the preset number is the time duration constraint parameter for confirming the crisis trigger. The value of the threshold adjustment coefficient satisfies the constraint that it is not greater than the standard circuit breaker threshold, so as to ensure that the adaptive circuit breaker threshold is not lower than zero when the disease activity score reaches its maximum value.
8. The method for managing the entire process of intelligent diagnosis and treatment services in an internet hospital based on artificial intelligence according to claim 1, characterized in that, The freezing of pending execution nodes in the current post-diagnosis management path includes: traversing all pending execution nodes in the post-diagnosis management status record, marking the status of each pending execution node as frozen and awaiting recovery, and recording a snapshot of the execution progress of each node at the time of freezing. The execution progress snapshot includes the node's planned execution time, completed preconditions, and associated clinical parameters. The preceding connection of the psychiatric crisis intervention bridging node is the most recently completed link node in the current post-diagnosis management path, and the subsequent connection is to the entry node of the offline psychiatric emergency treatment path subgraph, which includes an emergency triage node, a mental status assessment node, an acute phase treatment node, and a crisis stabilization assessment node. The post-treatment management path restoration after crisis management includes: acquiring emergency treatment result data, re-evaluating each node in the frozen pending recovery state, restoring nodes that do not conflict with the emergency treatment results to the pending execution state and recalculating the planned execution time, marking nodes that conflict with the emergency treatment results as abandoned, and inserting corresponding new node into the hybrid post-treatment management state diagram for any new subsequent requirements added in the emergency treatment results.
9. The method for managing the entire process of intelligent diagnosis and treatment services in an internet hospital based on artificial intelligence according to claim 1, characterized in that, The matching of crisis intervention resources includes: obtaining the patient's current GPS location information based on the preliminary judgment of the crisis type; querying the real-time resource status data of psychiatric emergency rooms or psychological crisis intervention centers within a preset range; calculating a comprehensive response time score for each candidate resource; the comprehensive response time score is the result of a weighted sum of the normalized value of the arrival time estimated based on the current traffic conditions, the resource matching gap metric, and the normalized value of the current load rate, weighted by a weight coefficient; the resource matching gap metric is the value obtained by subtracting the resource matching degree between the candidate resource and the crisis type from 1; the resource matching degree is the ratio of the number of intersection elements between the set of resource categories required by the crisis type and the set of resource categories that the candidate resource can provide to the number of elements in the set of required resource categories; and selecting the candidate resource with the smallest comprehensive response time score as the optimal docking target. The method for generating the psychiatric crisis handover information package is as follows: traverse the patient's post-diagnosis management longitudinal records, filter and extract the current psychiatric diagnosis, current medication regimen, decoupled disease activity change trajectory and compliance change trajectory, drug allergy information and self-harm history records, high-frequency phenotypic mutation evidence data and crisis urgency score sequence within the trigger window based on the psychiatric emergency information requirement template corresponding to the crisis type, and arrange them in a structured manner according to the priority defined by the psychiatric emergency information requirement template.
10. An AI-based intelligent diagnosis and treatment service management system for the entire process of an internet hospital, used to execute the AI-based intelligent diagnosis and treatment service management method for the entire process of an internet hospital as described in any one of claims 1 to 9, characterized in that, include: The dual-granularity feature aggregation module is used to acquire multi-source digital phenotypic data streams passively collected from patients' smartphones after diagnosis, and to generate daily digital phenotypic feature vector time series and high-frequency phenotypic mutation feature sequences by daily aggregation and hourly sliding window calculation respectively. The temporal representation learning module is used to fuse the daily digital phenotypic feature vector temporal sequence with the APP explicit interactive behavior event sequence, and encode it using a mask-based autoencoder-based temporal representation learning model to generate a continuous representation sequence of patient behavior status. The causal decoupling module is used to input the continuous representation sequence of the patient's behavioral state into the causal decoupling dual-branch network, and generate disease activity score and compliance probability score through adversarial training. The crisis early warning module is used to input the high-frequency phenotypic mutation feature sequence and the disease activity score into the mental health crisis early warning network, calculate the crisis urgency score, and generate a crisis circuit breaker trigger signal when the crisis urgency score exceeds the adaptive circuit breaker threshold determined based on the disease activity score. The path circuit breaker module is used to respond to the crisis circuit breaker trigger signal, freeze the link nodes to be executed in the current post-diagnosis management path, insert the psychiatric crisis intervention bridging node and connect it to the offline psychiatric emergency treatment path subgraph, and generate a hybrid post-diagnosis management status diagram after the circuit breaker is triggered. The resource matching and push module is used to match crisis intervention resources based on crisis type and patient location, generate crisis intervention resource matching plans and psychiatric crisis handover information packages and push them to multiple receiving terminals, and restore the post-diagnosis management path after the crisis is handled.