Neurosurgical postoperative intracranial pressure trend early warning method based on time series deep learning

CN123017446APending Publication Date: 2026-10-30THE SECOND AFFILIATED HOSPITAL ARMY MEDICAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611218332.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-12
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0004]为了克服现有技术的上述缺陷,本发明提供了基于时序深度学习的神经外科术后颅内压趋势预警方法,解决了现有技术中ICP预警技术存在静态模型无法自适应、个体化预警缺失、缺乏可解释性及增量更新无针对性导致灾难性遗忘的问题

Benefits of technology

[0023]1、该发明中S3、S4、S5是存在紧密的时序依赖和逻辑因果关系:S3的偏离度触发条件激活S4的归因分析,S4识别出的关键驱动因子引导S5的增量训练方向和参数更新策略,S5对原型记忆库的更新又直接反馈至S3的监测基准。三者构成“感知(S3)—诊断(S4)—适应(S5)”的完整技术闭环,缺少任一环节均无法实现本发明所述的闭环递进预警功能,属于一个总的发明构思。同时,S3以“欧氏距离大于第一阈值且连续多个时间窗口呈单调递增趋势”作为触发条件,S4以“归因分布与基准归因分布的JS散度大于第二阈值”识别关键驱动因子,S5以“关键驱动因子对应参数维度被赋予更小正则化强度”引导定向更新——三层之间形成“条件触发→归因诊断→定向更新”的因果递进链条,彼此不可分割,从根本上克服了多个独立预警信号并行输出所带来的单一性缺陷,符合专利法第三十一条的规定。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123017446A_ABST
    Figure CN123017446A_ABST
Patent Text Reader

Abstract

The application discloses a neurosurgical postoperative intracranial pressure trend early warning method based on time series deep learning, which comprises the following steps: collecting the intracranial pressure signals of a postoperative patient to obtain time series data; constructing an encoder and training by contrast learning, clustering the representation vectors to construct a prototype memory bank; inputting the current data into the encoder to obtain the representation vectors and calculating the distance between the representation vectors and the prototype memory bank, triggering attribution analysis when the first preset condition is met, extracting the attention allocation value to form the attribution distribution and calculating the difference between the attribution distribution and the benchmark attribution distribution to identify the key driving factor; accordingly, incremental training is carried out to make the encoder update the corresponding parameter dimension for the key driving factor, calculate the parameter change amount, and trigger the prototype memory bank update when the second preset condition is met; and outputting the early warning level according to the difference value. The application can be explained, self-adaptive and early warning, and overcomes the defects that the static model cannot adapt to the disease evolution and lacks explainability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical diagnostic measurement technology, and in particular relates to a method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning. Background Technology

[0002] Postoperative intracranial pressure (ICP) monitoring is a core component of neurocritical care. Sustained elevation of ICP postoperatively can lead to decreased cerebral perfusion pressure, cerebral ischemia, and even brain herniation, a key factor affecting patient prognosis. Current routine clinical monitoring methods include intraventricular catheter manometry and parenchymal pressure sensor measurement, which continuously record ICP values ​​and trigger alarms when they exceed a clinical threshold of 20 mmHg. Existing research has applied deep learning methods to ICP prediction, such as using Long Short-Term Memory (LSTM) networks for univariate prediction of ICP time-series data, or using temporal Transformer networks to model the long-range dependencies of ICP signals for multi-step prediction. Some studies have attempted to extract and classify ICP waveforms using attention mechanisms, while others have applied Bayesian continuous learning strategies to online modeling of physiological time series. These technologies provide the foundation for this invention, but existing technical approaches still have the following shortcomings.

[0003] Current ICP early warning methods primarily rely on fixed numerical thresholds as trigger conditions, failing to consider the differences in normal ICP levels and fluctuation patterns among individual patients, resulting in poor universality across different patients. Existing deep learning-based ICP prediction methods mostly employ offline training and static deployment—the model's parameters are fixed after training on historical data, making adaptive updates impossible as the patient's condition evolves post-operatively (e.g., cerebral edema resolution, drainage adjustments, drug interventions, etc.), leading to a decline in long-term monitoring accuracy. Furthermore, existing methods are mostly data-driven "black box" models, only outputting prediction results without providing decision-making basis. Clinicians struggle to understand the source of the model's judgments, reducing the clinical adoption rate of early warning information. While a few studies have attempted to apply continuous learning to medical signals, their incremental updates lack specificity—indiscriminate updates to all parameters easily lead to catastrophic forgetting of learned normal patterns; moreover, their model updates do not involve the evolution of the prototype memory bank, failing to achieve continuous optimization of the monitoring benchmark. These shortcomings make it difficult for existing technologies to achieve post-operative intracranial pressure trend early warning that is personalized, forward-looking, interpretable, and has long-term stability. Summary of the Invention

[0004] To overcome the aforementioned deficiencies of the prior art, this invention provides a method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning. This method solves the problems of static models being unable to adapt, lack of individualized warnings, lack of interpretability, and catastrophic forgetting caused by non-targeted incremental updates in existing ICP warning technologies.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A temporal deep learning-based method for predicting intracranial pressure trends after neurosurgery includes the following steps:

[0007] S1: Collect intracranial pressure monitoring signals from patients after neurosurgery and preprocess them to obtain intracranial pressure time-series data;

[0008] S2: Construct an encoder and train it using a contrastive learning method. After training, cluster the representation vectors of intracranial pressure time series data to obtain multiple prototype vectors and construct a prototype memory bank.

[0009] S3: Input the currently collected intracranial pressure time series data into the encoder to obtain the current representation vector, calculate the distance value between it and each prototype vector in the prototype memory bank, and when the distance value meets the first preset condition, determine that the current intracranial pressure mode deviates from the normal mode, and execute S4.

[0010] S4: Extract the attention allocation values ​​of the encoder to form an attribution distribution, calculate the difference between the attribution distribution and the benchmark attribution distribution, identify key driving factors based on the difference, and execute S5.

[0011] S5: Incrementally train the encoder according to the key driving factor, so that the encoder updates the parameter dimension corresponding to the key driving factor, calculate the parameter change of the encoder, and trigger the update of the prototype memory when the parameter change meets the second preset condition, and execute S6.

[0012] S6: Output the warning level based on the difference between the attribution distribution and the benchmark attribution distribution.

[0013] Preferably, the intracranial pressure monitoring signal in S1 is continuously acquired by an invasive pressure sensor at a sampling frequency of 100Hz to 1000Hz; the preprocessing includes bandpass filtering for noise reduction, baseline drift correction, amplitude outlier removal, and frame-by-frame segmentation based on waveform peak detection, outputting intracranial pressure time-series data with a fixed time window length of 30 seconds to 300 seconds.

[0014] Preferably, the encoder in S2 includes a temporal deep learning network. The training objective of the encoder is to predict the intracranial pressure values ​​at each time point in the future time window based on the intracranial pressure time-series data within the input time window. The contrastive learning method is as follows: data augmentation operations are performed on the same intracranial pressure time-series data sample to generate two augmented views as positive sample pairs. The data augmentation operations are selected from one or more of the following: cropping the time segment of the original sequence by a random ratio, scaling the sequence amplitude by a random factor, adding Gaussian noise at random time positions, and deforming the time axis of the sequence locally. The augmented views of different samples are used as negative sample pairs. The encoder is trained using a contrastive loss function, which maximizes the similarity of positive sample pairs in the representation space and minimizes the similarity of negative sample pairs in the representation space.

[0015] Preferably, the method for constructing the prototype memory bank in S2 is as follows: performing clustering operations on the representation vectors of time-series data samples with intracranial pressure peak values ​​below 20 mmHg in the training data, using each cluster center as the prototype vector, and each prototype vector representing a time-series pattern of normal postoperative intracranial pressure recovery; the number of prototype vectors is 5 to 20.

[0016] Preferably, the distance value in S3 is the Euclidean distance; the first preset condition is: the minimum Euclidean distance between the current representation vector and all prototype vectors in the prototype memory is greater than a first threshold, and the minimum Euclidean distance shows a monotonically increasing trend in multiple consecutive time windows; the first threshold is determined based on the initial distance value calculated from the intracranial pressure time series data collected in the early period after the patient's enrollment, and the first threshold is 1.5 times to 3 times the initial distance value.

[0017] Preferably, the encoder in S2 is a temporal Transformer network, comprising a temporal block embedding layer, a multi-head self-attention layer, and a feedforward network layer; the temporal block embedding layer is used to segment intracranial pressure temporal data into multiple time patches of fixed length, and adds temporal position information through learnable position encoding vectors; the number of attention heads in the multi-head self-attention layer is 4 to 16; the method for extracting attention allocation values ​​in S4 is as follows: extracting the attention weights of token pairs used to represent global information in the multi-head self-attention layer for each time patch, performing aggregation operations on the attention weights of each attention head and each layer of the network to obtain the attention weight value of each time patch, and using the normalized probability distribution of the attention weight values ​​of each time patch as the attribution distribution.

[0018] Preferably, the baseline attribution distribution in S4 is the time average of the attribution distributions at each time point within a preset time period before the current time point; the difference value is the Jensen-Shannon divergence; the criterion for determining the difference value is: the Jensen-Shannon divergence is greater than a second threshold and the divergence value shows a monotonically increasing trend within multiple consecutive time windows; the value range of the second threshold is 0.05 to 0.3.

[0019] Preferably, the incremental training in S5 employs a Bayesian continuous learning strategy, including: introducing a probability distribution representation for each parameter of the encoder; the loss function of incremental training includes a prediction loss term and a regularization term, wherein the prediction loss term is a measure of the error between the encoder's predicted value and the actual collected value of intracranial pressure at each time point within a future time window, and the regularization term is used to constrain the magnitude of parameter changes, its value being a weighted sum of the product of the importance of each parameter and the square of the magnitude of the parameter change, the parameter importance being measured by the diagonal elements of the Fisher information matrix, the diagonal elements of the Fisher information matrix being calculated online using an empirical average of the squared first-order gradient of the loss function with respect to the parameters under the current batch of data as the Fisher information matrix. The approximate values ​​of the diagonal elements of the her information matrix; the parameter dimension corresponding to the key driving factor is determined according to the distribution of the encoder's attention weights in each feature dimension, the key driving factor is the time window or waveform feature with the highest attribution score in the attribution distribution, and the parameters corresponding to the network neurons activated by the highest-ranking time window or waveform feature are the parameter dimensions corresponding to the key driving factor; in the regularization term, the parameter dimension corresponding to the key driving factor is given a smaller regularization strength than other parameter dimensions, so that the parameters corresponding to the key driving factor have greater update freedom; by minimizing the loss function of the incremental training, variational inference is used to update the probability distribution of each parameter.

[0020] Preferably, the incremental training in S5 further includes maintaining an experience replay buffer pool to store historically collected intracranial pressure time-series data samples; during each incremental training, historical samples are sampled from the buffer pool and mixed with newly added samples in the current batch for training; the method for calculating the parameter change is to calculate the average of the relative change amplitudes of each parameter value after incremental training and each parameter value before incremental training; the second preset condition is that the average of the relative change amplitudes is greater than the third threshold; the method for updating the prototype memory is as follows: based on the allocation criteria of the current representation vector being closest to each prototype vector, the currently collected intracranial pressure time-series data are allocated to the corresponding clusters; when the cumulative number of newly allocated samples in a certain cluster exceeds 10% to 30% of the original number of samples in the cluster, the cluster center is recalculated and the original prototype vector is replaced.

[0021] Preferably, the warning level in S6 is determined based on the difference between the attribution distribution and the benchmark attribution distribution. Specifically, a risk score is calculated based on the difference, with a higher risk score indicating a larger difference. The risk score is normalized to the range of 0 to 1. When the risk score is less than a first grading threshold, no warning is output. When the risk score is greater than or equal to the first grading threshold and less than a second grading threshold, a level one warning is output. When the risk score is greater than or equal to the second grading threshold, a level two warning is output. The first grading threshold is 0.3 to 0.5, and the second grading threshold is 0.6 to 0.8.

[0022] The technical effects and advantages of the present invention, a method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning, are as follows:

[0023] 1. In this invention, S3, S4, and S5 have a close temporal dependency and logical causal relationship: the deviation trigger condition of S3 activates the attribution analysis of S4; the key driving factors identified by S4 guide the incremental training direction and parameter update strategy of S5; and the update of the prototype memory bank by S5 directly feeds back to the monitoring benchmark of S3. The three constitute a complete technical closed loop of "perception (S3) - diagnosis (S4) - adaptation (S5)". The lack of any link will prevent the realization of the closed-loop progressive early warning function described in this invention, which belongs to a general inventive concept. Meanwhile, S3 uses "the Euclidean distance is greater than the first threshold and multiple consecutive time windows show a monotonically increasing trend" as the trigger condition, S4 uses "the JS divergence between the attribution distribution and the benchmark attribution distribution is greater than the second threshold" to identify key driving factors, and S5 uses "the parameter dimension corresponding to the key driving factor is given a smaller regularization intensity" to guide directional updates. The three layers form a causal progressive chain of "condition triggering → attribution diagnosis → directional updates", which is inseparable from each other. This fundamentally overcomes the singleness defect caused by the parallel output of multiple independent early warning signals and complies with the provisions of Article 31 of the Patent Law.

[0024] 2. In S3, this invention constructs a normal pattern prototype memory bank through contrastive learning pre-training. Each patient's individualized deviation baseline is calculated independently upon enrollment, with the first threshold determined based on the individual's initial distance value. The first preset condition requires the deviation to both exceed the individualized threshold and exhibit a monotonically increasing trend over multiple consecutive time windows—this dual criterion effectively excludes instantaneous deviations caused by normal physiological fluctuations in ICP. This invention does not rely on a fixed ICP numerical threshold but instead uses the degree of deviation between the prototype memory bank in space and the current ICP pattern for early perception. Even before the ICP value significantly increases or reaches the clinically relevant threshold, this invention can capture early signals of declining brain compensatory function through trend changes in deviation, achieving proactive warning. Simultaneously, the individualized baseline setting makes this invention highly adaptable to different patients, overcoming the inherent defects of uniform numerical thresholds, such as poor universality and high false alarm rates.

[0025] 3. This invention extracts the encoder's attention allocation values ​​for historical moments in S4 to form an attribution distribution, calculates the JS divergence between the current attribution distribution and the baseline attribution distribution, and identifies key driving factors causing deviations. Attribution analysis allows clinicians to intuitively understand the time window and waveform characteristics currently focused on by the model—that is, the basis for the warning is which historical periods and waveform morphologies have undergone abnormal changes. This interpretable mechanism overcomes the "black box" decision-making defects of traditional deep learning models, enhances clinicians' trust in warning information, and improves the clinical adoption rate of warning information. Simultaneously, the temporal drift of the attribution distribution (increased JS divergence) itself reflects a qualitative change in the ICP dynamics, and can serve as a warning signal even when ICP values ​​are still within the normal range.

[0026] 4. In S5, this invention utilizes the key driving factors identified by the attribution analysis in S4 to guide the direction of incremental training—the encoder focuses on updating the parameter dimensions corresponding to the key driving factors, rather than indiscriminately adjusting all parameters. In the regularization term, the parameter dimensions corresponding to the key driving factors are given a smaller regularization strength, allowing them greater update freedom and thus enabling rapid learning of new pathological patterns; other parameters maintain a larger regularization strength to prevent the learned normal patterns from being forgotten. This invention achieves precise orientation of model updates through attribution guidance—updating only the parameter dimensions related to the current abnormality, ensuring both the model's learning speed of new patterns and preventing catastrophic forgetting of learned normal patterns. This mechanism enables the model to continuously adaptively optimize as the patient's postoperative disease progresses, maintaining long-term monitoring accuracy without decay.

[0027] 5. This invention maintains an experience replay buffer in S5 to store recently collected historical samples. During each incremental training iteration, historical samples are mixed with newly added samples to prevent catastrophic forgetting during incremental updates. The average of the relative changes in parameters after incremental training is calculated as the parameter change. When the parameter change exceeds a threshold, an update of the prototype memory is triggered. This mechanism ensures that the normal pattern representation in the prototype memory is continuously updated with the accumulation of patient populations and the evolution of clinical practice, preventing a fixed prototype memory from gradually deviating from the true clinical state over time, thus ensuring the long-term clinical applicability of this invention.

[0028] 6. In step S6, this invention calculates a risk score based on the difference between the attribution distribution and the baseline attribution distribution, outputting three levels of information: no warning, level one warning, and level two warning. This tiered output allows clinicians to take differentiated clinical responses based on the warning level, avoiding the limitations of the traditional binary warning system's "all or nothing" approach. Simultaneously, the continuous scoring mechanism of the differentiated values ​​makes the warning information more refined, reflecting the progressive deterioration of intracranial pressure compensation, rather than simply reporting excessive events. Attached Figure Description

[0029] Figure 1 This is an overall flowchart of the neurosurgical postoperative intracranial pressure trend early warning method based on temporal deep learning proposed in this invention;

[0030] Figure 2 This is a flowchart of encoder pre-training and prototype memory bank construction for the neurosurgical postoperative intracranial pressure trend early warning method based on temporal deep learning proposed in this invention.

[0031] Figure 3 This is a flowchart of the attribution analysis and key driving factor identification of the neurosurgical postoperative intracranial pressure trend early warning method based on temporal deep learning proposed in this invention.

[0032] Figure 4 This is a flowchart of the hierarchical early warning output of the postoperative intracranial pressure trend early warning method for neurosurgery based on temporal deep learning proposed in this invention. Detailed Implementation

[0033] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0034] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include," "contain," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "includes..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.

[0035] refer to Figures 1-4 The core of the postoperative intracranial pressure trend early warning method for neurosurgery based on temporal deep learning, as described in this invention, lies in the real-time monitoring of intracranial pressure signals in postoperative patients through a temporal deep learning encoder. It achieves early warning through a closed-loop progressive architecture consisting of "deviation monitoring—attribution analysis—incremental learning—prototype library update." The specific embodiments of this invention are described in detail below with reference to the accompanying drawings.

[0036] System hardware configuration:

[0037] In this invention, intracranial pressure monitoring signals are continuously acquired from the patient using an invasive pressure sensor in an intracranial pressure monitor. The sensor can be an external ventricular drainage type or a brain parenchymal type pressure sensor, inserted by the surgeon before the end of neurosurgical procedures. The sensor is connected to a data acquisition workstation via a signal conditioning module. The workstation is equipped with a GPU-accelerated computing unit for real-time inference and incremental training of the deep learning model. The workstation is also connected to the display terminal of the clinical monitoring system for outputting early warning results and visual information.

[0038] Overall data flow process:

[0039] After system startup, the following process is followed: The data acquisition module continuously acquires ICP signals at a sampling frequency of 100Hz to 1000Hz, and after preprocessing, generates ICP time-series data segments with a fixed time window length. The pre-trained encoder continuously receives the current time-series segment and calculates its deviation from the prototype memory. When the deviation triggers the first preset condition, the system activates the attribution analysis module to identify the key driving factors causing the deviation. The attribution analysis results are used to output the warning level and guide the incremental learning module to update the encoder in a targeted manner. After the update is completed, if the parameter change meets the second preset condition, the prototype memory is updated, forming an adaptive evolution closed loop of the monitoring benchmark.

[0040] S1: Data Acquisition and Preprocessing. In S1, intracranial pressure monitoring signals are continuously acquired via an invasive pressure sensor at a sampling frequency of 100Hz to 1000Hz. After the raw signals enter the workstation, bandpass filtering from 0.5Hz to 30Hz is first applied to remove low-frequency interference from respiration and ECG, as well as high-frequency electronic noise. Baseline drift correction is then performed, using a moving median filter to eliminate the influence of sensor zero-point drift. Sampling points with amplitudes exceeding ±5 standard deviations of the mean are identified as outliers and removed; data at the removed locations are filled using cubic spline interpolation. Finally, the continuous signal is segmented beat-by-beat based on a waveform peak detection algorithm: the peak value of the ICP waveform corresponding to each cardiac cycle is detected, and a fixed number of sampling points are taken before and after the peak value to form a single-beat waveform. Multiple consecutive single-beat waveforms are then spliced ​​together to form an ICP time-series data segment with a fixed time window length, ranging from 30 seconds to 300 seconds.

[0041] S2: Encoder Construction and Pre-training. In S2, the encoder adopts a temporal Transformer network architecture, specifically including a temporal block embedding layer, a multi-head self-attention layer, and a feedforward network layer. The temporal block embedding layer divides the input time window sequence into multiple time patches of fixed length, each patch being 8 to 64 sampling points in length, and adds temporal position information to each patch using learnable positional encoding vectors. The multi-head self-attention layer contains 4 to 16 attention heads, each with a dimension of 16 to 64. The feedforward network layer consists of two fully connected layers with hidden layer dimensions of 128 to 512.

[0042] The encoder's training objective is to predict ICP values ​​at various times within future time windows based on ICP time-series data within the input time window. To achieve this objective, the encoder's pre-training employs a self-supervised contrastive learning method: data augmentation is performed on the same ICP time-series data sample to generate two augmented views as positive sample pairs; augmented views of different samples are used as negative sample pairs. Data augmentation operations are selected from one or more of the following: truncating time segments of the original sequence at a random ratio of 0.8 to 0.95; scaling the sequence amplitude by a random factor in the range of 0.85 to 1.15; adding Gaussian noise at random time locations with an amplitude of 1% to 3% of the signal standard deviation; and applying elastic deformation to the time axis of the sequence locally. The contrastive loss function maximizes the similarity of positive sample pairs in the representation space and minimizes the similarity of negative sample pairs in the representation space. The pre-training data consists of a large amount of historical postoperative ICP monitoring data from patients, with a total of no less than 500 patients and at least 24 hours of monitoring records for each patient.

[0043] After pre-training, K-Means clustering was performed on the representation vectors of time-series data samples with peak intracranial pressure below 20 mmHg in the training data. Each cluster center was used as a prototype vector to construct a prototype memory. The number of prototype vectors, K, ranged from 5 to 20, with each prototype vector representing a time-series pattern of normal postoperative intracranial pressure recovery. During clustering, the maximum number of iterations of the K-Means algorithm was set to 300, and the convergence threshold was 1e-4.

[0044] S3: Deviation Monitoring and Triggering. In S3, the currently acquired ICP time-series data is input into the encoder to obtain the current representation vector. The Euclidean distance between the current representation vector and each prototype vector in the prototype memory is calculated, and the minimum Euclidean distance is used as the deviation index.

[0045] The first preset condition is that the minimum Euclidean distance is greater than a first threshold, and this minimum Euclidean distance shows a monotonically increasing trend over 3 to 10 consecutive time windows. The first threshold is determined based on the initial distance value calculated from ICP time-series data collected during the initial period after patient enrollment, which is the first 5 to 10 minutes after enrollment. The first threshold is specifically taken as 1.5 to 3 times the initial distance value. The time window length is 5 to 60 seconds.

[0046] When the above conditions are met, the system determines that the current ICP mode deviates from the normal mode and automatically executes S4.

[0047] S4: Attribution Analysis. In S4, the attention weights of token pairs representing global information in the multi-head self-attention layer of the encoder are extracted for each time patch. The attention weights of each attention head and each layer of the network are aggregated to obtain the attention weight values ​​for each time patch. The probability distribution of the attention weight values ​​of each time patch after Softmax normalization is used as the attribution distribution.

[0048] The baseline attribution distribution is the time average of the attribution distributions over a preset time period prior to the current time, which is 5 to 30 minutes. The difference value is the Jensen-Shannon divergence between the current attribution distribution and the baseline attribution distribution. The criteria for determining this difference value are: the Jensen-Shannon divergence is greater than a second threshold and the divergence value shows a monotonically increasing trend over multiple consecutive time windows, where the second threshold ranges from 0.05 to 0.3, and the number of consecutive time windows is 2 to 5.

[0049] Based on the attribution scores in the attribution distribution, identify the key driving factors causing the current deviation, namely the time windows or waveform features with the highest attribution scores in the attribution distribution, specifically the top few items with a cumulative contribution rate of over 80%. After identification, execute S5.

[0050] S5: Incremental Training and Prototype Library Update. In S5, incremental training employs a Bayesian continuous learning strategy. A probability distribution representation is introduced for each parameter of the encoder, specifically a Gaussian posterior distribution. The loss function for incremental training includes a prediction loss term and a regularization term: the prediction loss term is the mean squared error between the encoder's predicted ICP values ​​at each time point within the future time window and the actual collected values; the regularization term constrains the magnitude of parameter changes, and its value is the weighted sum of the products of the importance of each parameter and the square of the change in each parameter. Parameter importance is measured by the diagonal elements of the Fisher information matrix, using an online approximation method. The empirical average of the squared first-order gradient of the loss function with respect to the parameters under the current batch of data is used as an approximation of the diagonal elements of the Fisher information matrix.

[0051] The parameter dimension corresponding to the key driving factor is determined based on the distribution of the encoder's attention weights across each feature dimension. The key driving factor is the time window or waveform feature ranking high in the attribution score in the attribution distribution; the parameters corresponding to the network neurons activated by these high-ranking time windows or waveform features are the parameter dimensions corresponding to the key driving factor. In the regularization term, the parameter dimension corresponding to the key driving factor is given a smaller regularization strength than other parameter dimensions. Specifically, the diagonal elements of the Fisher information matrix of this dimension are multiplied by a decay coefficient less than 1, ranging from 0.1 to 0.5, giving the parameters corresponding to the key driving factor greater update freedom. Variational inference is used to update the probability distribution of each parameter by minimizing the loss function of incremental training.

[0052] Incremental training also includes maintaining an experience replay buffer with a capacity of 1,000 to 10,000 samples to store historically acquired ICP time-series data samples. During each incremental training iteration, a batch of historical samples is randomly sampled from the buffer and mixed with the newly added samples in the current batch for training, with the ratio of historical samples to new samples in the mixture being 1:1 to 3:1.

[0053] After each incremental training iteration, the parameter change is calculated, which is the average of the relative changes in each parameter value after incremental training compared to the parameter values ​​before incremental training. Specifically, this involves dividing the absolute value of the difference between the parameter value after incremental training and the parameter value before incremental training by the absolute value of the parameter value before incremental training, and then averaging all parameters. When this average value exceeds a third threshold, the prototype memory is updated. The third threshold ranges from 0.01 to 0.10. The update method is as follows: the currently collected ICP time series data is assigned to the cluster to which the corresponding prototype vector belongs, based on the closest distance between the current representation vector and each prototype vector. When the cumulative number of newly assigned samples in a cluster exceeds 10% to 30% of the original number of samples in that cluster, the cluster center of that cluster is recalculated, and the original prototype vector of that cluster is replaced with the new cluster center. After the update is completed, S6 is executed.

[0054] S6: Warning Level Output. In S6, the warning level is determined based on the Jensen-Shannon divergence value between the attribution distribution and the baseline attribution distribution. Specifically, a risk score is calculated based on the difference value; the larger the difference, the higher the risk score. The risk score is normalized to the range of 0 to 1. When the risk score is less than the first-level threshold, no warning is output; when the risk score is greater than or equal to the first-level threshold and less than the second-level threshold, a Level 1 warning is output; when the risk score is greater than or equal to the second-level threshold, a Level 2 warning is output. The first-level threshold is 0.3 to 0.5, and the second-level threshold is 0.6 to 0.8.

[0055] Example 1

[0056] Early warning of intracranial pressure trends based on basic parameters.

[0057] Purpose of implementation:

[0058] This embodiment aims to verify the overall early warning performance of the present invention under standard parameter configuration, including early warning lead time, early warning accuracy and false alarm rate, and to provide a benchmark implementation scheme for routine clinical application scenarios.

[0059] Implementation steps:

[0060] S1: After craniotomy for hematoma evacuation, an external ventricular drainage pressure sensor was inserted through the anterior horn of the lateral ventricle before the end of the surgery. The sensor was connected to a Codman ICPExpress monitor, with the sampling frequency set to 256Hz. The raw signal was denoised by bandpass filtering from 0.5Hz to 30Hz, and then segmented into 5-second time windows to output ICP timing data with a fixed time window length of 60 seconds.

[0061] S2: The temporal Transformer encoder consists of 6 multi-head self-attention layers, each with 8 attention heads, and each attention head has a dimension of 32. The temporal block embedding layer divides the 60-second ICP sequence into time patches of 32 sampling points each, for a total of 480 patches. Pre-training uses a contrastive learning framework with a temperature coefficient of 0.07 and a batch size of 256. Data augmentation employs a combination of temporal pruning and amplitude scaling strategies, with a temporal pruning ratio of 0.9 and an amplitude scaling factor ranging from 0.9 to 1.1. The pre-training data consists of ICP monitoring records from 800 postoperative patients, each for at least 48 hours. After pre-training, K-Means clustering (K=10) is performed on the representation vectors of samples with ICP peak values ​​below 20 mmHg in the pre-training data. The maximum number of clustering iterations is 300, and the convergence threshold is 1e-4.

[0062] S3: After the patient is admitted to the ICU, ICP data from the first 5 minutes after admission are collected to calculate the initial distance baseline. The first threshold is set to twice the initial distance value. The time window length is set to 10 seconds. S4 is executed when 5 consecutive windows show a monotonically increasing trend.

[0063] S4: Extract the attention weights of tokens representing global information from the multi-head self-attention layer of the encoder for each time patch. Average the attention weights of each attention head and each layer of the network to obtain the attention weight value for each time patch, and use this value as the attribution distribution after Softmax normalization. The baseline attribution distribution is the temporal average of the attribution distributions over the 15 minutes prior to the current time. The Jensen-Shannon divergence threshold is set to 0.15; attribution drift is confirmed when it shows a monotonically increasing trend for three consecutive windows. Based on the attribution scores in the attribution distribution, identify the top few items with a cumulative contribution rate of 80% as key driving factors, and proceed to S5.

[0064] S5: Perform an incremental update every 30 minutes of new data collection. The Fisher information matrix uses an online gradient squared approximation. The decay coefficient is set to 0.3. The experience replay buffer capacity is 5000 samples, with a historical sample to new sample ratio of 2:1 in the mixing ratio. The third threshold is set to 0.05. After each incremental training, the parameter change is calculated. When the average relative change magnitude is greater than 0.05, the prototype memory is updated. The update method is as follows: the currently collected ICP time series data is assigned to the corresponding cluster based on the closest distance between the current representation vector and each prototype vector. When the cumulative number of new samples assigned to a cluster exceeds 20% of the original number of samples in the cluster, the cluster center is recalculated and the original prototype vector is replaced. After the update is completed, execute S6.

[0065] S6: Calculate the risk score based on the Jensen-Shannon divergence between the attribution distribution and the baseline attribution distribution, and normalize it to the range of 0 to 1. The first-level threshold is set to 0.4, and the second-level threshold is set to 0.7. When the risk score is less than 0.4, output no warning; when it is greater than or equal to 0.4 and less than 0.7, output a first-level warning; when it is greater than or equal to 0.7, output a second-level warning.

[0066] Implementation results:

[0067] In this embodiment, during the monitoring of 50 postoperative patients, the average lead time for early warning was 28 minutes, the accuracy rate of early warning (assessed by AUC) was 0.92, and the false alarm rate was 12.3%. Early warning information was issued on average 28 minutes before the ICP value actually exceeded the clinical threshold, providing ample time for clinical intervention.

[0068] Example 2

[0069] High-precision early warning under high sampling rate configuration.

[0070] Purpose of implementation:

[0071] This embodiment aims to verify the upper limit of the early warning performance of the present invention under high sampling frequency and more attention head configuration, and to explore the optimal parameter combination suitable for neurocritical care scenarios with high requirements for early warning accuracy.

[0072] Implementation steps:

[0073] S1: The sampling frequency is set to 1000Hz, and the time window length remains 60 seconds, with each window containing 60,000 sampling points. After the original signal is denoised by bandpass filtering from 0.5Hz to 30Hz, baseline drift correction and outlier removal are performed, outputting ICP timing data with a fixed time window length of 60 seconds.

[0074] S2: The temporal block embedding layer divides the sequence into temporal patches of 16 sampling points each, totaling 3750 patches. The multi-head self-attention layer is set to 16 attention heads, each with a dimension of 64. Due to the increased number of temporal patches, the number of model parameters increases accordingly, and the workstation is configured with an NVIDIA A100 GPU to meet the computational requirements. Data augmentation adds local temporal distortion enhancement based on Example 1, with a distortion amplitude of ±5%. After pre-training, K-Means clustering is performed on the representation vectors of samples with ICP peak values ​​below 20 mmHg in the pre-training data, with K=20.

[0075] S3: Calculate the initial distance baseline using ICP data from the first 5 minutes after patient enrollment, with the first threshold set to 2.5 times the initial distance value. The time window length is set to 10 seconds, and S4 is executed when 5 consecutive windows show a monotonically increasing trend.

[0076] S4: Extract the attention weights of tokens representing global information from the multi-head self-attention layer of the encoder for each time patch. Aggregate the maximum values ​​of the attention weights of each attention head and each layer of the network to obtain the attention weight values ​​of each time patch. After Softmax normalization, this is used as the attribution distribution. The baseline attribution distribution is the temporal average of the attribution distributions at each time point within the 15 minutes prior to the current time. The Jensen-Shannon divergence threshold is set to 0.20, and attribution drift is confirmed when it shows a monotonically increasing trend for three consecutive windows. Based on the attribution scores in the attribution distribution, identify the top few items with a cumulative contribution rate of 80% as key driving factors, and proceed to S5.

[0077] S5: Perform an incremental update every 30 minutes of new data collection. The decay coefficient is set to 0.3. The experience replay buffer capacity is 5000 samples, and the ratio of historical samples to new samples in the mixture is 2:1. The third threshold is set to 0.05. After each incremental training, the parameter change is calculated. When the average relative change is greater than 0.05, the prototype memory is updated. After the update is completed, S6 is executed.

[0078] S6: The first grading threshold is set to 0.4, and the second grading threshold is set to 0.7.

[0079] Implementation results:

[0080] In this embodiment, during the monitoring of 30 postoperative patients, the average lead time for early warning was extended to 35 minutes, the accuracy of early warning (assessed by AUC) was 0.95, and the false alarm rate was reduced to 8.7%. The trade-off was an increase of approximately 40% in the time required for a single inference, making it suitable for neuro-intensive care units with sufficient computing resources.

[0081] Example 3

[0082] Lightweight warning in low-computing-power scenarios.

[0083] Purpose of implementation:

[0084] This embodiment aims to verify the feasibility and basic early warning performance of the present invention in clinical scenarios with limited computing resources, determine the minimum hardware configuration requirements, and provide an implementation plan for applications in primary hospitals and bedside portable devices.

[0085] Implementation steps:

[0086] S1: The sampling frequency is set to 100Hz, and the time window length is shortened to 30 seconds, with each window containing 3000 sampling points. The original signal is denoised by bandpass filtering from 0.5Hz to 30Hz, followed by baseline drift correction and outlier removal, outputting ICP timing data with a fixed time window length of 30 seconds.

[0087] S2: The temporal block embedding layer divides the sequence into temporal patches of 64 sampling points each, for a total of 47 patches. The multi-head self-attention layer is set to 4 attention heads, each with a dimension of 16. The number of network layers is reduced to 3. Data augmentation uses only temporal pruning as an augmentation strategy, with a pruning ratio of 0.85. After pre-training, K-Means clustering is performed on the representation vectors of samples with ICP peak values ​​below 20 mmHg in the pre-training data, with K=5.

[0088] S3: Calculate the initial distance baseline using ICP data from the first 5 minutes after patient enrollment. Set the first threshold to 1.8 times the initial distance value. Set the time window length to 60 seconds. Execute S4 when three consecutive windows show a monotonically increasing trend.

[0089] S4: Extract the attention weights of token pairs representing global information from the multi-head self-attention layer of the encoder for each time patch. Aggregate the average attention weights of each attention head and each layer of the network to obtain the attention weight value for each time patch, and use this value as the attribution distribution after Softmax normalization. The baseline attribution distribution is the temporal average of the attribution distributions over the previous 15 minutes. The Jensen-Shannon divergence threshold is set to 0.15; attribution drift is confirmed when it shows a monotonically increasing trend for three consecutive windows. Based on the attribution scores in the attribution distribution, identify the top few items with a cumulative contribution rate of 80% as key driving factors, and proceed to S5.

[0090] S5: Perform an incremental update every 60 minutes of new data collection. The decay coefficient is set to 0.3. The experience replay buffer capacity is 2000 samples, and the ratio of historical samples to new samples in the mixture is 1:1. The third threshold is set to 0.08. After each incremental training, the parameter change is calculated. When the average relative change is greater than 0.08, the prototype memory is updated. After the update is completed, S6 is executed.

[0091] S6: The first grading threshold is set to 0.4, and the second grading threshold is set to 0.7.

[0092] Implementation results:

[0093] In this embodiment, during the monitoring of 40 postoperative patients, the average lead time for early warning was 22 minutes, the accuracy of early warning (assessed by AUC) was 0.85, and the false alarm rate was 16.5%. The model can run in real time on a regular workstation CPU, with a single inference time of less than 100ms, making it suitable for primary hospitals and resource-constrained scenarios.

[0094] Example 4

[0095] Parameter comparison and verification of the differential regularization strategy.

[0096] Purpose of implementation:

[0097] This embodiment aims to verify the effectiveness of the core innovative feature of the present invention—that the parameter dimension corresponding to the key driving factor in S5 is given a smaller regularization strength than other parameter dimensions—by setting different attenuation coefficients for systematic comparison to determine the optimal attenuation coefficient range.

[0098] Implementation steps:

[0099] S1: The hardware configuration and acquisition parameters are exactly the same as those in Example 1, with a sampling frequency of 256Hz and a time window length of 60 seconds.

[0100] S2: The encoder architecture and pre-training data are exactly the same as in Example 1, i.e., 6 layers, 8 attention heads, each head with a dimension of 32, and 800 examples of pre-training data, each example lasting no less than 48 hours. After pre-training, K-Means clustering is performed with K=10.

[0101] S3: Use the same threshold settings as in Example 1: Set the first threshold to twice the initial distance value, the time window length to 10 seconds, and execute S4 when 5 consecutive windows show a monotonically increasing trend.

[0102] S4: The same attribution analysis method as in Example 1 is used: the average value of the attention weights of each attention head and each layer of the network is taken, and then normalized by Softmax to obtain the attribution distribution. The baseline attribution distribution is the time average of the attribution distributions at each time point within the 15 minutes prior to the current time. The Jensen-Shannon divergence threshold is set to 0.15, and attribution drift is confirmed when it shows a monotonically increasing trend for three consecutive windows.

[0103] S5: Five independent experiments were conducted with attenuation coefficients set to 0.1, 0.3, 0.5, 0.7, and 1.0, respectively, where 1.0 indicates no difference, meaning all parameters have the same regularization strength. Except for the attenuation coefficients, all parameters were identical to those in Example 1. Key driving factors were defined as the top few terms in the attribution distribution that contributed 80% cumulatively. The diagonal elements of the Fisher information matrix were approximated using the online gradient squared approximation. The empirical replay buffer capacity was 5000 samples, with a historical sample to new sample ratio of 2:1 in the mixture. Each experiment was evaluated for effectiveness on the same data from 50 postoperative patients, and S6 was executed.

[0104] S6: Using the same grading thresholds as in Example 1, with a first grading threshold of 0.4 and a second grading threshold of 0.7, output the warning level and record the warning lead time and false alarm rate for each group.

[0105] Implementation results:

[0106] The optimal performance was achieved with an attenuation coefficient of 0.3, resulting in an average warning lead time of 28 minutes and a false alarm rate of 12.3%. With an attenuation coefficient of 0.1, the model adapted to the new pattern most quickly but overfitting occurred, increasing the false alarm rate to 15.8% and the warning lead time to 26 minutes. With an attenuation coefficient of 0.5, the model update speed slowed, the average warning lead time shortened to 24 minutes, and the false alarm rate was 13.1%. With an attenuation coefficient of 0.7, the average warning lead time was 21 minutes, and the false alarm rate was 14.6%. At an attenuation coefficient of 1.0 (i.e., no differentiation), the model struggled to effectively adapt to the patient's disease progression; in the later monitoring stage, i.e., 48 hours post-surgery, the warning accuracy decreased from 0.78 to 0.62, the average warning lead time was only 17 minutes, and the false alarm rate was 19.8%. This example demonstrates that the strength of the differential regularization, i.e., assigning a smaller regularization strength to the parameters corresponding to key driving factors, is a crucial mechanism for achieving a balance between rapidly adapting to new pathological patterns and maintaining the stability of learned normal patterns; the optimal attenuation coefficient range is 0.2 to 0.4.

[0107] Example 5

[0108] Multicenter clinical validation.

[0109] Purpose of implementation:

[0110] This embodiment aims to verify the cross-center migration capability and personalized adaptation effect of the present invention across different medical centers and different patient populations, and to evaluate the generalization performance and long-term monitoring stability of the model in real clinical environments.

[0111] Implementation steps:

[0112] S1: This invention was implemented in 120 postoperative patients across three different neurosurgical centers. Each center used a 256Hz sampling frequency and a 60-second time window. The raw signals were bandpass filtered for noise reduction, baseline drift correction, and outlier removal before outputting ICP time-series data.

[0113] S2: Using historical patient data from Center A, with at least 48 hours of ICP monitoring for each case, the encoder was pre-trained. The temporal Transformer encoder consisted of 6 multi-head self-attention layers, each with 8 attention heads, and each attention head had a dimension of 32. Pre-training employed a contrastive learning framework, with data augmentation using temporal pruning and amplitude scaling strategies. The pruning ratio was 0.9, and the amplitude scaling factor ranged from 0.9 to 1.1. After pre-training, K-Means clustering (K=10) was performed on the representation vectors of samples with ICP peak values ​​below 20 mmHg in the training data from Center A. The pre-trained encoder and prototype memory were then deployed to Centers B and C.

[0114] S3: Each center takes ICP data from the first 5 minutes after patient enrollment to calculate the initial distance baseline, with the first threshold set to twice the initial distance value. The time window length is set to 10 seconds, and S4 is executed when 5 consecutive windows show a monotonically increasing trend.

[0115] S4: All centers use the same attribution analysis method: the average value of the attention weights of each attention head and each layer of the network is taken, and then normalized by Softmax to obtain the attribution distribution. The baseline attribution distribution is the time average of the attribution distributions at each time point within the previous 15 minutes. The Jensen-Shannon divergence threshold is set to 0.15. Attribution drift is confirmed when the divergence shows a monotonically increasing trend for three consecutive windows, and S5 is then executed.

[0116] S5: Each center maintains its own independent experience replay buffer with a capacity of 5000 samples, storing only monitoring data from patients within that center. Incremental training is performed every 30 minutes, with a uniform decay coefficient set to 0.3. The ratio of historical samples to new samples in the pooling ratio is 2:1, and the third threshold is 0.05. After each incremental training, the parameter change is calculated. When the average relative change is greater than 0.05, the prototype memory is updated. After the update is completed, S6 is executed.

[0117] S6: Each center uses a first-level threshold of 0.4 and a second-level threshold of 0.7 to output the early warning level.

[0118] Implementation results:

[0119] Using the occurrence of intracranial hypertension crisis within 72 hours post-surgery as the gold standard, intracranial hypertension crisis was defined as ICP exceeding 20 mmHg for more than 5 minutes. The early warning AUC for Center A, whose data was similar to the pre-training data, was 0.94. The early warning AUC for Center B, whose patient population differed from that of Center A, was 0.89. The early warning AUC for Center C, whose patient population differed significantly, was 0.87. The average early warning lead time for the three centers was 31 minutes. With prolonged monitoring time, the early warning performance of each center showed a continuous upward trend: Center B's AUC increased from 0.89 to 0.92 after accumulating 50 local data cases, and Center C's AUC increased from 0.87 to 0.90 after accumulating 50 local data cases. This embodiment demonstrates that the architecture of this invention, which combines pre-trained general representations with online personalized incremental learning, can achieve good transfer effects and continuous performance optimization across different patient populations.

[0120] Comparative Example 1

[0121] Traditional static deep learning early warning methods.

[0122] Purpose of comparison:

[0123] This comparative example aims to verify the technical advantages of the closed-loop progressive architecture described in S3 to S6 of this invention over traditional static deep learning early warning methods by comparing it with the method of this invention.

[0124] Comparison method configuration:

[0125] The same temporal Transformer encoder architecture as in Example 1 was used, namely 6 layers, 8 attention heads, and 32 dimensions per head, and offline training was completed on the same 800 historical data sets. After training, the encoder parameters remained fixed, and no incremental training as described in S5 or prototype memory updates as described in S2 were performed during clinical monitoring. The warning logic adopted a single threshold method: an warning was triggered when the encoder predicted a future ICP value exceeding 25 mmHg. It does not include the deviation monitoring described in S3, the attribution analysis and key driver identification described in S4, the prototype memory, or output visual explanatory information such as attribution heatmaps.

[0126] Comparison of implementation steps:

[0127] S1: Using the same acquisition parameters as in Example 1, namely a sampling frequency of 256Hz and a time window of 60 seconds, ICP signals from 50 postoperative patients were acquired and preprocessed to obtain ICP time series data.

[0128] S2: Offline training is performed using the same encoder architecture and pre-training data as in Example 1. After training, the encoder parameters are fixed, and no prototype memory is built.

[0129] S3: Input the currently acquired ICP time-series data into an encoder with fixed parameters. The model outputs ICP prediction values ​​for the next 5, 15, and 30 minutes. An alert is triggered if any predicted value exceeds 25 mmHg.

[0130] S4: Do not perform attribution analysis.

[0131] S5: Do not perform incremental training and prototype memory updates.

[0132] S6: Issue an early warning when any predicted value exceeds 25 mmHg.

[0133] Comparative effect analysis:

[0134] Regarding the average lead time for early warning, the comparative static method is only 12 minutes, significantly shorter than the 28 minutes in Embodiment 1 of this invention. The reason is that the static model only relies on the current input ICP value for prediction and lacks the deviation trend monitoring capability based on the prototype memory bank in S3 of this invention, thus failing to capture early signals of compensatory function decline before the ICP value increases significantly.

[0135] Regarding the accuracy of early warning 48 hours post-surgery, the comparative static method decreased from 0.78 to 0.65, a drop of 17%, while the present invention remained stable at 0.91. This is because the static model lacks the incremental training and prototype memory update mechanism described in S5 of the present invention, and therefore cannot adapt to the dynamic changes in ICP patterns brought about by the patient's postoperative cerebral edema subsiding, drainage adjustments, and drug interventions.

[0136] Regarding the false alarm rate, the comparative static method had a rate of 31.5%, significantly higher than the 12.3% of Example 1 of this invention. This is because the static model uses a uniform 25 mmHg threshold and lacks the individualized deviation baseline and first threshold settings described in S3 of this invention, thus lacking adaptability to different patients.

[0137] Regarding clinical adoption rate, the comparative static method only achieved 38%, mainly because the model lacked the attribution analysis function described in S4 of this invention, failing to provide clinicians with interpretable early warning evidence. This invention, by outputting an attribution heatmap, enables clinicians to intuitively understand the time window and waveform characteristics the model focuses on, achieving a clinical adoption rate of 87%.

[0138] Comparison conclusion:

[0139] This comparative example verifies the overall technical effectiveness of each step from S3 to S6 of the present invention: S3 achieves early perception through prototype memory and individualized deviation monitoring; S4 achieves diagnosis of abnormal causes and provides interpretable evidence through attribution analysis; S5 achieves continuous adaptation of the model to the evolution of the disease course through incremental training and prototype memory updates; and S6 achieves clinically operable early warning information through tiered early warning output. The above steps work together to form a technical closed loop of "perception-diagnosis-adaptation," overcoming the inherent defects of traditional static methods in terms of early warning proactivity, individual adaptability, interpretability, and long-term stability.

[0140] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of protection of the claims.

[0141] In conclusion, the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning, characterized in that, Includes the following steps: S1: Collect intracranial pressure monitoring signals from patients after neurosurgery and preprocess them to obtain intracranial pressure time-series data; S2: Construct an encoder and train it using a contrastive learning method. After training, cluster the representation vectors of intracranial pressure time series data to obtain multiple prototype vectors and construct a prototype memory bank. S3: Input the currently collected intracranial pressure time series data into the encoder to obtain the current representation vector, calculate the distance value between it and each prototype vector in the prototype memory bank, and when the distance value meets the first preset condition, determine that the current intracranial pressure mode deviates from the normal mode, and execute S4. S4: Extract the attention allocation values ​​of the encoder to form an attribution distribution, calculate the difference between the attribution distribution and the benchmark attribution distribution, identify key driving factors based on the difference, and execute S5. S5: Incrementally train the encoder according to the key driving factor, so that the encoder updates the parameter dimension corresponding to the key driving factor, calculate the parameter change of the encoder, and trigger the update of the prototype memory when the parameter change meets the second preset condition, and execute S6. S6: Output the warning level based on the difference between the attribution distribution and the benchmark attribution distribution.

2. The method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning as described in claim 1, characterized in that, The intracranial pressure monitoring signal described in S1 is continuously acquired by an invasive pressure sensor at a sampling frequency of 100Hz to 1000Hz; the preprocessing includes bandpass filtering for noise reduction, baseline drift correction, amplitude outlier removal, and frame-by-frame segmentation based on waveform peak detection, outputting intracranial pressure time-series data with a fixed time window length of 30 seconds to 300 seconds.

3. The method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning as described in claim 1, characterized in that, The encoder described in S2 includes a temporal deep learning network. The training objective of the encoder is to predict the intracranial pressure values ​​at each time point in the future time window based on the intracranial pressure time-series data within the input time window. The contrastive learning method is as follows: data augmentation operations are performed on the same intracranial pressure time-series data sample to generate two augmented views as positive sample pairs. The data augmentation operations are selected from one or more of the following: cropping the time segment of the original sequence by a random ratio, scaling the sequence amplitude by a random factor, adding Gaussian noise at random time positions, and deforming the time axis of the sequence locally. The augmented views of different samples are used as negative sample pairs. The encoder is trained using a contrastive loss function, which maximizes the similarity of positive sample pairs in the representation space and minimizes the similarity of negative sample pairs in the representation space.

4. The method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning as described in claim 1, characterized in that, The method for constructing the prototype memory bank described in S2 is as follows: performing clustering operations on the representation vectors of time-series data samples with intracranial pressure peak values ​​below 20 mmHg in the training data, using each cluster center as the prototype vector, and each prototype vector representing a time-series pattern of normal postoperative intracranial pressure recovery; the number of prototype vectors is 5 to 20.

5. The method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning as described in claim 1, characterized in that, The distance value mentioned in S3 is the Euclidean distance; the first preset condition is: the minimum Euclidean distance between the current representation vector and all prototype vectors in the prototype memory is greater than the first threshold, and the minimum Euclidean distance shows a monotonically increasing trend in multiple consecutive time windows; The first threshold is determined based on the initial distance value calculated from the intracranial pressure time-series data collected in the early period after the patient's enrollment. The first threshold is 1.5 to 3 times the initial distance value.

6. The method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning as described in claim 1, characterized in that, The encoder described in S2 is a temporal Transformer network, comprising a temporal block embedding layer, a multi-head self-attention layer, and a feedforward network layer. The temporal block embedding layer is used to segment intracranial pressure temporal data into multiple time patches of fixed length and add temporal position information through learnable position encoding vectors. The number of attention heads in the multi-head self-attention layer is 4 to 16. The method for extracting attention allocation values ​​in S4 is as follows: extract the attention weights of token pairs used to represent global information in the multi-head self-attention layer for each time patch, perform aggregation operations on the attention weights of each attention head and each layer of the network to obtain the attention weight value of each time patch, and use the normalized probability distribution of the attention weight values ​​of each time patch as the attribution distribution.

7. The method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning as described in claim 1, characterized in that, The baseline attribution distribution mentioned in S4 is the time average of the attribution distributions at each time point within a preset time period before the current time point; the difference value is the Jensen-Shannon divergence; the criterion for determining the difference value is: the Jensen-Shannon divergence is greater than the second threshold and the divergence value shows a monotonically increasing trend in multiple consecutive time windows; the value range of the second threshold is 0.05 to 0.

3.

8. The method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning as described in claim 1, characterized in that, include: A probability distribution representation is introduced for each parameter of the encoder; The loss function for incremental training includes a prediction loss term and a regularization term. The prediction loss term is a measure of the error between the encoder's predicted value and the actual collected value of intracranial pressure at each time point within a future time window. The regularization term is used to constrain the magnitude of parameter changes, and its value is a weighted sum of the product of the importance of each parameter and the square of the magnitude of the change of each parameter. The importance of parameters is measured by the diagonal elements of the Fisher information matrix, which are calculated online using the empirical average of the squared first-order gradient of the loss function with respect to the parameters under the current batch of data. The parameter dimension corresponding to the key driving factor is determined according to the distribution of the encoder's attention weight in each feature dimension. The key driving factor is the time window or waveform feature with the highest attribution score in the attribution distribution. The parameters of the network neurons activated by the highest-ranking time window or waveform feature are the parameter dimensions corresponding to the key driving factor. In the regularization term, the parameter dimension corresponding to the key driving factor is given a smaller regularization strength than other parameter dimensions, so that the parameter corresponding to the key driving factor can obtain a greater degree of update freedom. By minimizing the loss function of the incremental training, variational inference is used to update the probability distribution of each parameter.

9. The method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning as described in claim 1, characterized in that, The incremental training described in S5 also includes maintaining an experience replay buffer pool to store historically collected intracranial pressure time-series data samples; during each incremental training, historical samples are sampled from the buffer pool and mixed with newly added samples in the current batch for training; the method for calculating the parameter change is to calculate the average of the relative change amplitudes of each parameter value after incremental training and each parameter value before incremental training; the second preset condition is that the average of the relative change amplitudes is greater than the third threshold; the method for updating the prototype memory is as follows: based on the allocation criteria of the current representation vector being closest to each prototype vector, the currently collected intracranial pressure time-series data are allocated to the corresponding clusters; when the cumulative number of newly allocated samples in a cluster exceeds 10% to 30% of the original number of samples in the cluster, the cluster center is recalculated and the original prototype vector is replaced.

10. The method for early warning of intracranial pressure trends after neurosurgery based on temporal deep learning as described in claim 1, characterized in that, The warning level in S6 is determined based on the difference between the attribution distribution and the benchmark attribution distribution. Specifically, a risk score is calculated based on the difference, with a higher risk score indicating a larger difference. The risk score is normalized to the range of 0 to 1. When the risk score is less than the first grading threshold, no warning is output. When the risk score is greater than or equal to the first grading threshold and less than the second grading threshold, a level one warning is output. When the risk score is greater than or equal to the second grading threshold, a level two warning is output. The first grading threshold is 0.3 to 0.5, and the second grading threshold is 0.6 to 0.8.