Anesthesia depth accurate prediction system and method based on time sequence alignment

By using a time-alignment-based approach, combined with multi-source heterogeneous data and a dual-head temporal deep learning model, the problems of drug efficacy lag and data integration in anesthesia depth prediction were solved, enabling accurate prediction of anesthesia depth and personalized dosing recommendations, and improving clinical risk identification and early warning capabilities.

CN121483484AInactive Publication Date: 2026-02-06BEIJING HEXING CHUANGLIAN HEALTH TECH CO LTD

Patent Information

Application Number
CN202610032289.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-12
Publication Date
2026-02-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing anesthesia depth prediction models fail to adequately consider the pharmacodynamic lag between drug administration and the production of brain effects, resulting in monitoring lag and prediction delays. They also lack effective integration of multi-source heterogeneous data, making it difficult to provide individualized dosing recommendations. Furthermore, existing systems lack real-time risk warnings and recommendations on the timing of drug intervention.

Method used

A time-alignment-based approach is adopted to construct a cross-modal joint time-series feature data matrix by collecting multi-source heterogeneous data and performing unified encoding preprocessing. A dual-head time-series deep learning model is used to predict anesthesia depth, and logical auditing and dynamic safety constraint optimizers are introduced to generate personalized dosing recommendations.

Benefits of technology

It enables accurate prediction of anesthesia depth, improves the sensitivity of clinical risk identification and abnormal situation warning, provides individualized dosing regimens, meets clinical safety standards, and enhances the foresight and real-time nature of prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121483484A_ABST
    Figure CN121483484A_ABST
Patent Text Reader

Abstract

The invention discloses an anesthesia depth accurate prediction system and method based on time sequence alignment. The method comprises the steps that a cross-modal joint time sequence characteristic data matrix is acquired and generated; outputting a time sequence alignment feature sample; outputting a future advanced prediction label set; obtaining a first-stage anesthesia depth prediction model; in the first anesthesia depth prediction model training stage, a logic auditing link is introduced, and a self-adaptive online updating model is formed; starting an anti-fact dose simulation module, and outputting a candidate anti-fact administration scheme set; and inputting the candidate anti-factual administration scheme set into a dynamic security constraint optimizer, rejecting non-compliant schemes by the dynamic security constraint optimizer according to single maximum dose limitation, single additional dose and administration times in a minimum administration interval, and outputting an optimal administration suggestion. According to the method, combined classification judgment is carried out on the anesthesia state grade and the change trend of each prediction step, and the sensitivity of clinical risk identification and abnormal situation early warning is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of anesthesia, in particular to a precise anesthesia depth prediction system and method based on time sequence alignment. BACKGROUND

[0002] With the rapid development of medical artificial intelligence and multi-modal data analysis technology, anesthesia depth monitoring and intelligent auxiliary decision-making have become an important research direction in modern surgical anesthesia management. The anesthesia depth monitoring indicators commonly used in clinical practice, such as bispectral index (BIS), are widely used to dynamically evaluate the anesthesia state of patients during surgery to assist anesthesiologists in drug adjustment and risk warning.

[0003] Most existing anesthesia depth prediction models use a reactive method, i.e., monitoring and alarming only based on the vital signs and BIS values at the current time point. This method fails to fully consider the several minutes of drug lag between drug administration and brain effect, resulting in a lag between the changes in BIS values on the monitor and the real physiological response of the patient, and problems such as prediction delay and causal misplacement. Traditional AI models often directly model the current time's vital signs and BIS values, ignoring the dynamic timing of drug action and the nonlinear relationship between drug effect and response, making it difficult to predict the results in advance and easily causing patient movement or awareness risks.

[0004] Existing intelligent auxiliary systems are mostly based on single modal signals, lacking joint modeling of electronic medical records, dynamic vital signs, and multi-source heterogeneous data of anesthesia intervention events. The misalignment of different types and frequencies of clinical data on the time axis further increases the difficulty of data fusion and effective utilization, making it difficult for existing systems to achieve efficient information integration and comprehensive situation awareness.

[0005] Current anesthesia auxiliary decision-making systems generally lack executable drug administration recommendations for actual clinical applications. Most AI systems can only provide alarm prompts for anesthesia depth abnormalities, but lack individualized and clinically safe drug dosage and intervention timing recommendations for specific patients at specific time points. Traditional drug administration recommendations are mostly experience-driven or based on static rules, failing to dynamically simulate the BIS response path under drug dosage changes, and also failing to integrate single dose, cumulative dose, and drug interval clinical safety constraints into the optimization decision. SUMMARY

[0006] One object of the present application is to provide a precise anesthesia depth prediction system and method based on time sequence alignment. The present application jointly classifies and judges the anesthesia state level and change trend of each prediction step, effectively improving the sensitivity of clinical risk identification and abnormal situation warning.

[0007] According to an embodiment of the present application, a kind of anesthesia depth precision prediction method based on timing alignment includes:

[0008] Collecting multi-source heterogeneous surgical process data and performing uniform coding preprocessing, generate cross-modal joint timing feature data matrix;

[0009] Nonlinear time axis mapping is carried out on the cross-modal joint timing feature data matrix, and timing alignment feature sample is output;

[0010] BIS pre-judgment label sliding window is constructed based on timing alignment feature sample, BIS pre-judgment label sliding window slides along time axis according to set window length, and future lead prediction label set is output;

[0011] Timing alignment feature sample is used as input, and future lead prediction label set is used as supervision signal, double-head timing deep learning model is established, double-head timing deep learning model simultaneously outputs future BIS regression result and anesthesia depth classification result, and first stage anesthesia depth prediction model is obtained;

[0012] In the training stage of first stage anesthesia depth prediction model, a logical audit link is introduced, so that BIS regression output head and anesthesia depth classification output head reach consensus in medical logic, and form adaptive online updating model;

[0013] Real-time anesthesia depth prediction result is generated by calling adaptive online updating model, when real-time anesthesia depth prediction result indicates that BIS trend will deviate from target interval, start counterfactual dose simulation module, and output candidate counterfactual dosing scheme set;

[0014] Candidate counterfactual dosing scheme set is input into dynamic safety constraint optimizer, dynamic safety constraint optimizer removes non-compliant scheme according to single maximum dose limit, single additional dose and number of doses within minimum dosing interval, and searches target dosing scheme in feasible solution space, which can make BIS value return to target interval and minimize intervention dose, and outputs optimal dosing suggestion.

[0015] Optionally, the collecting multi-source heterogeneous surgical process data and performing uniform coding preprocessing includes:

[0016] Collecting multi-source heterogeneous surgical process data including patient static feature data, dynamic vital sign timing data and anesthesia intervention event data;

[0017] Vector embedding coding operation is carried out on patient static feature data, and the static embedding feature of patient is obtained;

[0018] Abnormal value elimination processing is carried out on dynamic vital sign timing data, and intermediate cleaned dynamic vital sign timing data is formed;

[0019] The missing value interpolation processing is performed on the dynamic vital sign time series data after the intermediate cleaning, and a dynamic vital sign time series matrix is obtained.

[0020] The dynamic vital sign time series matrix is normalized to obtain a normalized dynamic vital sign time series feature.

[0021] According to the unique identification information of each patient and the time stamp of each time point, the static embedding feature, the normalized dynamic vital sign time series feature and the anesthesia intervention event data are aligned and fused according to the time sequence, and a cross-modal joint time series feature data matrix is obtained after alignment and fusion.

[0022] Optionally, the non-linear time axis mapping of the cross-modal joint time series feature data matrix comprises:

[0023] The cross-modal joint time series feature data matrix is represented as a cross-modal joint time series feature vector of the i th patient at the time point t.

[0024] The anesthesia intervention event data is extracted from the cross-modal joint time series feature vector of the i th patient at each time point, and an anesthesia intervention event sequence is constructed.

[0025] The dynamic vital sign time series data is extracted from the cross-modal joint time series feature vector of the i th patient at each time point, and a dynamic vital sign response sequence is constructed.

[0026] Based on the anesthesia intervention event sequence and the dynamic vital sign response sequence, a dynamic time warping distance matrix is constructed.

[0027] Based on the dynamic time warping distance matrix, the minimum cumulative distance path of dynamic time warping is solved.

[0028] According to the minimum cumulative distance path, a non-linear time axis mapping function is constructed.

[0029] Based on the non-linear time axis mapping function, the cross-modal joint time series feature data matrix of the i th patient is elastically registered to obtain a time series alignment cross-modal joint matrix.

[0030] Based on the time series alignment cross-modal joint matrix, a time series alignment feature sample is constructed.

[0031] Optionally, the BIS pre-judgment label sliding window is constructed based on the time series alignment feature sample, comprising:

[0032] An event weighting factor based on time decay attention mechanism is introduced for each anesthesia intervention event feature component in the time series alignment feature sample, the static embedding feature component, the normalized dynamic vital sign time series feature component and the weighted anesthesia intervention event feature component are spliced to form a corrected time series alignment cross-modal feature vector.

[0033] Taking the current predicted reference time point as the starting point of the BIS pre-judgment label sliding window, a BIS pre-judgment label sliding window is constructed according to the fluctuation rate of the dynamic vital sign time series feature component of the patient within a preset time period before the predicted reference time point;

[0034] In each BIS pre-judgment label sliding window, the BIS value of all time points within the BIS pre-judgment label sliding window is extracted from the original dynamic vital sign time series, and the baseline BIS value in the patient static feature is combined as a reference baseline to generate an anesthesia depth level label for each time point, and form a multi-step target label set composed of BIS values, anesthesia depth level labels and BIS trend direction labels;

[0035] For each observation time point of each patient, the modified time series alignment cross-modal feature vector, the multi-step target label set and the BIS pre-judgment label sliding window length are combined into a set of sliding window samples, all sliding window samples are arranged in time sequence to form a sliding window sample set of the patient, and all sliding window sample sets of all patients are combined to form a future advanced prediction label set.

[0036] Optionally, the anesthesia depth level label rule comprises:

[0037] When the BIS value of the corresponding time point is higher than the baseline BIS value plus the upper offset threshold, it is marked as too light anesthesia;

[0038] When the BIS value is between the baseline BIS value minus the lower offset threshold and the baseline BIS value plus the upper offset threshold, it is marked as moderate anesthesia;

[0039] When the BIS value is lower than the baseline BIS value minus the lower offset threshold, it is marked as too deep anesthesia;

[0040] The BIS trend direction label rule comprises:

[0041] Comparing the BIS values of two consecutive time points in the BIS pre-judgment label sliding window, if the BIS value of the latter time point is higher than that of the former time point, the trend label is an upward trend;

[0042] If the BIS value of the latter time point is lower than that of the former time point, the trend label is a downward trend;

[0043] If the BIS value of the latter time point is equal to that of the former time point, the trend label is a flat trend.

[0044] Optionally, the double-head time series deep learning model comprises:

[0045] A double-head time series deep learning model is established, which includes a shared time series encoder and a BIS regression output head, an anesthesia depth classification output head and a trend prediction output head connected with the shared time series encoder. The modified time series alignment cross-modal feature vectors at all time points in each group of input sliding windows are sequentially grouped into an input feature sequence and input into the encoder structure, and the time series hidden representation corresponding to the current prediction reference time point is output.

[0046] The BIS regression output head adopts a time series decoding structure with variable length sequence output, takes the time series hidden representation and the corresponding prediction time step number as input, and outputs a future multi-step BIS regression prediction sequence.

[0047] The anesthesia depth classification output head and the trend prediction output head are respectively constructed based on the time series hidden representation. For each prediction time step, an independent Transformer substructure is used to output the corresponding anesthesia depth classification probability vector and trend direction prediction probability vector.

[0048] The double-head time series deep learning model is jointly supervised and trained based on a future lead prediction label set. The training target is to jointly minimize the BIS regression loss function, the anesthesia depth classification loss function and the trend prediction loss function, and to perform weighted summation to form a joint loss function.

[0049] After completing the joint training and making the joint loss function converge, the obtained double-head time series deep learning model is used as the first-stage anesthesia depth prediction model.

[0050] Optionally, in the first-stage anesthesia depth prediction model training stage, a logical audit link is introduced, which includes:

[0051] In the first-stage anesthesia depth prediction model training stage, a logical audit link is introduced. The logical audit link compares the results generated by the BIS regression output head with the results generated by the anesthesia depth classification output head in real time.

[0052] The system presets an alignment rule based on clinical medical knowledge. The logical audit link checks whether the BIS regression output head and the anesthesia depth classification output head have logical deviation. If the BIS prediction value given by the BIS regression output head is higher than the safety threshold, it implies that the anesthesia is too shallow, while the anesthesia depth classification output head determines that the anesthesia is too deep, and the system determines that a logical conflict occurs.

[0053] When a logical conflict is detected, a logical consistency penalty term is triggered in the joint loss function. The logical consistency penalty generates error feedback, forcing the first-stage anesthesia depth prediction model to re-examine the feature extraction logic until the BIS regression output head and the anesthesia depth classification output head reach a consensus in medical logic, forming an adaptive online update model.

[0054] Optionally, the starting counterfactual dose simulation module outputs a candidate counterfactual dosing scheme set, comprising:

[0055] The modified time sequence alignment cross-modal feature vector sequence at the current prediction reference time point is inferred by calling the adaptive online updating model to obtain the future multi-step BIS regression prediction value sequence, the future multi-step anesthesia depth classification probability vector sequence and the future multi-step trend direction prediction probability vector sequence corresponding to the current prediction reference time point;

[0056] Based on the future multi-step BIS regression prediction value sequence, real-time anesthesia depth prediction results are generated, and interval determination is performed on the future multi-step BIS regression prediction value sequence one by one according to the upper and lower bounds of the target interval, and the time step indexes of all prediction time steps that deviate from the target interval are collected into a trigger time step index set;

[0057] When the trigger time step index set is a non-empty set, a counterfactual dose simulation module is started, and a multi-dose virtual dosing scenario is constructed for the current prediction reference time point based on the patient's historical pharmacokinetic parameter set;

[0058] For each candidate dosing dose value in the candidate dose set of the multi-dose virtual dosing scenario, the counterfactual dose simulation module injects the candidate dosing dose value into the anesthesia intervention event feature component corresponding to the current prediction reference time point to form a virtual intervention input feature corresponding to the candidate dosing dose value;

[0059] BIS response trajectory simulation is performed on each virtual intervention input feature to obtain a future multi-step BIS counterfactual trajectory corresponding to the current candidate dosing dose value;

[0060] Each candidate dosing dose value is uniquely paired with its corresponding future multi-step BIS counterfactual trajectory to form a candidate counterfactual dosing scheme, and all candidate counterfactual dosing schemes are sequentially collected to form a candidate counterfactual dosing scheme set.

[0061] Optionally, the candidate counterfactual dosing scheme set is input into a dynamic safety constraint optimizer, comprising:

[0062] In the dynamic safety constraint optimizer, a preset clinical safety constraint rule is called to perform a first round of safety screening on the candidate counterfactual dosing scheme set. When any candidate counterfactual dosing scheme violates any preset clinical safety constraint rule, the candidate counterfactual dosing scheme is marked as an illegal scheme and removed from the candidate counterfactual dosing scheme set. The candidate counterfactual dosing schemes that pass all safety constraint rules are retained to form a safe and feasible scheme set;

[0063] Under the premise of satisfying the BIS target interval constraint, the set of safe and feasible schemes is searched with the minimization of intervention dose as the optimization objective. The candidate counterfactual dosing scheme that simultaneously satisfies the following conditions: the BIS counterfactual trajectory of multiple future steps regresses and remains within the BIS target interval in the shortest prediction time and the candidate dosing dose value is the smallest among all safe and feasible schemes that satisfy the BIS regression effect is selected as the target dosing scheme.

[0064] Optimal dosing recommendations, including dose adjustment range, infusion rate, and dosing timing suggestions, are generated based on the target dosing regimen.

[0065] The optimal dosing recommendations are output to the clinical interface and displayed for medical staff to refer to.

[0066] A time-aligned accurate prediction system for anesthesia depth, used to execute a time-aligned accurate prediction method for anesthesia depth, includes:

[0067] The data preprocessing module is used to collect multi-source heterogeneous surgical process data, perform unified coding preprocessing, and generate a cross-modal joint temporal feature data matrix;

[0068] The temporal alignment module is used to perform nonlinear time axis mapping on the cross-modal joint temporal feature data matrix and output temporal aligned feature samples.

[0069] The sliding window module is used to construct a BIS predictive label sliding window based on time-aligned feature samples. The sliding window slides dynamically along the time axis and outputs a set of future advanced predicted labels.

[0070] The dual-head temporal deep learning module uses temporally aligned feature samples as input and a future advanced prediction label set as supervision signal to establish a first-stage anesthesia depth prediction model.

[0071] The online update module incorporates a logical auditing step, forming an adaptive online update model.

[0072] The counterfactual simulation module is used to call the adaptive online update model to generate real-time anesthesia depth prediction results, and simulate multi-dose virtual drug administration scenarios when the BIS trend deviates from the target range, and output a set of candidate counterfactual drug administration schemes;

[0073] The dynamic safety constraint optimization module inputs a set of candidate counterfactual dosing regimens into the constraint optimizer, filters regimens based on dose limits and dosing intervals, and outputs the optimal dosing recommendation.

[0074] The beneficial effects of this invention are:

[0075] This invention combines dynamic time warping with a cross-modal feature alignment mechanism. Targeting the sparsity of anesthetic drug administration events and the continuity of physiological response signals, it introduces event-weighted representation based on time decay attention to achieve elastic alignment between drug intervention events and vital sign responses on a nonlinear time axis. This effectively captures the true time lag between drug effect and physiological response, significantly improving the model's prospective predictive ability and real-time performance in clinical applications.

[0076] This invention designs a dynamic label window construction mechanism based on individual patient volatility and baseline BIS adaptive threshold. The window length is adaptively adjusted according to real-time vital sign fluctuations, achieving intelligent matching of dynamic prediction duration. Combined with a three-in-one label system of BIS value, grade label, and trend label, it can not only perform regression prediction of future BIS value trajectory, but also jointly classify and judge the anesthesia status level and change trend of each prediction step, effectively improving the sensitivity of clinical risk identification and abnormal situation warning.

[0077] This invention establishes a counterfactual dose simulation module based on pharmacokinetic parameters. For abnormal BIS trend detected in real time, it automatically constructs multi-dose virtual dosing scenarios and simulates the future BIS counterfactual trajectory. By embedding safety constraints, it strictly screens and sorts all candidate schemes. With the joint optimization objectives of rapid regression of BIS target interval and minimization of intervention dose, it automatically outputs the optimal dosing recommendation, including dose fine-tuning range, infusion rate and best dosing timing. Attached Figure Description

[0078] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0079] Fig. 1 This is a flowchart of a method for accurately predicting the depth of anesthesia based on temporal alignment proposed in this invention;

[0080] Fig. 2 This is a structural block diagram of the dual-head temporal deep learning model in the precise prediction method for anesthesia depth based on temporal alignment proposed in this invention. Detailed Implementation

[0081] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0082] refer to Figs. 1-2 As shown in Example 1: A method for accurate prediction of anesthesia depth based on temporal alignment, comprising:

[0083] Collect multi-source heterogeneous surgical process data and perform unified coding preprocessing to generate a cross-modal joint temporal feature data matrix;

[0084] This implementation method collects multi-source heterogeneous surgical process data and performs unified encoding preprocessing, including:

[0085] Collect multi-source heterogeneous surgical process data, including patient static characteristic data, dynamic vital sign time-series data, and anesthesia intervention event data;

[0086] Patient static characteristic data refers to the static characteristic information of each patient, including attributes such as age, gender, height, weight, ASA classification, and BMI that do not change over time. Dynamic vital sign time-series data refers to the vital sign observation information collected for each patient at each time point, including physiological indicators such as heart rate, systolic blood pressure, diastolic blood pressure, blood oxygen saturation, bispectral index of EEG, and end-tidal carbon dioxide concentration. Anesthesia intervention event data refers to the anesthetic drug intervention information received by each patient at each time point, including drug name, dosage, administration method, and administration rate per unit time.

[0087] Vector embedding encoding is performed on the patient's static feature data to obtain the patient's static embedding features;

[0088] Vector embedding encoding maps the original patient static feature information into low-dimensional semantic embedding features, the dimension of which is the same as the dimension of the static feature embedding vector.

[0089] Outlier removal is performed on the dynamic vital signs time series data to form intermediate cleaned dynamic vital signs time series data;

[0090] Outlier removal refers to identifying and removing vital sign observations that exceed the upper or lower limits of the physiologically acceptable range.

[0091] Missing values ​​were imputed in the intermediate cleaned dynamic vital signs time series data to obtain the dynamic vital signs time series matrix.

[0092] Missing value imputation refers to using a time-series linear interpolation method to estimate and fill in vital sign observation information with time discontinuities. The completed data constitutes a complete dynamic vital sign time-series matrix.

[0093] The dynamic vital signs time series matrix is ​​normalized to obtain the normalized dynamic vital signs time series features.

[0094] Based on each patient's unique identifier and the timestamp of each time point, the static embedded features, normalized dynamic vital signs time series features, and anesthesia intervention event data are aligned and fused according to time series, resulting in a cross-modal joint time series feature data matrix.

[0095] The feature dimensions of the cross-modal joint time-series feature data matrix are jointly determined by the sum of the static feature embedding vector dimension, the dynamic vital sign feature dimension, and the anesthesia intervention event feature encoding dimension.

[0096] The cross-modal joint temporal feature data matrix represents the comprehensive feature information of all patients at different time points throughout the entire surgical process. Each individual data sample is a feature vector, which includes three parts: static feature embedding, dynamic vital sign features, and anesthesia intervention event features. The sum of the feature dimensions of the three parts is the dimension of the feature vector. The total number of samples in the cross-modal joint temporal feature data matrix is ​​determined by the total number of all patients and the total number of observation time points for each patient.

[0097] Nonlinear time axis mapping is performed on the cross-modal joint temporal feature data matrix to output temporally aligned feature samples;

[0098] In this embodiment, nonlinear time axis mapping is performed on the cross-modal joint temporal feature data matrix, including:

[0099] The cross-modal joint temporal feature data matrix is ​​represented as the cross-modal joint temporal feature vector of the i-th patient at time point t;

[0100] Anesthesia intervention event data are extracted from the cross-modal joint temporal feature vector of the i-th patient at each time point, and an anesthesia intervention event sequence is constructed.

[0101] In Example 1, for the cross-modal joint temporal feature vector of the i-th patient at each time point in its time point set, the anesthesia intervention event data component in the time point feature vector is located according to the preset data structure indexing rules. The drug name code value, dosage value, administration method code value and administration rate value per unit time of the time point are extracted and arranged in chronological order to construct the anesthesia intervention event sequence of the i-th patient. The anesthesia intervention event sequence is a vector sequence composed of the anesthesia intervention event vectors corresponding to all observation time points of the patient in chronological order.

[0102] Dynamic vital sign time series data are extracted from the cross-modal joint temporal feature vector of the i-th patient at each time point to construct a dynamic vital sign response sequence;

[0103] In Example 1, from the cross-modal joint temporal feature vector of the i-th patient at all observation time points, the normalized heart rate, systolic blood pressure, diastolic blood pressure, blood oxygen saturation, bispectral index of EEG, and end-tidal carbon dioxide concentration corresponding to each time point are extracted from the cross-modal joint temporal feature vector according to the dimensional index inside the feature vector. They are arranged in order of time points to form the dynamic vital sign response sequence of the i-th patient. Each response vector in the dynamic vital sign response sequence is composed of six indicators: normalized heart rate, systolic blood pressure, diastolic blood pressure, blood oxygen saturation, bispectral index of EEG, and end-tidal carbon dioxide concentration, and each corresponds uniquely to its corresponding time point.

[0104] A dynamic time-normalized distance matrix is ​​constructed based on the sequence of anesthesia intervention events and the dynamic vital sign response sequence.

[0105] Each element of the dynamic time-normalized distance matrix represents the distance between the anesthesia intervention event vector of the i-th patient at a certain time point and the dynamic vital signs response vector at another time point. The distance value is calculated by using a distance function to measure the normalized difference of each dimension between the anesthesia intervention event vector and the dynamic vital signs response vector using the same dimension.

[0106] Based on the dynamic time warping distance matrix, the minimum cumulative distance path of dynamic time warping is solved;

[0107] In Example 1, based on the dynamic time warping distance matrix of the i-th patient, the dynamic time warping algorithm is used to search all possible paths step by step, starting from the top left corner and following the row and column order of the dynamic time warping distance matrix. By summing the cumulative distance of each candidate alignment path, the cumulative distance is the sum of all distance values ​​on the candidate alignment path. The path with the smallest cumulative distance among all candidate alignment paths is selected as the minimum cumulative distance path of dynamic time warping. The minimum cumulative distance path consists of a series of alignment index pairs. Each alignment index pair is determined by the row index and column index of the dynamic time warping distance matrix, representing the optimal registration relationship between a certain time point of the anesthesia intervention event sequence and a certain time point of the dynamic vital signs response sequence, thus obtaining the minimum cumulative distance path.

[0108] Construct a nonlinear time axis mapping function based on the path with the minimum cumulative distance;

[0109] In Example 1, the construction process of the nonlinear time axis mapping function is as follows: For each pair of aligned indexes belonging to the minimum cumulative distance path, corresponding to the index of a certain time point in the anesthesia intervention event sequence and the index of another time point in the dynamic vital sign response sequence, the index of the anesthesia intervention event sequence at each original time point is determined by finding the aligned index pair containing the time point in the minimum cumulative distance path, and the time point index of the dynamic vital sign response sequence paired with it is determined. In this way, a unique mapping relationship is established from the original time point index of the anesthesia intervention event sequence to the time point index of the dynamic vital sign response sequence, realizing the flexible registration of the anesthesia intervention event and its physiological effects on the time axis. All the time point index mapping results together form the nonlinear time axis mapping function.

[0110] The function of the nonlinear time axis mapping function is to map the index of the anesthesia intervention event sequence at a certain time point to the index of the dynamic vital sign response sequence at another time point when a certain aligned index pair belongs to the minimum cumulative distance path, thereby achieving flexible mapping between time points.

[0111] Based on a nonlinear time axis mapping function, elastic registration is performed on the cross-modal joint temporal feature data matrix of the i-th patient to obtain a time-aligned cross-modal joint matrix;

[0112] The flexible registration specifically includes: traversing each time point in the anesthesia intervention event sequence of the i-th patient, mapping each time point to a corresponding target time point in the dynamic vital sign response sequence according to the mapping relationship determined by the minimum cumulative distance path; for each set of registered anesthesia intervention event vectors and dynamic vital sign response vectors, combining the static embedding features of the same time point, concatenating them according to the time point to form a registered temporally aligned cross-modal feature vector; and arranging all registered temporally aligned cross-modal feature vectors in chronological order to form the temporally aligned cross-modal joint matrix of the i-th patient.

[0113] Temporally aligned feature samples are constructed based on the temporally aligned cross-modal joint matrix.

[0114] Each time-aligned cross-modal feature vector obtained through flexible registration is paired with a timestamp at a time point to form a feature-time point pair. The feature-time point pairs of all patients at all observation time points are summarized to form a time-aligned feature sample set. The time-aligned feature sample set includes the time-aligned cross-modal feature vector of each patient at each observation time point and its corresponding timestamp.

[0115] A BIS predictive label sliding window is constructed based on time-aligned feature samples. The BIS predictive label sliding window slides along the time axis according to the set window length, and outputs the future advanced prediction label set.

[0116] In this embodiment, a BIS predictive label sliding window is constructed based on temporally aligned feature samples, including:

[0117] Since the feature components of anesthesia intervention events exhibit a sparse and aperiodic distribution on the time axis, in order to enhance the modeling ability of the impact of sparse events on the predicted labels, an event weighting factor based on the time decay attention mechanism is introduced for each feature component of anesthesia intervention events. The static embedded feature components, the normalized dynamic vital signs time-series feature components, and the weighted anesthesia intervention event feature components are concatenated to form a modified time-aligned cross-modal feature vector.

[0118] In Example 1, the time-aligned feature sample is represented as the feature vector of the i-th patient at time point t. The feature vector includes static embedded feature components, dynamic vital sign time-series feature components, and anesthesia intervention event feature components.

[0119] By calculating the time difference between the current predicted reference time and the time of the anesthetic intervention event, and combining the event time decay hyperparameter, an event weighting factor is obtained through exponential decay. The event weighting factor is then used to weight each feature component of the original anesthetic intervention event to obtain the weighted feature components of the anesthetic intervention event. The event weighting factor is used to weight the feature components of historical intervention events so that the anesthetic intervention event closer to the current predicted reference time contributes more to the feature expression.

[0120] Using the current predicted reference time point as the starting point of the BIS predictive label sliding window, the BIS predictive label sliding window is constructed based on the volatility of the dynamic vital signs time series characteristic components of the patient within a preset time period before the predicted reference time point.

[0121] The method for setting the BIS predictive label sliding window length is as follows: Calculate the volatility of all dynamic vital sign time-series feature components of the current patient within a preset time period before the reference time point. The volatility is obtained by calculating the variance of each dynamic vital sign feature component within the time period and taking the mean of all component variances. The initial baseline window length is then weighted and added to the volatility to obtain the BIS predictive label sliding window length corresponding to the current time point. A larger BIS predictive label sliding window length indicates a longer future duration covered by the prediction window. The BIS predictive label sliding window slides along the time axis with the BIS predictive label sliding window length, capturing target label information within the window coverage area and providing adaptive-length future target information pairing for the feature vector at each time point.

[0122] Within each BIS prediction label sliding window, the BIS values ​​of all time points within the BIS prediction label sliding window are extracted from the original dynamic vital signs time series. Combined with the baseline BIS value in the patient's static characteristics as a reference baseline, an anesthesia depth level label is generated for each time point, forming a multi-step target label set consisting of BIS value, anesthesia depth level label and BIS trend direction label.

[0123] In this embodiment, the rules for labeling the depth of anesthesia include:

[0124] When the BIS value at the corresponding time point is higher than the baseline BIS value plus the upper offset threshold, it is marked as insufficient anesthesia.

[0125] When the BIS value is between the baseline BIS value minus the lower offset threshold and the baseline BIS value plus the upper offset threshold, it is marked as moderate anesthesia.

[0126] When the BIS value is lower than the baseline BIS value minus the lower offset threshold, it is marked as excessive anesthesia;

[0127] The rules for BIS trend direction labels include:

[0128] Compare the BIS values ​​of two consecutive time points within the BIS prediction label sliding window. If the BIS value of the later time point is higher than the BIS value of the earlier time point, the trend label indicates an upward trend.

[0129] If the BIS value at a later time point is lower than the BIS value at the previous time point, the trend label is a downward trend;

[0130] If the BIS value at a later time point is equal to the BIS value at the previous time point, the trend label is "flat trend".

[0131] The upper and lower offset thresholds can be set later based on actual needs or expert models.

[0132] The future advanced prediction label set of anesthesia depth level label is the set of anesthesia depth level labels corresponding to all predicted time steps after each time point for each patient. The set of values ​​for the anesthesia depth level label is too shallow anesthesia, moderate anesthesia, and too deep anesthesia, represented by 0, 1, and 2, respectively.

[0133] The BIS trend direction label set in the future advance prediction label set is the set of BIS trend direction labels for each patient at each prediction time step after each time point. The BIS trend direction label value set is a downward trend, a flat trend, and an upward trend, represented by -1, 0, and +1, respectively.

[0134] For each observation point of each patient, the corrected temporally aligned cross-modal feature vector, multi-step target label set, and BIS predictive label sliding window length are combined into a set of sliding window samples. All sliding window samples are arranged in chronological order to form the patient's sliding window sample set. All patients' sliding window sample sets are merged to form a complete future advance prediction label set.

[0135] The future advanced prediction label set includes the corrected feature vector for each time point, the BIS value for multiple prediction time steps in the future for each time point, the anesthesia depth level label, the BIS trend direction label, and the sliding window length of the BIS prediction label corresponding to each time point.

[0136] The BIS values ​​used for regression supervision in the multi-step target label set are represented as the BIS true value sequence. The BIS true value sequence is the set of BIS true values ​​corresponding to all predicted time steps after each time point for each patient. The number of predicted time steps is determined by the length of the BIS prediction label sliding window.

[0137] Using temporally aligned feature samples as input and future advanced prediction label sets as supervision signals, a dual-head temporal deep learning model is established. The dual-head temporal deep learning model simultaneously outputs future BIS regression results and anesthesia depth classification results, thus obtaining the first-stage anesthesia depth prediction model.

[0138] In this embodiment, a dual-head temporal deep learning model is established, including:

[0139] A dual-head temporal deep learning model is established, which includes a shared temporal encoder and a BIS regression output head, an anesthesia depth classification output head, and a trend prediction output head connected to the shared temporal encoder. The corrected temporally aligned cross-modal feature vectors at all time points within each input sliding window are arranged in chronological order to form an input feature sequence, which is then fed into the encoder structure to output the temporal hidden representation corresponding to the current prediction reference time point.

[0140] In Example 1, the shared temporal encoder is implemented using a temporal Transformer encoder with a multi-head attention structure and positional encoding. The input of the shared temporal encoder is a modified temporally aligned cross-modal feature vector sequence. The modified temporally aligned cross-modal feature vectors at all time points within each input sliding window are arranged in chronological order to form an input feature sequence, which is then fed into the encoder structure. The shared temporal encoder comprehensively models the temporal correlation, event influence, and cross-modal signal features within the feature sequence, and performs feature interaction between features of different modalities in the time and event dimensions. Through the Transformer's self-attention mechanism, it extracts the temporal dynamic information within the window to form a globally dependent feature representation. The shared temporal encoder outputs the temporal hidden representation corresponding to the current prediction reference time point. The temporal hidden representation includes the temporal correlation information of all input features within the window, key event weight information, and global context feature information.

[0141] The BIS regression output head adopts a time-series decoding structure that outputs a variable-length sequence. It takes the time-series hidden representation and the corresponding number of prediction time steps as input and outputs a multi-step BIS regression prediction sequence.

[0142] In Example 1, after acquiring the temporal hidden representation, the BIS regression output head adopts a temporal decoding structure. The number of time steps to be predicted is dynamically determined according to the length of the BIS predictive label sliding window. The temporal decoding structure uses a temporal Transformer decoder with positional encoding, taking the temporal hidden representation as context input, and a dynamic masking mechanism for the future prediction step length to add positional encoding to each prediction time step. The dependency relationship between different time steps is modeled through a self-attention module, and the entire prediction sequence is output in parallel at one time. The output at each position is consistent with the prediction step length. The length of the output BIS regression prediction sequence is strictly consistent with the length of the BIS predictive label sliding window, and different length prediction sequences can be adapted for different time points as needed in the actual inference process.

[0143] The anesthesia depth classification output head and the trend prediction output head are constructed based on temporal hidden representations. For each prediction time step, they are processed through independent Transformer substructures to output the corresponding anesthesia depth classification probability vector and trend direction prediction probability vector.

[0144] The anesthesia depth classification probability vector represents the probability of too shallow anesthesia, moderate anesthesia, and too deep anesthesia, respectively. The trend direction prediction probability vector represents the probability of a downward trend, a flat trend, and an upward trend, respectively. The sum of the components in each probability vector is 1.

[0145] The dual-head time-series deep learning model is jointly supervised and trained based on a future-oriented predictive label set. The training objective is to jointly minimize the BIS regression loss function, the anesthesia depth classification loss function, and the trend prediction loss function, and then perform a weighted summation to form a joint loss function.

[0146] In Example 1, the BIS regression loss function is obtained as follows: for each patient, each time point, and each prediction time step, the mean square error between the BIS predicted value output by the BIS regression output head and the corresponding true BIS value is calculated. The mean square errors of all prediction time steps are averaged to obtain the BIS regression loss of each group of samples. The BIS regression losses of all samples are summed to obtain the overall BIS regression loss function, which is used to supervise the fitting accuracy between the BIS predicted value and the true BIS value.

[0147] The anesthesia depth classification loss function is obtained as follows: For each patient, each time point, and each prediction time step, the anesthesia depth classification probability vector output by the anesthesia depth classification output head is used to calculate the cross-entropy loss with the actual anesthesia depth level label. The cross-entropy losses of all prediction time steps are averaged to obtain the anesthesia depth classification loss for each group of samples. The anesthesia depth classification losses of all samples are summed to obtain the overall anesthesia depth classification loss function, which is used to supervise the accuracy of anesthesia depth level prediction.

[0148] The trend prediction loss function is obtained as follows: for each patient, each time point, and each prediction time step, the trend direction prediction probability vector output by the trend prediction output head is used to calculate the cross-entropy loss with the true trend direction label. The cross-entropy losses of all prediction time steps are averaged to obtain the trend prediction loss of each group of samples. The average of the trend prediction losses of all samples is then calculated to obtain the overall trend prediction loss function, which is used to supervise the prediction accuracy of the BIS trend direction.

[0149] The dynamic loss weight coefficient is adaptively adjusted according to the predicted risk level at the current time point. The predicted risk level is determined by the deviation between the predicted value of the future multi-step BIS regression and the target interval. When the prediction result is close to or enters a high-risk anesthesia stage, the loss weight of anesthesia depth classification and the loss weight of trend prediction are increased, so that the dual-head temporal deep learning model can strengthen its ability to distinguish the boundary and direction of change of the anesthesia state at the critical stage.

[0150] The system sets risk factors based on the predicted risk level. The calculation logic of the risk factors is to establish a risk assessment mechanism based on the clinical warning line. The system monitors the BIS predicted value of the BIS regression output head in real time, sets a clinical safety interval (between 40 and 60 in Example 1), and sets a transition buffer at the edge of the clinical safety interval. When the BIS predicted value is in the center of the safety interval, the system determines that the current risk is low and the risk factor is at an extremely low level. The model focuses on fine-tuning the accuracy of the numerical values. When the BIS predicted value begins to drift towards the boundary of too shallow or too deep anesthesia and enters the buffer, the risk factor increases exponentially with the distance of the value from the center point. The risk factor directly intervenes in the weight allocation of the joint loss function as a coefficient before each loss function, and increases with the increase of the risk factor. In the stage of rising risk, the system will automatically increase the proportion of the anesthesia depth level label and trend direction prediction index in the total loss. The technical purpose is to force the model to prioritize the absolute accuracy of state determination and trend prediction at critical moments when patients may face fluctuations in vital signs or the risk of awakening consciousness.

[0151] After completing joint training and converging the joint loss function, the resulting dual-head temporal deep learning model is used as the first-stage anesthesia depth prediction model.

[0152] In the first stage of training the anesthesia depth prediction model, a logical auditing step is introduced to ensure that the BIS regression output head and the anesthesia depth classification output head reach a consensus in medical logic, forming an adaptive online update model.

[0153] In this embodiment, a logical auditing step is introduced during the first-stage anesthesia depth prediction model training phase, including:

[0154] In the first stage of training the anesthesia depth prediction model, a logical auditing step is introduced. The logical auditing step compares the results generated by the BIS regression output head with the results generated by the anesthesia depth classification output head in real time.

[0155] The system pre-sets alignment rules based on clinical medical common sense. The logic auditing process checks whether there is a logical discrepancy between the BIS regression output head and the anesthesia depth classification output head. If the BIS prediction value given by the BIS regression output head is higher than the safety threshold, it indicates that the anesthesia is too shallow, but the anesthesia depth classification output head determines that the anesthesia is too deep. The system determines that a logical conflict has occurred.

[0156] When a logical conflict is detected, a logical consistency penalty term is triggered in the joint loss function. The logical consistency penalty generates error feedback, forcing the first-stage anesthesia depth prediction model to re-examine the feature extraction logic until the BIS regression output head and the anesthesia depth classification output head reach a consensus in medical logic, forming an adaptive online update model.

[0157] When the logic audit detects a medical logic discrepancy between the BIS regression output and the anesthesia depth classification output, a logic consistency penalty mechanism is activated. A logic consistency conflict judgment function is defined to detect whether there is an unreasonable combination between the predicted value and the classification level. A logic consistency penalty term is constructed based on the logic conflict frequency and added to the joint loss function to form a complete multi-objective loss function. The error feedback signal generated by the logic consistency penalty term is used for backpropagation training of the model, forcing the first-stage anesthesia depth prediction model to adjust its parameters so that the BIS regression output and the anesthesia depth classification output are consistent in medical semantics, forming an adaptive online update model with medical logic constraints.

[0158] In Example 1, the alignment rule for clinical medical common sense is to use three preset core BIS intervals as logical judgment criteria:

[0159] Light anesthesia / awake interval: when BIS predicted value At that time, the corresponding anesthesia depth level must be grade 1. (The anesthesia was too weak).

[0160] Ideal anesthesia range: when BIS predicted value At that time, the corresponding anesthesia depth level must be grade 1. (The anesthesia was moderate).

[0161] Deep anesthesia zone: when BIS predicted value At that time, the corresponding anesthesia depth level must be grade 1. (The anesthesia was too deep).

[0162] The system determines serious logical conflicts (triggering high penalties) in the following situations as logical deviations and triggers penalties:

[0163] Cross-level divergence: BIS predicted values ​​are in an excessively shallow range (in Example 1). However, the classification probability distribution is too deep (level). The probability of ) is dominant (greater than) The output is defined as a serious logical conflict.

[0164] Critical contradiction: BIS predicted values ​​indicate deep anesthesia (in Example 1) However, the classification result indicated that the anesthesia was too weak (grade 1). The conflict means that the model encoder's interpretation of the signal features has been reversed at the qualitative level.

[0165] The consistency and coordination rule between trends and numerical values ​​introduces trend direction prediction (upward, stable, downward) as a logical reinforcement:

[0166] Trend rationality check: If the first-stage anesthesia depth prediction model predicts a continuous upward trend over multiple future time steps ( However, the corresponding BIS prediction sequence value is continuously decreasing, which the system judges as a trend logic deviation.

[0167] Boundary warning consistency: When the BIS forecast value is close to (At the edge of deep anesthesia) and the trend is predicted to continue to decline. If the probability of excessive anesthesia given by the classification head does not increase significantly, it is considered that the model's sensitivity to risk evolution is distorted.

[0168] The above-mentioned logical auditing process can be summarized in Table 1 below: Table 1: Logical Audit Execution Logic Summary Table

[0169] The first-stage anesthesia depth prediction model is used to output the corrected temporally aligned cross-modal feature vector input at any time point, as well as the future multi-step BIS regression results, future multi-step anesthesia depth classification results, and future multi-step trend direction prediction results.

[0170] The adaptive online update model is invoked to generate real-time anesthesia depth prediction results. When the real-time anesthesia depth prediction results indicate that the BIS trend will deviate from the target range, the counterfactual dose simulation module is activated and a set of candidate counterfactual dosing schemes is output.

[0171] In this embodiment, the counterfactual dose simulation module is activated, and a set of candidate counterfactual dosing regimens is output, including:

[0172] The adaptive online update model is invoked to perform inference calculations on the corrected temporally aligned cross-modal feature vector sequence of the current prediction reference time point, and to obtain the future multi-step BIS regression prediction value sequence, the future multi-step anesthesia depth classification probability vector sequence, and the future multi-step trend direction prediction probability vector sequence corresponding to the current prediction reference time point.

[0173] The future multi-step BIS regression prediction sequence consists of the BIS prediction values ​​of the current patient at each prediction time step after the prediction reference time point. The number of prediction time steps is determined by the length of the BIS prediction label sliding window.

[0174] Based on the future multi-step BIS regression prediction value sequence, the real-time anesthesia depth prediction result is generated. The future multi-step BIS regression prediction value sequence is then determined according to the upper and lower bounds of the target interval. The time step indices of all prediction time steps that deviate from the target interval are summarized into a set of trigger time step indices.

[0175] In Example 1, the target interval is uniquely determined by the lower bound threshold and the upper bound threshold of the BIS target interval. When the BIS predicted value at any prediction time step is lower than the lower bound threshold or higher than the upper bound threshold, it is determined that the BIS trend at the current prediction reference time point will deviate from the target interval. The time step indices of all prediction time steps that have deviated from the target interval are summarized into a trigger time step index set. The trigger time step index set is used to record the time step indices of all prediction time steps that have deviated from the target interval.

[0176] When the trigger time step index set is a non-empty set, the counterfactual dose simulation module is started, and a multi-dose virtual dosing scenario is constructed for the current predicted reference time point based on the patient's historical pharmacokinetic parameter set.

[0177] The counterfactual dose simulation module uses the patient's historical pharmacodynamic parameters as individualized parameter inputs. The patient's historical pharmacodynamic parameters represent the relationship between the patient's anesthetic drug dosage and BIS response. The patient's historical pharmacodynamic parameters are estimated by combining the patient's historical anesthetic intervention event data and historical dynamic vital sign time series data. All parameters constitute a unique set of patient historical pharmacodynamic parameters.

[0178] The candidate dose set for a multi-dose virtual drug delivery scenario consists of all candidate drug delivery dose values ​​for the current patient at the corresponding time point. Each candidate drug delivery dose value is in milligrams or milligrams per kilogram. The number of candidate doses in the candidate dose set is determined by the set dose deviation range and the clinically safe dose range.

[0179] For each candidate dosing dose value in the candidate dose set for a multi-dose virtual dosing scenario, the counterfactual dose simulation module injects the candidate dosing dose value into the anesthesia intervention event feature component corresponding to the current prediction reference time point, forming a virtual intervention input feature that uniquely corresponds to the candidate dosing dose value.

[0180] Each virtual intervention input feature is a modified time-aligned cross-modal feature vector obtained by replacing the original dose value with the current candidate dose value on the basis of the original features.

[0181] For each virtual intervention input feature, BIS response trajectory simulation is performed to obtain a future multi-step BIS counterfactual trajectory that uniquely corresponds to the current candidate drug dose value;

[0182] In Example 1, the counterfactual dose simulation module, while keeping the adaptive online update model parameters unchanged, takes each virtual intervention input feature as the model input and performs forward prediction calculations on each virtual intervention input feature according to the reasoning process that is completely consistent with the generation process of real-time anesthesia depth prediction results. This yields a sequence of future multi-step BIS prediction values ​​corresponding to the virtual intervention input features. The sequence of future multi-step BIS prediction values ​​constitutes a future multi-step BIS counterfactual trajectory that uniquely corresponds to the current candidate drug dose value. The future multi-step BIS counterfactual trajectory is composed of the counterfactual BIS prediction values ​​of the current patient at each prediction time step after the prediction reference time point in chronological order.

[0183] Each candidate dosing dose value is uniquely paired with its corresponding future multi-step BIS counterfactual trajectory to form a candidate counterfactual dosing regimen. All candidate counterfactual dosing regimens are then summarized in order to form a candidate counterfactual dosing regimen set.

[0184] The candidate counterfactual dosing regimen set consists of multiple candidate dosing dose values ​​paired one-to-one with their corresponding future multi-step BIS counterfactual trajectories. Each candidate counterfactual dosing regimen set corresponds to a virtual dosing decision result at the current predicted reference time point.

[0185] The candidate counterfactual dosing regimen set is input into the dynamic safety constraint optimizer. The dynamic safety constraint optimizer eliminates non-compliant regimens based on the single maximum dose limit, single additional dose, and number of dosings within the minimum dosing interval. It then searches the feasible solution space for the target dosing regimen that minimizes the intervention dose and allows the BIS value to return to the target range, and outputs the optimal dosing recommendation.

[0186] In this embodiment, the set of candidate counterfactual drug administration schemes is input into the dynamic safety constraint optimizer, including:

[0187] The dynamic safety constraint optimizer calls the preset clinical safety constraint rules to perform the first round of safety screening on the candidate counterfactual dosing regimen set. When any candidate counterfactual dosing regimen violates any preset clinical safety constraint rule, the candidate counterfactual dosing regimen is marked as non-compliant and removed from the candidate counterfactual dosing regimen set. The candidate counterfactual dosing regimens that pass all safety constraint rules are retained to form a set of safe and feasible regimens.

[0188] In Example 1, the dynamic safety constraint optimizer is a constraint optimization decision module constructed based on patient pharmacodynamic parameters, a set of clinical safety constraint rules, and a set of candidate counterfactual dosing regimens.

[0189] The pre-defined clinical safety constraints include the following conditions:

[0190] The single maximum dose limit rule is used to limit the single dose value of any candidate drug to not exceed the current patient's maximum safe dose for the corresponding drug.

[0191] The single dose limit rule is used to limit the additional dose range between the current candidate dose value and the most recent actual dose to not exceed a preset safe additional dose threshold.

[0192] The rule limiting the number of doses within the minimum dosing interval is used to restrict the cumulative number of doses within a preset minimum dosing interval to not exceed the maximum allowed number of doses.

[0193] For each candidate counterfactual dosing regimen in the set of safe and feasible solutions, based on its corresponding future multi-step BIS counterfactual trajectory, it is determined whether the future multi-step BIS counterfactual trajectory falls into the BIS target interval at each predicted time step. The deviation between the future multi-step BIS counterfactual trajectory and the center value of the BIS target interval is calculated to represent the stability of the candidate counterfactual dosing regimen in regulating the depth of anesthesia.

[0194] Under the premise of satisfying the BIS target interval constraint, the set of safe and feasible schemes is searched with the minimization of intervention dose as the optimization objective. The candidate counterfactual dosing scheme that simultaneously satisfies the following conditions: the BIS counterfactual trajectory of multiple future steps regresses and remains within the BIS target interval in the shortest prediction time and the candidate dosing dose value is the smallest among all safe and feasible schemes that satisfy the BIS regression effect is selected as the target dosing scheme.

[0195] Optimal dosing recommendations, including dose adjustment range, infusion rate, and dosing timing suggestions, are generated based on the target dosing regimen.

[0196] The dose adjustment range is determined based on the difference between the dose value in the target dosing regimen and the current actual dose.

[0197] The infusion rate is calculated based on the target dosing regimen, the corresponding dose value, and the preset infusion time window to determine the recommended infusion rate.

[0198] The timing of drug administration is indicated by generating time reference information to prompt anesthesia and medical staff to perform drug administration based on the predicted time step when the first deviation from or return to the target BIS interval occurs in the future multi-step BIS counterfactual trajectory corresponding to the target drug administration regimen.

[0199] The optimal dosing recommendations are output to the clinical interface and displayed for medical staff to refer to.

[0200] A time-aligned accurate prediction system for anesthesia depth, used to execute a time-aligned accurate prediction method for anesthesia depth, includes:

[0201] The data preprocessing module is used to collect multi-source heterogeneous surgical process data, perform unified coding preprocessing, and generate a cross-modal joint temporal feature data matrix;

[0202] The temporal alignment module is used to perform nonlinear time axis mapping on the cross-modal joint temporal feature data matrix and output temporal aligned feature samples.

[0203] The sliding window module is used to construct a BIS predictive label sliding window based on time-aligned feature samples. The sliding window slides dynamically along the time axis and outputs a set of future advanced predicted labels.

[0204] The dual-head temporal deep learning module uses temporally aligned feature samples as input and a future advanced prediction label set as supervision signal to establish a first-stage anesthesia depth prediction model.

[0205] The online update module incorporates a logical auditing step, forming an adaptive online update model.

[0206] The counterfactual simulation module is used to call the adaptive online update model to generate real-time anesthesia depth prediction results, and simulate multi-dose virtual drug administration scenarios when the BIS trend deviates from the target range, and output a set of candidate counterfactual drug administration schemes;

[0207] The dynamic safety constraint optimization module inputs a set of candidate counterfactual dosing regimens into the constraint optimizer, filters regimens based on dose limits and dosing intervals, and outputs the optimal dosing recommendation.

[0208] Example 2: In the anesthesiology department, an anesthesiologist is administering general anesthesia to a patient scheduled for laparoscopic cholecystectomy. The patient is a 58-year-old female, weighing 63 kg, 160 cm tall, with a BMI of 24.6 and an ASA classification of II. Preoperatively, the anesthesiologist recorded the patient's static characteristics, including age, sex, height, weight, BMI, and ASA classification. During the operation, the anesthesia monitor recorded heart rate, systolic blood pressure, diastolic blood pressure, oxygen saturation, bispectral index (BPI), and end-tidal carbon dioxide levels in real time. Simultaneously, the system automatically captured all propofol and remifentanil administration events during the surgery, including the time, dosage, method, and infusion rate of each administration.

[0209] All data was collected by the system from 30 minutes before the surgery until the end of the surgery. For example:

[0210] Patient static characteristics (after vectorization): [Female, 58, 63, 160, 24.6, II];

[0211] Raw vital signs data for the first 1-5 minutes of surgery (sampled once per minute):

[0212] HR:[76,78,81,82,79];

[0213] SBP:[125,128,130,133,131];

[0214] DBP:[78,80,81,82,79];

[0215] SpO2:[98,99,99,98,98];

[0216] BIS:[42,39,38,36,37];

[0217] ETCO2:[33,34,36,36,35].

[0218] Anesthesia intervention events:

[0219] 0 minutes: 80 mg propofol bolus; 2 minutes: 0.3 μg / kg / min remifentanil infusion; 4 minutes: 30 mg propofol bolus.

[0220] In the preprocessing stage, the system removes the ETCO2 "0" outlier that appears in the 3rd minute and linearly interpolates it with the effective values ​​before and after. Zero drift noise in the BIS signal is also automatically detected and corrected. All vital sign sequences are Z-score normalized and embedded features are spliced ​​into a unified matrix.

[0221] The system automatically extracts the timing of propofol and remifentanil administration during all surgical procedures to form an event sequence, and extracts vital sign responses from the multimodal features at the corresponding time points. It automatically establishes a dynamic time-normalized distance matrix for the BIS and HR fluctuation patterns within 0-10 minutes after each propofol bolus. In Example 2, after the propofol bolus at 4 minutes, the BIS showed a decreasing inflection point between 6 and 8 minutes. DTW automatically and flexibly paired the 4-minute event with the 7-minute BIS inflection point, dynamically establishing a pharmacodynamic-response mapping (rather than simple synchronous alignment).

[0222] Using the 8th minute as the prediction reference time point, the system automatically counted the variance of vital signs HR, SBP, and DBP within the first 10 minutes (from -2 to 8 minutes), with a mean variance of 7.4. The system adjusted the base window length W0=5min to 6.1min. Subsequently, the system extracted the BIS label sequence for the next 6 minutes: [37,38,41,44,49,57]. Using the patient's baseline BIS (mean 39 in the first 10 minutes of the operation) as a reference, the threshold ±8 was set as the dynamic grade division boundary, and grade labels [1,1,1,0,0,0] and trend labels [+1,+1,+1,+1,+1,+1] (both of which showed a gradual increase in BIS).

[0223] The system inputs the multimodal feature sequence of the current prediction window into the Transformer encoder, outputting the hidden state corresponding to the 8th minute. The BIS regression output head uses a variable-length sequence decoding structure with dynamic masking and outputs 6-step BIS predictions in parallel: [38.5, 39.7, 41.2, 44.0, 48.6, 55.2]. The classification head outputs a 6-step anesthesia depth probability vector, with each step having three terms: "too shallow / moderate / too deep," and the maximum probability falling in [moderate, moderate, moderate, too shallow, too shallow, too shallow], respectively. The trend head outputs 6-step trend direction probabilities, all of which are increasing. At this point, the system detects that after the 11th minute, the predicted BIS is higher than the upper limit of the target interval (the safe interval is 40~60), indicating a risk of shallow anesthesia.

[0224] When the prediction results approach the BIS=60 upper limit, the system automatically increases the weights of classification and trend loss, prompting the model to prioritize classification accuracy and trend capture within the critical interval. In Example 2, at the 12-minute mark, the regression loss is 0.85, the classification loss is increased to 0.19, and the trend loss is 0.07, adjusting the total system loss from 1.11 to 1.21, thus enhancing the model's boundary discrimination capability. Counterfactual dose simulation module and trajectory output.

[0225] Upon detecting a risk of future BIS deviating from the target range, the system invokes the counterfactual dose simulation module. Based on the patient's current historical pharmacokinetic parameters (propofol EC50 = 2.6 μg / ml, T½ = 1.7 h, remifentanil EC50 = 1.8 ng / ml), the system constructs multiple virtual dosing doses: [0 mg, 10 mg, 20 mg, 30 mg], and simulates the future BIS counterfactual trajectory.

[0226] Additional 0 mg (i.e., no intervention): [38.5, 39.7, 41.2, 44.0, 48.6, 55.2];

[0227] Additional 10 mg of propofol: [38.2, 39.1, 39.9, 41.7, 46.4, 51.7];

[0228] Additional 20 mg of propofol: [37.5, 37.9, 39.0, 40.5, 43.2, 47.9];

[0229] Additional 30 mg of propofol: [36.7, 36.9, 37.6, 39.2, 41.7, 44.9];

[0230] The system automatically applied the following rules to screen all candidate dosing regimens: the maximum single dose must not exceed 50 mg, the interval between a single bolus dose and the previous bolus dose must be >3 min, and the number of doses within a minimum dosing interval of 5 min must be ≤2. Simulations showed that after a 20 mg bolus of propofol, the BIS remained consistently between 40 and 50, exhibiting the most stable trajectory without exceeding the limit; while a 30 mg bolus could lower the BIS to 35, the threshold was too high; and with 10 mg, the BIS remained above the upper limit of 60 after 13-14 minutes. Ultimately, the system output suggested:

[0231] Dosage adjustment range: Add 20 mg of propofol; Recommended infusion rate: 400 mg / h; Timing of administration: Inject at the 9th minute (predicted 2 minutes in advance).

[0232] Using a historical control sample of 30 patients during the same period (all using traditional BIS trend alarm + empirical dosing decision), the average duration of BIS>60 per patient was 7.3 min, 4 cases of intraoperative body movement events occurred, the average intervention dose was 28 mg (standard deviation 12 mg), and the average response lag time was 5.2 min.

[0233] In the experimental group of 30 patients using the method of this invention, the duration of BIS>60 decreased to 1.1 min, there were 0 intraoperative body movement events, the average intervention dose was 19 mg (standard deviation 6 mg), and the response lag time was 1.7 min. The consistency between the simulated label distribution and the real event in the training set (F1-score) improved to 0.86 (compared to 0.67 in the traditional method).

[0234] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A method for accurate prediction of anesthesia depth based on temporal alignment, characterized in that, include: Collect multi-source heterogeneous surgical process data and perform unified coding preprocessing to generate a cross-modal joint temporal feature data matrix; Nonlinear time axis mapping is performed on the cross-modal joint temporal feature data matrix to output temporally aligned feature samples; A BIS predictive label sliding window is constructed based on time-aligned feature samples. The BIS predictive label sliding window slides along the time axis according to the set window length, and outputs the future advanced prediction label set. Using temporally aligned feature samples as input and future advanced prediction label sets as supervision signals, a dual-head temporal deep learning model is established. The dual-head temporal deep learning model simultaneously outputs future BIS regression results and anesthesia depth classification results, thus obtaining the first-stage anesthesia depth prediction model. In the first stage of training the anesthesia depth prediction model, a logical auditing step is introduced to ensure that the BIS regression output head and the anesthesia depth classification output head reach a consensus in medical logic, forming an adaptive online update model. The adaptive online update model is invoked to generate real-time anesthesia depth prediction results. When the real-time anesthesia depth prediction results indicate that the BIS trend will deviate from the target range, the counterfactual dose simulation module is activated and a set of candidate counterfactual dosing schemes is output. The candidate counterfactual dosing regimen set is input into the dynamic safety constraint optimizer. The dynamic safety constraint optimizer eliminates non-compliant regimens based on the single maximum dose limit, single additional dose, and number of dosings within the minimum dosing interval. It then searches the feasible solution space for the target dosing regimen that minimizes the intervention dose and allows the BIS value to return to the target range, and outputs the optimal dosing recommendation.

2. The method for accurate prediction of anesthesia depth based on temporal alignment according to claim 1, characterized in that, The process of collecting multi-source heterogeneous surgical procedure data and performing unified encoding preprocessing includes: Collect multi-source heterogeneous surgical process data, including patient static characteristic data, dynamic vital sign time-series data, and anesthesia intervention event data; Vector embedding encoding is performed on the patient's static feature data to obtain the patient's static embedding features; Outlier removal is performed on the dynamic vital signs time series data to form intermediate cleaned dynamic vital signs time series data; Missing values ​​were imputed in the intermediate cleaned dynamic vital signs time series data to obtain the dynamic vital signs time series matrix. The dynamic vital signs time series matrix is ​​normalized to obtain the normalized dynamic vital signs time series features; Based on each patient's unique identifier and the timestamp of each time point, the static embedded features, normalized dynamic vital signs time series features, and anesthesia intervention event data are aligned and fused according to time series, resulting in a cross-modal joint time series feature data matrix.

3. The method for accurate prediction of anesthesia depth based on temporal alignment according to claim 1, characterized in that, The nonlinear time axis mapping of the cross-modal joint temporal feature data matrix includes: The cross-modal joint temporal feature data matrix is ​​represented as the cross-modal joint temporal feature vector of the i-th patient at time point t; Anesthesia intervention event data are extracted from the cross-modal joint temporal feature vector of the i-th patient at each time point, and an anesthesia intervention event sequence is constructed. Dynamic vital sign time series data are extracted from the cross-modal joint temporal feature vector of the i-th patient at each time point to construct a dynamic vital sign response sequence; A dynamic time-normalized distance matrix is ​​constructed based on the sequence of anesthesia intervention events and the dynamic vital sign response sequence. Based on the dynamic time warping distance matrix, the minimum cumulative distance path of dynamic time warping is solved; Construct a nonlinear time axis mapping function based on the path with the minimum cumulative distance; Based on a nonlinear time axis mapping function, elastic registration is performed on the cross-modal joint temporal feature data matrix of the i-th patient to obtain a time-aligned cross-modal joint matrix; Temporally aligned feature samples are constructed based on the temporally aligned cross-modal joint matrix.

4. The method for accurate prediction of anesthesia depth based on temporal alignment according to claim 1, characterized in that, The construction of the BIS predictive label sliding window based on temporally aligned feature samples includes: For each feature component of anesthesia intervention event in the temporal alignment feature sample, an event weighting factor based on time decay attention mechanism is introduced. The static embedded feature component, the normalized dynamic vital sign temporal feature component, and the weighted anesthesia intervention event feature component are concatenated to form the corrected temporal alignment cross-modal feature vector. Using the current predicted reference time point as the starting point of the BIS predictive label sliding window, the BIS predictive label sliding window is constructed based on the volatility of the dynamic vital signs time series characteristic components of the patient within a preset time period before the predicted reference time point. Within each BIS prediction label sliding window, the BIS values ​​of all time points within the BIS prediction label sliding window are extracted from the original dynamic vital signs time series. Combined with the baseline BIS value in the patient's static characteristics as a reference baseline, an anesthesia depth level label is generated for each time point, forming a multi-step target label set consisting of BIS value, anesthesia depth level label and BIS trend direction label. For each observation point of each patient, the corrected temporally aligned cross-modal feature vector, multi-step target label set, and BIS predictive label sliding window length are combined into a set of sliding window samples. All sliding window samples are arranged in chronological order to form the patient's sliding window sample set. All patients' sliding window sample sets are merged to form the future advanced prediction label set.

5. The method for accurate prediction of anesthesia depth based on temporal alignment according to claim 4, characterized in that, The rules for the labeling of the depth of anesthesia include: When the BIS value at the corresponding time point is higher than the baseline BIS value plus the upper offset threshold, it is marked as insufficient anesthesia. When the BIS value is between the baseline BIS value minus the lower offset threshold and the baseline BIS value plus the upper offset threshold, it is marked as moderate anesthesia. When the BIS value is lower than the baseline BIS value minus the lower offset threshold, it is marked as excessive anesthesia; The rules for the BIS trend direction labels include: Compare the BIS values ​​of two consecutive time points within the BIS prediction label sliding window. If the BIS value of the later time point is higher than the BIS value of the earlier time point, the trend label indicates an upward trend. If the BIS value at a later time point is lower than the BIS value at the previous time point, the trend label is a downward trend; If the BIS value at a later time point is equal to the BIS value at the previous time point, the trend label is "flat trend".

6. The method for accurate prediction of anesthesia depth based on temporal alignment according to claim 1, characterized in that, The establishment of the dual-head temporal deep learning model includes: A dual-head temporal deep learning model is established, which includes a shared temporal encoder and a BIS regression output head, an anesthesia depth classification output head, and a trend prediction output head connected to the shared temporal encoder. The corrected temporally aligned cross-modal feature vectors at all time points within each input sliding window are arranged in chronological order to form an input feature sequence, which is then fed into the encoder structure to output the temporal hidden representation corresponding to the current prediction reference time point. The BIS regression output head adopts a time-series decoding structure that outputs a variable-length sequence. It takes the time-series hidden representation and the corresponding number of prediction time steps as input and outputs a multi-step BIS regression prediction sequence. The anesthesia depth classification output head and the trend prediction output head are constructed based on temporal hidden representations. For each prediction time step, they are processed through independent Transformer substructures to output the corresponding anesthesia depth classification probability vector and trend direction prediction probability vector. The dual-head time-series deep learning model is jointly supervised and trained based on a future-oriented predictive label set. The training objective is to jointly minimize the BIS regression loss function, the anesthesia depth classification loss function, and the trend prediction loss function, and then perform a weighted summation to form a joint loss function. After completing joint training and converging the joint loss function, the resulting dual-head temporal deep learning model is used as the first-stage anesthesia depth prediction model.

7. The method for accurate prediction of anesthesia depth based on temporal alignment according to claim 1, characterized in that, In the first stage of the anesthesia depth prediction model training phase, a logical auditing step is introduced, including: In the first stage of training the anesthesia depth prediction model, a logical auditing step is introduced. The logical auditing step compares the results generated by the BIS regression output head with the results generated by the anesthesia depth classification output head in real time. The system pre-sets alignment rules based on clinical medical common sense. The logic auditing process checks whether there is a logical discrepancy between the BIS regression output head and the anesthesia depth classification output head. If the BIS prediction value given by the BIS regression output head is higher than the safety threshold, it indicates that the anesthesia is too shallow, but the anesthesia depth classification output head determines that the anesthesia is too deep. The system determines that a logical conflict has occurred. When a logical conflict is detected, a logical consistency penalty term is triggered in the joint loss function. The logical consistency penalty generates error feedback, forcing the first-stage anesthesia depth prediction model to re-examine the feature extraction logic until the BIS regression output head and the anesthesia depth classification output head reach a consensus in medical logic, forming an adaptive online update model.

8. The method for accurate prediction of anesthesia depth based on temporal alignment according to claim 1, characterized in that, The counterfactual dose simulation module is activated, and a set of candidate counterfactual dosing regimens is output, including: The adaptive online update model is invoked to perform inference calculations on the corrected temporally aligned cross-modal feature vector sequence of the current prediction reference time point, and to obtain the future multi-step BIS regression prediction value sequence, the future multi-step anesthesia depth classification probability vector sequence, and the future multi-step trend direction prediction probability vector sequence corresponding to the current prediction reference time point. Based on the future multi-step BIS regression prediction value sequence, the real-time anesthesia depth prediction result is generated. The future multi-step BIS regression prediction value sequence is then determined according to the upper and lower bounds of the target interval. The time step indices of all prediction time steps that deviate from the target interval are summarized into a set of trigger time step indices. When the trigger time step index set is a non-empty set, the counterfactual dose simulation module is started, and a multi-dose virtual dosing scenario is constructed for the current predicted reference time point based on the patient's historical pharmacokinetic parameter set. For each candidate dosing dose value in the candidate dose set for a multi-dose virtual dosing scenario, the counterfactual dose simulation module injects the candidate dosing dose value into the anesthesia intervention event feature component corresponding to the current prediction reference time point, forming a virtual intervention input feature that uniquely corresponds to the candidate dosing dose value. For each virtual intervention input feature, BIS response trajectory simulation is performed to obtain the future multi-step BIS counterfactual trajectory that uniquely corresponds to the current candidate drug dose value; Each candidate dosing dose value is uniquely paired with its corresponding future multi-step BIS counterfactual trajectory to form a candidate counterfactual dosing regimen. All candidate counterfactual dosing regimens are then summarized in order to form a candidate counterfactual dosing regimen set.

9. The method for accurate prediction of anesthesia depth based on temporal alignment according to claim 1, characterized in that, The step of inputting the candidate counterfactual drug administration scheme set into the dynamic safety constraint optimizer includes: The dynamic safety constraint optimizer calls the preset clinical safety constraint rules to perform the first round of safety screening on the candidate counterfactual dosing regimen set. When any candidate counterfactual dosing regimen violates any preset clinical safety constraint rule, the candidate counterfactual dosing regimen is marked as non-compliant and removed from the candidate counterfactual dosing regimen set. The candidate counterfactual dosing regimens that pass all safety constraint rules are retained to form a set of safe and feasible regimens. Under the premise of satisfying the BIS target interval constraint, the set of safe and feasible schemes is searched with the minimization of intervention dose as the optimization objective. The candidate counterfactual dosing scheme that simultaneously satisfies the following conditions: the BIS counterfactual trajectory of multiple future steps regresses and remains within the BIS target interval in the shortest prediction time and the candidate dosing dose value is the smallest among all safe and feasible schemes that satisfy the BIS regression effect is selected as the target dosing scheme. Optimal dosing recommendations, including dose adjustment range, infusion rate, and dosing timing suggestions, are generated based on the target dosing regimen. The optimal dosing recommendations are output to the clinical interface and displayed for medical staff to refer to.

10. A system for accurately predicting the depth of anesthesia based on temporal alignment, used to execute the method for accurately predicting the depth of anesthesia based on temporal alignment as described in any one of claims 1-9, characterized in that, include: The data preprocessing module is used to collect multi-source heterogeneous surgical process data, perform unified coding preprocessing, and generate a cross-modal joint temporal feature data matrix; The temporal alignment module is used to perform nonlinear time axis mapping on the cross-modal joint temporal feature data matrix and output temporal aligned feature samples; The sliding window module is used to construct a BIS predictive label sliding window based on time-aligned feature samples. The sliding window slides dynamically along the time axis and outputs a set of future advanced predicted labels. The dual-head temporal deep learning module uses temporally aligned feature samples as input and a future advanced prediction label set as supervision signal to establish a first-stage anesthesia depth prediction model. The online update module incorporates a logical auditing step, forming an adaptive online update model. The counterfactual simulation module is used to call the adaptive online update model to generate real-time anesthesia depth prediction results, and simulate multi-dose virtual drug administration scenarios when the BIS trend deviates from the target range, and output a set of candidate counterfactual drug administration schemes; The dynamic safety constraint optimization module inputs a set of candidate counterfactual dosing regimens into the constraint optimizer, filters regimens based on dose limits and dosing intervals, and outputs the optimal dosing recommendation.

Citation Information

Patent Citations

  • Real-time anesthesia depth monitoring system based on deep learning

    CN115040140A

  • Anesthesia depth prediction method based on representation learning

    CN119092127A

  • Anesthesia complication prediction model construction method based on deep learning

    CN120452673A

  • Risk prediction method and platform for perioperative period and medium

    CN120833910A

  • Multi-modal causal reasoning and explaining method, device, equipment and medium

    CN120952184A

Cited By

  • Multi-medicine combined dose dynamic optimization method, equipment and medium

    CN121862450A

  • Remazolam anesthetic dosage AI prediction system

    CN122050688A