Artificial intelligence-based post-spinal surgery drainage volume prediction and risk early warning method and system
Patent Information
- Application Number
- CN202611111859.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-24
- Publication Date
- 2026-10-30
AI Technical Summary
[0005]现有引流监测方式仅能反映当前或过去的引流状态,无法前瞻性地预测未来引流量的变化趋势,特别是无法提前识别引流趋势的拐点,导致对活动性出血或引流骤停等突发事件的识别存在时间滞后;
[0049]本发明通过人工智能预测模型输出未来引流量预测值,并在线计算预测误差序列,进而基于误差的方向持续强度和变化速率计算拐点逼近指数,能够提前识别引流趋势的拐点,为临床干预提供前瞻性预警,而非等待实测值发生明显变化后才报警;
Smart Images

Figure CN123017472A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of medical data processing and intelligent monitoring technology, specifically an artificial intelligence-based method and system for predicting postoperative drainage volume and risk warning of spinal surgery. Background Technology
[0002] Postoperative drainage volume in spinal surgery is an important clinical indicator for assessing postoperative recovery and early identification of complications. Spinal surgery involves procedures such as spinal canal decompression, bone grafting and fusion, and internal fixation, resulting in large surgical wounds. Postoperatively, drainage tubes are routinely placed to drain wound bleeding and exudate, prevent epidural hematoma formation, and help determine the presence of complications such as active bleeding or cerebrospinal fluid leakage by observing the color and characteristics of the drainage fluid. The dynamic changes in drainage volume are affected by various factors such as patient age, coagulation function, number of surgical segments, surgical approach, and intraoperative blood loss, resulting in significant individual differences in drainage patterns among different patients.
[0003] Currently, postoperative drainage management in clinical practice mainly relies on medical staff manually measuring and observing the characteristics of drainage fluid at fixed time points, recording the results, and judging whether the drainage trend is normal based on clinical experience. This manual, intermittent measurement method has significant time blind spots; if a sharp change in drainage volume or a sudden change in the characteristics of drainage fluid occurs between two measurements, it is difficult to detect in time. Furthermore, the judgment of the timing of tube removal is highly dependent on the doctor's personal experience; different doctors may reach different conclusions about the same drainage trend, lacking objective and quantitative auxiliary decision-making tools. The quality of drainage management directly affects patient safety and postoperative recovery; removing the tube too late increases the risk of infection, while removing it too early may lead to serious complications such as epidural hematoma. Therefore, clinical practice needs an auxiliary method that can prospectively predict the trend of postoperative drainage volume in spinal surgery and objectively quantify the risks, providing medical staff with continuous and dynamic decision-making reference information.
[0004] The following problems exist in the existing technology:
[0005] Existing drainage monitoring methods can only reflect the current or past drainage status and cannot predict the future trend of drainage volume changes in advance. In particular, they cannot identify the inflection point of the drainage trend in advance, resulting in a time lag in the identification of sudden events such as active bleeding or drainage cessation.
[0006] Existing anomaly detection methods based on thresholds or simple statistics cannot effectively capture abnormal patterns in the complex geometric features of drainage curves, such as shape, fluctuation cycle, and torsion, and are prone to missing atypical but clinically significant dynamic anomalies in drainage.
[0007] Existing early warning methods typically use fixed decision thresholds, which cannot be adaptively adjusted according to individual differences among patients and dynamic changes at different stages of postoperative recovery, resulting in frequent false positive alarms or missed alarms in high-risk situations. Summary of the Invention
[0008] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a method and system for predicting and warning of postoperative drainage volume and risk based on artificial intelligence, in order to solve the above-mentioned technical problems.
[0009] The first aspect of this invention provides an artificial intelligence-based method for predicting postoperative drainage volume and providing risk warnings for spinal surgery, comprising the following steps:
[0010] S1: Acquire real-time time-series data of drainage volume in patients after spinal surgery, input it into a trained artificial intelligence prediction model, output the predicted value of drainage volume within a set time period and its prediction error distribution parameters, and compare the measured value of each drainage volume in the real-time time-series data with the predicted value of the corresponding time in the predicted value of drainage volume, and generate a prediction error sequence online.
[0011] S2: Based on the predicted error sequence, calculate the inflection point approximation index, which reflects the sustained intensity of the error direction and its rate of change, to form an inflection point approximation index sequence.
[0012] S3: Construct a multidimensional path from the predicted traffic flow value sequence and the inflection point approximation index sequence, calculate the truncated path signature of the multidimensional path, and measure the difference between the truncated path signature and the pre-constructed normal traffic flow path signature template based on the adaptive weighting matrix to generate an abnormal risk score; wherein each element of the weighting matrix is determined by the magnitude of the corresponding component of the normal template signature through exponential mapping.
[0013] S4: Using the abnormal risk score as the modulation signal of the drift term, the evidence accumulation process is driven to obtain the accumulated evidence variable. Based on the statistical average level of the abnormal risk score within a preset time window and the instantaneous rate of change between adjacent sampling times, the decision threshold boundary of the evidence accumulation process is jointly adjusted. When the accumulated evidence variable crosses the decision threshold boundary, a risk warning is triggered.
[0014] Preferably, step S1 includes the following steps:
[0015] The trained artificial intelligence prediction model adopts an encoder-decoder structure, in which the encoder consists of multiple layers of Transformer coding blocks and the decoder is a fully connected feedforward network.
[0016] Real-time time series data includes measured drainage values and patient static feature information; a segment of measured drainage value taken from the current moment in the real-time time series data is concatenated with the patient static features expanded by the embedding layer and used as input for the trained artificial intelligence prediction model;
[0017] The prediction error distribution parameters are formed by simultaneously outputting multiple sets of predicted values at different quantile levels from the trained artificial intelligence prediction model through quantile regression.
[0018] The predicted value of the trained artificial intelligence prediction model for the current moment is compared point by point with the newly acquired actual value of the traffic inflow at the current moment to generate an instantaneous prediction error. This instantaneous prediction error and the corresponding prediction error distribution parameters are stored in a circular buffer to form an online updated prediction error sequence.
[0019] Preferably, step S2 includes the following steps:
[0020] Take the prediction error sequence with a forward length of w at the current time, and the prediction error distribution parameter sequence corresponding to each time step of the prediction error sequence;
[0021] Calculate the cumulative symbolic momentum reflecting the sustained intensity of the error direction; from the cumulative symbolic momentum at the current time t The rate of change of momentum is obtained by the first-order difference between the accumulated signed momentum and the momentum from the previous moment. ;
[0022] Calculate the inflection point approximation index The inflection point approximation index calculated at each time point is stored in a circular buffer in chronological order, thus forming the inflection point approximation index sequence.
[0023] Preferably, the cumulative symbolic momentum at the current time t The calculation formula is:
[0024]
[0025] Where w is the length of the prediction error sequence used for forward fetching, k is the number of steps from the current time, and λ is the exponential time decay factor. Let be the prediction error at time t−k. Let be the prediction error distribution parameters at time t−k. This is the sign-resetting function.
[0026] Preferably, step S3 includes the following steps:
[0027] A multidimensional path with time as a parameter is constructed by the predicted flow rate sequence, the inflection point approximation index sequence, and the first-order difference sequence of each measured flow rate in the real-time time series data.
[0028] Calculate the truncated path signature for a multidimensional path, which is truncated to a preset order. The truncated path signature is composed of iterative integrals of each order.
[0029] After constructing a multidimensional path from the drainage data of multiple patients who recovered normally, configuring the same channel, and calculating the truncated path signature, the normal drainage path signature template was obtained by averaging each element.
[0030] The diagonal elements of the adaptive weighted matrix are determined by exponentially amplifying the absolute values of the components corresponding to the normal template signature.
[0031] After subtracting the truncated path signature from the normal template signature at the current moment, the deviation of each component is weighted using an adaptive weighting matrix, and the sum of the squares of the weighted deviations is used as the abnormal risk score.
[0032] Preferably, the adaptive weighting matrix and the anomaly risk score include the following steps:
[0033] The formula for calculating the adaptive weighting matrix W is: ;
[0034] The abnormal risk score The calculation formula is: ;
[0035] in, The signature template for the normal traffic diversion path. This indicates that the absolute value of each component of the template signature is taken, where γ is the exponential amplification factor. This means constructing a diagonal matrix using a given vector. This is the truncated path signature for the current moment, where ⊙ represents element-wise multiplication.
[0036] Preferably, step S4 includes the following steps:
[0037] Set initial values for the cumulative evidence variables, as well as initial upper and lower boundaries for the decision threshold.
[0038] The abnormal risk score is mapped to a drift rate through a preset monotonically increasing function. The drift rate is used as the deterministic drift term in the evidence accumulation process to drive the accumulated evidence variable to drift upward. The larger the abnormal risk score, the greater the drift rate of the accumulated evidence variable.
[0039] Every preset first cycle, based on the average of the abnormal risk scores in that cycle, the basic boundary value is calculated according to a preset monotonically decreasing mapping relationship, and the upper boundary of the decision threshold boundary is updated to the basic boundary value.
[0040] At each time the abnormal risk score is generated, the instantaneous rise rate of the abnormal risk score relative to the previous time is monitored. When the instantaneous rise rate exceeds the preset risk surge trigger threshold, an asymmetric temporary contraction is performed on the upper boundary of the decision threshold boundary. The contraction magnitude is proportional to the instantaneous rise rate and does not make the upper boundary lower than the basic boundary value.
[0041] When the abnormal risk score falls back, the upper boundary slowly recovers to the basic boundary value at a preset rate, which is lower than the rate of contraction.
[0042] A risk warning is triggered when the accumulated evidence variable crosses the upper boundary of the decision threshold boundary from below.
[0043] A second aspect of the present invention provides an artificial intelligence-based system for predicting and warning the drainage volume and risks after spinal surgery, comprising the following modules:
[0044] The time-series prediction and error generation module acquires real-time time-series data of drainage volume in patients after spinal surgery, inputs it into a trained artificial intelligence prediction model, outputs the predicted value of drainage volume within a set time period and its prediction error distribution parameters, and compares the measured drainage values in the real-time time-series data with the predicted values at the corresponding time in the predicted drainage volume values to generate a prediction error sequence online.
[0045] Inflection point approximation index generation module: Based on the prediction error sequence, calculates the inflection point approximation index, which reflects the persistence intensity of the error direction and its rate of change, and forms an inflection point approximation index sequence.
[0046] Path signature risk quantification module: Constructs a multi-dimensional path from the predicted traffic value sequence and the inflection point approximation index sequence, calculates the truncated path signature of the multi-dimensional path, and measures the difference between the truncated path signature and the pre-constructed normal traffic path signature template based on an adaptive weighting matrix to generate an abnormal risk score; wherein each element of the weighting matrix is determined by the amplitude of the corresponding component of the normal template signature through exponential mapping.
[0047] Dynamic evidence accumulation and early warning triggering module: using the abnormal risk score as the modulation signal of the drift term, the evidence accumulation process is driven to obtain the accumulated evidence variable. Based on the statistical average level of the abnormal risk score within a preset time window and the instantaneous rate of change between adjacent sampling times, the decision threshold boundary of the evidence accumulation process is jointly adjusted. When the accumulated evidence variable crosses the decision threshold boundary, a risk warning is triggered.
[0048] Compared with the prior art, the beneficial effects of the present invention are:
[0049] This invention outputs predicted future drainage volume values through an artificial intelligence prediction model and calculates the prediction error sequence online. Then, based on the direction, persistence, intensity, and rate of change of the error, it calculates the inflection point approximation index, which can identify the inflection point of the drainage trend in advance and provide a forward-looking warning for clinical intervention, rather than waiting for the measured value to change significantly before issuing an alarm.
[0050] This invention constructs a multidimensional path by combining the predicted traffic flow value sequence with the inflection point approximation index sequence and calculates the truncated path signature. It then uses an adaptive weighted matrix to measure the difference between the signature template and the normal traffic flow path, which can quantify the degree of abnormality in traffic flow dynamics from the perspective of path geometry and effectively detect complex abnormal patterns that cannot be identified by relying solely on numerical thresholds.
[0051] This invention uses the abnormal risk score as a modulated signal to drive the evidence accumulation process. Based on the statistical average level of the risk score within a preset time window and the instantaneous change rate between adjacent sampling times, the decision threshold boundary is jointly adjusted so that the threshold can be dynamically adjusted according to the background risk level and the sudden increase in risk. It maintains high specificity in the low-risk stage to reduce false alarms, and rapidly shrinks the threshold in the high-risk or risk-surge stage to improve sensitivity, thereby achieving adaptive optimization of early warning decision. Attached Figure Description
[0052] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0053] Figure 2 This is a schematic diagram of the module flow of the present invention. Detailed Implementation
[0054] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0055] Please see Figure 1 This invention is an artificial intelligence-based method for predicting and warning of postoperative drainage volume and risks in spinal surgery, comprising the following steps:
[0056] S1: Acquire real-time time-series data of drainage volume in patients after spinal surgery, input it into a trained artificial intelligence prediction model, output the predicted value of drainage volume within a set time period and its prediction error distribution parameters, and compare the measured value of each drainage volume in the real-time time-series data with the predicted value of the corresponding time in the predicted value of drainage volume, and generate a prediction error sequence online.
[0057] S2: Based on the predicted error sequence, calculate the inflection point approximation index, which reflects the sustained intensity of the error direction and its rate of change, to form an inflection point approximation index sequence.
[0058] S3: Construct a multidimensional path from the predicted traffic flow value sequence and the inflection point approximation index sequence, calculate the truncated path signature of the multidimensional path, and measure the difference between the truncated path signature and the pre-constructed normal traffic flow path signature template based on the adaptive weighting matrix to generate an abnormal risk score; wherein each element of the weighting matrix is determined by the magnitude of the corresponding component of the normal template signature through exponential mapping.
[0059] S4: Using the abnormal risk score as the modulation signal of the drift term, the evidence accumulation process is driven to obtain the accumulated evidence variable. Based on the statistical average level of the abnormal risk score within a preset time window and the instantaneous rate of change between adjacent sampling times, the decision threshold boundary of the evidence accumulation process is jointly adjusted. When the accumulated evidence variable crosses the decision threshold boundary, a risk warning is triggered.
[0060] Specifically, real-time drainage data from post-spinal surgery patients is continuously collected using a bedside drainage monitoring device. This real-time data is input into a trained encoder-decoder AI prediction model. The model outputs a predicted drainage volume over a set timeframe, and simultaneously outputs prediction error distribution parameters via quantile regression. The measured drainage values are compared point-by-point with the predicted values at corresponding times, generating an online prediction error sequence. Subsequently, an inflection point approximation index reflecting the direction, intensity, and rate of change of the error is calculated based on the prediction error sequence, forming an inflection point approximation index sequence. On this basis, a multidimensional path is constructed using the predicted drainage volume sequence and the inflection point approximation index sequence. The truncated path signature of the multidimensional path is calculated, and an adaptive weighted matrix is used to measure the difference between the current truncated path signature and a pre-constructed normal drainage path signature template from data of normally recovering patients, generating an abnormal risk score. Each element of the weighted matrix is determined by an exponential mapping of the amplitude of the corresponding component of the normal template signature. Finally, the abnormal risk score is used as the modulated signal of the drift term to drive the evidence accumulation process, resulting in accumulated evidence variables. At the same time, the basic boundary value is calculated based on the statistical average level of the abnormal risk score within a preset time window, and the boundary emergency contraction is performed based on the instantaneous rate of change between adjacent sampling times. The decision threshold boundary is jointly adjusted, and a risk warning is triggered when the accumulated evidence variable crosses the decision threshold boundary.
[0061] In one embodiment of the present invention, step S1 includes the following steps:
[0062] The trained artificial intelligence prediction model adopts an encoder-decoder structure, in which the encoder consists of multiple layers of Transformer coding blocks and the decoder is a fully connected feedforward network.
[0063] Real-time time series data includes measured drainage values and patient static feature information; a segment of measured drainage value taken from the current moment in the real-time time series data is concatenated with the patient static features expanded by the embedding layer and used as input for the trained artificial intelligence prediction model;
[0064] The prediction error distribution parameters are formed by simultaneously outputting multiple sets of predicted values at different quantile levels from the trained artificial intelligence prediction model through quantile regression.
[0065] The predicted value of the trained artificial intelligence prediction model for the current moment is compared point by point with the newly acquired actual value of the traffic inflow at the current moment to generate an instantaneous prediction error. This instantaneous prediction error and the corresponding prediction error distribution parameters are stored in a circular buffer to form an online updated prediction error sequence.
[0066] Specifically, real-time time-series data of postoperative drainage volume in spinal surgery are continuously collected by a bedside drainage monitoring device at fixed sampling intervals. The interval is set to 1 minute, but can be adjusted from 30 seconds to 5 minutes according to clinical needs. At each sampling time, the device outputs a measured drainage value. , where t is the current sampling time number. The patient's static characteristic information is acquired synchronously; static characteristic information refers to the patient's inherent attributes recorded and archived at the end of the surgery. In this embodiment, it specifically includes five items: age, surgical approach identifier, number of vertebral segments involved in the surgery, preoperative prothrombin time value, and preoperative platelet count value; this information remains unchanged throughout the postoperative monitoring period.
[0067] The trained AI prediction model employs an encoder-decoder architecture. The encoder consists of four stacked Transformer coding blocks, each containing a multi-head self-attention mechanism and a feedforward sublayer. The number of self-attention heads is set to 8, and the hidden dimension of the feedforward sublayer is set to 512. The decoder is a fully connected feedforward network containing two hidden layers with 256 and 128 neurons per layer, respectively. The number of neurons in the output layer is dynamically determined according to the prediction requirements.
[0068] The measured flow rate values extracted from the real-time time series data, taking a segment backward from the current moment, are used as the flow rate measurement value window sequence. The length L of the flow rate measurement value window sequence is set to 64 sampling points, covering the flow rate measurement values of the past 64 minutes; if the current moment is t, then the extracted flow rate measurement value window sequence is... The patient's static feature information is fed into an embedding layer for processing, where discrete and continuous features are processed separately. Numerical features such as age and number of surgical segments are directly normalized and fed into a fully connected embedding layer with a dimension of 16. Categorical features such as surgical approach are mapped to an 8-dimensional vector through an embedding table with 3 categories. Prothrombin time and platelet count are also mapped to an 8-dimensional vector after logarithmic normalization. The embedded outputs of the static feature information are concatenated to obtain a 32-dimensional static feature extension vector. The measured drainage value window sequence and the static feature extension vector are concatenated at each time step to form the encoder input at each time step, with an input dimension of 33. The encoder output is then fed into the decoder.
[0069] The decoder output has three output heads arranged in parallel, corresponding to the 0.1 quantile, 0.5 quantile, and 0.9 quantile, respectively, synchronously outputting the predicted values of these three quantiles for a future set time period. The 0.5 quantile output head directly provides the predicted traffic flow sequence. In this embodiment, the set time period is the next 2 hours, and the sampling interval is 1 minute; therefore, the prediction step size H is 120 steps. Finally, the artificial intelligence prediction model outputs the predicted traffic flow sequence for the next 120 steps. Each predicted value is determined by the 0.5 quantile output value of the corresponding step. Simultaneously, the 0.1 quantile predicted value is obtained from the other two quantile outputs. and 0.9 quantile predicted value And accordingly, the prediction error distribution parameters are calculated. For the h-th step in the future, the prediction error distribution parameters are... ,in and These are the predicted values for the 0.1 quantile and 0.9 quantile, respectively. The value ≈1.2816 represents the 0.9 quantile of the standard normal distribution. Statistical verification of the prediction error distribution in the training set shows that the prediction error approximately follows a zero-mean normal distribution (Kolmogorov-Smirnov test greater than 0.05). Therefore, the estimation method based on the normal quantile relationship described above is used to obtain the error distribution parameters. This estimation method is merely one way to obtain the scaling parameter reflecting the degree of prediction dispersion.
[0070] The AI prediction model was trained offline using a large amount of historical drainage data from spinal surgery patients before deployment. The training set contained complete time-series drainage data from no fewer than 5000 spinal surgery patients from the end of surgery to extubation; all data were anonymized and standardized. The loss function consisted of two parts: a mean squared error loss between predicted and measured values, applied to the 0.5 quantile prediction head; and a quantile loss, applied to the 0.1 and 0.9 quantile heads, respectively. The quantile loss used standard quantile regression loss (pinball loss). For a quantile level τ, when the predicted value... When the loss is greater than or equal to the measured value y, the loss is ,when When y is less than y, the loss is The 0.9 quantile head is set to τ=0.9, the 0.1 quantile head to τ=0.1, and the 0.5 quantile head to τ=0.5 for mean squared error loss. The AI prediction model is trained using the Adam optimizer with an initial learning rate of 0.001 and a batch size of 128. Training stops when the validation set loss does not decrease for five consecutive epochs. Finally, the parameters are fixed and deployed on an edge inference server.
[0071] Each time a new traffic generation measurement value is obtained Take the window sequence of the currently updated measured traffic flow values. Patient static characteristic information is input into the artificial intelligence prediction model to obtain the prediction sequence and quantile output. Although the artificial intelligence prediction model outputs predicted values for the next H steps, only one step is used when generating the prediction error. Specifically, the prediction value for the current time t is retained when the artificial intelligence prediction model is run at the previous time t−1. and the corresponding prediction error distribution parameters Measured value at time t Upon arrival, the instantaneous prediction error is calculated directly. .
[0072] The calculated and its corresponding time Data is stored as a pair in a fixed-length circular buffer. The length w of the circular buffer is set to 30, covering the error information from the past 30 minutes. When the circular buffer is full, new data automatically overwrites the oldest data, always maintaining the most recent w error pairs. The circular buffer thus forms an online-updated prediction error sequence. (Right now ), and the corresponding prediction error distribution parameter sequence (Right now ), each of which The values are all calculated from the 0.9 quantile and 0.1 quantile intervals of the model output at the corresponding time point.
[0073] In one embodiment of the present invention, step S2 includes the following steps:
[0074] Take the prediction error sequence with a forward length of w at the current time, and the prediction error distribution parameter sequence corresponding to each time step of the prediction error sequence;
[0075] Calculate the cumulative symbolic momentum reflecting the sustained intensity of the error direction; from the cumulative symbolic momentum at the current time t The rate of change of momentum is obtained by the first-order difference between the accumulated signed momentum and the momentum from the previous moment. ;
[0076] Calculate the inflection point approximation index The inflection point approximation index calculated at each time point is stored in a circular buffer in chronological order, thus forming the inflection point approximation index sequence.
[0077] Specifically, at the current time t, the prediction error sequence and the corresponding prediction error distribution parameter sequence are obtained. The length of both sequences is the set circular buffer length w (w=30). A data segment of length w forward from the current time is selected from these two sequences. Since the circular buffer length is exactly w, all data within the buffer can be directly used, i.e., the prediction error sequence. And the corresponding prediction error distribution parameter sequence for each time point. For the same number of backtracking steps, the prediction error... With error distribution parameters They have the exact same time index t−k. Here, k is the backtracking step, k=1 is the most recent sampling time t−1, and k=w represents the earliest sampling time t−w.
[0078] Calculate the cumulative sign momentum that reflects the sustained intensity of the error direction. , Its function is to quantify the consistency of prediction error directions over a period of time. Its basic construction method is to combine the sign and magnitude of each prediction error in the sequence and then perform a weighted sum, such that when most errors have the same sign, the absolute value of momentum approaches 1, and when positive and negative errors cancel each other out, the momentum approaches 0. In this embodiment, the cumulative symbolic momentum can be calculated by normalizing the error amplitude using the prediction error distribution parameters before participating in the weighting, thus suppressing the interference of random large errors on momentum during periods of high noise.
[0079] Get the current time t Then, the rate of change of momentum is calculated. For the first sampling time, since there is no accumulated symbol momentum from the previous time, The rate of change of momentum is set to zero. For subsequent sampling times, the accumulated symbol momentum from the previous time step is taken, and the first-order difference between the two is calculated to obtain an approximate value of the rate of change of momentum, denoted as . ,Right now ,in The sampling interval is specified in this embodiment. =1 minute.
[0080] As the inflection point approaches the index In the calculation formula, the sensitivity coefficient >0, in this embodiment The value is 0.5; The range of values is determined by the saturation characteristics of the tanh function; the output of tanh(x) is close to 0.96 when x≈2.0 and close to 0.995 when x≈3.0, further increasing the input has minimal impact on the output; in actual traffic generation scenarios, The maximum is 1.0. When the traffic trend changes abruptly, the typical value is between 0.3 and 1.5, and the typical value of the product term is between 0 and 1.5; to make It remains in a low range during normal fluctuations in traffic flow, and can rise significantly without saturating when the trend changes sharply. The value range is generally set to 0.1 to 2.0; the larger the value, the better. The steeper the response to trend changes, the more suitable a value of 0.5 is for routine drainage monitoring after spinal surgery. It is the absolute value of the accumulated symbolic momentum at the current moment, and its theoretical range is [0,1]. It is the absolute value of the rate of change of momentum. Given the hyperbolic tangent function, we map the product terms within the parentheses to the open interval (0,1) to obtain the normalized inflection point approximation exponent.
[0081] Each time an inflection point approximation exponent is calculated, a value is obtained. This involves storing the data in a dedicated circular buffer. The length of the circular buffer (w=30) is consistent with the input sequence to ensure that the inflection point approximation exponent sequence and the prediction error sequence are aligned in time. When the buffer is full, new data automatically overwrites the oldest data. The inflection point approximation exponents stored in the circular buffer in chronological order form the inflection point approximation exponent sequence. .
[0082] In one embodiment of the present invention, the cumulative symbolic momentum at the current time t The calculation formula is:
[0083]
[0084] Where w is the length of the prediction error sequence used for forward fetching, k is the number of steps from the current time, and λ is the exponential time decay factor. Let be the prediction error at time t−k. Let be the prediction error distribution parameters at time t−k. This is the sign-resetting function.
[0085] Specifically, the cumulative signed momentum at the current time t In the calculation formula, w is the length of the prediction error sequence used to move forward, which is consistent with the length of the circular buffer. In this embodiment, w=30. The summation range is from k=1 to k=w, representing the error information from the past 30 sampling times. k is the number of backtracking steps from the current time t. k=1 corresponds to the prediction error and error distribution parameters of the most recent sampling time t−1, and k=30 corresponds to the prediction error and error distribution parameters of the earliest sampling time t−30.
[0086] The prediction error at time t−k can be positive, negative, or zero; a positive value indicates that the measured value of the drainage is greater than the predicted value, and a negative value indicates that the measured value of the drainage is less than the predicted value. To and Prediction error distribution parameters at the same time point, Constant is positive.
[0087] The exponential time decay factor λ > 0. The larger the value of k, the higher the weighting coefficient is assigned to the prediction error sign that is further away from the current time. In this embodiment, λ=0.1, and the value of λ is generally in the range of 0.05 to 0.2. The larger the value, the more significant the weighting amplification effect of the long-term error; if λ is 0.05, The error weight is approximately 4.48, meaning the error weight at the earliest time is about 4.5 times that at the most recent time. If λ is 0.2, this ratio is approximately 403 times, making it extremely sensitive to long-term trends and suitable for scenarios requiring early detection of slow, hidden changes. In this embodiment, λ is set to 0.1, striking a balance between the sensitivity of traffic trend monitoring and robustness to instantaneous noise.
[0088] This is the sign-determining function. When hour ;when hour ;when hour .
[0089] In one embodiment of the present invention, step S3 includes the following steps:
[0090] A multidimensional path with time as a parameter is constructed by the predicted flow rate sequence, the inflection point approximation index sequence, and the first-order difference sequence of each measured flow rate in the real-time time series data.
[0091] Calculate the truncated path signature for a multidimensional path, which is truncated to a preset order. The truncated path signature is composed of iterative integrals of each order.
[0092] After constructing a multidimensional path from the drainage data of multiple patients who recovered normally, configuring the same channel, and calculating the truncated path signature, the normal drainage path signature template was obtained by averaging each element.
[0093] The diagonal elements of the adaptive weighted matrix are determined by exponentially amplifying the absolute values of the components corresponding to the normal template signature.
[0094] After subtracting the truncated path signature from the normal template signature at the current moment, the deviation of each component is weighted using an adaptive weighting matrix, and the sum of the squares of the weighted deviations is used as the abnormal risk score.
[0095] Specifically, during the real-time monitoring of postoperative drainage volume in spinal surgery, a new predicted drainage volume value and inflection point approximation index are generated at each sampling time, and these values accumulate over time to form a sequence. At the current time t, the available sequence of predicted drainage volume values covers all predicted values from the start of monitoring to the current time, while the inflection point approximation index sequence covers the most recent 30 sampling times. Its length is determined by the length w=30 of the circular buffer of the prediction error sequence.
[0096] When constructing a multidimensional path, a subsequence of length T needs to be extracted from the predicted flow rate sequence, where T is the window length of the multidimensional path, and in this embodiment, it is set to 60. The reason T is greater than w is that the path signature calculation requires a sufficiently long path to fully capture the geometric features of the flow curve, including curve direction, fluctuation period, and torsion pattern. With a sampling interval of 1 minute, T=60 corresponds to the flow dynamics of the past hour, providing rich geometric information for the path signature, while w=30 only corresponds to 30 minutes; a path length that is too short will result in insufficient high-order iterative integral information in the signature. Therefore, a subsequence of the predicted flow rate is extracted. .
[0097] The inflection point approximation exponential sequence has a length of only w, but the multidimensional path requires a complete sequence of length T. For moments within the window whose time indices are earlier than the start of the inflection point approximation exponential sequence (i.e., from t−T+1 to t−w), no calculated inflection point approximation exponential value is available. For these earlier moments, the earliest available value in the inflection point approximation exponential sequence is used for forward padding, and this value is copied to all earlier moments to obtain an inflection point approximation exponential sequence of length T. When constructing a piecewise linear path, the filled segment and the actual calculated segment participate in linear interpolation and path integration in the same way. The coordinate values of the filled segment extend from the earliest available values to form horizontal line segments, maintaining the geometric continuity of the path. The signature component provided by this filled segment only serves as background shape support for the path. As online monitoring progresses, the filled segment window gradually slides out and is covered by the actual calculated values. The inflection point approximation index typically remains at a low level and changes gradually during the stable traffic phase, and forward filling does not introduce significant shape distortion. As online operation progresses, the filled segment will be gradually covered by subsequent actual calculated values.
[0098] Simultaneously, measured values of drainage are extracted from real-time time-series data to form a sequence of measured drainage values. A first-order difference is calculated for each sampling time in the sequence; that is, for any two adjacent times i−1 and i in the sequence, the change in the measured drainage value at time i compared to the previous time is calculated. ,in Let i be the measured value of the diversion. Let be the measured value of the drainage at time i−1; thus, a first-order difference sequence synchronously extended with the measured drainage value sequence is obtained. From this first-order difference sequence, a subsequence within the same window range as the multidimensional path is extracted, with a window length of T, to obtain... Where t−T+1 is the starting sampling time of the window; each item in the sequence The subscript is consistent with the sampling time number of the actual measured value of the drainage. The first difference value corresponding to the current time. The first-order difference value corresponding to the start time of the window.
[0099] The predicted flow rate sequence, the inflection point approximation exponential sequence, and the first-order difference sequence of the measured flow rate are used as three channels to construct a multidimensional path X with time as the parameter. The values of the three channels are taken at each sampling time within a time window of length T; that is, for times t−T+1, t−T+2, …,t, the predicted flow rate is taken respectively. Inflection point approach index (IPX) and first-order difference of actual traffic generation value The values at corresponding moments constitute three-dimensional coordinate points. Coordinate points at adjacent moments are connected by linear interpolation, forming piecewise linear paths. The three channels depict the same traffic acquisition process from three aspects: the level of traffic acquisition, the urgency of trend reversal, and the direction of short-term changes.
[0100] Calculate the truncated path signature for the multidimensional path X , It consists of iterative integrals of various orders; in this embodiment, the truncation order N is set to 3; the number of channels d=3 for X, and its three channels are respectively... 1, 2, and 3 are used to distinguish different channels. It consists of zero-order, first-order, second-order, and third-order terms. The zero-order term is always 1. The first-order term is the difference between the endpoint value and the starting value of each channel, i.e. , , The subscripts 1 and 0 represent the values of the path parameters when they are 1 and 0, respectively. The second-order terms are the iterative integrals between pairs of channels, totaling 9 components. Taking the second-order term between channel 1 and channel 2 as an example, ,in For inner-layer integration variables, For the outer integral variable, the upper limit of integration The inner integration interval is [0, ... The remaining second-order terms are similar in form, with the superscript index traversing all ordered combinations of {1,2,3}. The third-order terms are triple iterative integrals between the three channels, totaling 27 components. Taking the third-order terms between channels 1, 2, and 3 as an example... ,in For the innermost integration variable, For intermediate layer integration variables, The outermost integration variable is used, and the upper limit of integration for each layer is determined by the outermost integration variable; the remaining third-order terms are similar in form, with the superscript index group traversing all ordered combinations of {1,2,3}. There are 3 zero-order terms, 3 first-order terms, 9 second-order terms, and 27 third-order terms, totaling 40 components in the truncated path signature vector. For piecewise linear paths, the above iterative integrals can be analytically calculated using the path node coordinates; with second-order terms... For example, its value is equal to the sum of the contributions of all line segment pairs between adjacent nodes on the path. The calculation of the truncated path signature uses the Chen-Leon algorithm, which directly outputs the signature vector given the path node sequence and the truncation order. The truncated path signature truncated to order 3 contains incremental information of the path, second-order area information, and third-order volume information, capturing the shape, torsion, and fluctuation characteristics of the drainage curve in three-dimensional space.
[0101] Normal referral path signature template This is a pre-constructed reference baseline during the offline phase. During construction, complete drainage data from multiple post-spinal surgery patients meeting all clinical criteria were collected. Clinical criteria included: no post-operative complications such as epidural hematoma, active bleeding, or cerebrospinal fluid leakage; a monotonically decreasing daily drainage volume during tube indwelling without any abnormal rebound in drainage volume lasting more than 2 hours; and no need for further intervention due to drainage-related complications within 72 hours after tube removal. For each case, a multidimensional path was constructed using the same three-channel configuration and the same window length T=60, and the truncated path signature (cut to order 3) was calculated. Assume a total of M normal patients were collected, resulting in M truncated path signatures. The normal traffic diversion path signature template is obtained by averaging each element. In this embodiment, M is no less than 300 cases. The signature template for the normal traffic redirection path has been calculated before deployment and is directly loaded and used during the online operation phase.
[0102] Sign the truncated path at the current moment. and Perform a difference measurement. During measurement, the difference is adaptively weighted based on the magnitude of each component of the normal template signature. For each component, its absolute value is calculated, amplified by exponential mapping, and used as a weighting coefficient to construct an adaptive weighting matrix in diagonal form. Components with larger amplitudes correspond to the dominant geometric features in the traffic generation dynamics, and their corresponding diagonal elements in the weighting matrix are also larger, thus giving higher attention to deviations on these components. The adaptive weighting matrix is used to weight the deviations between the current path signature and the normal template signature, and the sum of the squares of the weighted deviations is used as the anomaly risk score. After completing the path construction and signature calculation for each current time window, the corresponding anomaly risk score is output. .
[0103] In one embodiment of the present invention, the adaptive weighting matrix and the anomaly risk score include the following steps:
[0104] The formula for calculating the adaptive weighting matrix W is: ;
[0105] The abnormal risk score The calculation formula is: ;
[0106] in, The signature template for the normal traffic diversion path. This indicates that the absolute value of each component of the template signature is taken, where γ is the exponential amplification factor. This means constructing a diagonal matrix using a given vector. This is the truncated path signature for the current moment, where ⊙ represents element-wise multiplication.
[0107] Specifically, the construction of the adaptive weighted matrix relies on a pre-built signature template for the normal referral path. , It is a vector of length 40, along with the truncated path signature at the current time. Same dimensions. Take For each component, calculate its absolute value to obtain a vector in which all components are non-negative. .Will Multiplying each element by the exponential amplification factor γ, we calculate its natural exponent to obtain the weighted coefficient vector. A diagonal matrix is constructed from this weighted coefficient vector, where each element on the diagonal is equal to the corresponding component of the weighted coefficient vector, and all off-diagonal elements are zero. This diagonal matrix is the adaptive weighting matrix W, i.e. .in This means transforming a given vector into a diagonal matrix. This is an element-wise natural exponential function. The exponential amplification factor γ is 0.5, and its value generally ranges from 0.2 to 1.0. The value of γ is based on the amplitude distribution characteristics of each component of the normal template signature: if the value of γ is too small, the diagonal elements of the weighting matrix tend to be close to 1, the weighting effect is weakened, and it is difficult to highlight the dominant geometric features; if the value of γ is too large, the weights corresponding to the components with large amplitudes are too high, which may lead to oversensitivity to small fluctuations. γ=0.5 can effectively balance the emphasis on dominant features and the suppression of noise in most traffic monitoring scenarios.
[0108] Sign the truncated path at the current moment. Signature template for normal traffic diversion path Subtracting element-wise yields the deviation vector. Multiplying the adaptive weighting matrix W element-wise with the deviation vector (i.e., multiplying each element on the diagonal of the weighting matrix by the corresponding component of the deviation vector) yields the weighted deviation vector. The sum of squares of all components of this weighted deviation vector is the anomaly risk score. ,Right now Where ⊙ denotes element-wise multiplication. Let be the L2 norm of the vector, and the superscript 2 indicates that it is squared. It is a non-negative scalar. The larger its value, the greater the deviation of the current traffic diversion path signature from the normal recovery pattern in the dominant geometric feature dimension, that is, the higher the risk of abnormal patterns in traffic diversion dynamics.
[0109] In one embodiment of the present invention, step S4 includes the following steps:
[0110] Set initial values for the cumulative evidence variables, as well as initial upper and lower boundaries for the decision threshold.
[0111] The abnormal risk score is mapped to a drift rate through a preset monotonically increasing function. The drift rate is used as the deterministic drift term in the evidence accumulation process to drive the accumulated evidence variable to drift upward. The larger the abnormal risk score, the greater the drift rate of the accumulated evidence variable.
[0112] Every preset first cycle, based on the average of the abnormal risk scores in that cycle, the basic boundary value is calculated according to a preset monotonically decreasing mapping relationship, and the upper boundary of the decision threshold boundary is updated to the basic boundary value.
[0113] At each time the abnormal risk score is generated, the instantaneous rise rate of the abnormal risk score relative to the previous time is monitored. When the instantaneous rise rate exceeds the preset risk surge trigger threshold, an asymmetric temporary contraction is performed on the upper boundary of the decision threshold boundary. The contraction magnitude is proportional to the instantaneous rise rate and does not make the upper boundary lower than the basic boundary value.
[0114] When the abnormal risk score falls back, the upper boundary slowly recovers to the basic boundary value at a preset rate, which is lower than the rate of contraction.
[0115] A risk warning is triggered when the accumulated evidence variable crosses the upper boundary of the decision threshold boundary from below.
[0116] Specifically, at the start of the real-time monitoring process for postoperative spinal drainage, the initial value of the cumulative evidence variable E is set to zero. The initial value of the upper boundary A of the decision threshold is set to 2.5, which is based on the boundary value corresponding to the lowest background risk level in the basic boundary value lookup table. This ensures that a wider boundary is used in the initial monitoring stage when there are no abnormal risk signals to suppress false alarms. The lower boundary is set to −B, where B is a fixed positive value. In this embodiment, B is set to 2.0. The lower boundary remains constant throughout the monitoring period. Under the conditions of noise intensity σ=1.0 and drift rate of zero, numerical simulation shows that when the boundary value is 2.0, the expected time for the cumulative evidence variable to first cross the boundary is much longer than the routine postoperative monitoring time. Therefore, the probability of false alarms caused by random fluctuations is extremely low.
[0117] Abnormal risk score The drift rate is mapped to a pre-defined monotonically increasing function. ,by This serves as the deterministic drift term in the evidence accumulation process. In this embodiment, the monotonically increasing function is taken as... Among them, the basic drift rate =0.3, sensitivity factor =1.0. At the typical abnormal risk level. With a value of σ = 0.5, tanh(0.5) ≈ 0.462, corresponding to a drift rate of approximately 0.139. Combined with noise intensity σ = 1.0 and boundary value B = 2.0, numerical simulations show... A value of 0.3 allows the cumulative evidence variable to cross the upper boundary within approximately 20 minutes, meeting clinical requirements for timely early warning. The most significant changes in the abnormal risk score after spinal surgery occurred within the range of 0.2 to 0.6. Setting the value to 1.0 allows the tanh function to maintain an approximately linear response within the interval, while gradually saturating at both ends, thus avoiding excessive amplification of extreme values.
[0118] The cumulative evidence variable E is updated using a discretized recursive approach. At each sampling time, the current drift rate is used... Update the cumulative evidence variable E, i.e. Where σ=1.0 is the noise intensity. =1 minute is the sampling interval, and ϵ is the random number drawn by the MT19937 standard normal distribution pseudo-random number generator (using the hash value of a fixed timestamp as the random seed to ensure the repeatability of clinical monitoring).
[0119] The upper boundary A of the decision threshold is not fixed. It varies every preset first cycle. Calculate all within this period average In this embodiment The time interval is 30 minutes, meaning it is calculated every 30 sampling times. The basic boundary values are calculated based on a pre-defined monotonically decreasing mapping relationship. The mapping relationships are stored in the form of lookup tables. The lookup tables are compiled based on: statistical analysis of historical case data before the occurrence of abnormal events at different background risk levels. The distribution characteristics are used to maximize the Youden's Index of the ROC curve, ensuring that the baseline boundary value achieves a predetermined balance between sensitivity and specificity at this background risk level. Specifically, in this embodiment, the lookup table is set as follows: when... When <0.1, =2.5; when 0.1≤ When <0.3, =2.0; when 0.3≤ When <0.5, =1.5; when When ≥0.5, =1.0. The lookup table sets the thresholds 0.1, 0.3, and 0.5 for each tier based on the patient's normal recovery and the period before the abnormal event. The statistical differences in the distribution are determined, enabling each tier to effectively distinguish different risk levels. At the end of each first cycle, the upper boundary A of the decision threshold is directly updated to the value obtained from the current table lookup. value.
[0120] In each generation At any time, monitor The instantaneous rate of ascent relative to the previous moment, i.e., the rate of ascent at the current moment. value minus the previous moment The difference obtained is used as the threshold value. When this difference exceeds the preset risk surge trigger threshold θ, asymmetric temporary contraction is performed on the upper boundary A of the decision threshold. In this embodiment, θ is set to 0.15, which is based on the statistical analysis of adjacent sampling times during the entire drainage process of no less than 1000 normally recovered patients. The 99th percentile of the difference ensures that emergency contractions are rarely triggered under normal fluctuations. The contraction magnitude equals the difference multiplied by the contraction coefficient. In this embodiment The value is set to 1.5, based on the premise that a single moderate surge in risk (with a difference of approximately 0.3) would compress the upper boundary by about 0.45, approaching the distance between adjacent basic boundary value levels. The upper boundary after temporary contraction is determined by the contraction candidate value and the current basic boundary value. The larger of the two is used to ensure that the upper boundary is not lower than the basic boundary determined by the long-term statistical level.
[0121] when During the pullback, i.e., at the current moment Subtract the previous moment When the difference is less than or equal to zero, the upper boundary A moves towards the base boundary value at a preset recovery rate c. Slow recovery. In this embodiment, c is set to 0.05 per minute. This value is based on the fact that the time required for the upper boundary to fully recover to the basic boundary value after a single emergency contraction is approximately on the order of tens of minutes. During this period, the monitoring process maintains a high ability to detect potential recurrence of risk escalation. The reason why the recovery rate is lower than the contraction rate is that after a single risk escalation triggers the threshold, the difference between adjacent time points can reach more than 0.15, multiplied by... =1.5 After contraction, the contraction amplitude is at least 0.225, while the recovery amount per minute is only 0.05. The recovery amount in the same time is much less than the contraction amount.
[0122] The warning is triggered when the cumulative evidence variable E crosses the upper boundary A of the decision threshold from bottom to top. After evidence updates and boundary adjustments are completed at each sampling time, the following two conditions are checked simultaneously: the cumulative evidence variable value at the previous time step is less than the upper boundary A value at the previous time step; the cumulative evidence variable value at the current time step is greater than or equal to the upper boundary A value at the current time step. When both conditions are met, a traffic diversion anomaly risk warning is triggered. This warning indicates that the current traffic diversion dynamics have exhibited a continuous and systematic abnormal pattern. After the warning is triggered, the cumulative evidence variable E is reset to zero, and A is restored to the current basic boundary value. This marks the beginning of a new round of evidence accumulation.
[0123] Please see Figure 2 As shown, this invention is an artificial intelligence-based system for predicting and warning the drainage volume and risks after spinal surgery, comprising the following modules:
[0124] The time-series prediction and error generation module acquires real-time time-series data of drainage volume in patients after spinal surgery, inputs it into a trained artificial intelligence prediction model, outputs the predicted value of drainage volume within a set time period and its prediction error distribution parameters, and compares the measured drainage values in the real-time time-series data with the predicted values at the corresponding time in the predicted drainage volume values to generate a prediction error sequence online.
[0125] Inflection point approximation index generation module: Based on the prediction error sequence, calculates the inflection point approximation index, which reflects the persistence intensity of the error direction and its rate of change, and forms an inflection point approximation index sequence.
[0126] Path signature risk quantification module: Constructs a multi-dimensional path from the predicted traffic value sequence and the inflection point approximation index sequence, calculates the truncated path signature of the multi-dimensional path, and measures the difference between the truncated path signature and the pre-constructed normal traffic path signature template based on an adaptive weighting matrix to generate an abnormal risk score; wherein each element of the weighting matrix is determined by the amplitude of the corresponding component of the normal template signature through exponential mapping.
[0127] Dynamic evidence accumulation and early warning triggering module: using the abnormal risk score as the modulation signal of the drift term, the evidence accumulation process is driven to obtain the accumulated evidence variable. Based on the statistical average level of the abnormal risk score within a preset time window and the instantaneous rate of change between adjacent sampling times, the decision threshold boundary of the evidence accumulation process is jointly adjusted. When the accumulated evidence variable crosses the decision threshold boundary, a risk warning is triggered.
[0128] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A method for predicting postoperative drainage volume and providing risk warning based on artificial intelligence for spinal surgery, characterized in that, Includes the following steps: S1: Acquire real-time time-series data of drainage volume in patients after spinal surgery, input it into a trained artificial intelligence prediction model, output the predicted value of drainage volume within a set time period and its prediction error distribution parameters, and compare the measured value of each drainage volume in the real-time time-series data with the predicted value of the corresponding time in the predicted value of drainage volume, and generate a prediction error sequence online. S2: Based on the predicted error sequence, calculate the inflection point approximation index, which reflects the sustained intensity of the error direction and its rate of change, to form an inflection point approximation index sequence. S3: Construct a multi-dimensional path from the predicted traffic flow value sequence and the inflection point approximation index sequence, calculate the truncated path signature of the multi-dimensional path, and measure the difference between the truncated path signature and the pre-constructed normal traffic flow path signature template based on the adaptive weighting matrix to generate an abnormal risk score. The elements of the weighting matrix are determined by the magnitude of the component corresponding to the normal template signature through exponential mapping. S4: Using the abnormal risk score as the modulation signal of the drift term, the evidence accumulation process is driven to obtain the accumulated evidence variable. Based on the statistical average level of the abnormal risk score within a preset time window and the instantaneous rate of change between adjacent sampling times, the decision threshold boundary of the evidence accumulation process is jointly adjusted. When the accumulated evidence variable crosses the decision threshold boundary, a risk warning is triggered.
2. The method for predicting and warning the amount of drainage after spinal surgery based on artificial intelligence according to claim 1, characterized in that, S1 includes the following steps: The trained artificial intelligence prediction model adopts an encoder-decoder structure, in which the encoder consists of multiple layers of Transformer coding blocks and the decoder is a fully connected feedforward network. Real-time time series data includes measured drainage values and patient static feature information; a segment of measured drainage value taken from the current moment in the real-time time series data is concatenated with the patient static features expanded by the embedding layer and used as input for the trained artificial intelligence prediction model; The prediction error distribution parameters are formed by simultaneously outputting multiple sets of predicted values at different quantile levels from the trained artificial intelligence prediction model through quantile regression. The predicted value of the trained artificial intelligence prediction model for the current moment is compared point by point with the newly acquired actual value of the traffic inflow at the current moment to generate an instantaneous prediction error. This instantaneous prediction error and the corresponding prediction error distribution parameters are stored in a circular buffer to form an online updated prediction error sequence.
3. The method for predicting and warning the amount of drainage after spinal surgery based on artificial intelligence according to claim 1, characterized in that, S2 includes the following steps: Take the prediction error sequence with a forward length of w at the current time, and the prediction error distribution parameter sequence corresponding to each time step of the prediction error sequence; Calculate the cumulative symbolic momentum reflecting the sustained intensity of the error direction; from the cumulative symbolic momentum at the current time t The rate of change of momentum is obtained by the first-order difference between the accumulated signed momentum and the momentum from the previous moment. ; Calculate the inflection point approximation index The inflection point approximation index calculated at each time point is stored in a circular buffer in chronological order, thus forming the inflection point approximation index sequence.
4. The method for predicting and warning the amount of drainage after spinal surgery based on artificial intelligence according to claim 3, characterized in that, The cumulative symbolic momentum at the current time t The calculation formula is: Where w is the length of the prediction error sequence used for forward fetching, k is the number of steps from the current time, and λ is the exponential time decay factor. Let be the prediction error at time t−k. Let be the prediction error distribution parameters at time t−k. This is the sign-resetting function.
5. The method for predicting and warning the amount of drainage after spinal surgery based on artificial intelligence according to claim 1, characterized in that, S3 includes the following steps: A multidimensional path with time as a parameter is constructed by the predicted flow rate sequence, the inflection point approximation index sequence, and the first-order difference sequence of each measured flow rate in the real-time time series data. Calculate the truncated path signature for a multidimensional path, which is truncated to a preset order. The truncated path signature is composed of iterative integrals of each order. After constructing a multidimensional path from the drainage data of multiple patients who recovered normally, configuring the same channel, and calculating the truncated path signature, the normal drainage path signature template was obtained by averaging each element. The diagonal elements of the adaptive weighted matrix are determined by exponentially amplifying the absolute values of the components corresponding to the normal template signature. After subtracting the truncated path signature from the normal template signature at the current moment, the deviation of each component is weighted using an adaptive weighting matrix, and the sum of the squares of the weighted deviations is used as the abnormal risk score.
6. The method for predicting and warning the amount of drainage after spinal surgery based on artificial intelligence according to claim 5, characterized in that, The adaptive weighting matrix and the anomaly risk score include the following steps: The formula for calculating the adaptive weighting matrix W is: ; The abnormal risk score The calculation formula is: ; in, The signature template for the normal traffic diversion path. This indicates that the absolute value of each component of the template signature is taken, where γ is the exponential amplification factor. This means constructing a diagonal matrix using a given vector. This is the truncated path signature for the current moment, where ⊙ represents element-wise multiplication.
7. The method for predicting and warning the amount of drainage after spinal surgery based on artificial intelligence according to claim 1, characterized in that, S4 includes the following steps: Set initial values for the cumulative evidence variables, as well as initial upper and lower boundaries for the decision threshold. The abnormal risk score is mapped to a drift rate through a preset monotonically increasing function. The drift rate is used as the deterministic drift term in the evidence accumulation process to drive the accumulated evidence variable to drift upward. The larger the abnormal risk score, the greater the drift rate of the accumulated evidence variable. Every preset first cycle, based on the average of the abnormal risk scores in that cycle, the basic boundary value is calculated according to a preset monotonically decreasing mapping relationship, and the upper boundary of the decision threshold boundary is updated to the basic boundary value. At each time the abnormal risk score is generated, the instantaneous rise rate of the abnormal risk score relative to the previous time is monitored. When the instantaneous rise rate exceeds the preset risk surge trigger threshold, an asymmetric temporary contraction is performed on the upper boundary of the decision threshold boundary. The contraction magnitude is proportional to the instantaneous rise rate and does not make the upper boundary lower than the basic boundary value. When the abnormal risk score falls back, the upper boundary slowly recovers to the basic boundary value at a preset rate, which is lower than the rate of contraction. A risk warning is triggered when the accumulated evidence variable crosses the upper boundary of the decision threshold boundary from below.
8. An artificial intelligence-based system for predicting and warning the drainage volume and risks after spinal surgery, characterized in that: Includes the following modules: The time-series prediction and error generation module acquires real-time time-series data of drainage volume in patients after spinal surgery, inputs it into a trained artificial intelligence prediction model, outputs the predicted value of drainage volume within a set time period and its prediction error distribution parameters, and compares the measured drainage values in the real-time time-series data with the predicted values at the corresponding time in the predicted drainage volume values to generate a prediction error sequence online. Inflection point approximation index generation module: Based on the prediction error sequence, calculates the inflection point approximation index, which reflects the persistence intensity of the error direction and its rate of change, and forms an inflection point approximation index sequence. Path signature risk quantification module: Constructs a multi-dimensional path from the predicted traffic value sequence and the inflection point approximation index sequence, calculates the truncated path signature of the multi-dimensional path, and measures the difference between the truncated path signature and the pre-constructed normal traffic path signature template based on the adaptive weighting matrix to generate an abnormal risk score; The elements of the weighting matrix are determined by the magnitude of the component corresponding to the normal template signature through exponential mapping. Dynamic evidence accumulation and early warning triggering module: using the abnormal risk score as the modulation signal of the drift term, the evidence accumulation process is driven to obtain the accumulated evidence variable. Based on the statistical average level of the abnormal risk score within a preset time window and the instantaneous rate of change between adjacent sampling times, the decision threshold boundary of the evidence accumulation process is jointly adjusted. When the accumulated evidence variable crosses the decision threshold boundary, a risk warning is triggered.