Cerebral stroke patient treatment information management method and system based on machine learning

By constructing a stroke map and introducing a multi-head attention mechanism and other technical means, the problems of complex and uneven medical information and quality of stroke patients in the existing technology are solved, the prediction accuracy and practical management of patients with different risks are improved, and effective management of patients with different risks is achieved.

CN119889722AInactive Publication Date: 2025-04-25RENMIN HOSPITAL OF WUHAN UNIVERSITY (HUBEI GENERAL HOSPITAL)
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411963959.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing medical information management methods for stroke patients, the patient's medical information is complex and the quality is uneven, making it difficult to fully understand the patient's condition and the prediction accuracy is low. At the same time, the specific situation of patients varies greatly, making it difficult to apply to all patients universally, resulting in low practicality and prediction accuracy.

Method used

Using a machine learning-based method, by constructing a stroke graph, a multi-head attention mechanism, a time convolution network, an adaptive adjacency matrix and a gating mechanism are introduced to extract temporal and spatial features, and risk prediction is carried out through the full connection layer. At the same time, the population intelligent algorithm is used to search the model's best parameters and dynamically adjust the search range to adapt to the specific situation of different patients.

Benefits of technology

By integrating complex information from multiple dimensions, we can improve the degree of understanding of the patient's situation, improve the prediction accuracy, enhance the practicality and reliability of the medical information management of stroke patients, and achieve effective management of patients with different risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119889722A_ABST
    Figure CN119889722A_ABST
Patent Text Reader

Abstract

The invention discloses a cerebral apoplexy patient treatment information management method and system based on machine learning, and belongs to the technical field of information management, and the method comprises the steps of data collection, data preprocessing, cerebral apoplexy risk prediction model construction, cerebral apoplexy risk prediction model parameter search and cerebral apoplexy patient treatment information management. According to the scheme, a multi-head attention mechanism is introduced to update cerebral apoplexy node features, a time convolution network is utilized to construct residual connection to extract time features, an adaptive adjacency matrix is introduced to calculate diffusion features, a gating mechanism is introduced to extract spatial features, and a loss function including mean square error loss and an attention weight regularization item is designed; a gamma function is introduced to design a convergence factor, a search radius is designed, and the global optimal position and the global average position are comprehensively considered to update the individual position, so that the practicability and reliability of the treatment information management of the stroke patient are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of information management, and specifically refers to a method and system for managing medical information of stroke patients based on machine learning. Background Art

[0002] The method of managing the medical information of stroke patients is to use machine learning technology to deeply mine and learn the medical information, predict the risk of stroke, and manage patients in reasonable groups according to the risk level to improve the quality of medical services and the treatment effect of patients. However, the existing methods of managing the medical information of stroke patients have the problems of complex patient information and uneven quality, which makes it difficult to fully understand the patient's condition and low prediction accuracy; the existing methods of managing the medical information of stroke patients have the problem of large differences in the specific conditions of patients, which makes it difficult to universally apply to all patients, resulting in problems of low practicality and prediction accuracy. Summary of the invention

[0003] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a method and system for managing the medical information of stroke patients based on machine learning. In view of the problems in the existing methods for managing the medical information of stroke patients that the medical information of patients is complex and of uneven quality, which makes it difficult to fully understand the patient's condition and the prediction accuracy is low, this scheme constructs a stroke graph based on a similarity threshold, introduces a multi-head attention mechanism to update the features of stroke nodes, uses a temporal convolutional network to construct a residual connection to extract temporal features, introduces an adaptive adjacency matrix to calculate the diffusion features, and introduces a gating mechanism to extract spatial features. After fusing the temporal and spatial features, they are processed with a fully connected layer for risk prediction. A loss function including a mean square error loss and an attention weight regularization term is designed. By constructing a stroke graph to integrate multi-dimensional complex information, the multi-head attention mechanism can Focusing on important information, the adaptive adjacency matrix and gating mechanism can dynamically adjust feature extraction and processing according to the patient's specific situation, dig deeper and more comprehensively into patient information, and improve the practicality and reliability of stroke patient medical information management; in view of the fact that the existing stroke patient medical information management methods have large differences in patient specific conditions and are difficult to be universally applied to all patients, resulting in low practicality and prediction accuracy, this solution uses a swarm intelligence algorithm to search for the optimal parameters of the model, introduces the gamma function to design the convergence factor, designs the search radius, comprehensively considers the global optimal position and the global average position to update the individual position, finds the optimal parameters to construct a stroke risk prediction model, dynamically adjusts the search range, makes the search process more flexible and adaptive, improves the performance of the stroke risk prediction model, and realizes effective management of patients with different risks.

[0004] The technical solution adopted by the present invention is as follows: The present invention provides a method for managing the medical information of stroke patients based on machine learning, and the method comprises the following steps:

[0005] Step S1: data collection;

[0006] Step S2: data preprocessing;

[0007] Step S3: constructing a stroke risk prediction model;

[0008] Step S4: Stroke risk prediction model parameter search;

[0009] Step S5: Management of stroke patient medical information.

[0010] Furthermore, in step S1, the data collection is to collect historical medical information of stroke patients; the historical medical information of stroke patients includes clinical data of stroke, stroke image data and risk level; the clinical data of stroke includes time of consultation, basic data of patients, medical history data, clinical examination data and living habit data; the medical history data includes previous medical history and family medical history; the clinical examination data includes vital signs, neurological examination results and laboratory test results; the vital signs include blood pressure, heart rate, respiratory rate and body temperature; the neurological examination results include consciousness state, reaction ability, limb strength assessment and sensory assessment; the laboratory test results include blood lipids, blood sugar, liver and kidney function and coagulation function; the living habit data includes eating habits and exercise habits; the stroke image data is a brain CT image; the risk level includes high risk, medium risk and low risk, and the risk level is used as a data label.

[0011] Furthermore, in step S2, the data preprocessing specifically includes the following steps:

[0012] Step S21: Stroke clinical data processing, data cleaning, data conversion and data normalization processing are performed on the collected stroke clinical data; data cleaning includes processing missing values, abnormal values ​​and duplicate values; data conversion is to convert the data into vector form; data normalization is to unify the data range based on the maximum and minimum normalization method;

[0013] Step S22: Stroke image data processing, performing image denoising, image enhancement and image feature extraction on the acquired stroke image data; image denoising is to use a Gaussian filter to remove high-frequency noise in the brain CT image; image enhancement is to use histogram equalization to improve the contrast of the brain CT image; image feature extraction is to extract features from the brain CT image based on the VGGNet network;

[0014] Step S23: construct a data set, obtain the stroke patient visit samples based on the processed stroke clinical data, the features extracted from the brain CT images and the risk level, construct a stroke patient visit data set, and randomly select 70% of the samples from the stroke patient visit data set to construct a training data set, and construct a test data set based on the remaining 30% of the samples.

[0015] Furthermore, in step S3, the construction of the stroke risk prediction model specifically includes the following steps:

[0016] Step S31: Adaptive neighborhood selection, including the following steps:

[0017] Step S31: construct a graph structure, regard each stroke patient visit sample in the training data set as a stroke node, pre-set a similarity threshold J, calculate the cosine similarity between every two stroke nodes, add an edge between two stroke nodes whose cosine similarity is greater than the similarity threshold, and obtain a stroke graph B; if there is an edge between two stroke nodes, the element in the adjacency matrix is ​​1, otherwise the element in the adjacency matrix is ​​0, and obtain an adjacency matrix A;

[0018] Step S32: Update the stroke node features and introduce a multi-head attention mechanism to calculate the new features of each stroke node, including the following steps:

[0019] Step S321: Calculate the attention weight. For each stroke node, obtain the query vector Q, key vector K and value vector V through linear transformation. The attention score between two stroke nodes is obtained by calculating the dot product of the query vector and the key vector. The attention score is normalized to obtain the attention weight α. The formula used is as follows:

[0020] ;

[0021] ;

[0022] In the formula, and The hth attention head calculates the stroke node b. i With stroke node b j and stroke node b c The attention scores between them, i, j and c are the stroke node indices, h is the attention head index, is the hth attention head calculating the stroke node b i The query vector is is the hth attention head calculating the stroke node b j The key vector is μ, μ is the control factor in the range (0, 1), T is the transposition operator, and d kis the dimension of the key vector, The hth attention head calculates the stroke node b i and stroke node b j The attention weights between It is the stroke node b i The neighbor node set of stroke node b i The stroke nodes with edges between them are stroke nodes b. i Neighbor nodes of

[0023] Step S322: Calculate new features, and concatenate the outputs of H attention heads to obtain new features of the stroke node. The formula used is as follows:

[0024] ;

[0025] In the formula, It is the stroke node b i New features of is the concatenation operator, The hth attention head calculates the stroke node b j is a value vector of , i and j are stroke node indices, h is the attention head index, The hth attention head calculates the stroke node b i and stroke node b j The attention weights between It is the stroke node b i The neighbor node set of stroke node b i The stroke nodes with edges between them are stroke nodes b. i Neighbor nodes of

[0026] Step S33: extracting temporal features, using three temporal convolutional networks to construct residual connections to capture the temporal features of stroke nodes, the formula used is as follows:

[0027] ;

[0028] In the formula, It is the stroke node b i The time characteristic, Tconv 1 、Tconv 2 and Tconv 3 They are the first time convolution network, the second time convolution network and the third time convolution network. , and Stroke node b i By Tconv 1 、Tconv 2 and Tconv3 The obtained features, is the Hadamard product, LeakyReLU (·) and ELU (·) are activation functions;

[0029] Step S34: extracting spatial features, including the following steps:

[0030] Step S341: Introduce the adaptive adjacency matrix to calculate the diffusion feature. The formula used is as follows:

[0031] ;

[0032] ;

[0033] ;

[0034] ;

[0035] In the formula, and are the forward transfer matrix and the reverse transfer matrix when the diffusion order is k, K is the total diffusion order, k is the diffusion order index, is an adaptive adjacency matrix, SoftMax (·) is a normalized exponential function, rowsum (·) is a row-wise summation function, ReLU (·) is a rectified linear unit function, E1 and E2 are learnable matrices, , and is the weight matrix when the diffusion order is k, Z is the diffusion feature, γ k is the diffusion intensity adjustment factor when the diffusion order is k in the range of (0, 1);

[0036] Step S342: introduce a gating mechanism to calculate spatial features, and the formula used is as follows:

[0037] ;

[0038] ;

[0039] ;

[0040] ;

[0041] In the formula, m i and r i Stroke nodes b i The corresponding update gate and reset gate, W mb and W mg is the weight matrix of the update gate, W rb and W rg is the weight matrix of the reset gate, Wsb and W sg is the weight matrix of the updated value, GCN is the graph convolutional network, σ(·) is the Sigmoid function, s i It is the stroke node b i The updated value of It is the stroke node b i spatial characteristics;

[0042] Step S35: Risk prediction: the extracted temporal features and spatial features are fused, and the fused features are processed using a fully connected layer to predict the risk of stroke. The formula used is as follows:

[0043] ;

[0044] In the formula, It is the stroke node b i The corresponding predicted label, W out and v out are the weight matrix and bias of the fully connected layer respectively, and Concat(·) is the concatenation operation;

[0045] Step S36: Design a loss function, and calculate the loss function of the model based on the mean square error loss and the attention weight regularization term. The formula used is as follows:

[0046] ;

[0047] Where L is the loss function, N is the number of nodes in the stroke graph, and y i It is the stroke node b i The corresponding true label, λ is a balancing factor in the range of (0, 1).

[0048] Furthermore, in step S4, the stroke risk prediction model parameter search specifically includes the following steps:

[0049] Step S41: Initialize individual positions, and adjust the similarity threshold J, control factor μ, and diffusion intensity adjustment factor γ in the stroke risk prediction model. k A parameter search space is established with a balance factor λ, individual positions are randomly initialized in the parameter search space, individual positions are used as representatives of stroke risk prediction model parameters, and the loss function of the stroke risk prediction model trained based on individual positions on the test data set is used as the individual fitness value;

[0050] Step S42: Individual location search, using swarm intelligence algorithm to update individual locations, including the following steps:

[0051] Step S421: Introduce the gamma function to design the convergence factor, and the formula used is as follows:

[0052] ;

[0053] Where p(t) is the convergence factor at the tth search, p max and p min are the maximum and minimum values ​​of the convergence factor, t is the search number index, and t max is the maximum number of searches, δ1 is the first random number in the range (0, 1), is the gamma function;

[0054] Step S422: Design the search radius, the formula used is as follows:

[0055] ;

[0056] Where u(t) is the search radius during the t-th search, u max is the maximum value of the search radius, sin(·) is the sine function;

[0057] Step S423: Position update, comprehensively consider the global optimal position and the global average position to update the individual position, the formula used is as follows:

[0058] ;

[0059] Where M q (t) and M q (t+1) are the positions of the qth individual in the tth and t+1th searches, respectively, q is the individual index, δ2 is the second random number in the range of (0, 1), and M best (t) and are the global optimal position and global average position at the t-th search respectively;

[0060] Step S43: Determine the optimal parameters, pre-set the fitness threshold, update the individual fitness value and the global optimal position, when the fitness value corresponding to the global optimal position is lower than the fitness threshold, the model parameters represented by the global optimal position are the optimal parameters, and a stroke risk prediction model is constructed based on the optimal parameters; otherwise, if the maximum number of searches is reached, return to step S41 to reinitialize the individual position; otherwise, add 1 to the number of searches and return to step S42 to continue the iterative search.

[0061] Furthermore, in step S5, the stroke patient medical information management is to collect real-time stroke patient medical information; the real-time stroke patient medical information includes stroke clinical data and stroke image data; after data preprocessing of the real-time stroke patient medical information, it is input into the stroke risk prediction model for processing to obtain the risk level, and the patients are divided into 3 different groups based on the risk level, and the stroke patients in different groups are managed and monitored separately.

[0062] The present invention provides a stroke patient medical information management system based on machine learning, comprising a data acquisition module, a data preprocessing module, a stroke risk prediction model construction module, a stroke risk prediction model parameter search module and a stroke patient medical information management module;

[0063] The data acquisition module collects historical stroke patient visit information and sends the data to the data preprocessing module;

[0064] The data preprocessing module processes the collected clinical stroke data and stroke image data respectively, constructs a training data set and a test data set, and sends the data to the stroke risk prediction model construction module;

[0065] The stroke risk prediction model construction module constructs a stroke graph based on a similarity threshold, introduces a multi-head attention mechanism to update stroke node features, uses a temporal convolutional network to construct a residual connection to extract temporal features, introduces an adaptive adjacency matrix to calculate diffusion features, and introduces a gating mechanism to extract spatial features. After fusing the temporal and spatial features, the fully connected layer is used for risk prediction, a loss function including a mean square error loss and an attention weight regularization term is designed, and the data is sent to a stroke risk prediction model parameter search module;

[0066] The stroke risk prediction model parameter search module introduces a gamma function to design a convergence factor, designs a search radius, comprehensively considers the global optimal position and the global average position to update the individual position, finds the optimal parameter based on the fitness threshold, and sends the data to the stroke patient medical information management module;

[0067] The stroke patient medical information management module inputs the real-time stroke patient medical information into the stroke risk prediction model for processing, groups the patients based on the output risk levels, and manages and monitors the stroke patients in different groups separately.

[0068] The beneficial effects achieved by the present invention using the above scheme are as follows:

[0069] (1) In view of the problems in the existing methods of managing the medical information of stroke patients, such as the complexity and uneven quality of the medical information of patients, which makes it difficult to fully understand the patient's condition and the low prediction accuracy, this scheme constructs a stroke graph based on the similarity threshold, introduces a multi-head attention mechanism to update the stroke node features, uses a temporal convolutional network to construct residual connections to extract temporal features, introduces an adaptive adjacency matrix to calculate the diffusion features, and introduces a gating mechanism to extract spatial features. After fusing the temporal and spatial features, they are processed by a fully connected layer for risk prediction. A loss function containing a mean square error loss and an attention weight regularization term is designed. By constructing a stroke graph, multi-dimensional complex information is integrated and different features are associated to better cope with the complexity of information. The multi-head attention mechanism can focus on important information and reduce the interference of poor quality information, which helps to extract key features from complex information. The adaptive adjacency matrix and gating mechanism can dynamically adjust feature extraction and processing according to the specific situation of the patient, so as to more deeply and comprehensively mine patient information, improve the understanding of the patient's condition, and thus improve the prediction accuracy and the practicality and reliability of the management of the medical information of stroke patients.

[0070] (2) In view of the fact that the existing methods for managing stroke patient medical information vary greatly in terms of specific conditions of patients, making it difficult to apply them to all patients, resulting in low practicality and prediction accuracy, this solution uses a swarm intelligence algorithm to search for the optimal parameters of the model, introduces a gamma function to design the convergence factor, designs the search radius, and comprehensively considers the global optimal position and the global average position to update the individual position, finds the optimal parameters to construct a stroke risk prediction model, dynamically adjusts the search range, makes the search process more flexible and adaptive, and improves the efficiency and accuracy of parameter search. The adaptive convergence factor and search radius help to adapt to different data characteristics and problem complexity, enhance the generalization ability and practicality of the model, improve the performance of the stroke risk prediction model, more accurately distinguish patients with different risk levels, and achieve effective management of patients with different risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 A schematic diagram of a process flow of a method for managing the medical information of stroke patients based on machine learning provided by the present invention;

[0072] Figure 2 A schematic diagram of a stroke patient medical information management system based on machine learning provided by the present invention;

[0073] Figure 3 is a schematic flow chart of step S3;

[0074] Figure 4 It is a schematic diagram of the process of step S4.

[0075] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION

[0076] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0077] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.

[0078] Example 1, see Figure 1 The present invention provides a method for managing the medical information of stroke patients based on machine learning, the method comprising the following steps:

[0079] Step S1: Data collection, collecting historical stroke patient visit information;

[0080] Step S2: data preprocessing, processing the collected stroke clinical data and stroke image data separately, and constructing a data set;

[0081] Step S3: construct a stroke risk prediction model, construct a stroke graph based on a similarity threshold, introduce a multi-head attention mechanism to update stroke node features, use a temporal convolutional network to construct a residual connection to extract temporal features, introduce an adaptive adjacency matrix to calculate diffusion features, and introduce a gating mechanism to extract spatial features. After fusing temporal and spatial features, use a fully connected layer to process for risk prediction, and design a loss function that includes a mean square error loss and an attention weight regularization term.

[0082] Step S4: Parameter search of stroke risk prediction model, introducing the gamma function to design the convergence factor, designing the search radius, comprehensively considering the global optimal position and the global average position to update the individual position, and finding the optimal parameters based on the fitness threshold;

[0083] Step S5: Management of stroke patient medical information. Real-time stroke patient medical information is input into the stroke risk prediction model for processing. Patients are grouped based on the output risk level, and stroke patients in different groups are managed and monitored separately.

[0084] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, the historical stroke patient consultation information includes stroke clinical data, stroke image data and risk level; the stroke clinical data includes consultation time, patient basic data, medical history data, clinical examination data and lifestyle data; the medical history data includes previous medical history and family medical history; the clinical examination data includes vital signs, neurological examination results and laboratory test results; vital signs include blood pressure, heart rate, respiratory rate and body temperature; neurological examination results include consciousness state, reaction ability, limb strength assessment and sensory assessment; laboratory test results include blood lipids, blood sugar, liver and kidney function and coagulation function; lifestyle data includes eating habits and exercise habits; the stroke image data is a brain CT image; the risk level includes high risk, medium risk and low risk, and the risk level is used as a data label.

[0085] Example 3, see Figure 1 This embodiment is based on the above embodiment. In step S2, data preprocessing specifically includes the following steps:

[0086] Step S21: Stroke clinical data processing, data cleaning, data conversion and data normalization processing are performed on the collected stroke clinical data; data cleaning includes processing missing values, abnormal values ​​and duplicate values; data conversion is to convert the data into vector form; data normalization is to unify the data range based on the maximum and minimum normalization method;

[0087] Step S22: Stroke image data processing, performing image denoising, image enhancement and image feature extraction on the acquired stroke image data; image denoising is to use a Gaussian filter to remove high-frequency noise in the brain CT image; image enhancement is to use histogram equalization to improve the contrast of the brain CT image; image feature extraction is to extract features from the brain CT image based on the VGGNet network;

[0088] Step S23: construct a data set, obtain the stroke patient visit samples based on the processed stroke clinical data, the features extracted from the brain CT images and the risk level, construct a stroke patient visit data set, and randomly select 70% of the samples from the stroke patient visit data set to construct a training data set, and construct a test data set based on the remaining 30% of the samples.

[0089] Example 4, see Figure 1 and Figure 3This embodiment is based on the above embodiment. In step S3, building a stroke risk prediction model specifically includes the following steps:

[0090] Step S31: construct a graph structure, regard each stroke patient visit sample in the training data set as a stroke node, pre-set a similarity threshold J, calculate the cosine similarity between every two stroke nodes, add an edge between two stroke nodes whose cosine similarity is greater than the similarity threshold, and obtain a stroke graph B; if there is an edge between two stroke nodes, the element in the adjacency matrix is ​​1, otherwise the element in the adjacency matrix is ​​0, and obtain an adjacency matrix A;

[0091] Step S32: Update the stroke node features and introduce a multi-head attention mechanism to calculate the new features of each stroke node, including the following steps:

[0092] Step S321: Calculate the attention weight. For each stroke node, obtain the query vector Q, key vector K and value vector V through linear transformation. The attention score between two stroke nodes is obtained by calculating the dot product of the query vector and the key vector. The attention score is normalized to obtain the attention weight α, which can better capture the importance difference between different nodes and improve the accuracy and flexibility of feature updating. The formula used is as follows:

[0093] ;

[0094] ;

[0095] In the formula, and The hth attention head calculates the stroke node b. i With stroke node b j and stroke node b c The attention scores between them, i, j and c are the stroke node indices, h is the attention head index, The hth attention head calculates the stroke node b i The query vector is The hth attention head calculates the stroke node b j The key vector is μ, μ is the control factor in the range (0, 1), T is the transposition operator, and d k is the dimension of the key vector, The hth attention head calculates the stroke node b i and stroke node b j The attention weights between It is the stroke node b i The neighbor node set of stroke node b iThe stroke nodes with edges between them are stroke nodes b. i Neighbor nodes of

[0096] Step S322: Calculate new features, concatenate the outputs of H attention heads to obtain new features of the stroke node, and integrate the information of multiple attention heads to obtain more comprehensive and rich node features; the formula used is as follows:

[0097] ;

[0098] In the formula, It is the stroke node b i New features of is the concatenation operator, is the hth attention head calculating the stroke node b j is a value vector of , i and j are stroke node indices, h is the attention head index, is the hth attention head calculating the stroke node b i and stroke node b j The attention weights between It is the stroke node b i The neighbor node set of stroke node b i The stroke nodes with edges between them are stroke nodes b. i Neighbor nodes of

[0099] Step S33: extracting time features, using three time convolutional networks to construct residual connections to capture the time features of stroke nodes, effectively capturing features in time series data, and improving the model's ability to process time-related information; the formula used is as follows:

[0100] ;

[0101] ;

[0102] ;

[0103] ;

[0104] In the formula, It is the stroke node b i The time characteristic, Tconv 1 、Tconv 2 and Tconv 3 They are the first time convolution network, the second time convolution network and the third time convolution network. , and Stroke nodes b i By Tconv1 、Tconv 2 and Tconv 3 The obtained features, is the Hadamard product, LeakyReLU (·) and ELU (·) are activation functions;

[0105] Step S34: extracting spatial features, including the following steps:

[0106] Step S341: Introduce an adaptive adjacency matrix to calculate diffusion features, better capture spatial structure information and the interaction between nodes, and enhance the model's ability to express spatial features; the formula used is as follows:

[0107] ;

[0108] ;

[0109] ;

[0110] ;

[0111] In the formula, and are the forward transfer matrix and the reverse transfer matrix when the diffusion order is k, K is the total diffusion order, k is the diffusion order index, is an adaptive adjacency matrix, SoftMax (·) is a normalized exponential function, rowsum (·) is a row-wise summation function, ReLU (·) is a rectified linear unit function, E1 and E2 are learnable matrices, , and is the weight matrix when the diffusion order is k, Z is the diffusion feature, γ k is the diffusion intensity adjustment factor when the diffusion order is k in the range of (0, 1);

[0112] Step S342: Introduce a gating mechanism to calculate spatial features, better control the flow and update of information, and improve the flexibility and adaptability of the model; the formula used is as follows:

[0113] ;

[0114] ;

[0115] ;

[0116] ;

[0117] In the formula, m i and r i Stroke nodes bi The corresponding update gate and reset gate, W mb and W mg is the weight matrix of the update gate, W rb and W rg is the weight matrix of the reset gate, W sb and W sg is the weight matrix of the updated value, GCN is the graph convolutional network, σ(·) is the Sigmoid function, s i It is the stroke node b i The updated value of It is the stroke node b i spatial characteristics;

[0118] Step S35: Risk prediction: the extracted temporal features and spatial features are fused, and the fused features are processed using a fully connected layer to predict the risk of stroke. The formula used is as follows:

[0119] ;

[0120] In the formula, It is the stroke node b i The corresponding predicted label, W out and v out are the weight matrix and bias of the fully connected layer respectively, and Concat(·) is the concatenation operation;

[0121] Step S36: Design a loss function, calculate the loss function of the model based on the mean square error loss and the attention weight regularization term, prevent the model from over-relying on some nodes, and improve the generalization ability of the model; the formula used is as follows:

[0122] ;

[0123] Where L is the loss function, N is the number of nodes in the stroke graph, and y i It is the stroke node b i The corresponding true label, λ is a balancing factor in the range of (0, 1).

[0124] By performing the above operations, the existing methods for managing the medical information of stroke patients have complex patient medical information and uneven quality, which makes it difficult to fully understand the patient's condition and the prediction accuracy is low. This scheme constructs a stroke graph based on a similarity threshold, introduces a multi-head attention mechanism to update the stroke node features, uses a temporal convolutional network to construct a residual connection to extract temporal features, introduces an adaptive adjacency matrix to calculate diffusion features, and introduces a gating mechanism to extract spatial features. After fusing the temporal and spatial features, they are processed with a fully connected layer for risk prediction. A loss function containing a mean square error loss and an attention weight regularization term is designed. By constructing a stroke graph, multi-dimensional complex information is integrated, and different features are associated to better cope with the complexity of information. The multi-head attention mechanism can focus on important information, reduce the interference of poor quality information, and help extract key features from complex information. The adaptive adjacency matrix and gating mechanism can dynamically adjust feature extraction and processing according to the specific situation of the patient, and more deeply and comprehensively mine patient information, improve the understanding of the patient's condition, and thus improve the prediction accuracy and the practicality and reliability of the management of the medical information of stroke patients.

[0125] Example 5, see Figure 1 and Figure 4 This embodiment is based on the above embodiment. In step S4, the stroke risk prediction model parameter search specifically includes the following steps:

[0126] Step S41: Initialize individual positions, and adjust the similarity threshold J, control factor μ, and diffusion intensity adjustment factor γ in the stroke risk prediction model. k The parameter search space is established with the balance factor λ, and the individual position is randomly initialized in the parameter search space. The individual position is used as the representative of the parameters of the stroke risk prediction model. The loss function of the stroke risk prediction model trained based on the individual position on the test data set is used as the individual fitness value, which effectively measures the performance of the model under different parameter combinations.

[0127] Step S42: Individual location search, using swarm intelligence algorithm to update individual locations, including the following steps:

[0128] Step S421: Introduce the gamma function to design the convergence factor, so that the search process has a larger exploration range in the early stage, gradually converges as the search proceeds, improves the efficiency and accuracy of the search, and helps to find the appropriate parameters more quickly; the formula used is as follows:

[0129] ;

[0130] Where p(t) is the convergence factor at the tth search, p max and p min are the maximum and minimum values ​​of the convergence factor, t is the search number index, and tmax is the maximum number of searches, δ1 is the first random number in the range (0, 1), is the gamma function;

[0131] Step S422: Design the search radius to ensure that the individual has a suitable range of activities in the search space, which is neither too limited nor too broad, so as to better find the optimal parameters; the formula used is as follows:

[0132] ;

[0133] Where u(t) is the search radius during the t-th search, u max is the maximum value of the search radius, sin(·) is the sine function;

[0134] Step S423: position update, comprehensively consider the global optimal position and the global average position to update the individual position, while making full use of the optimal individual information, also take into account the overall situation of the group, avoid the algorithm from falling into the local optimum, and improve the comprehensiveness and accuracy of the search; the formula used is as follows:

[0135] ;

[0136] Where M q (t) and M q (t+1) are the positions of the qth individual in the tth and t+1th searches, respectively, q is the individual index, δ2 is the second random number in the range of (0, 1), and M best (t) and are the global optimal position and global average position at the t-th search, respectively. The global optimal position is the position of the individual with the smallest fitness value among all individuals, and the global average position is the average position of all individuals;

[0137] Step S43: Determine the optimal parameters, pre-set the fitness threshold, update the individual fitness value and the global optimal position, when the fitness value corresponding to the global optimal position is lower than the fitness threshold, the model parameters represented by the global optimal position are the optimal parameters, and a stroke risk prediction model is constructed based on the optimal parameters; otherwise, if the maximum number of searches is reached, return to step S41 to reinitialize the individual position; otherwise, add 1 to the number of searches and return to step S42 to continue the iterative search.

[0138] By performing the above operations, in view of the fact that the existing methods for managing the medical information of stroke patients have large differences in specific conditions of patients, which makes it difficult to universally apply to all patients, resulting in low practicality and prediction accuracy, this solution adopts a swarm intelligence algorithm to search for the optimal parameters of the model, introduces a gamma function to design the convergence factor, designs the search radius, and comprehensively considers the global optimal position and the global average position to update the individual position, finds the optimal parameters to construct a stroke risk prediction model, dynamically adjusts the search range, makes the search process more flexible and adaptive, and improves the efficiency and accuracy of parameter search. The adaptive convergence factor and search radius help to adapt to different data characteristics and problem complexity, enhance the generalization ability and practicality of the model, improve the performance of the stroke risk prediction model, more accurately distinguish patients with different risk levels, and achieve effective management of patients with different risks.

[0139] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S5, the management of stroke patient medical information is to collect real-time stroke patient medical information; the real-time stroke patient medical information includes stroke clinical data and stroke image data; after data preprocessing, the real-time stroke patient medical information is input into the stroke risk prediction model for processing to obtain the risk level, and the patients are divided into 3 different groups based on the risk level, and the stroke patients in different groups are managed and monitored separately.

[0140] Embodiment 7, see Figure 2 , this embodiment is based on the above embodiment, and the present invention provides a stroke patient medical information management system based on machine learning, including a data acquisition module, a data preprocessing module, a stroke risk prediction model construction module, a stroke risk prediction model parameter search module and a stroke patient medical information management module;

[0141] The data acquisition module collects historical stroke patient visit information and sends the data to the data preprocessing module;

[0142] The data preprocessing module processes the collected clinical stroke data and stroke image data respectively, constructs a training data set and a test data set, and sends the data to the stroke risk prediction model construction module;

[0143] The stroke risk prediction model construction module constructs a stroke graph based on a similarity threshold, introduces a multi-head attention mechanism to update stroke node features, uses a temporal convolutional network to construct a residual connection to extract temporal features, introduces an adaptive adjacency matrix to calculate diffusion features, and introduces a gating mechanism to extract spatial features. After fusing the temporal and spatial features, the fully connected layer is used for risk prediction, a loss function including a mean square error loss and an attention weight regularization term is designed, and the data is sent to a stroke risk prediction model parameter search module;

[0144] The stroke risk prediction model parameter search module introduces a gamma function to design a convergence factor, designs a search radius, comprehensively considers the global optimal position and the global average position to update the individual position, finds the optimal parameter based on the fitness threshold, and sends the data to the stroke patient medical information management module;

[0145] The stroke patient medical information management module inputs the real-time stroke patient medical information into the stroke risk prediction model for processing, groups the patients based on the output risk levels, and manages and monitors the stroke patients in different groups separately.

[0146] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0147] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.

[0148] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.

Claims

1. A method for managing stroke patient medical information based on machine learning, characterized in that: The method comprises the following steps: Step S1: data collection; Step S2: data preprocessing; Step S3: construct a stroke risk prediction model, construct a stroke graph based on a similarity threshold, introduce a multi-head attention mechanism to update stroke node features, use a temporal convolutional network to construct a residual connection to extract temporal features, introduce an adaptive adjacency matrix to calculate diffusion features, and introduce a gating mechanism to extract spatial features. After fusing temporal and spatial features, use a fully connected layer to process for risk prediction, and design a loss function that includes a mean square error loss and an attention weight regularization term. Step S4: Parameter search of stroke risk prediction model, introducing the gamma function to design the convergence factor, designing the search radius, comprehensively considering the global optimal position and the global average position to update the individual position, and finding the optimal parameters based on the fitness threshold; Step S5: Management of stroke patient medical information.

2. The method for managing stroke patient medical information based on machine learning according to claim 1, characterized in that: In step S3, the construction of the stroke risk prediction model specifically includes the following steps: Step S31: construct a graph structure, regard each stroke patient visit sample in the training data set as a stroke node, pre-set a similarity threshold J, calculate the cosine similarity between every two stroke nodes, add an edge between two stroke nodes whose cosine similarity is greater than the similarity threshold, and obtain a stroke graph B; if there is an edge between two stroke nodes, the element in the adjacency matrix is ​​1, otherwise the element in the adjacency matrix is ​​0, and obtain an adjacency matrix A; Step S32: Update the stroke node features and introduce a multi-head attention mechanism to calculate the new features of each stroke node; Step S33: extracting temporal features, using three temporal convolutional networks to construct residual connections to capture the temporal features of stroke nodes, the formula used is as follows: ; In the formula, It is the stroke node b i The time characteristics of , and Stroke nodes b i By Tconv 1 、Tconv 2 and Tconv 3 The obtained features, Tconv 1 、Tconv 2 and Tconv 3 They are the first time convolution network, the second time convolution network and the third time convolution network. is the Hadamard product, LeakyReLU (·) and ELU (·) are activation functions; Step S34: extracting spatial features; Step S35: Risk prediction: the extracted temporal features and spatial features are fused, and the fused features are processed using a fully connected layer to predict the risk of stroke. The formula used is as follows: ; In the formula, It is the stroke node b i The corresponding predicted label, W out and v out are the weight matrix and bias of the fully connected layer, Concat (·) is the concatenation operation, σ (·) is the Sigmoid function, It is the stroke node b i spatial characteristics; Step S36: Design a loss function, and calculate the loss function of the model based on the mean square error loss and the attention weight regularization term. The formula used is as follows: ; Where L is the loss function, N is the number of nodes in the stroke graph, and y i It is the stroke node b i The corresponding true label, λ is the balance factor, i is the stroke node index, is the hth attention head calculating the stroke node b i and stroke node b j The attention weights between It is the stroke node b i The neighbor node set of stroke node b i The stroke nodes with edges between them are stroke nodes b. i neighbor nodes.

3. The method for managing stroke patient medical information based on machine learning according to claim 2, characterized in that: In step S32, the updating of the stroke node feature specifically includes the following steps: Step S321: Calculate the attention weight. For each stroke node, obtain the query vector Q, key vector K and value vector V through linear transformation. The attention score between two stroke nodes is obtained by calculating the dot product of the query vector and the key vector. The attention score is normalized to obtain the attention weight α. The formula used is as follows: ; ; In the formula, and The hth attention head calculates the stroke node b. i With stroke node b j and stroke node b c The attention scores between them, i, j and c are the stroke node indices, h is the attention head index, is the hth attention head calculating the stroke node b i The query vector is is the hth attention head calculating the stroke node b j The key vector, μ is the control factor, T is the transposition operator, d k is the dimension of the key vector; Step S322: Calculate new features, and concatenate the outputs of H attention heads to obtain new features of the stroke node. The formula used is as follows: ; In the formula, It is the stroke node b i New features of is the concatenation operator, is the hth attention head calculating the stroke node b j The value vector of , h is the attention head index, is the hth attention head calculating the stroke node b i and stroke node b j The attention weights between It is the stroke node b i The neighbor node set of stroke node b i The stroke nodes with edges between them are stroke nodes b. i neighbor nodes.

4. The method for managing stroke patient medical information based on machine learning according to claim 2, characterized in that: In step S34, the extraction of spatial features specifically includes the following steps: Step S341: Introduce the adaptive adjacency matrix to calculate the diffusion feature. The formula used is as follows: ; ; ; ; In the formula, and are the forward transfer matrix and the reverse transfer matrix when the diffusion order is k, K is the total diffusion order, k is the diffusion order index, is an adaptive adjacency matrix, SoftMax (·) is a normalized exponential function, rowsum (·) is a row-wise summation function, ReLU (·) is a rectified linear unit function, E1 and E2 are learnable matrices, , and is the weight matrix when the diffusion order is k, Z is the diffusion feature, γ k is the diffusion intensity adjustment factor when the diffusion order is k; Step S342: introduce a gating mechanism to calculate spatial features, and the formula used is as follows: ; ; ; ; In the formula, m i and r i Stroke nodes b i The corresponding update gate and reset gate, W mb and W mg is the weight matrix of the update gate, W rb and W rg is the weight matrix of the reset gate, W sb and W sg is the weight matrix of the updated value, GCN is the graph convolutional network, σ(·) is the Sigmoid function, s i It is the stroke node b i The updated value of It is the stroke node b i spatial characteristics.

5. The method for managing stroke patient medical information based on machine learning according to claim 1, characterized in that: In step S4, the stroke risk prediction model parameter search specifically includes the following steps: Step S41: Initialize individual positions, and adjust the similarity threshold J, control factor μ, and diffusion intensity adjustment factor γ in the stroke risk prediction model. k A parameter search space is established with a balance factor λ, individual positions are randomly initialized in the parameter search space, individual positions are used as representatives of stroke risk prediction model parameters, and the loss function of the stroke risk prediction model trained based on individual positions on the test data set is used as the individual fitness value; Step S42: Individual location search, using swarm intelligence algorithm to update individual locations, including the following steps: Step S421: Introduce the gamma function to design the convergence factor, and the formula used is as follows: ; In the formula, is the convergence factor at the t-th search, p max and p min are the maximum and minimum values ​​of the convergence factor, t is the search number index, and t max is the maximum number of searches, δ1 is the first random number, is the gamma function; Step S422: Design the search radius, the formula used is as follows: ; In the formula, is the search radius during the t-th search, u max is the maximum value of the search radius, sin(·) is the sine function; Step S423: Position update, comprehensively consider the global optimal position and the global average position to update the individual position, the formula used is as follows: ; Where M q (t) and M q (t+1) are the positions of the qth individual in the tth and t+1th searches, q is the individual index, δ2 is the second random number, and M best (t) and are the global optimal position and global average position at the t-th search respectively; Step S43: Determine the optimal parameters, pre-set the fitness threshold, update the individual fitness value and the global optimal position, when the fitness value corresponding to the global optimal position is lower than the fitness threshold, the model parameters represented by the global optimal position are the optimal parameters, and a stroke risk prediction model is constructed based on the optimal parameters; otherwise, if the maximum number of searches is reached, return to step S41 to reinitialize the individual position; otherwise, add 1 to the number of searches and return to step S42 to continue the iterative search.

6. The method for managing stroke patient medical information based on machine learning according to claim 1, characterized in that: In step S2, the data preprocessing specifically includes the following steps: Step S21: Stroke clinical data processing, data cleaning, data conversion and data normalization processing are performed on the collected stroke clinical data; data cleaning includes processing missing values, abnormal values ​​and duplicate values; data conversion is to convert the data into vector form; data normalization is to unify the data range based on the maximum and minimum normalization method; Step S22: Stroke image data processing, performing image denoising, image enhancement and image feature extraction on the acquired stroke image data; image denoising is to use a Gaussian filter to remove high-frequency noise in the brain CT image; image enhancement is to use histogram equalization to improve the contrast of the brain CT image; image feature extraction is to extract features from the brain CT image based on the VGGNet network; Step S23: construct a data set, obtain the stroke patient visit samples based on the processed stroke clinical data, the features extracted from the brain CT images and the risk level, construct a stroke patient visit data set, and randomly select 70% of the samples from the stroke patient visit data set to construct a training data set, and construct a test data set based on the remaining 30% of the samples.

7. The method for managing stroke patient medical information based on machine learning according to claim 1, characterized in that: In step S1, the data collection is to collect historical information on the medical treatment of stroke patients; the historical information on the medical treatment of stroke patients includes clinical data of stroke, image data of stroke and risk level; The stroke clinical data includes consultation time, patient basic data, medical history data, clinical examination data and lifestyle data; the medical history data includes previous medical history and family medical history; the clinical examination data includes vital signs, neurological examination results and laboratory test results; the vital signs include blood pressure, heart rate, respiratory rate and body temperature; the neurological examination results include consciousness state, reaction ability, limb strength assessment and sensory assessment; the laboratory test results include blood lipids, blood sugar, liver and kidney function and coagulation function; the lifestyle data includes eating habits and exercise habits; the stroke image data is a brain CT image; the risk level includes high risk, medium risk and low risk, and the risk level is used as a data label.

8. The method for managing stroke patient medical information based on machine learning according to claim 1, characterized in that: In step S5, the stroke patient medical information management is to input the real-time stroke patient medical information into the stroke risk prediction model for processing, group the patients based on the output risk level, and manage and monitor the stroke patients in different groups separately.

9. A stroke patient medical information management system based on machine learning, used to implement a stroke patient medical information management method based on machine learning as claimed in any one of claims 1 to 8, characterized in that: It includes data collection module, data preprocessing module, stroke risk prediction model building module, stroke risk prediction model parameter search module and stroke patient medical information management module; The data acquisition module collects historical stroke patient visit information and sends the data to the data preprocessing module; The data preprocessing module processes the collected clinical stroke data and stroke image data respectively, constructs a training data set and a test data set, and sends the data to the stroke risk prediction model construction module; The stroke risk prediction model construction module constructs a stroke graph based on a similarity threshold, introduces a multi-head attention mechanism to update stroke node features, uses a temporal convolutional network to construct a residual connection to extract temporal features, introduces an adaptive adjacency matrix to calculate diffusion features, and introduces a gating mechanism to extract spatial features. After fusing the temporal and spatial features, the fully connected layer is used for risk prediction, a loss function including a mean square error loss and an attention weight regularization term is designed, and the data is sent to a stroke risk prediction model parameter search module; The stroke risk prediction model parameter search module introduces a gamma function to design a convergence factor, designs a search radius, comprehensively considers the global optimal position and the global average position to update the individual position, finds the optimal parameter based on the fitness threshold, and sends the data to the stroke patient medical information management module; The stroke patient medical information management module inputs the real-time stroke patient medical information into the stroke risk prediction model for processing, groups the patients based on the output risk levels, and manages and monitors the stroke patients in different groups separately.

Citation Information

Cited By

  • Vehicle-mounted mobile shelter platform for stroke

    CN121059383A