Abdominal postoperative infection trend prediction system and method
Through the combination of multi-dimensional dynamic sliding window and LSTM model, the problem of complexity of post-abdominal infection prediction is solved, personalized infection trend prediction is achieved, and the accuracy and efficiency of prediction are improved.
Patent Information
- Application Number
- CN202411112356.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-06
AI Technical Summary
The prediction of post-abdominal infection is complex and personalized, and it is difficult for the prior art to effectively collect and analyze multiple data characteristics, resulting in inaccurate and missing prediction results.
Data feature analysis is performed using multi-dimensional dynamic sliding windows, and an infection trend prediction model is constructed in combination with the LSTM framework. Through the skewness, correlation and dynamic feature extraction of data, the window size is dynamically adjusted to adapt to data changes, and personalized infection trend prediction is achieved.
It improves the accuracy and personalized output of infection trend prediction, reduces the workload of model learning, enhances feature extraction capabilities, and provides real-time and accurate post-abdominal infection trend analysis.
Smart Images

Figure CN119092119A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of post-abdominal infection prediction, and more specifically, to a post-abdominal infection trend prediction system and method. Background Art
[0002] The publication number CN116864142A discloses a method and system for predicting epidemic trends. The method is to collect basic information of users, give the user's epidemic weight according to the basic information of the users; update the user's epidemic weight according to the preset rules, and after the update is completed, calculate the warning score of the user's area according to the updated epidemic weight and the basic information of the user; when the warning score of the user's area is greater than the preset warning threshold, determine whether the epidemic has been modeled in the preset trend prediction model; if the epidemic has been modeled, output the quantitative prediction result of the infection trend through the trend prediction model, and modify the trend prediction model; if the epidemic has not been modeled, output the qualitative prediction result of the infection trend through the trend prediction model, and fit the trend prediction model. This method and this system can solve the technical problems of inaccurate prediction results and missing prediction results in some cases, but how to extract features from a large number of collected data, strengthen data feature analysis, and adaptive setting of the model have not been involved.
[0003] Abdominal surgery is a conventional treatment method, but in terms of postoperative care, postoperative infection is an extremely dangerous and important aspect. With the introduction of AI technology, it provides new possibilities for intelligent care and rapid and healthy recovery of abdominal postoperative infection. However, there are many factors affecting abdominal postoperative infection, which leads to a large amount of sample data collected when predicting abdominal postoperative infection. In addition, since each patient's physiological state and recovery environment are different, including the patient's physiological state, type of surgery, postoperative care, etc., the correlation data of infection prediction for personalized prediction is complex and difficult to distinguish, which makes the targeted and personalized feature selection of each patient complicated. Therefore, innovative design of abdominal postoperative infection prediction is needed. Summary of the invention
[0004] In view of the problems existing in the prior art, the purpose of the present invention is to provide a system and method for predicting the trend of post-abdominal infection, so as to realize the intelligent prediction of the trend of post-abdominal infection.
[0005] To achieve the above object, the present invention provides the following technical solution: a system for predicting the trend of postoperative infection after abdominal surgery, the system comprising:
[0006] The data collection module collects the basic information of the patient and continuously collects the comprehensive nursing information of the patient at n time points within a time period and at a fixed frequency p;
[0007] Fitting analysis module: constructs the original data matrix, performs statistical feature analysis on the original data matrix through a multi-dimensional dynamic sliding window, and obtains a characteristic data set;
[0008] Model prediction module: Build and train an infection trend prediction model, import the patient's characteristic data set in the current time period into the trained infection trend prediction model, and obtain infection trend prediction information for the next time period;
[0009] The modules are connected to each other via wired and / or wireless means.
[0010] Preferably, the basic patient information includes the patient's age, gender, height, weight, allergy history, past medical history, surgery type, surgery time, surgery duration, surgery complexity, and intraoperative blood loss;
[0011] Comprehensive nursing information included patients’ postoperative body temperature, heart rate, blood pressure, respiratory rate, blood oxygen saturation, white blood cell count, C-reactive protein, medication use data, wound care records, activity data, and food intake data.
[0012] Preferably, the construction of the original data matrix includes: identifying the text descriptions in the basic information and the comprehensive nursing information, and converting them into numerical form through numerical coding, taking n time points as the rows of the matrix, taking the data types in the comprehensive nursing information as the columns of the matrix, performing all numerical coding on the basic information to form a string of digital strings, setting the original data matrix,
[0013]
[0014] Among them, x00 represents the digital string formed by basic information, x0i represents the value at the i-th time point, and i=1,...,n, xj0 represents the numerical code of the j-th data type in the comprehensive nursing information, and j=1,...,m, m represents the number of data types in the comprehensive nursing information, and xij represents the value of the j-th data type at the i-th time point.
[0015] Preferably, the setting of the multidimensional dynamic sliding window includes:
[0016] Define a multi-dimensional dynamic sliding window, dynamically adjust the window size based on trend changes, and set the multi-dimensional dynamic sliding window size to r×m, where r is the length of the window and m is the width of the window;
[0017] At time point u, the multidimensional dynamic sliding window Wu includes data from time point u-r+1 to time point u, Wu = {Xu-r+1, ..., Xu}, where each Xo is an m-dimensional vector representing the values represented by the m data types collected at time point o, o = u-r+1, ..., u;
[0018] Dynamically adjust the window size based on trend changes including:
[0019] At time point u, the trend change of the multidimensional dynamic sliding window Wu is ΔS u =|S u -S u-1 |, where S u is the smoothed value at time point u, S u-1 The smoothed value at time point u-1, and the exponential smoothing trend detection algorithm is used to detect the trend changes of time series data in the multidimensional dynamic sliding window Wu.
[0020]
[0021] Among them, α is the smoothing coefficient, and its value range is 0<α<1. The smoothing coefficient is set by the management personnel based on practical experience or experimental data analysis. xoj represents the value of the jth data type at time point o in the multidimensional dynamic sliding window Wu;
[0022] The initial setting of the multidimensional dynamic sliding window size is r×m, and the minimum window size is r min ×m, the maximum window size is r max ×m,r min and r max They represent the minimum and maximum lengths of the multidimensional dynamic sliding window respectively. The trend change threshold is θ. When ΔS u When it is greater than θ, reduce the window size and adjust it to r 1 =max(r min ,r-δ), when ΔS u When it is less than or equal to θ, increase the window size and adjust it to r 1 =min(r max ,r+δ), where δ is the adjustment step of the window size,
[0023]
[0024] At the next time point u+1, the size of the multidimensional dynamic sliding window Wu is adjusted to r 1 ×m;
[0025] The statistical features within each multidimensional dynamic sliding window, including skewness, correlation features and dynamic features, are calculated to obtain the skew feature set, correlation feature set and dynamic feature set, and the feature data set is constructed by aggregation.
[0026] Preferably, the skewness is used to describe the degree of skewness of the data, and is calculated as follows:
[0027]
[0028] Among them, sk j represents the skewness of the value of the j-th data type in each multidimensional dynamic sliding window from time point u-r+1 to time point u, xoj represents the value of the j-th data type in the multidimensional dynamic sliding window Wu at time point o, xo1j represents the value of the j-th data type in the multidimensional dynamic sliding window Wu at time point o1, δ j Represents the standard deviation of the j-th data type from time point u-r+1 to time point u.
[0029] The skew degree of each data type in the multidimensional dynamic sliding window is collected in turn, and then the skew degrees of m data types are obtained to form a skew vector at time point u. The multidimensional dynamic sliding window is used to process n time points in turn to collect n skew vectors, which are recorded as a skew feature set.
[0030] Preferably, the correlation feature is used to describe the interactive correlation of values between different data types, and is calculated as follows:
[0031]
[0032] vo o,j1-j2 Represent the correlation features of the value of the j1th data type and the j2th data type at time point o in each multidimensional dynamic sliding window, collect the correlation features of any two different data types in the multidimensional dynamic sliding window in turn, form a correlation feature vector at time point u, and use the multidimensional dynamic sliding window to process n time points in turn to collect n correlation feature vectors, which are recorded as a correlation feature set;
[0033] Among them, xo1j1 represents the value of the j1th data type at the time point o1 in the multidimensional dynamic sliding window Wu, and xo1j2 represents the value of the j2th data type at the time point o1 in the multidimensional dynamic sliding window Wu. represents the mean value of the j1th data type from time point u-r+1 to time point u, Represents the mean value of the j2th data type from time point u-r+1 to time point u.
[0034] Preferably, the dynamic feature is used to describe the dynamic change of data, and the calculation method is:
[0035] Δ 2 x o,j =Δx o+1,j -Δx o,j =(xo+2j-xo+1j)-(xo+1j-xoj),
[0036] Δ 2 x o,j represents the dynamic characteristics of the j-th data type at time point o in the multidimensional dynamic sliding window, Δx o+1,j represents the first-order difference of the j-th data type at time point o+1 in the multidimensional dynamic sliding window, Δx o,j represents the first-order difference of the j-th data type at time point o in the multidimensional dynamic sliding window, xo+1j represents the value of the j-th data type at time point o+1 in the multidimensional dynamic sliding window, and xo+2j represents the value of the j-th data type at time point o+2 in the multidimensional dynamic sliding window;
[0037] The dynamic features of each data type at all time points in the multidimensional dynamic sliding window are collected in turn to form a dynamic feature vector at time point u. The multidimensional dynamic sliding window is used to process n time points in turn to collect n dynamic feature vectors, which are recorded as a dynamic feature set.
[0038] Preferably, the infection trend prediction model is based on the LSTM basic framework, and an input layer, an LSTM layer, a fully connected layer and an output layer are set. The input of the input layer is set as a characteristic data set, the LSTM layer is set to two layers, each layer has 50 units, LSTM layer 1 is set to return a sequence, and LSTM layer 2 is set to not return a sequence;
[0039] The fully connected layer is set to two layers, each layer has 10 nodes and the activation function is ReLU. The fully connected layer 1 is used for regression tasks, and the fully connected layer 2 is used for classification tasks.
[0040] The output layer includes the regression task output layer, the classification task output layer 1, and the classification task output layer 2. The activation function is set to the softmax function. The regression task output layer is used to predict the degree of infection and has 1 node. The classification task output layer 1 is used to predict symptoms, and the classification task output layer 2 is used to predict the cause of infection.
[0041] The Adam optimization algorithm is used, the learning rate is set to 0.001, and the loss function is,
[0042]
[0043] Among them, σ1 and σ2 are the uncertainty parameters of regression and classification tasks, represents the loss of the regression task, z is the number of samples, f is the sample index, y1 f is the actual degree of infection after surgery. is the predicted infection degree after surgery, and Loss1+Loss2 represents the loss of the classification task.
[0044]
[0045] Among them, m1 and m2 are the number of categories of infection symptoms and the number of categories of infection causes, h1 and h2 are the category indexes of infection symptoms and the category indexes of infection causes, and y21 fh1 is the true label of the fth sample in the infection symptom in the h1th category, is the predicted probability of the h1th class of the fth sample in the infection symptom, y22 fh2 is the true label of the fth sample in the h2 class among the causes of infection, is the predicted probability of the h2th class of the fth sample in the infection cause;
[0046] The training and use of the infection trend prediction model includes:
[0047] S11. Collect xx groups of characteristic data sets to form a sample set, divide it into a training set and a validation set in a ratio of 8:2, input the training set into batches in turn into the infection trend prediction model, and perform forward propagation in the intelligent analysis model;
[0048] S12, obtain the infection degree, infection symptoms and infection causes predicted by the infection trend prediction model, calculate the loss value using the loss function, calculate the gradient of each parameter in the model, including σ1 and σ2, through the back propagation algorithm, and update the parameters using the gradient descent algorithm;
[0049] S13, repeatedly executing S11 and S12 until the loss function value of the infection trend prediction model no longer changes, importing the verification set for verification, and when the verification is successful, obtaining the trained infection trend prediction model, and when the verification is unsuccessful, repeating S13;
[0050] S14. Input the characteristic data set of the patient in the current time period into the trained infection trend prediction model to obtain infection trend prediction information outputted by the prediction, where the infection trend prediction information includes the degree of infection, infection symptoms and causes of infection.
[0051] Preferably, the process of setting the uncertainty parameters σ1 and σ2 includes:
[0052] Initialize σ1 and σ2 to positive values;
[0053] Calculate the gradient of the loss function with respect to σ1 and σ2,
[0054]
[0055] Using the gradient descent algorithm, it is updated as:
[0056]
[0057] Where k=1,2 and η is the learning rate.
[0058] Preferably, a method for predicting postoperative infection trend after abdominal surgery comprises:
[0059] S1. Collect the basic information and comprehensive nursing information of patients and construct the original data matrix;
[0060] S2. Analyze the statistical characteristics of the original data matrix through a multi-dimensional dynamic sliding window, including skewness, correlation characteristics and dynamic characteristics, obtain the skew feature set, correlation feature set and dynamic feature set, and collect and construct a characteristic data set;
[0061] S3. Build and train an infection trend prediction model, import the patient's characteristic data set in the current time period into the trained infection trend prediction model, and obtain the predicted infection degree, infection symptoms and infection causes in the next time period;
[0062] S4. Repeat S1 to S3 to predict the infection trend of the patient continuously and uninterruptedly over a continuous time period.
[0063] Compared with the prior art, the present invention has the following beneficial effects:
[0064] In the present invention, the present invention performs statistical feature analysis on the collected patient information through a multi-dimensional dynamic sliding window, deeply mines the skewness, correlation features and dynamic features of the data, reduces the running computing power and workload of model learning, and realizes feature extraction for different patients, and extracts features for infection prediction of patients under the influence of different factors. The multi-dimensional dynamic sliding window not only realizes adaptive adjustment of the scale of data processing, but also realizes the stability and accuracy of data analysis within the window, strengthens the feature extraction and mining capabilities, realizes high-quality data input, improves the effect of subsequent data processing and model training, and the retrieval and response speed, and provides an accurate data foundation for subsequent model optimization; injects new kinetic energy into the agility and flexibility of data processing, and the system implements a multi-task prediction model based on the LSTM basic framework to output personalized information for the trend prediction of abdominal postoperative infection; the adaptive regulation and optimization mechanism continuously improves the overall efficiency of intelligent analysis, and multiple modules cooperate with each other to realize comprehensive data collection, processing and analysis, and provide real-time and accurate trend prediction data analysis of abdominal postoperative infection. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1A schematic diagram of a system for predicting postoperative infection trends after abdominal surgery is provided for the present invention;
[0066] Figure 2 It is a schematic diagram of the steps of the method for predicting the trend of post-abdominal infection in the present invention. DETAILED DESCRIPTION
[0067] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.
[0068] Embodiment 1
[0069] Reference Figure 1 and Figure 2 Embodiment 1 further illustrates a system and method for predicting postoperative abdominal infection trends proposed by the present invention.
[0070] Abdominal surgery is a conventional treatment method, but in terms of postoperative care, postoperative infection is an extremely dangerous and important aspect. With the introduction of AI technology, it provides new possibilities for intelligent care and rapid and healthy recovery of abdominal postoperative infection. However, there are many factors affecting abdominal postoperative infection, which leads to a large amount of sample data collected when predicting abdominal postoperative infection. In addition, since each patient's physiological state and recovery environment are different, including the patient's physiological state, type of surgery, postoperative care, etc., the correlation data of infection prediction for personalized prediction is complex and difficult to distinguish, which makes the targeted and personalized feature selection of each patient complicated. Therefore, innovative design of abdominal postoperative infection prediction is needed.
[0071] Postoperative infection is affected by many factors, such as the patient's age, gender, medical history, type of surgery, quality of postoperative care, etc. There may be complex interactions between these factors, which increases the difficulty of feature selection; each patient's physiological state and recovery environment are different, which makes it difficult to apply general feature selection methods. For example, the same type of surgery may have different infection risks in different patients; a lot of feature engineering work is required to extract useful features, which increases the complexity and workload of model development. For example, it is necessary to extract features such as postoperative temperature change trends and postoperative care measures from the original data.
[0072] The risk of postoperative infection is dynamic and closely related to time. How to dynamically and accurately predict infection is a difficult problem. For example, the infection risk on the first day after surgery and the seventh day after surgery may be completely different. It is necessary to consider the changes in indicators such as body temperature and white blood cell count at different time points after surgery.
[0073] In real-time clinical work, clinicians need to get prediction results quickly in order to make reasonable clinical decisions. However, during the construction and training of the model, if the model is too rigid and cannot be dynamically adjusted according to the task, it will lead to large prediction errors in actual use and lead doctors to misjudge. Therefore, the model should be able to dynamically and adaptively adjust according to the task during actual use.
[0074] Designing a system for predicting the trend of postoperative abdominal infection requires comprehensive consideration of data collection to ensure the accuracy and reliability of the prediction model.
[0075] The data collection module collects the basic information of the patient and continuously and uninterruptedly collects the patient's comprehensive nursing information at n time points within a time period and at a fixed frequency p.
[0076] The patient's basic information includes the patient's age, gender, height, weight, allergy history, medical history, surgery type, surgery time, surgery duration, surgery complexity, and intraoperative blood loss.
[0077] Comprehensive nursing information includes the patient's body temperature, heart rate, blood pressure, respiratory rate, blood oxygen saturation, white blood cell count (WBC), C-reactive protein (CRP), medication use data, wound care records, activity data, and food intake data after surgery.
[0078] There are a series of complex and interrelated problems in predicting the trend of postoperative infection after abdominal surgery, which mainly arise from aspects such as irregular data collection, complex feature selection and dynamically changing infection risks.
[0079] First, the data collection standards and methods of different medical institutions are inconsistent, resulting in uneven data quality. During the data entry and transmission process, data may be missing, wrong, or inconsistent. This data quality problem directly affects the accuracy and reliability of the prediction model. Therefore, before processing the data, it is necessary to standardize the data, delete the erroneous data, and supplement the missing data through interpolation.
[0080] Example of data collection for a patient:
[0081] Collecting basic information about the patient helps understand the patient's overall health status and potential risk factors for infection.
[0082] For example, age: 65 years old.
[0083] Gender: Female.
[0084] Weight and height: 70 kg, 165 cm.
[0085] Past medical history: e.g., hypertension, diabetes.
[0086] Allergy history: For example, penicillin allergy level is 0.6.
[0087] Type of surgery: Laparoscopic cholecystectomy.
[0088] Surgery time: June 1, 2024.
[0089] Duration of surgery: 2 hours.
[0090] Surgical complexity: 0.8 (complex), (based on the type of surgery and physician assessment).
[0091] Intraoperative blood loss: 200 ml.
[0092] Integrated nursing information is key to predicting infection trends.
[0093] For example, body temperature: t second after surgery (37.5°C), t+n second (38.0°C);
[0094] Heart rate: t second after surgery (80 beats / minute), t+n second (85 beats / minute);
[0095] Blood pressure: t second after surgery (120 / 80 mmHg), t+n second (125 / 85 mmHg);
[0096] Respiratory rate: t second after surgery (18 times / minute), t+n second (20 times / minute);
[0097] Blood oxygen saturation: t second after surgery (98%), t+n second (97%);
[0098] White blood cell count (WBC): t second after surgery (10,000 / μL), t+n second (12,000 / μL);
[0099] C-reactive protein (CRP): t second after surgery (5 mg / L), t+n second (10 mg / L);
[0100] Medication use data can affect the risk of postoperative infection: t second after surgery (cefotaxime, blood medication content 0.001 g), t+n second (cefotaxime, 0.0001 g);
[0101] Wound care records can reflect direct signs of postoperative infection: t second after surgery (no redness, swelling, no secretions, no dressing changes), t+n seconds (slight redness, swelling, a small amount of purulent secretions, dressing changes);
[0102] Activity data: t second after surgery (resting in bed), t+n second (light activity).
[0103] Food intake data: t second after surgery (eating small amounts without any restrictions), t+n second (eating high-protein food).
[0104] By comprehensively collecting basic patient information and comprehensive nursing information, rich data support can be provided for the abdominal postoperative infection trend prediction system. These data will help build an accurate prediction model and improve the early identification and intervention capabilities of postoperative infection.
[0105] Fitting analysis module: constructs the original data matrix, performs statistical feature analysis on the original data matrix through a multi-dimensional dynamic sliding window, and obtains a characteristic data set.
[0106] The construction of the original data matrix includes: identifying the text descriptions in the basic information and comprehensive nursing information, and converting them into numerical form through numerical coding, taking n time points as the rows of the matrix, and the data types in the comprehensive nursing information as the columns of the matrix, numerically coding all the basic information to form a string of digital strings, setting the original data matrix,
[0107]
[0108] Among them, x00 represents the digital string formed by basic information, x0i represents the value at the i-th time point, and i=1,...,n, xj0 represents the numerical code of the j-th data type in the comprehensive nursing information, and j=1,...,m, m represents the number of data types in the comprehensive nursing information, and xij represents the value of the j-th data type at the i-th time point.
[0109] That is, in the original data matrix, the first row and the first column are digital strings of basic information, the remaining first rows are time points, the remaining first columns are numerical codes of data types, and the rest are numerical values of the jth data type at the i-th time point. In the present invention, the comprehensive nursing information includes 11 types of patient data, so m is at most 11. Assuming that we encode the basic information numerically:
[0110] Age: 65 years old, directly coded as 65;
[0111] Gender: female, coded as 0;
[0112] Weight and height: 70 kg, 165 cm, directly coded as 70165;
[0113] Past medical history: for example, hypertension and diabetes, coded as 0112 and 0021;
[0114] Allergy history: For example, if the penicillin allergy level is 0.6, it is directly coded as 0.6;
[0115] Type of surgery: laparoscopic cholecystectomy, coded as 10005 (gallbladder) 02 (resection);
[0116] Surgery time: June 1, 2024, directly coded as 20240601;
[0117] Duration of surgery: 2 hours, directly coded as 2;
[0118] Surgical complexity: 0.8 (complex), directly coded as 0.8 based on the type of surgery and physician assessment;
[0119] Intraoperative blood loss: 200 ml, directly coded as 200.
[0120] The digital string formed by encoding all the numerical values of the basic information is: 65-0-70165-0112-0021-0.6-1000502-20240601-2-0.8-200.
[0121] Numerical encoding of each data type in comprehensive nursing information, for example:
[0122] Body temperature: 0100, then x10 means 0100;
[0123] Heart rate: 0200, then x20 means 0200;
[0124] Blood pressure: 0300, then x30 means 0300;
[0125] Respiratory rate: 0400, then x40 means 0400;
[0126] Blood oxygen saturation: 0500, then x50 means 0500;
[0127] White blood cell count (WBC): 0600, then x60 means 0600;
[0128] C-reactive protein (CRP): 0700, then x70 means 0700;
[0129] Drug use data: 0800, then x80 means 0800;
[0130] Wound care record: 0900, then x90 means 0900;
[0131] Active data: 0010, then x110 means 0010;
[0132] Food intake data: 0110, then x110 means 0110.
[0133] Define a multi-dimensional dynamic sliding window, dynamically adjust the window size based on trend changes, and set the size of the multi-dimensional dynamic sliding window to r×m, where r is the length of the window (number of time points) and m is the width of the window (data type). This multi-dimensional window can process multiple types of data in multiple time series at the same time, and extract features useful for infection prediction by combining time characteristics and associated interaction characteristics. The following are detailed steps and methods:
[0134] At time point u, the multidimensional dynamic sliding window Wu includes data from time point u-r+1 to time point u, Wu = {Xu-r+1, ..., Xu}, where each Xo is an m-dimensional vector representing the values represented by the m data types collected at time point o, o = u-r+1, ..., u;
[0135] Calculate various statistical features within each multidimensional dynamic sliding window, including skewness, correlation features and dynamic features. Skewness can describe the degree of skewness of the data, correlation features are used to describe the interactive correlation of values between different data types, and dynamic features are used to describe the dynamic changes of the data.
[0136]
[0137] sk j Indicates the skew degree of the value of the j-th data type in each multidimensional dynamic sliding window from time point u-r+1 to time point u, collects the skew degree of each data type in the multidimensional dynamic sliding window in turn, and then obtains the skew degree of m data types to form a skew vector at time point u, and sequentially applies multidimensional dynamic sliding window processing to n time points to collect n skew vectors, which are recorded as skew feature sets;
[0138] Among them, xoj represents the value of the j-th data type at time point o in the multidimensional dynamic sliding window Wu, and xo1j represents the value of the j-th data type at time point o1 in the multidimensional dynamic sliding window Wu. represents the mean value of the jth data type from time point u-r+1 to time point u, δ j Represents the standard deviation of the j-th data type from time point u-r+1 to time point u.
[0139] For example, at time point u, the size of the multidimensional dynamic sliding window Wu is r×m, the number of time points is set to 4, and there are 3 data types, then the size of the multidimensional dynamic sliding window Wu is 4×3, and it is assumed that in the multidimensional dynamic sliding window, the skewness of the value of the first data type from time point u-r+1 to time point u is 0.1, the skewness of the value of the second data type from time point u-r+1 to time point u is 0.1, and the skewness of the value of the third data type from time point u-r+1 to time point u is 0.15, forming a skew vector at time point u of Du=[0.1,0.1,0.15]. The multidimensional dynamic sliding window is used to process n time points in turn to collect n skew vectors, which are recorded as the skew feature set Fn={D1,...,Du,...,Dn}, and u=1,...,n.
[0140]
[0141] vo o,j1-j2 Represent the correlation features of the value of the j1th data type and the j2th data type at time point o in each multidimensional dynamic sliding window, collect the correlation features of any two different data types in the multidimensional dynamic sliding window in turn, form a correlation feature vector at time point u, and use the multidimensional dynamic sliding window to process n time points in turn to collect n correlation feature vectors, which are recorded as a correlation feature set;
[0142] Among them, xo1j1 represents the value of the j1th data type at the time point o1 in the multidimensional dynamic sliding window Wu, and xo1j2 represents the value of the j2th data type at the time point o1 in the multidimensional dynamic sliding window Wu. represents the mean value of the j1th data type from time point u-r+1 to time point u, Represents the mean value of the j2th data type from time point u-r+1 to time point u.
[0143] For example, suppose we have two data types: body temperature and heart rate. The values at three time points are as follows: body temperature (37.5, 38, 37.8), heart rate (80, 85, 82). Calculate the mean of body temperature and heart rate at three time points.
[0144]
[0145] Calculate the correlation characteristics between body temperature and heart rate,
[0146]
[0147] Assuming the calculated value is 0.13, the correlation characteristic between body temperature and heart rate is 0.13.
[0148] Δ2 x o,j =Δx o+1,j -Δx o,j =(xo+2j-xo+1j)-(xo+1j-xoj),
[0149] Δ 2 x o,j represents the dynamic characteristics of the j-th data type at time point o in the multidimensional dynamic sliding window, Δx o+1,j represents the first-order difference of the j-th data type at time point o+1 in the multidimensional dynamic sliding window, Δx o,j represents the first-order difference of the j-th data type at time point o in the multidimensional dynamic sliding window, xo+1j represents the value of the j-th data type at time point o+1 in the multidimensional dynamic sliding window, xo+2j represents the value of the j-th data type at time point o+2 in the multidimensional dynamic sliding window, and collects the dynamic features of each data type at all time points in the multidimensional dynamic sliding window in turn to form a dynamic feature vector at time point u. The multidimensional dynamic sliding window is used to process n time points in turn to collect n dynamic feature vectors, which are recorded as a dynamic feature set.
[0150] Assuming we have body temperatures at three time points (37.5, 38, 37.8), then calculate
[0151] Δx 2,j =(xo+2j-xo+1j)=37.8-38=-0.2,
[0152] Δx 1,j =(xo+1j-xoj)=38-37.5=0.5,
[0153] Δ 2 x 1,j =Δx 2,j -Δx 1,j =-0.2-0.5=-0.7,
[0154] By calculating the skewness, correlation characteristics, and dynamic characteristics of the original data matrix, we can more fully describe the characteristics of the data, thereby improving our understanding of the data and the accuracy of the predictive model.
[0155] Dynamically adjust the window size based on trend changes including:
[0156] Use the exponential smoothing trend detection algorithm to detect trend changes in time series. Exponential smoothing can effectively capture trends in data. According to the trend changes, the window size is dynamically adjusted. When the trend changes greatly, a smaller window is used; when the trend changes less, a larger window is used. A trend change threshold is set. When the trend changes exceed the threshold, the window size is reduced; when the trend changes below the threshold, the window size is increased.
[0157] At time point u, the trend change of the multidimensional dynamic sliding window Wu is ΔS u =|S u -S u-1 |, where S u is the smoothed value at time point u, S u-1 The smoothed value at time point u-1, and the exponential smoothing trend detection algorithm is used to detect the trend changes of time series data in the multidimensional dynamic sliding window Wu.
[0158]
[0159] Among them, α is the smoothing coefficient, and its value range is 0<α<1. The smoothing coefficient is set by the management personnel based on practical experience or experimental data analysis. xoj represents the value of the jth data type at time point o in the multidimensional dynamic sliding window Wu;
[0160] The initial setting of the multidimensional dynamic sliding window size is r×m, and the minimum window size is r min ×m, the maximum window size is r max ×m,r min and r max They represent the minimum and maximum lengths of the multidimensional dynamic sliding window respectively. The trend change threshold is θ. When ΔS u When it is greater than θ, reduce the window size and adjust it to r 1 =max(r min ,r-δ), when ΔS u When it is less than or equal to θ, increase the window size and adjust it to r 1 =min(r max ,r+δ), where δ is the adjustment step of the window size,
[0161]
[0162] At the next time point u+1, the size of the multidimensional dynamic sliding window Wu is adjusted to r 1 ×m.
[0163] The trend change threshold is θ, which is set by the management personnel based on practical experience or experimental data analysis, or can be selected and set through cross-validation. For example, at time point u, the size of the multidimensional dynamic sliding window Wu is 4×m, and the trend change amount is ΔS u =0.4-0.2=0.2, set the trend change threshold θ=0.2, then,
[0164] Increase the window size and adjust to r 1 =min(r max =4,4+1)=4, at the next time point u+1, the size of the multidimensional dynamic sliding window Wu is adjusted to 4×m.
[0165] The above data will be standardized and normalized according to actual requirements during use and processing to improve the quality of the data.
[0166] The infection trend prediction model is based on the LSTM basic framework, with input layer, LSTM layer, fully connected layer and output layer. The input of the input layer is set as the feature data set, the LSTM layer is set to two layers, each with 50 units, LSTM layer 1 is set to return sequence, and LSTM layer 2 is set to not return sequence;
[0167] The fully connected layer is set to two layers, each layer has 10 nodes and the activation function is ReLU. The fully connected layer 1 is used for regression tasks, and the fully connected layer 2 is used for classification tasks.
[0168] The output layer includes the regression task output layer, the classification task output layer 1, and the classification task output layer 2. The activation function is set to the softmax function. The regression task output layer is used to predict the degree of infection and has 1 node. The classification task output layer 1 is used to predict symptoms, and the classification task output layer 2 is used to predict the cause of infection.
[0169] The Adam optimization algorithm is used, the learning rate is set to 0.001, and the loss function is,
[0170]
[0171] Among them, σ1 and σ2 are the uncertainty parameters of regression and classification tasks, represents the loss of the regression task, z is the number of samples, f is the sample index, y1 f is the actual degree of infection after surgery. is the predicted infection degree after surgery, and Loss1+Loss2 represents the loss of the classification task.
[0172]
[0173] Among them, m1 and m2 are the number of categories of infection symptoms and the number of categories of infection causes, h1 and h2 are the category indexes of infection symptoms and the category indexes of infection causes, and y21 fh1 is the true label of the fth sample in the infection symptom in the h1th category, is the predicted probability of the h1th class of the fth sample in the infection symptom, y22 fh2 is the true label of the fth sample in the h2 class among the causes of infection, is the predicted probability of the h2th class for the fth sample in the infection cause.
[0174] The training and use of infection trend prediction models include:
[0175] S11. Collect xx groups of characteristic data sets to form a sample set, divide it into a training set and a validation set in a ratio of 8:2, input the training set into batches in turn into the infection trend prediction model, and perform forward propagation in the intelligent analysis model;
[0176] S12, obtain the infection degree, infection symptoms and infection causes predicted by the infection trend prediction model, use the loss function to calculate the loss value, calculate the gradient of each parameter (including σ1 and σ2) in the model through the back propagation algorithm, and use the gradient descent algorithm to update the parameters;
[0177] S13, repeatedly executing S11 and S12 until the loss function value of the infection trend prediction model no longer changes, importing the verification set for verification, and when the verification is successful, obtaining the trained infection trend prediction model, and when the verification is unsuccessful, repeating S13;
[0178] S14. Input the characteristic data set of the patient in the current time period into the trained infection trend prediction model to obtain the predicted output of infection degree, infection symptoms and infection cause.
[0179] The process of setting the uncertainty parameters σ1 and σ2 for regression and classification tasks includes:
[0180] Initialize σ1 and σ2 to positive values, such as 1;
[0181] Calculate the gradient of the loss function with respect to σ1 and σ2
[0182]
[0183] Using the gradient descent algorithm, it is updated as:
[0184]
[0185] Where k=1,2 and η is the learning rate.
[0186] By training the model, the uncertainty parameters will be optimized and the loss weight of each task will be adjusted dynamically, so that the model can better balance the losses of different tasks and the loss weight of each task can be dynamically adjusted according to its uncertainty, thereby accelerating the learning and convergence of the model and optimizing the performance of the model.
[0187] In this embodiment, the present invention performs statistical feature analysis on the collected patient information through a multi-dimensional dynamic sliding window, deeply mines the skewness, correlation features and dynamic features of the data, reduces the running computing power and workload of model learning, and realizes feature extraction of different patients, and extracts features for infection prediction of patients under the influence of different factors. The multi-dimensional dynamic sliding window not only realizes adaptive adjustment of the scale of data processing, but also realizes the stability and accuracy of data analysis within the window, strengthens the feature extraction and mining capabilities, realizes high-quality data input, improves the effects of subsequent data processing and model training, as well as the retrieval and response speed, and provides an accurate data foundation for subsequent model optimization; injects new kinetic energy into the agility and flexibility of data processing. The system implements a multi-task prediction model based on the LSTM basic framework to output personalized information for the trend prediction of abdominal postoperative infection; the adaptive regulation and optimization mechanism continuously improves the overall efficiency of intelligent analysis, and multiple modules cooperate with each other to realize comprehensive data collection, processing and analysis, and provide real-time and accurate trend prediction data analysis of abdominal postoperative infection.
[0188] Embodiment 2
[0189] Reference Figure 1 and Figure 2 , Example 2 further illustrates a system for predicting post-abdominal infection trends proposed by the present invention.
[0190] A method for predicting a trend of postoperative infection after abdominal surgery is applied to a system for predicting a trend of postoperative infection after abdominal surgery, comprising the following steps:
[0191] S1. Collect the basic information and comprehensive nursing information of patients and construct the original data matrix;
[0192] S2. Analyze the statistical characteristics of the original data matrix through a multi-dimensional dynamic sliding window, including skewness, correlation characteristics and dynamic characteristics, obtain the skew feature set, correlation feature set and dynamic feature set, and collect and construct a characteristic data set;
[0193] S3. Build and train an infection trend prediction model, import the patient's characteristic data set in the current time period into the trained infection trend prediction model, and obtain the predicted infection degree, infection symptoms and infection causes in the next time period;
[0194] S4. Repeat S1 to S3 to predict the infection trend of the patient continuously and uninterruptedly over a continuous time period.
[0195] A system for predicting the trend of postoperative abdominal infection comprises:
[0196] The data collection module collects the basic information of the patient and continuously collects the comprehensive nursing information of the patient at n time points within a time period and at a fixed frequency p;
[0197] Fitting analysis module: constructs the original data matrix, performs statistical feature analysis on the original data matrix through a multi-dimensional dynamic sliding window, and obtains a characteristic data set;
[0198] Model prediction module: Build and train an infection trend prediction model, import the patient's characteristic data set in the current time period into the trained infection trend prediction model, and obtain infection trend prediction information for the next time period;
[0199] The modules are connected to each other via wired and / or wireless means.
[0200] In addition, according to the implementation of the present application, the process described in the attached figure of a system for predicting the trend of postoperative infection after abdominal surgery can be implemented as a computer software program. For example, the present application provides a non-transitory machine-readable storage medium, which stores machine-readable instructions, and the machine-readable instructions can be executed by a processor to execute instructions corresponding to the method steps provided in the present application. Of course, the architecture shown in the attached figure of a system for predicting the trend of postoperative infection after abdominal surgery is only exemplary. When implementing different devices, adaptive selection or adjustment can be performed according to actual needs.
[0201] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0202] The above is only a preferred embodiment of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technical users in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A system for predicting the trend of postoperative infection in abdominal cavity, characterized in that: The abdominal postoperative infection trend prediction system comprises: The data collection module collects the basic information of the patient and continuously collects the comprehensive nursing information of the patient at n time points within a time period and at a fixed frequency p; Fitting analysis module: constructs the original data matrix, performs statistical feature analysis on the original data matrix through a multi-dimensional dynamic sliding window, and obtains a characteristic data set; Model prediction module: Build and train an infection trend prediction model, import the patient's characteristic data set in the current time period into the trained infection trend prediction model, and obtain infection trend prediction information for the next time period; The modules are connected to each other via wired and / or wireless means.
2. The post-abdominal infection trend prediction system according to claim 1, characterized in that: The patient's basic information includes the patient's age, gender, height, weight, allergy history, medical history, surgery type, surgery time, surgery duration, surgery complexity, and intraoperative blood loss; Comprehensive nursing information included patients’ postoperative body temperature, heart rate, blood pressure, respiratory rate, blood oxygen saturation, white blood cell count, C-reactive protein, medication use data, wound care records, activity data, and food intake data.
3. The post-abdominal infection trend prediction system according to claim 2, characterized in that: The construction of the original data matrix includes: identifying the text descriptions in the basic information and the comprehensive nursing information, and converting them into numerical form through numerical coding, taking n time points as the rows of the matrix, taking the data types in the comprehensive nursing information as the columns of the matrix, performing all numerical coding on the basic information to form a string of digital strings, setting the original data matrix, Among them, x00 represents the digital string formed by basic information, x0i represents the value at the i-th time point, and i=1,...,n, xj0 represents the numerical code of the j-th data type in the comprehensive nursing information, and j=1,...,m, m represents the number of data types in the comprehensive nursing information, and xij represents the value of the j-th data type at the i-th time point.
4. The post-abdominal infection trend prediction system according to claim 3, characterized in that: The setting of the multidimensional dynamic sliding window includes: Define a multi-dimensional dynamic sliding window, dynamically adjust the window size based on trend changes, and set the multi-dimensional dynamic sliding window size to r×m, where r is the length of the window and m is the width of the window; At time point u, the multidimensional dynamic sliding window Wu includes data from time point u-r+1 to time point u, Wu = {Xu-r+1, ..., Xu}, where each Xo is an m-dimensional vector representing the values represented by the m data types collected at time point o, o = u-r+1, ..., u; Dynamically adjust the window size based on trend changes including: At time point u, the trend change of the multidimensional dynamic sliding window Wu is ΔS u =|S u -S u-1 |, where S u is the smoothed value at time point u, S u-1 The smoothed value at time point u-1, and the exponential smoothing trend detection algorithm is used to detect the trend changes of time series data in the multidimensional dynamic sliding window Wu. Among them, α is the smoothing coefficient, and its value range is 0<α<1. The smoothing coefficient is set by the management personnel based on practical experience or experimental data analysis. xoj represents the value of the jth data type at time point o in the multidimensional dynamic sliding window Wu; The initial setting of the multidimensional dynamic sliding window size is r×m, and the minimum window size is r min ×m, the maximum window size is r max ×m,r min and r max They represent the minimum and maximum lengths of the multidimensional dynamic sliding window respectively. The trend change threshold is θ. When ΔS u When it is greater than θ, reduce the window size and adjust it to r 1 =max(r min ,r-δ), when ΔS u When it is less than or equal to θ, increase the window size and adjust it to r 1 =min(r max ,r+δ), where δ is the adjustment step of the window size, At the next time point u+1, the size of the multidimensional dynamic sliding window Wu is adjusted to r 1 ×m; The statistical features within each multidimensional dynamic sliding window, including skewness, correlation features and dynamic features, are calculated to obtain the skew feature set, correlation feature set and dynamic feature set, and the feature data set is constructed by aggregation.
5. The post-abdominal infection trend prediction system according to claim 4, characterized in that: The skewness is used to describe the degree of skewness of the data and is calculated as follows: Among them, sk j represents the skewness of the value of the j-th data type in each multidimensional dynamic sliding window from time point u-r+1 to time point u, xoj represents the value of the j-th data type in the multidimensional dynamic sliding window Wu at time point o, xo1j represents the value of the j-th data type in the multidimensional dynamic sliding window Wu at time point o1, δ j Represents the standard deviation of the j-th data type from time point u-r+1 to time point u. The skew degree of each data type in the multidimensional dynamic sliding window is collected in turn, and then the skew degrees of m data types are obtained to form a skew vector at time point u. The multidimensional dynamic sliding window is used to process n time points in turn to collect n skew vectors, which are recorded as a skew feature set.
6. The post-abdominal infection trend prediction system according to claim 5, characterized in that: The correlation feature is used to describe the interactive correlation of values between different data types, and is calculated as follows: vo o,j1-j2 Represent the correlation features of the value of the j1th data type and the j2th data type at time point o in each multidimensional dynamic sliding window, collect the correlation features of any two different data types in the multidimensional dynamic sliding window in turn, form a correlation feature vector at time point u, and use the multidimensional dynamic sliding window to process n time points in turn to collect n correlation feature vectors, which are recorded as a correlation feature set; Among them, xo1j1 represents the value of the j1th data type at the time point o1 in the multidimensional dynamic sliding window Wu, and xo1j2 represents the value of the j2th data type at the time point o1 in the multidimensional dynamic sliding window Wu. represents the mean value of the j1th data type from time point u-r+1 to time point u, Represents the mean value of the j2th data type from time point u-r+1 to time point u.
7. The post-abdominal infection trend prediction system according to claim 6, characterized in that: The dynamic feature is used to describe the dynamic changes of data, and the calculation method is: Δ 2 x o,j =Δx o+1,j −Δx o,j =(x+2j-x+1j)-(x+1j-x), Δ 2 x o,j represents the dynamic characteristics of the jth data type at time point o in the multidimensional dynamic sliding window, Δx o+1,j represents the first-order difference of the j-th data type at time point o+1 in the multidimensional dynamic sliding window, Δx o,j represents the first-order difference of the j-th data type at time point o in the multidimensional dynamic sliding window, xo+1j represents the value of the j-th data type at time point o+1 in the multidimensional dynamic sliding window, and xo+2j represents the value of the j-th data type at time point o+2 in the multidimensional dynamic sliding window; The dynamic features of each data type at all time points in the multidimensional dynamic sliding window are collected in turn to form a dynamic feature vector at time point u. The multidimensional dynamic sliding window is used to process n time points in turn to collect n dynamic feature vectors, which are recorded as a dynamic feature set.
8. The post-abdominal infection trend prediction system according to claim 7, characterized in that: The infection trend prediction model is based on the LSTM basic framework, and sets an input layer, an LSTM layer, a fully connected layer, and an output layer. The input of the input layer is set as a feature data set, the LSTM layer is set to two layers, each with 50 units, LSTM layer 1 is set to return a sequence, and LSTM layer 2 is set to not return a sequence; The fully connected layer is set to two layers, each layer has 10 nodes and the activation function is ReLU. The fully connected layer 1 is used for regression tasks, and the fully connected layer 2 is used for classification tasks. The output layer includes the regression task output layer, the classification task output layer 1, and the classification task output layer 2. The activation function is set to the softmax function. The regression task output layer is used to predict the degree of infection and has 1 node. The classification task output layer 1 is used to predict symptoms, and the classification task output layer 2 is used to predict the cause of infection. The Adam optimization algorithm is used, the learning rate is set to 0.001, and the loss function is, Among them, σ1 and σ2 are the uncertainty parameters of regression and classification tasks, represents the loss of the regression task, z is the number of samples, f is the sample index, y1 f is the actual degree of infection after surgery. is the predicted infection degree after surgery, and Loss1+Loss2 represents the loss of the classification task. Among them, m1 and m2 are the number of categories of infection symptoms and the number of categories of infection causes, h1 and h2 are the category indexes of infection symptoms and the category indexes of infection causes, and y21 fh1 is the true label of the fth sample in the infection symptom in the h1th category, is the predicted probability of the h1th class of the fth sample in the infection symptom, y22 fh2 is the true label of the fth sample in the h2 class among the causes of infection, is the predicted probability of the h2th class of the fth sample in the infection cause; The training and use of the infection trend prediction model includes: S11. Collect xx groups of characteristic data sets to form a sample set, divide it into a training set and a validation set in a ratio of 8:2, input the training set into batches in turn into the infection trend prediction model, and perform forward propagation in the intelligent analysis model; S12, obtain the infection degree, infection symptoms and infection causes predicted by the infection trend prediction model, calculate the loss value using the loss function, calculate the gradient of each parameter in the model, including σ1 and σ2, through the back propagation algorithm, and update the parameters using the gradient descent algorithm; S13, repeatedly executing S11 and S12 until the loss function value of the infection trend prediction model no longer changes, importing the verification set for verification, and when the verification is successful, obtaining the trained infection trend prediction model, and when the verification is unsuccessful, repeating S13; S14. Input the characteristic data set of the patient in the current time period into the trained infection trend prediction model to obtain infection trend prediction information outputted by the prediction, where the infection trend prediction information includes the degree of infection, infection symptoms and causes of infection.
9. The post-abdominal infection trend prediction system according to claim 8, characterized in that: The setting process of the uncertainty parameters σ1 and σ2 includes: Initialize σ1 and σ2 to positive values; Calculate the gradient of the loss function with respect to σ1 and σ2, Using the gradient descent algorithm, it is updated as: Where k=1,2 and η is the learning rate.
10. A method for predicting the trend of postoperative infection in abdominal cavity, characterized in that: The system for predicting the trend of postoperative abdominal infection as claimed in any one of claims 1 to 9 comprises: S1. Collect the basic information and comprehensive nursing information of patients and construct the original data matrix; S2. Analyze the statistical characteristics of the original data matrix through a multi-dimensional dynamic sliding window, including skewness, correlation characteristics and dynamic characteristics, obtain the skew feature set, correlation feature set and dynamic feature set, and collect and construct a characteristic data set; S3. Build and train an infection trend prediction model, import the patient's characteristic data set in the current time period into the trained infection trend prediction model, and obtain the predicted infection degree, infection symptoms and infection causes in the next time period; S4. Repeat S1 to S3 to predict the infection trend of the patient continuously and uninterruptedly over a continuous time period.
Citation Information
Cited By
Infection nursing recording method, device and system based on intelligent medical treatment
CN119361173A
Risk prediction method for malnutrition of gastric cancer surgery patient
CN119889706A
