An emergency patient risk level assessment method and system based on an attention mechanism

By using a multi-head self-attention model based on an attention mechanism, the problem of inaccurate triage in the emergency department was solved, enabling more efficient risk assessment of emergency patients, improving triage accuracy and resource utilization, and reducing patient waiting time.

CN120048532BActive Publication Date: 2026-07-03SHANDONG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2025-04-24
Publication Date
2026-07-03

Smart Images

  • Figure CN120048532B_ABST
    Figure CN120048532B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of intelligent medical treatment, and provides an emergency patient risk grade evaluation method and system based on an attention mechanism, basic information and physiological related information history data of an emergency patient are acquired, data is preprocessed and divided into a training set, a verification set and a test set, an evaluation model is constructed, the evaluation model is a multi-head self-attention mechanism model, the evaluation model is trained by using the training set, the trained evaluation is optimized by using the verification set, and the performance of the evaluation model is tested by using the test set, basic information and physiological related information data of an emergency patient are acquired, the acquired data is processed by using the evaluation model that passes the performance test, and an emergency patient risk grade evaluation result is obtained. The application can effectively assist emergency pre-examination triage, and solves the problem of emergency delay.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of smart healthcare technology, specifically relating to a method and system for assessing the risk level of emergency patients based on attention mechanisms. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Currently, the sheer volume of emergency department visits can easily lead to a lack of timely emergency care due to insufficient emergency resources. Furthermore, emergency department overcrowding is a long-standing and serious problem globally, resulting in a growing negative impact on the provision of reliable healthcare services. Long patient wait times can lead to overcrowding, causing surges in patients and treatment delays, which are intolerable for emergency patients.

[0004] Some hospitals have designed and implemented emergency triage information systems in accordance with industry standards. Emergency nurses complete the measurement, assessment, recording, and triage process for patients within 2-5 minutes of arrival, placing high demands on their triage skills. Inaccurate triage by junior nurses due to lack of experience is a frequent occurrence. Analysis of triage data from one hospital shows an emergency triage accuracy rate of 80.51%, with the accuracy rate for the more common level 3 and 4 triage results at 78.12%. The rate of manual correction for level 3 and 4 triage results is high, posing a potential risk of delayed treatment for critically ill patients due to inaccurate triage. Therefore, exploring and developing more intelligent emergency triage assistance tools to provide accurate triage suggestions to triage staff is of great significance for improving the emergency triage process. Summary of the Invention

[0005] To address the aforementioned problems, this invention proposes a method and system for assessing the risk level of emergency patients based on attention mechanisms.

[0006] According to some embodiments, the present invention adopts the following technical solution:

[0007] A method for assessing the risk level of emergency patients based on attention mechanisms includes the following steps:

[0008] Acquire basic information of emergency patients, as well as historical data on physiological information. Preprocess and divide the data into training set, validation set, and test set.

[0009] An evaluation model is constructed, which is a multi-head self-attention mechanism model. The evaluation model is trained using a training set, the trained evaluation is evaluated and the parameters are tuned using a validation set, and the performance of the evaluation model is tested using a test set.

[0010] The system acquires basic information and physiological data related to emergency patients, processes the acquired data using an evaluation model that has passed performance testing, and obtains the risk level assessment results for emergency patients.

[0011] As an alternative implementation method, the basic information of the emergency patient includes age, gender, ethnicity, time from onset to admission, whether the patient and family can communicate normally, and clinical data.

[0012] As an alternative implementation, the physiologically relevant information includes the patient's disease type, heart rate, diastolic blood pressure, systolic blood pressure, mental state, blood oxygen saturation, body temperature, pulse pressure, shock index, and mean blood pressure.

[0013] As an alternative implementation method, the data preprocessing process includes:

[0014] The dataset is cleaned and filtered, and incomplete data tuples and data tuples that do not conform to the standard are deleted.

[0015] For data in which some attributes are continuous, calculate the mean, variance, maximum and minimum values, and perform standardization, dimensionality reduction and normalization based on the calculation results;

[0016] For datasets where some attributes are discrete, calculate the number of discrete data points and perform classification based on the number of different types of discrete data.

[0017] As an alternative implementation method, the specific process of constructing the evaluation model includes: initializing the multi-head attention model, the main structure of which includes three parts connected in sequence: the embedding layer, the multi-head attention pre-feedback layer, and the encoding layer.

[0018] As an alternative implementation, the specific process of training the evaluation model using the training set includes: an embedding layer for loading the dataset into the model, original baseline covariates for describing patient characteristics, and... and Let the number of categorical and numerical covariates be set respectively. For discrete data, classification is performed, followed by normalization and annotation. This is then done through the embedding matrix. The variables are represented in 3D space;

[0019] The multi-head attention pre-feedback layer is used to make full interaction between variable parameter embeddings by using multi-head self-attention. The key value attention mechanism allows the model to automatically learn the combination of interactions and obtain the output embedding of the transformer layer.

[0020] The encoder is used to generate the patient's final representation.

[0021] As a further step, the number of covariates is expressed as + Categorical covariates are transformed into 0-1 vectors before entering the survival model.

[0022] As a further step, through the embedding matrix in The variables are represented in 3D space: ;

[0023] in, It is a category field 0-1 vectors It is the obtained embedding;

[0024] To allow for interaction between numerical and categorical covariates, in low-dimensional space: ;

[0025] in It is the first A scalar with a numerical value It is the embedding matrix of numerical features. yes The Okay, let's connect the two types of embeddings mentioned above:

[0026] ;

[0027] To obtain the Representation of all original input patient-related information parameters for a patient .

[0028] As a further development, SELU represents the proportionally exponentially linear unit activation function, through another function with residual connections. Layer feedforward network obtains the output embedding of transformer layer:

[0029] ;

[0030] Original embedding Convert to attention embedding Stacking transformer: ; .

[0031] As an alternative implementation method, the process of processing the acquired data using an evaluation model that has passed performance testing includes:

[0032] (1) Save and export the trained attention mechanism model;

[0033] (2) Construct an emergency patient risk level classification system based on attention mechanism and provide a channel for importing basic patient information data;

[0034] (3) The model is stored in the backend server. The system can preload the model from the file during the startup process, and the system and the model can be directly connected. The prediction function of the model can be called, and the prediction classification interface of the model can be called to output the patient's risk level.

[0035] (4) The system collects and obtains relevant data of emergency patients, uses it as an influencing factor input into the model, and calls the model to make predictions.

[0036] An attention-based emergency patient risk assessment system includes:

[0037] The data acquisition module is configured to acquire basic information of emergency patients, as well as historical data related to physiological information, and to preprocess and divide the data into training set, validation set, and test set.

[0038] The model building and training module is configured to build an evaluation model, which is a multi-head self-attention mechanism model, train the evaluation model using a training set, evaluate the trained model and fine-tune the parameters using a validation set, and test the performance of the evaluation model using a test set.

[0039] The assessment module is configured to acquire basic information and physiological information data of emergency patients, process the acquired data using an assessment model that has passed performance testing, and obtain the risk level assessment results of emergency patients.

[0040] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the steps in the above method.

[0041] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps in the method described above.

[0042] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0043] This invention classifies emergency patients into risk levels based on attention mechanisms, with accurate results. It can effectively assist emergency triage and provide accurate triage suggestions for triage staff, which is of great significance for improving the emergency triage process.

[0044] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0045] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0046] Figure 1 This is a schematic diagram of the method flow in this embodiment;

[0047] Figure 2 This is a model structure diagram of this embodiment. Detailed Implementation

[0048] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0049] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0050] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0051] Where there is no conflict, the embodiments and features described in this application may be combined with each other.

[0052] Example 1

[0053] A method for assessing the risk level of emergency patients based on attention mechanisms, such as Figure 1 As shown, it includes the following steps:

[0054] Step 1: Obtain the emergency patient dataset and preprocess it;

[0055] Step 2: Pre-train the model on the emergency patient dataset;

[0056] Step 3: Integrate and use the trained attention mechanism model;

[0057] Step 4: Classify the emergency patients according to their risk level using the model.

[0058] Step 1 involves obtaining and preprocessing the emergency patient dataset as follows:

[0059] (1) Obtain historical datasets of emergency patients, including basic information such as age, gender, ethnicity, time from onset to admission, ability of patients and their families to communicate normally, and complete clinical data. Other information, including patient disease type, heart rate, diastolic blood pressure, systolic blood pressure, mental state, blood oxygen saturation, body temperature, pulse pressure, shock index, and average blood pressure, are used as influencing factors for the dataset model of emergency patients.

[0060] (2) Clean and filter the dataset. First, delete incomplete data tuples in the dataset and delete data tuples that do not conform to the standard.

[0061] (3) For some attributes in the dataset that are continuous, calculate their inherent attributes such as mean, variance, maximum value, and minimum value, and then perform standardization, dimensionality reduction, and normalization on this basis.

[0062] (4) For some attributes in the dataset that are discrete data, calculate the number of discrete data, classify them based on the number of different types of discrete data, and divide the original data into different datasets as training set, validation set and test set respectively.

[0063] The specific process of pre-training the model on the emergency patient dataset in step 2 is as follows:

[0064] (1) Initialize the model, input the basic attribute variables of the model, set the network structure and loss function of the model, and set the training step size and learning rate of the model;

[0065] The main structure of the model consists of three parts connected in sequence: an embedding layer, a multi-head attention pre-feedback layer, and an encoding layer.

[0066] (2) Input and embedding the model: Load the dataset into the model, such as... Figure 2 As shown, the original baseline covariates describe the patient's characteristics. This embodiment will... and The number of categorical and numerical covariates is set as follows: categorical covariates are set as discrete, and numerical covariates as continuous patient-related information. This is primarily for data differentiation. Discrete data, i.e., data categorizing patients (e.g., binary categories like whether a patient has hypertension or diabetes) or fracture severity, is used for multi-class classification. Continuous data, i.e., data describing patient information, is used for data normalization and labeling (e.g., age, height).

[0067] The number of covariates is expressed as + Categorical covariates are transformed into 0-1 vectors before entering the survival model. In this embodiment, this is achieved through embedding matrices. exist They are represented in 3D space:

[0068] ;

[0069] in, It is a category field 0-1 vectors It is the obtained embedding;

[0070] (3) In order to allow the interaction between numerical covariates and categorical covariates, this embodiment uses the following in the low-dimensional space:

[0071] ;

[0072] in It is the first A scalar with a numerical value It is the embedding matrix of numerical features. It is an embedding matrix The Okay. With these two types of embedding, this embodiment can connect them.

[0073] ;

[0074] To obtain the Representation of all original input covariates for each patient ;

[0075] (4) To ensure sufficient interaction between covariate embeddings, this embodiment employs multi-head self-attention. The key value attention mechanism allows the model to automatically learn combined interactions. SELU represents the Scaled Exponential Linear Unit (SELU) activation function, which is then passed through another function with residual connections. Layer feedforward network (FFN) Obtain the output embedding of the transformer layer:

[0076] ;

[0077] In short, starting with the first converter, this embodiment will embed the original... Convert to attention embedding To encourage further interactions between covariates to obtain higher-order combinatorial embeddings, this embodiment can be stacked. transformer:

[0078] ;

[0079] therefore, The final representation of the patient is generated by the stacked transformer encoder.

[0080] Covariates refer to the input parameters of the model, including two types: discrete and continuous. Discrete variables are mainly used for classification, while continuous variables are mainly used for standardization to improve the accuracy of the model.

[0081] The specific process of integrating and using the trained attention mechanism model in step 3 is as follows:

[0082] (1) Save and export the trained attention mechanism model;

[0083] (2) Construct an emergency patient risk level classification system based on attention mechanism, and provide channels for importing, accessing and inputting basic patient information data;

[0084] (3) The model is stored on the backend server. The system can call the model's prediction and classification functions by preloading the model during startup and directly connecting to the model.

[0085] (4) Collect and obtain relevant data of emergency patients through the system, input them into the model as influencing factors, call the model's prediction method, and realize the prediction function of the integrated model.

[0086] The specific process of classifying the model risk level of emergency patients in step 4 is as follows:

[0087] (1) The data of emergency patients are collected and input into the model in step 3. The risk probability and risk level of the patients are output through the prediction method of the model.

[0088] (2) Visualize the patient’s risk level and output the patient’s auxiliary treatment plan according to the risk level to provide auxiliary triage assistance to emergency medical staff.

[0089] The following product examples are also provided:

[0090] An attention-based emergency patient risk assessment system includes:

[0091] The data acquisition module is configured to acquire basic information of emergency patients, as well as historical data related to physiological information, and to preprocess and divide the data into training set, validation set, and test set.

[0092] The model building and training module is configured to build an evaluation model, which is a multi-head self-attention mechanism model, train the evaluation model using a training set, evaluate the trained model and fine-tune the parameters using a validation set, and test the performance of the evaluation model using a test set.

[0093] The assessment module is configured to acquire basic information and physiological information data of emergency patients, process the acquired data using an assessment model that has passed performance testing, and obtain the risk level assessment results of emergency patients.

[0094] A computer-readable storage medium for storing computer instructions, which, when executed by a processor, perform the steps in the above method.

[0095] An electronic device includes a memory and a processor, as well as computer instructions stored in the memory and running on the processor, wherein the computer instructions, when executed by the processor, perform the steps in the method described above.

[0096] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of one or more computer-usable storage media (including, but not limited to, disk storage, etc.) containing computer-usable program code. CD - ROM It takes the form of a computer program product implemented on (such as optical memory, etc.).

[0097] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0098] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0099] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1The steps of the function specified in one or more boxes.

[0100] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made by those skilled in the art without creative effort within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for assessing the risk level of emergency patients based on attention mechanisms, characterized in that, Includes the following steps: Acquire basic information of emergency patients, as well as historical data on physiological information. Preprocess and divide the data into training set, validation set, and test set. An evaluation model is constructed, which is a multi-head self-attention mechanism model. The evaluation model is trained using a training set, the trained evaluation is evaluated and the parameters are tuned using a validation set, and the performance of the evaluation model is tested using a test set. The system acquires basic information and physiological information data of emergency patients, processes the acquired data using an evaluation model that has passed performance testing, and obtains the risk level assessment results of emergency patients. Specifically, the system collects emergency patient data and inputs it into the model, and outputs the patient's risk probability and risk level through the model's prediction method. The system visualizes the patient's risk level and provides auxiliary treatment suggestions based on the risk level, thus providing auxiliary triage assistance to emergency medical staff. The basic information of the emergency patients includes age, gender, ethnicity, time from onset to admission, whether the patient and family can communicate normally, and clinical data; The physiological information includes the patient's disease type, heart rate, diastolic blood pressure, systolic blood pressure, mental state, blood oxygen saturation, body temperature, pulse pressure, shock index, and mean blood pressure. The multi-head attention pre-feedback layer is used to make full interaction between variable parameter embeddings by using multi-head self-attention. The key value attention mechanism allows the model to automatically learn the combination of interactions and obtain the output embedding of the transformer layer. The number of covariates is expressed as + Categorical covariates are transformed into 0-1 vectors before entering the survival model, where... and These represent the number of categorical covariates and the number of numerical covariates, respectively. By embedding matrix in The variables are represented in 3D space: ; in, It is a category field 0-1 vectors It is the obtained embedding; To allow for interaction between numerical and categorical covariates, in low-dimensional space: ; in It is the first A scalar with a numerical value It is the embedding matrix of numerical features. yes The Okay, let's connect the two types of embeddings mentioned above: ; To obtain the Representation of all original input patient-related information parameters for a patient ; SELU represents the proportionally exponentially linear unit activation function, which is passed through another function with residual connections. Layer feedforward network obtains the output embedding of transformer layer: ; Original embedding Convert to attention embedding Stacking transformer: ; .

2. The method for assessing the risk level of emergency patients based on attention mechanisms as described in claim 1, characterized in that, The process of data preprocessing includes: The dataset is cleaned and filtered, and incomplete data tuples and data tuples that do not conform to the standard are deleted. For data in which some attributes are continuous, calculate the mean, variance, maximum and minimum values, and perform standardization, dimensionality reduction and normalization based on the calculation results; For datasets where some attributes are discrete, calculate the number of discrete data points and perform classification based on the number of different types of discrete data.

3. The method for assessing the risk level of emergency patients based on attention mechanisms as described in claim 1, characterized in that, The specific process of building the evaluation model includes: initializing the multi-head attention model, the main structure of which consists of three parts connected in sequence: the embedding layer, the multi-head attention pre-feedback layer, and the encoding layer.

4. The method for assessing the risk level of emergency patients based on attention mechanisms as described in claim 3, characterized in that, The specific process of training the evaluation model using the training set includes: an embedding layer for loading the dataset into the model, original baseline covariates for describing patient characteristics, and... and Let the number of categorical and numerical covariates be set respectively. For discrete data, classification is performed, followed by normalization and annotation. This is then done through the embedding matrix. The variables are represented in 3D space; The coding layer is used to generate the final representation of the patient.

5. The method for assessing the risk level of emergency patients based on attention mechanisms as described in claim 1, characterized in that, The process of processing the acquired data using an evaluation model that has passed performance testing includes: (1) Save and export the trained attention mechanism model; (2) Construct an emergency patient risk level classification system based on attention mechanism and provide a channel for importing basic patient information data; (3) The model is stored in the backend server. The system can preload the model from the file during the startup process, and the system and the model can be directly connected. The model's prediction function can be called, and the model's prediction classification interface can be called to output the patient's risk level. (4) The system collects and obtains relevant data of emergency patients, uses it as an influencing factor input into the model, and calls the model to make predictions.

6. An attention-based emergency patient risk assessment system, employing the attention-based emergency patient risk assessment method as described in any one of claims 1-5, characterized in that, include: The data acquisition module is configured to acquire basic information of emergency patients, as well as historical data related to physiological information, and to preprocess and divide the data into training set, validation set, and test set. The model building and training module is configured to build an evaluation model, which is a multi-head self-attention mechanism model, train the evaluation model using a training set, evaluate the trained model and fine-tune the parameters using a validation set, and test the performance of the evaluation model using a test set. The assessment module is configured to acquire basic information and physiological information data of emergency patients, process the acquired data using an assessment model that has passed performance testing, and obtain the risk level assessment results of emergency patients.