A medical health care patient image typing improvement method and related device

By employing a multi-model fusion architecture combining CNN-LSTM, attention mechanisms, LightGBM, and random forests, the problems of strong subjectivity and difficulty in capturing data correlations in traditional clinical risk assessment are solved. This enables precise stratification and dynamic monitoring of patient risk levels, improving the accuracy and robustness of the assessment.

CN121964159BActive Publication Date: 2026-06-16HAINAN UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HAINAN UNIV
Filing Date
2026-04-03
Publication Date
2026-06-16

Smart Images

  • Figure CN121964159B_ABST
    Figure CN121964159B_ABST
Patent Text Reader

Abstract

The application discloses a medical health patient image typing improvement method and related device, and relates to the technical field of medical health. The method acquires multi-modal medical data and pre-processes, and constructs a data set; a training set is input into a mixed architecture model, the mixed architecture model comprises a static branch, a time sequence branch, a feature fusion layer and an output layer, the static branch extracts features and performs nonlinear fitting on static data to obtain static features, the time sequence branch extracts features from time sequence data to obtain time sequence features, the random forest model is used to analyze and screen the time sequence features, the screened time sequence features and the static features are fused through the feature fusion layer to obtain fusion features, the model optimization layer processes the fusion features through a triple strategy, and the output layer outputs low, medium and high risk levels and corresponding probabilities and confidence levels according to the input fusion features. The application can provide decision support for medical resource allocation and personalized intervention.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical and health technology, and in particular to an improved method and related device for patient profiling and classification in medical and health care. Background Technology

[0002] Traditional clinical risk assessment relies on physician experience and limited structured indicators, which has limitations such as strong subjectivity and difficulty in integrating dynamic time-series data. With the widespread adoption of electronic health records (EHRs) and wearable devices, medical data is exhibiting a "multimodal" characteristic: it includes both static baseline information (such as age and underlying diseases) and dynamic time-series data. This makes it possible to uncover hidden risk patterns in the data through algorithms. Simultaneously, the increasing clinical demand for "precise stratified intervention" is driving the development of automated risk prediction tools.

[0003] Most existing methods only consider patients' static clinical information. While highly interpretable, they struggle to capture complex data correlations and fail to fully utilize multimodal time-series data such as 24-hour heart rate changes during treatment. This time-series data reflects real-time risk trends and is crucial for accurate prediction. Therefore, there is an urgent need for a patient risk assessment method that focuses on "integrating static and time-series data with interpretability." Summary of the Invention

[0004] To address the aforementioned technical issues, this invention proposes an improved method and related device for patient profiling in medical and rehabilitation care. It combines a multimodal fusion architecture of static and temporal features and highlights key influencing factors through an attention mechanism. This approach retains the prediction accuracy of deep learning while enhancing clinical trust, thus more effectively solving problems such as data dispersion and subjective bias in traditional clinical risk assessment.

[0005] To achieve the above objectives, the technical solution of the present invention is as follows:

[0006] An improved method for patient profiling and classification in medical and rehabilitation care includes the following steps:

[0007] Acquire and preprocess the patient's multimodal medical data, construct a dataset, and divide the dataset into a training set and a test set according to a preset ratio. The multimodal medical data includes static data and time-series data.

[0008] Input the dataset into the hybrid architecture model for iterative training to obtain the trained hybrid architecture model;

[0009] The multimodal medical data to be processed is input into the trained hybrid architecture model to obtain patient profile classification results;

[0010] The processing steps of the hybrid architecture model are as follows: the static branch extracts features and performs nonlinear fitting on the static data through a residual network, a static attention layer, and a LightGBM model to obtain static features; the temporal branch extracts features from the temporal data through a 1D-CNN, LSTM, and a temporal attention layer to obtain temporal features; the temporal features are filtered using a random forest model; the filtered temporal features are fused with the static features through a feature fusion layer to obtain fused features; the model optimization layer processes the fused features through a triple strategy of Dropout layer random deactivation, L2 regularization weight constraints, difficulty adaptive weighting, and cross-validation; and the output layer outputs low, medium, and high risk levels and corresponding probabilities and confidence scores based on the input fused features.

[0011] Preferably, the preprocessing includes filling the static data with the mean and median, and truncating the time series data to a preset fixed length and padding any data that is less than the preset fixed length.

[0012] Preferably, before the feature fusion layer is processed, it further includes bidirectional guided superposition processing of static and dynamic features, and noise tolerance and feature attention collaborative filtering superposition processing.

[0013] Preferably, the bidirectional guided overlay processing of static and dynamic features includes the following steps:

[0014] The top five static features were selected based on the feature importance gain value of the LightGBM model. These top five static features were then min-max normalized to form the static core vector. Based on static core vectors Construct adjustment terms to adjust the gating mechanism of the LSTM;

[0015] Calculate the single-index time series deviation of each time series feature at each time step. Calculate the weighted sum of the single-index time series deviations of all time steps using the normalized weights of the time steps to obtain the dynamic anomaly of a single time series feature. Integrate the dynamic anomalies of all single time series features to obtain the overall dynamic anomaly. Use the overall dynamic anomaly as a correction term to modify the split gain formula of the LightGBM model. Optimize the selection of static features based on the modified LightGBM model.

[0016] Preferably, the adjusted LSTM gating mechanism is as follows:

[0017] The forgetting gate, the formula is:

[0018]

[0019] in, This represents the output of the forget gate at time t. It is the Sigmoid activation function. This represents the weight matrix of the LSTM forget gate. This represents the input vector at time step t in the time series data. This represents the hidden state of the LSTM at time step (t-1). This represents the bias vector of the LSTM forget gate. It is the learnable weight matrix used to connect the static core vector in the LSTM forget gate. 32 represents the LSTM hidden layer dimension, and 5 represents the static kernel vector dimension. The purpose is to pass through the static kernel vector... Adjusting the forgetting threshold;

[0020] Input gate, formula:

[0021]

[0022] in, Its function is to use static core vectors Adjust input sensitivity. The weight matrix of the LSTM input gate is represented by... This represents the bias vector of the LSTM input gate;

[0023] Cell state The formula is:

[0024]

[0025]

[0026] in, It is the hidden state output of the LSTM at time step t. It is the timing input vector at the t-th time step in the timing branch of the LSTM. For output gate, For element-wise product, , These are cell parameters.

[0027] Preferably, the single-index time series deviation of each time series feature at each time step is calculated. The calculation formula is as follows:

[0028]

[0029] in, and These represent the maximum and minimum values ​​within the clinically reasonable range. Let be the temporal mean of the k-th temporal feature at the t-th time step; This represents the original value of the k-th time series feature at the t-th time step.

[0030] Preferably, the noise tolerance and feature attention collaborative filtering superposition process includes the following steps:

[0031] The weights output by the static attention layer are corrected, and static features are determined based on the corrected weights and the predicted values.

[0032] A mask is introduced to perform a masking and zero-padding operation on the LSTM hidden state of the zero-padding feature, so that the output of the LSTM hidden state of the zero-padding feature is zero.

[0033] Based on the above, the present invention also discloses an improved patient profiling and classification system for medical and rehabilitation care, comprising:

[0034] The acquisition module is used to acquire patients' multimodal medical data and preprocess it to construct a dataset. The dataset is divided into a training set and a test set according to a preset ratio. The multimodal medical data includes static data and time-series data.

[0035] The training module is used to input the dataset into the hybrid architecture model for iterative training to obtain the trained hybrid architecture model. The processing of the hybrid architecture model is as follows: the static branch extracts features and performs nonlinear fitting on the static data through a residual network, a static attention layer, and a LightGBM model to obtain static features; the temporal branch extracts features from the temporal data through a 1D-CNN, LSTM, and a temporal attention layer to obtain temporal features; the temporal features are filtered using a random forest model; the filtered temporal features are fused with the static features through a feature fusion layer to obtain fused features; the model optimization layer processes the fused features through a triple strategy of Dropout layer random deactivation, L2 regularization weight constraints, difficulty adaptive weighting, and cross-validation; and the output layer outputs low, medium, and high risk levels and corresponding probabilities and confidence scores based on the input fused features.

[0036] The prediction module is used to input the multimodal medical data to be processed into the trained hybrid architecture model to obtain patient profile classification results.

[0037] Based on the above, the present invention also discloses a computer device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement any of the methods described above.

[0038] Based on the above, the present invention also discloses a readable storage medium storing a computer program, which, when executed by a processor, implements any of the methods described above.

[0039] Based on the above technical solution, the beneficial effects of this invention are as follows: This invention proposes an improved method and related device for patient profiling in medical and rehabilitation settings. It adopts a multi-model weighted fusion architecture of "CNN-LSTM + attention mechanism + LightGBM + random forest," with the core design revolving around the clinical assessment logic of "basic state + dynamic monitoring" in medical scenarios. CNN-LSTM (Convolutional Neural Network - Long Short-Term Memory) serves as the core of temporal modeling, extracting local fluctuation features of vital signs through Conv1D, capturing long-term temporal dependencies through LSTM, and strengthening the weights of high-risk time steps with the help of the attention mechanism to accurately identify the dynamic trend of disease deterioration. LightGBM focuses on the nonlinear fitting and feature interaction capture of 24 static data items (basic diseases, functional scores, etc.), balancing prediction efficiency and clinical interpretability, providing a basis for risk stratification. Random forest enhances the model's generalization ability with its ensemble learning advantages, effectively tolerating data noise and extreme cases, and balancing prediction errors in edge scenarios. After the weighted fusion of the three, it not only adapts to the temporal dynamic monitoring needs after multi-device data calibration but also fully utilizes the basic risk information of static features, ultimately outputting low / medium / High-level three-tier risk stratification. This leads to a patient risk classification solution that is accurate, robust, and clinically practical. Attached Figure Description

[0040] Figure 1 This is a schematic diagram of a method for improving patient profiling and classification in medical and rehabilitation care, as described in one embodiment.

[0041] Figure 2 This is a schematic diagram of the processing flow for static branches and sequential branches in one embodiment, wherein, Figure 2 'a' is a schematic diagram of the static branch processing flow. Figure 2 b is a schematic diagram of the processing flow of the timing branch;

[0042] Figure 3 This is a training set confusion matrix in one embodiment;

[0043] Figure 4 This is a test set confusion matrix in one embodiment;

[0044] Figure 5 This is a training and validation accuracy curve in one embodiment;

[0045] Figure 6 This is a training and validation loss curve in one example. Detailed Implementation

[0046] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.

[0047] like Figures 1 to 6 As shown, this embodiment provides an improved method for patient profiling and classification in medical and rehabilitation care, including the following steps:

[0048] Step 100: Acquire the patient's multimodal medical data and preprocess it to construct a dataset. Divide the dataset into a training set and a test set according to a preset ratio. The multimodal medical data includes static data and time-series data.

[0049] In this embodiment, multimodal medical data is acquired to construct a dataset (500 cases), divided into an 80% training set and a 20% test set. Static data includes 24 items: whether admitted to the emergency department (yes), moderate to severe chronic kidney disease, congestive heart failure, ICU admission, dyspnea, chest pain, drowsiness, confusion, stupor, coma, wheezing appearance, feverish appearance, rapid breathing, cold / cold skin, Barthel score, age, BMI (Body Mass Index), body temperature, systolic blood pressure, diastolic blood pressure, heart rate, respiration, pulse, and pulse oximetry. Temporal data includes 6 items: body temperature, systolic blood pressure, diastolic blood pressure, heart rate, respiratory rate, and pulse oximetry. Temporal data is acquired through continuous monitoring using wearable medical devices or periodic manual recording. These wearable medical devices include a dynamic heart rate monitor, a portable blood pressure monitor, and a smart pulse oximeter.

[0050] Preprocessing includes: Preprocessing the time series data: The `parse_temporal_data` function converts the JSON-formatted time series data into a NumPy array. If the length is less than 10, it is padded with zeros; if it exceeds 10, it is truncated to the first 10 time steps, resulting in a final shape of (1, 10, 6). The core logic of the function is to standardize the length of the time series data, ensuring that the length of the time series features input to the model is fixed at TIME_STEPS=10, and converting the input `temporal_json` into a NumPy array `temporal_data` with a shape of (n... timesteps ,6), where n timesteps The number of time steps in the original data (may be less than or greater than 10). If the number of original time steps is n... timesteps If the value is less than 10, then padding with zeros is used to bring the total number of time steps to 10. The formula for zero padding is as follows:

[0051]

[0052] Here, zeros indicates that an array of all zeros is generated.

[0053] Step 200: Input the dataset into the hybrid architecture model for iterative training to obtain the trained hybrid architecture model.

[0054] In this embodiment, see Figure 2 2a is a schematic diagram of the static branch processing flow. Figure 2 b is a schematic diagram of the processing flow of the temporal branch. In the hybrid architecture model, the static branch extracts features and performs nonlinear fitting on the static data through a residual network, a static attention layer, and a LightGBM (Light Gradient Boosting Machine) model to obtain static features. The temporal branch extracts features from the temporal data through a 1D-CNN (1-Dimensional Convolutional Neural Network), an LSTM (Long Short-Term Memory) network, and a temporal attention layer to obtain temporal features. The temporal features obtained from the temporal branch are used as input to the random forest model. First, a quantitative analysis of the feature importance of the input temporal features across all dimensions is performed. By evaluating the node splitting gain and node purity improvement of each decision tree for the temporal features, the correlation between each temporal feature and the patient's low, medium, and high risk levels is quantitatively assessed. Then, based on the preset feature importance threshold, precise screening is completed, retaining high-importance effective temporal features that are strongly correlated with the risk level, while removing noise features, redundant features, and ineffective temporal features with low correlation caused by equipment acquisition errors and occasional fluctuations in physiological indicators. For special temporal features such as marginal case feature patterns, the strong generalization ability and noise resistance of the random forest itself are used to finally integrate and form a denoised core temporal feature set. The selected temporal features are fused with static features through the feature fusion layer to obtain fused features. The output layer outputs low, medium, and high risk levels and corresponding probabilities and confidence levels based on the input fused features.

[0055] Specifically, the 1D-CNN has 16 filters (kernel size 3), the LSTM hidden layer dimension is 32, and dropout is 0.3; the LightGBM parameters are: 100 decision trees, learning rate 0.05, and maximum depth 8.

[0056] Static attention layer: used to calculate the weights of a 24-dimensional static data vector, highlighting static data that is more important for risk classification.

[0057] (1) Static feature importance score:

[0058]

[0059] in It is the normalized value of the i-th static data vector; It is a learnable weight matrix (24×24 in shape). It is a bias vector (with a shape of 24×1); It is an activation function used to map scores to the interval [-1, 1], enhancing non-linear expression.

[0060] (2) Weight normalization:

[0061]

[0062] in It is the normalized weight of the i-th static data vector; It is the importance score of the i-th static feature, with a value range of [-1, 1].

[0063] (3) Weighted output:

[0064]

[0065] in It is the i-th static feature after weighting, and makes the important features ( Larger features account for a larger proportion of the output, while secondary features ( (Small) is weakened.

[0066] Temporal attention layer: used to calculate the weights of different time steps in a time series, focusing on the time points that are more critical to changes in risk.

[0067] (1) Calculation of time step importance score:

[0068]

[0069] in It is the t-th time step feature output by the LSTM. (32×32) (32×1) is a learnable parameter. (32×1) is a learnable vector used to compress the dimension; through Enhance nonlinearity, and then with The dot product compresses 32-dimensional features into a single scalar score. .

[0070] (2) Time step weight normalization:

[0071]

[0072] in It is the timing length (in this embodiment) =10), It is the normalized weight at the t-th time step, which transforms the scores at different time steps into a probability distribution, ensuring that the sum of the weights is 1, which facilitates weighted fusion.

[0073] (3) Weighted fusion of temporal features:

[0074]

[0075] Among them is The time series features after fusing all time steps (32×1 shape) serve to integrate the features of key time steps. Large) magnification, features of secondary time steps ( (Small) Weaken, focus on core information in dynamic change.

[0076] In this embodiment, the feature fusion layer has 48 nodes, activated by ReLU, and the calculation formula is as follows:

[0077]

[0078] The output layer (fully connected layer) has 3 nodes, activated by softmax, and the core formula is:

[0079]

[0080] in This represents the basic static features extracted by the static branch (output after processing the original 24-dimensional static data by the residual network). This represents the core temporal features after filtering the temporal branches (output after random forest filtering). This represents the fused feature output by the feature fusion layer (the fusion result of static features and filtered temporal features). The weight matrix of the feature fusion layer is represented by... Represents the weight matrix of the output layer, The bias vector of the feature fusion layer This represents the bias vector of the output layer. It outputs the probability distribution of three types of risk: 0 represents low risk, 1 represents medium risk, and 2 represents high risk. The sum of the probabilities of low risk, medium risk, and high risk output by the softmax activation function is 1. When the probability of a certain risk level is ≥85%, this probability value is used as the confidence level of the corresponding risk level.

[0081] Overfitting is prevented by using Dropout layers, while L2 regularization weight penalty formulas are used to avoid overlearning noise in the training data.

[0082] Training phase:

[0083]

[0084] Testing phase:

[0085] =

[0086] in, These are the input features of the Dropout layer during the model training phase, specifically the intermediate feature data obtained after fusing the static feature branch and the temporal feature branch. , is the "raw fusion feature" received by the Dropout layer; yes The output after being processed by the Dropout layer will be used as the input to subsequent output layers of the model, and will participate in backpropagation and parameter updates during training. These are the input features during the model testing phase, and the features from the training phase. They are from the same source, but because the random masking operation of the Dropout layer is not required during the testing phase, they are not tested. The complete fusion features processed; This is the output result of the model testing phase, i.e. The final output obtained after calculation by the trained hybrid architecture model is directly used to output the low, medium and high risk levels and their corresponding probabilities and confidence levels, as the result of patient profiling. For dropout probability, Is with input Binary masks with consistent shape (elements in probability) =0, (1) Used to keep the input and output consistent as expected.

[0087] L2 regularization core formula:

[0088]

[0089] in, This represents the regularization strength (0.01 / 0.1 in the code). It is the weight matrix of all learnable weights of the model (such as the weight matrix of fully connected layers and convolutional layers). The sum of squares of ). This represents the input features (including intermediate features after static and temporal fusion) of the Dropout layer during the model training phase. This represents the original input features that do not require Dropout processing during the model testing phase.

[0090] Risk level indicators: 0 represents low risk, 1 represents medium risk, and 2 represents high risk; Confidence index: the probability of predicting a certain risk level (e.g., a confidence level of 0.85 for high risk means the model is 85% certain that it is high risk); Probability distribution: a list of probabilities for low / medium / high risk.

[0091] Step 300: Input the multimodal medical data to be processed into the trained hybrid architecture model to obtain patient profile classification results.

[0092] One embodiment of a method for improving patient profiling in healthcare and wellness also discloses a specific process for bidirectional guided overlay processing of static features and temporal features, which includes the following steps:

[0093] In this embodiment, considering that static data (such as BMI) reflects the patient's baseline risk and dynamic temporal features (such as 24-hour heart rate changes) reflect real-time risk trends, and that there is a clinical causal relationship between the two (e.g., the contribution of heart rate fluctuations to risk is much higher in heart failure patients than in healthy individuals), a gating coordination mechanism statically guides temporal modeling and a gain correction mechanism temporally feeds back to static weights, allowing the two types of features to mutually empower each other during model training.

[0094] Static core feature screening: The top five static features are selected based on the feature importance (Gain value) of LightGBM: whether it is congestive heart failure (s1), Barthel score (s2), whether it is an emergency admission (s3), age (s4), and whether it is moderate to severe kidney disease (s5).

[0095] The top five static features selected are Min-Max normalized (mapped to [0, 1]) to form a static core vector. Its formula is:

[0096]

[0097] in These are the original static eigenvalues. and This refers to the minimum / maximum value of this feature in the training set.

[0098] LSTM gating formula revised: The original LSTM gating in the forget gate only relies on the historical hidden state. and current timing input After modification, a static core vector was added as an adjustment term.

[0099] The forgetting gate formula is:

[0100]

[0101] in It is the learnable weight matrix used to connect the static core vector in the LSTM forget gate. 32 represents the LSTM hidden layer dimension, and 5 represents the static kernel vector dimension. Their function is to... Adjusting the forgetting threshold, The "forget gate output at time t" is a core parameter in the LSTM model that controls the retention / forgetting of historical information. For example, in heart failure patients... When =1, Increase, make It is closer to 1, retaining more historical information about heart rate timing. The weight matrix of the LSTM forget gate is represented by... This represents the input vector at the t-th time step in the time series data (t = 1 to 10, corresponding to 10 fixed time steps). The bias vector representing the forget gate of the LSTM. This represents the hidden state of the LSTM at time step (t-1). This is the Sigmoid activation function, used to compress the gate value to the (0,1) interval, controlling the proportion of information retained.

[0102] The input gate formula is:

[0103]

[0104] in Its function is to Adjust the input sensitivity; when the Barthel score is low, i.e. When <0.3, Decrease Getting closer to 0 reduces the interference of time-series noise (such as occasional blood pressure fluctuations) on the model. The weight matrix of the LSTM input gate is represented by... Represents the hidden state of the LSTM at time step t-1. This represents the bias vector of the LSTM input gate.

[0105] LSTM Cell State Correction: Cell State Based on Corrected Gating The formula is:

[0106]

[0107]

[0108] in, It is the hidden state output of the LSTM at time step t. It is the timing input vector at the t-th time step in the timing branch of the LSTM. For output gate, For element-wise product, , These are cell parameters.

[0109] Dynamic anomaly calculation is performed by dynamically feeding back LightGBM static weights to six time-series features (body temperature (T), systolic blood pressure (SBP), diastolic blood pressure (DBP), heart rate (HR), respiratory rate (RR), pulse oximetry (Sp). ). Calculate the single-index time series deviation of each time series feature at each time step. The time series deviation of a single index at all time steps is calculated using normalized weights for each time step. The dynamic anomaly degree of a single time-series feature is obtained by performing a weighted summation. Dynamic anomaly degree of all individual time-series features Integrate to obtain the overall dynamic anomaly degree The formula is:

[0110]

[0111] in, and These represent the maximum and minimum values ​​within the clinically reasonable range. Let be the temporal mean of the k-th temporal feature at the t-th time step; This represents the original value of the k-th time series feature at the t-th time step (k = 1 to 6, corresponding to 6 time series data).

[0112] Temporal attention weighting: Utilizing the weights output by the original temporal attention layer. Normalization ,right The weighted average is calculated using the following formula:

[0113]

[0114] in, Represents the overall dynamic anomaly degree of the k-th time series feature. This represents the dynamic anomaly degree of the k-th feature at the t-th time step of the time series data.

[0115] The overall dynamic anomaly score is obtained by integrating all individual time-series features. The formula is as follows:

[0116] D=concat(d1,d2,d3,d4,d5,d6)

[0117] LightGBM Feature Gain Correction: LightGBM determines feature importance through "feature splitting gain," and the modified feature splitting gain is applied to static features. Add overall dynamic anomaly degree The correction term is given by the following formula:

[0118]

[0119] in, It is a fixed adjustment coefficient in the bidirectional guided superposition processing of static and dynamic features. Its core function is to control the intensity of the influence of temporal dynamic anomaly degree on the importance of static features. =0.4, when When it increases, LightGBM prioritizes static features related to dynamic anomalies for splitting. Achieving "time-series dynamic information feeding back into static feature extraction" is a key aspect of the bidirectional collaborative mechanism of multimodal data (static + time-series). Simultaneously, the dynamic anomaly calculation results of the time-series branch also contribute to the accuracy of static feature extraction and the overall risk classification of the model. The time-series branch calculates the dynamic anomaly degree D of the time-series data (weighted by the deviation of each time step and each time-series feature, reflecting real-time risk fluctuations in the patient's vital signs, such as sudden increases in heart rate and unstable blood pressure). LightGBM, as the core model of the static branch, determines the importance of static features through their own "feature splitting gain" Gaini. After modification, a correction term for D is added to assess the importance of static features. When D increases (dynamic risk increases), the corrected gain Gaini' of static features strongly correlated with this dynamic risk (such as congestive heart failure, age, etc.) increases synchronously. This allows LightGBM to prioritize these "closely correlated static-dynamic" features during feature splitting, avoiding the isolation of static feature extraction from real-time dynamic risk. Meanwhile, through the bidirectional guidance of static and dynamic features and the feedback of D to LightGBM, a closed loop is formed in which static features guide the timing and the timing feedback to static features. Ultimately, the static features output by the static branch retain basic risk information and incorporate dynamic risk association weights to strengthen the static-dynamic association.

[0120] One embodiment of the improved patient profiling and classification method for medical and rehabilitation patients also discloses a specific process of superimposing noise tolerance and feature attention collaborative filtering, which includes the following:

[0121] Static attention weight correction: the weights output by the original static attention layer. Multiplied by the weight correction coefficient of the i-th static feature After being suppressed, the weight The formula is:

[0122]

[0123] in, The normalized attention weight of the j-th static feature (j corresponds to the index of the 24 static data items, j=1,2,…,24). The weight correction coefficient for the j-th static feature is used to correct the original weights of the static attention layer output. .

[0124] The formula for the weighted static feature output is:

[0125]

[0126] LSTM Output Correction: Hidden State of LSTM use The effect of zero-padding feature is masked. This refers to the masking mask for the k-th time-series feature at time step t in the time-series data, where t is the time step index of the time-series data, t=1,2,…,10, corresponding to 10 fixed time steps after preprocessing; k is the time-series feature index, k=1,2,…,6, corresponding to 6 time-series data items such as body temperature and systolic blood pressure. The formula is:

[0127]

[0128] in Let be the LSTM hidden state of the k-th feature at time step t. To correct the hidden state, zero-padding features are used. =0.

[0129] One embodiment of a method for improving patient profiling in healthcare and elderly care also discloses a specific process for adaptive weighted average and cross-validation, which includes the following:

[0130] Single-model prediction entropy: For model m, the probability that its predicted sample belongs to risk level c∈{0,1,2} is... satisfy If = 1, then the prediction entropy of the model is:

[0131]

[0132] The prediction entropy is an indicator that quantifies the uncertainty of a single model in classifying the risk of a particular patient sample. It directly reflects the ambiguity of the model's judgment on the current sample and forms the basis for subsequent calculations of the overall sample difficulty coefficient. When The larger the value, the more uncertain the model's predictions for the sample. For example... =0.4, =0.3, =0.2 =1.58.

[0133] Model m is associated with three sub-models: CNN-LSTM (an abbreviation for the combined structure of 1D-CNN and LSTM), Random Forest (RF), and LightGBM. These sub-models are based on preprocessed multimodal medical data from the same source and share a consistent prediction target of low, medium, and high risk levels. Specifically, model m extracts the prediction probability distributions of the three sub-models (CNN-LSTM, LightGBM, and Random Forest) and calculates the prediction entropy of each sub-model. (Reflecting the uncertainty of CNN-LSTM in judging the dynamic risk trend of time series) (Reflecting the uncertainty of LightGBM's judgment on the correlation of static basic risks) (This reflects the uncertainty of random forest in judging noisy data and marginal cases), and then the weights are determined through cross-validation (CNN-LSTM weight 0.3, LightGBM weight 0.4, random forest weight 0.3), and the weighted average is used to obtain the comprehensive sample difficulty coefficient. Based on this coefficient, dynamic weight allocation is achieved, which becomes the central hub for the coordinated scheduling of the three types of sub-models, ensuring that the model balances prediction accuracy and efficiency in samples of different difficulty.

[0134] Overall sample difficulty coefficient: Different models have different sensitivities to difficulty (e.g., random forests are more sensitive to noise, so their entropy weights should be higher), and the weights are determined through cross-validation:

[0135]

[0136] in This represents the prediction entropy of the CNN-LSTM model. Its function is to measure the uncertainty of the CNN-LSTM model in predicting the risk classification of the current sample. It is calculated by the entropy formula. The larger the entropy value, the more uncertain the model's prediction of the sample (e.g., the entropy value is high when the probability distribution is uniform, and low when the probability is concentrated). This represents the prediction entropy of the LightGBM model, which measures the uncertainty of the LightGBM model's prediction for the current sample. It is calculated using the same entropy formula and reflects the model's confidence in judging samples dominated by static features. This represents the prediction entropy of the random forest model. Its purpose is to measure the uncertainty of the random forest model's prediction of the current sample, focusing on reflecting the ambiguity of the model's judgment of "noisy samples and marginal cases".

[0137] Determining interval thresholds using K-means clustering: Simple samples <0.2; Medium sample size 0.2< <0.5; complex samples ≥0.5. After determining the sample complexity, model selection and weight allocation strictly adhere to the logic of "adapting to difficulty and leveraging advantages," specifically: simple samples ( <0.2) A combination of LightGBM as the primary algorithm and CNN-LSTM as the secondary algorithm is selected, with a weight distribution of LightGBM 0.7 and CNN-LSTM 0.3 (random forest weights are 0). LightGBM's efficient fitting ability to static features is prioritized to ensure prediction speed; for medium-sized samples (0.2 < <0.5) A three-model approach was chosen: LightGBM, CNN-LSTM, and Random Forest. The weights were allocated as follows: LightGBM 0.4, CNN-LSTM 0.3, and Random Forest 0.3. This approach balances prediction accuracy and speed through the synergistic effect of static feature fitting and temporal feature capture. For complex samples ( (≥0.5) A combination of Random Forest and CNN-LSTM as the main model and LightGBM as the auxiliary model is selected. The weights are allocated as follows: Random Forest 0.4, CNN-LSTM 0.4, and LightGBM 0.2. The noise resistance advantage of Random Forest and the accurate capture of temporal trends by CNN-LSTM are used to ensure prediction accuracy. The total weight of the model is 1 in all scenarios.

[0138] The logic is as follows: LightGBM efficiently fits static data when the value is less than 0.2, prioritizing speed; when the value is less than 0.2... Static + timing coordination when <0.5, balancing accuracy and speed; For values ​​≥0.5, use Random Forest for noise mitigation and CNN-LSTM for timing capture, prioritizing accuracy.

[0139] Different models adapt to different sample difficulty levels. LightGBM excels at handling simple samples with "static features as the main focus and clean data"; Random Forest is highly robust to noise and suitable for complex samples; CNN-LSTM is adept at capturing temporal fluctuations and suitable for samples of medium difficulty. By quantifying sample difficulty and dynamically allocating weights, the model can balance accuracy and efficiency when dealing with different samples.

[0140] One embodiment of a method for improving patient profiling in healthcare and elderly care also discloses a specific process for determining measurement indicators and using a test set to evaluate the performance of a hybrid architecture model. This process includes the following steps:

[0141] In this embodiment, the main measurement metrics used are macro-average precision, macro-average recall, and weighted F1 score. Precision measures the proportion of correctly predicted samples out of the total sample, thus determining overall accuracy. Its formula is as follows:

[0142]

[0143] in, It is a true positive for category c. For true negatives of category c, This represents the total number of samples.

[0144] Macro-average precision measures the reliability of the model's predictions for each category, and its formula is as follows:

[0145]

[0146] in, This is a false positive for category c.

[0147] The macro average recall rate measures the model's ability to capture samples from each class, and its formula is as follows:

[0148]

[0149] in, False negatives for category c.

[0150] The weighted F1 score is used to comprehensively measure the precision and recall of a model by weighting the number of samples in each class. Its formula is as follows:

[0151]

[0152] in, This refers to the number of true positive samples at risk level c, i.e., the number of samples that are actually at risk level c and are also predicted by the model to be at risk level c. It is used to calculate the precision, recall, and... The core foundational data. The weighted F1 score refers to the accuracy for risk level c, which is the accuracy rate for that class. Weighted−F1 refers to the weighted F1 score, which is the average accuracy rate across the three risk levels. The comprehensive index is obtained by weighting and summing the samples according to their respective proportions to the total number of samples (N).

[0153] See Figures 3 to 6 ,in, Figure 3 The training set confusion matrix shows the model's classification of low, medium, and high-risk samples on the training set. The vertical axis represents the true label, the horizontal axis represents the predicted label, and the color scale on the right indicates the number of samples. Figure 4 The confusion matrix for the test set reflects the model's generalization classification ability on the independent test set, indicating accurate prediction of each category and low misclassification rate. Figure 5The training and validation accuracy curves are plotted with the number of training rounds on the horizontal axis and accuracy on the vertical axis. The blue curve represents the training accuracy and the yellow curve represents the validation accuracy. Both curves rise rapidly and then stabilize, indicating that the model has high classification accuracy and good generalization ability. Figure 6 The training and validation loss curves are plotted with the number of training rounds on the horizontal axis and the loss value on the vertical axis. The blue curve represents the training loss and the yellow curve represents the validation loss. The curves decrease rapidly and converge, indicating that the model training is stable.

[0154] Referring to Tables 1 to 5, the precision, recall, and weighted F1 score of the hybrid architecture model used in this application were compared with the K-Nearest Neighbors (KNN) model, LR (Logistic Regression) model, DT (Decision Tree) model, and RF (Random Forest) model in a dataset of 500 examples.

[0155] Table 1 Results of various metrics for the hybrid architecture model

[0156]

[0157] Table 2 Results of various indicators of the KNN model

[0158]

[0159] Table 3 Results of various indicators of the LR model

[0160]

[0161] Table 4 Results of various indicators of the DT model

[0162]

[0163] Table 5 Results of various indicators of the RF model

[0164]

[0165] Experimental results show that the hybrid architecture model proposed in this application significantly outperforms the other four machine learning models in terms of precision, macro-average precision, recall, and weighted F1 score, with an average precision exceeding 5%, macro-average recall exceeding 7.75%, and weighted F1 score exceeding 7%. Furthermore, by enhancing clinical understandability through feature weight analysis and a natural language interpretation module, and coupled with a web interaction platform, it can be rapidly applied to hospital and community healthcare scenarios, providing decision support for medical resource allocation and personalized intervention.

[0166] It should be understood that although the steps in the flowchart above are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowchart above may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0167] Based on the same inventive concept, this application also provides a system for implementing the aforementioned method for improving the patient profiling and classification of medical and rehabilitation patients. The solution provided by this system is similar to the solution described in the above method, and therefore will not be repeated here.

[0168] In one embodiment, a patient profiling and classification improvement system for medical and health care patients is also provided, including:

[0169] The acquisition module is used to acquire patients' multimodal medical data and preprocess it to construct a dataset. The dataset is divided into a training set and a test set according to a preset ratio. The multimodal medical data includes static data and time-series data.

[0170] The training module is used to input the dataset into the hybrid architecture model for iterative training to obtain the trained hybrid architecture model. The processing of the hybrid architecture model is as follows: the static branch extracts features and performs nonlinear fitting on the static data through a residual network, a static attention layer, and a LightGBM model to obtain static features; the temporal branch extracts features from the temporal data through a 1D-CNN, LSTM, and a temporal attention layer to obtain temporal features; the temporal features are filtered using a random forest model; the filtered temporal features are fused with the static features through a feature fusion layer to obtain fused features; the model optimization layer processes the fused features through a triple strategy of Dropout layer random deactivation, L2 regularization weight constraints, difficulty adaptive weighting, and cross-validation; and the output layer outputs low, medium, and high risk levels and corresponding probabilities and confidence scores based on the input fused features.

[0171] The prediction module is used to input the multimodal medical data to be processed into the trained hybrid architecture model to obtain patient profile classification results.

[0172] In the above embodiments, each module of the improved patient profiling and classification system for medical and health care can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0173] In one embodiment, a computer device is also provided, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps as described in all the above method embodiments.

[0174] In one embodiment, a readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps as described in all the above method embodiments.

[0175] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0176] The above are merely preferred embodiments of the present application and are not intended to limit the embodiments of the present application. For those skilled in the art, the embodiments of the present application can have various modifications and variations. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of the present application should be included within the protection scope of the embodiments of the present application.

Claims

1. An improved method for patient profiling and classification in medical and rehabilitation care, characterized in that, Includes the following steps: Acquire and preprocess the patient's multimodal medical data, construct a dataset, and divide the dataset into a training set and a test set according to a preset ratio. The multimodal medical data includes static data and time-series data. Input the dataset into the hybrid architecture model for iterative training to obtain the trained hybrid architecture model; The multimodal medical data to be processed is input into the trained hybrid architecture model to obtain patient profile classification results; The processing steps of the hybrid architecture model are as follows: the static branch extracts features and performs nonlinear fitting on the static data through a residual network, a static attention layer, and a LightGBM model to obtain static features; the temporal branch extracts features from the temporal data through a 1D-CNN, LSTM, and a temporal attention layer to obtain temporal features; the temporal features are filtered using a random forest model; the filtered temporal features are fused with the static features through a feature fusion layer to obtain fused features; the model optimization layer processes the fused features through a triple strategy of random deactivation of the Dropout layer, L2 regularization weight constraints, adaptive difficulty weighting, and cross-validation; and the output layer outputs low, medium, and high risk levels and corresponding probabilities and confidence scores based on the input fused features. Before the feature fusion layer performs processing, it also includes bidirectional guided superposition processing of static and dynamic features, and noise tolerance and feature attention collaborative filtering superposition processing. The bidirectional guided superposition processing of static and dynamic features includes the following steps: The top five static features were selected based on the feature importance gain value of the LightGBM model. These top five static features were then min-max normalized to form the static core vector. Based on static core vectors Construct adjustment terms to adjust the gating mechanism of the LSTM; Calculate the single-index time series deviation of each time series feature at each time step. Calculate the weighted sum of the single-index time series deviations of all time steps using the normalized weights of the time steps to obtain the dynamic anomaly of a single time series feature. Integrate the dynamic anomalies of all single time series features to obtain the overall dynamic anomaly. Use the overall dynamic anomaly as a correction term to modify the split gain formula of the LightGBM model. Optimize the selection of static features based on the modified LightGBM model.

2. The improved method for patient profiling and classification in medical and rehabilitation care according to claim 1, characterized in that, The preprocessing includes filling the static data with the mean and median, and truncating the time series data to a preset fixed length and padding any data that is shorter than the preset fixed length.

3. The improved method for patient profiling and classification in medical and rehabilitation care according to claim 1, characterized in that, The adjusted LSTM gating mechanism is shown below: The forgetting gate, the formula is: ,in, This represents the output of the forget gate at time t. It is the Sigmoid activation function. This represents the weight matrix of the LSTM forget gate. This represents the input vector at time step t in the time series data. This represents the hidden state of the LSTM at time step (t-1). This represents the bias vector of the LSTM forget gate. It is the learnable weight matrix used to connect the static core vector in the LSTM forget gate. 32 represents the LSTM hidden layer dimension, and 5 represents the static kernel vector dimension. The purpose is to pass through the static kernel vector... Adjusting the forgetting threshold; Input gate, formula: ,in, Its function is to use static core vectors Adjust input sensitivity. The weight matrix of the LSTM input gate is represented by... This represents the bias vector of the LSTM input gate; Cell state The formula is: , ,in, It is the hidden state output of the LSTM at time step t. It is the timing input vector at the t-th time step in the timing branch of the LSTM. For output gate, For element-wise product, , These are cell parameters.

4. The improved method for patient profiling and classification in medical and rehabilitation care according to claim 1, characterized in that, Calculate the single-index time series deviation of each time series feature at each time step. The calculation formula is as follows: ,in, and These are the maximum and minimum values ​​within the clinically reasonable range. Let be the temporal mean of the k-th temporal feature at the t-th time step; This represents the original value of the k-th time series feature at the t-th time step.

5. The improved method for patient profiling and classification according to claim 1, characterized in that, The noise tolerance and feature attention collaborative filtering superposition process includes the following steps: The weights output by the static attention layer are corrected, and static features are determined based on the corrected weights and the predicted values. A mask is introduced to perform a masking and zero-padding operation on the LSTM hidden state of the zero-padding feature, so that the output of the LSTM hidden state of the zero-padding feature is zero.

6. An improved patient profiling and classification system for medical and rehabilitation care, characterized in that, include: The acquisition module is used to acquire patients' multimodal medical data and preprocess it to construct a dataset. The dataset is divided into a training set and a test set according to a preset ratio. The multimodal medical data includes static data and time-series data. The training module is used to input the dataset into the hybrid architecture model for iterative training to obtain the trained hybrid architecture model. The processing of the hybrid architecture model is as follows: the static branch extracts features and performs nonlinear fitting on the static data through a residual network, a static attention layer, and a LightGBM model to obtain static features; the temporal branch extracts features from the temporal data through a 1D-CNN, LSTM, and a temporal attention layer to obtain temporal features; the temporal features are then filtered using a random forest model; and the filtered temporal features are fused with the static features through a feature fusion layer to obtain fused features; the model optimization layer uses a Dropout layer for random deactivation and L2 optimization. The fusion features are processed using a triple strategy of regularized weight constraints, adaptive difficulty weighting, and cross-validation. The output layer outputs low, medium, and high risk levels, along with corresponding probabilities and confidence scores, based on the input fusion features. Before the feature fusion layer processes the features, a bidirectional guided superposition process is performed on static and dynamic features, as well as a noise-tolerant and feature-attention collaborative filtering superposition process. The bidirectional guided superposition process on static and dynamic features includes the following steps: selecting the top five static features using the feature importance gain value of the LightGBM model, and performing Min-Max normalization on the top five static features to form a static core vector. ; Based on static core vector An adjustment term is constructed to adjust the gating mechanism of the LSTM. The single-index temporal deviation of each temporal feature at each time step is calculated. The single-index temporal deviation of all time steps is weighted and summed using the normalized weights of the time steps to obtain the dynamic anomaly of a single temporal feature. The dynamic anomalies of all single temporal features are integrated to obtain the overall dynamic anomaly. The overall dynamic anomaly is used as a correction term to correct the split gain formula of the LightGBM model. The selection of static features is optimized based on the corrected LightGBM model. The prediction module is used to input the multimodal medical data to be processed into the trained hybrid architecture model to obtain patient profile classification results.

7. A computer device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the method as described in any one of claims 1 to 5.

8. A readable storage medium, characterized in that, The readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 5.