Medical resource allocation system, method, device and medium based on medical event risk monitoring

By constructing a medical event association graph and using graph attention networks to extract features, the problem of inaccurate risk assessment for patients with comorbidities was solved, enabling accurate risk assessment and resource allocation across scenarios and improving the uniformity and fairness of hierarchical management.

CN122455282APending Publication Date: 2026-07-24RUIJIN HOSPITAL AFFILIATED TO SHANGHAI JIAO TONG UNIV SCHOOL OF MEDICINE
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
RUIJIN HOSPITAL AFFILIATED TO SHANGHAI JIAO TONG UNIV SCHOOL OF MEDICINE
Filing Date
2026-06-08
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing patient management methods fail to explicitly model the association between diseases in patients with comorbidities, resulting in low accuracy of risk assessment and scoring bias when used across different scenarios, affecting the uniformity and fairness of hierarchical management.

Method used

We construct a correlation graph based on medical events, extract temporal features through a graph attention network, perform multi-layer message passing and feature aggregation, generate user-level cross-event joint representations, and combine clinical guidelines and expert knowledge for risk scoring and resource allocation.

Benefits of technology

It enables precise risk assessment and adaptive resource allocation across scenarios for patients with comorbidities, improving the accuracy of risk assessment and the uniformity of hierarchical management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122455282A_ABST
    Figure CN122455282A_ABST
Patent Text Reader

Abstract

The application discloses a medical resource allocation system and method based on medical event risk monitoring, equipment and medium, relates to the field of medical information technology, and comprises the following steps: a data acquisition module is used for acquiring a medical event coding set of a target user and time sequence physiological index data corresponding to each medical event; a graph construction module is used for constructing a correlation graph with medical event coding as nodes and correlation strength between events as edges; a feature extraction module is used for extracting a time sequence feature vector from the time sequence physiological index data; a graph attention processing module is used for taking the time sequence feature vector as the initial feature of the corresponding node, and obtaining the updated feature of each node after fusing the neighbor node information through multi-layer message passing; a feature aggregation module is used for aggregating all the updated features to obtain a user-level cross-event joint representation; and a deployment instruction generation module is used for outputting a disease risk score according to the user-level cross-event joint representation and generating a medical resource deployment instruction. Precise resource allocation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical information technology, and in particular to a medical resource allocation system, method, equipment and medium based on medical event risk monitoring. Background Technology

[0002] With the deepening of the hierarchical medical system, collaborative patient management between primary community health service centers (community health centers) and higher-level hospitals has become a key link in improving the continuity of medical services. However, existing patient management methods often face the challenge of patients simultaneously suffering from multiple diseases (such as diabetes mellitus combined with hypertension and nephropathy). These different diseases interact at the pathophysiological level, and existing hierarchical methods (scoring systems based on single-disease scales or general machine learning models) typically treat the test indicators of each disease as independent features in parallel, failing to explicitly model the correlation between diseases. This results in low accuracy in the comprehensive risk assessment of comorbid patients. Different physiological indicators (blood glucose, blood pressure, glomerular filtration rate) have different time scales in the evolution of the disease. Short-term indicators fluctuate on a daily basis, while long-term indicators require monthly or even yearly timeframes to reflect trends. Existing methods generally use fixed-length time windows to extract temporal features, failing to adaptively select the optimal window length for different indicators, leading to the loss of key information or the introduction of noise. Patients admitted to higher-level hospitals are mainly complex and high-risk cases, while patients managed by primary community health centers are mainly stable and low-risk cases. Existing models, when trained on data from a single institution and then used directly across different scenarios, may exhibit different scoring biases due to variations in sample distribution, affecting the uniformity and fairness of hierarchical management.

[0003] In summary, how to accurately score the risk of users with comorbidities and adaptively allocate resources across scenarios are technical problems that need to be solved in this field. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a medical resource allocation system, method, device, and medium based on medical event risk monitoring, capable of accurately scoring the risk of comorbid users and adaptively allocating resources across scenarios. The specific solution is as follows: Firstly, this application discloses a medical resource allocation system based on medical event risk monitoring, comprising: The data acquisition module is used to acquire the target user's medical event code set and the time-series physiological indicator data corresponding to each medical event; The graph construction module is used to construct an association graph using each medical event code in the medical event code set as a node and the association strength between each medical event as an edge. The feature extraction module is used to extract the time-series feature vectors of corresponding medical events from the time-series physiological index data. The graph attention processing module is used to take the temporal feature vector as the initial feature of the corresponding node in the association graph, and perform multi-layer message passing on each node through the graph attention network to obtain the updated feature of each node after fusing the information of its neighboring nodes. The feature aggregation module is used to aggregate the updated features of all nodes to obtain a user-level joint representation across events. The allocation instruction generation module is used to output the target user's disease risk score based on the user-level cross-event joint representation, so as to generate corresponding medical resource allocation instructions based on the disease risk score.

[0005] Optionally, the feature extraction module includes: The raw data acquisition unit is used to acquire the raw measurement value sequence of the time-series physiological indicators corresponding to each medical event within a preset time window, as time-series physiological indicator data. The first feature extraction unit is used to extract corresponding time-series features from the time-series physiological index data; The second feature extraction unit is used to extract context embedding vectors from the time-series physiological index data through a convolutional network or a gated recurrent network. The concatenation unit is used to concatenate the temporal features with the context embedding vector to obtain the temporal feature vector of the corresponding medical event.

[0006] Optionally, the raw data acquisition unit includes: The parameter configuration unit is used to configure a learnable time window length parameter for the time-series physiological indicators corresponding to each of the medical events. The data extraction unit is used to extract data located within the corresponding time window from the full data of the time-series physiological indicators corresponding to each medical event according to the time window length parameter, so as to obtain the original measurement value sequence.

[0007] Optionally, a medical resource allocation system based on medical event risk monitoring may also include: The strength acquisition module is used to read the predefined correlation strength between various medical events from clinical guidelines or expert knowledge bases; Alternatively, the co-occurrence frequency of historical medical data can be statistically analyzed to determine the strength of the correlation between different medical data. Alternatively, the strength of the correlation between different medical data can be determined through model training.

[0008] Optionally, the graph attention processing module includes: The weighting unit is used to perform a weighted summation of the attention coefficients between each node and its neighboring nodes on the current layer features of the neighboring nodes to obtain aggregated features; The function processing unit is used to perform linear transformation and activation function processing on the aggregated features to obtain the processed features; The message passing unit is used to add the processed features and the current layer features of the node through a residual connection to obtain the current layer output result of the node, and add the current layer output result and the current layer features of the node through a residual connection as the input for the next layer message passing, until the message passing ends.

[0009] Optionally, the feature aggregation module includes: The mapping unit is used to map the updated features of each node into attention scores through a fully connected network; A normalization unit is used to normalize the attention scores of each node to obtain a normalized attention score. The feature aggregation unit is used to use the normalized attention score as a weight parameter to perform a weighted summation of the updated features of each node to obtain a user-level cross-event joint representation.

[0010] Optionally, the allocation instruction generation module includes: The tag acquisition unit is used to acquire the tag of the type of medical institution currently visited by the target user; wherein, the type of medical institution includes non-community health center type and primary community health center type; The scoring generation unit is used to input the user-level cross-event joint representation into a scoring system containing a first scoring branch and a second scoring branch, respectively, so as to select and activate the output of the corresponding first scoring branch or second scoring branch according to the medical institution type label, as the disease risk score of the target user; wherein, the first scoring branch corresponds to the non-community health hospital scenario, and the second scoring branch corresponds to the primary community health center scenario; The first instruction generation unit is used to generate a referral instruction to a non-community health center and an instruction to allocate specialist doctor resources if the disease risk score belongs to a preset high-risk level. The second instruction generation unit is used to generate a referral instruction to a non-community health center if the disease risk score belongs to a preset medium risk level. The third instruction generation unit is used to generate an instruction to adjust the follow-up frequency if the disease risk score belongs to a preset low to medium risk level. The fourth instruction generation unit is used to generate a referral instruction to a community health center if the disease risk score belongs to a preset low-risk level.

[0011] Secondly, this application discloses a method for allocating medical resources based on medical event risk monitoring, including: Obtain the target user's medical event code set and the time-series physiological indicator data corresponding to each medical event; A correlation graph is constructed using each medical event code in the medical event code set as a node and the correlation strength between each medical event as an edge. Extract the temporal feature vectors of the corresponding medical events from the temporal physiological index data; The temporal feature vector is used as the initial feature of the corresponding node in the association graph. Multi-layer message passing is performed on each node through a graph attention network to obtain the updated feature of each node after fusing the information of its neighboring nodes. The updated features of all nodes are aggregated to obtain a user-level joint representation across events; The target user's disease risk score is output based on the user-level cross-event joint representation, and corresponding medical resource allocation instructions are generated based on the disease risk score.

[0012] Thirdly, this application discloses an electronic device, including: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the aforementioned disclosed method for allocating medical resources based on medical event risk monitoring.

[0013] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed method for allocating medical resources based on medical event risk monitoring.

[0014] As can be seen, this application discloses a data acquisition module for acquiring a set of medical event codes for a target user and time-series physiological indicator data corresponding to each medical event; a graph construction module for constructing a relational graph using each medical event code in the set of medical event codes as nodes and the correlation strength between each medical event as edges; a feature extraction module for extracting time-series feature vectors of corresponding medical events from each of the time-series physiological indicator data; a graph attention processing module for using the time-series feature vectors as initial features of corresponding nodes in the relational graph, and performing multi-layer message passing on each node through a graph attention network to obtain updated features of each node after fusing information from neighboring nodes; a feature aggregation module for aggregating the updated features of all nodes to obtain a user-level cross-event joint representation; and a dispatch instruction generation module for outputting the target user's disease risk score based on the user-level cross-event joint representation to generate corresponding medical resource dispatch instructions based on the disease risk score. Therefore, by treating each medical event of the target user as a node in the association graph, and using the association strength between different medical events as edges to construct the association graph; then, extracting feature vectors reflecting the changing trends from the time-series data such as blood glucose and blood pressure corresponding to each event, using them as the initial features of the corresponding nodes, and using a graph attention network to perform multi-layer message passing between these nodes, and then adjusting according to the attention weights, after several rounds of the above interaction, the features of each node are integrated with the information of the neighboring nodes. Finally, the updated features of all nodes are aggregated into a user-level comprehensive representation, outputting a risk score; in this way, the score of comorbid patients truly simulates the process of the disease interacting in the body, and the assessment is more accurate. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of a medical resource allocation system based on medical event risk monitoring disclosed in this application; Figure 2 This application discloses a flowchart of a medical resource allocation method based on medical event risk monitoring. Figure 3 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0018] With the deepening of the hierarchical medical system, collaborative patient management between primary community health service centers (community health centers) and higher-level hospitals has become a key link in improving the continuity of medical services. However, existing patient management methods often face the challenge of patients simultaneously suffering from multiple diseases (such as diabetes mellitus combined with hypertension and nephropathy). These different diseases interact at the pathophysiological level, and existing hierarchical methods (scoring systems based on single-disease scales or general machine learning models) typically treat the test indicators of each disease as independent features in parallel, failing to explicitly model the correlation between diseases. This results in low accuracy in the comprehensive risk assessment of comorbid patients. Different physiological indicators (blood glucose, blood pressure, glomerular filtration rate) have different time scales in the evolution of the disease. Short-term indicators fluctuate on a daily basis, while long-term indicators require monthly or even yearly timeframes to reflect trends. Existing methods generally use fixed-length time windows to extract temporal features, failing to adaptively select the optimal window length for different indicators, leading to the loss of key information or the introduction of noise. Patients admitted to higher-level hospitals are mainly complex and high-risk cases, while patients managed by primary community health centers are mainly stable and low-risk cases. Existing models, when trained on data from a single institution and then used directly across different scenarios, may exhibit different scoring biases due to variations in sample distribution, affecting the uniformity and fairness of hierarchical management.

[0019] To address this, the present invention provides a medical resource allocation scheme based on medical event risk monitoring, which can accurately score the risk of comorbid users and adaptively allocate resources across scenarios.

[0020] like Figure 1 As shown, this invention provides a medical resource allocation system based on medical event risk monitoring, comprising: Data acquisition module 11 is used to acquire the target user's medical event code set and the time-series physiological indicator data corresponding to each medical event; Graph construction module 12 is used to construct an association graph with each medical event code in the medical event code set as a node and the association strength between each medical event as an edge. The feature extraction module 13 is used to extract the time-series feature vectors of corresponding medical events from each of the time-series physiological index data; The graph attention processing module 14 is used to take the temporal feature vector as the initial feature of the corresponding node in the association graph, and perform multi-layer message passing on each node through the graph attention network to obtain the updated feature of each node after fusing the information of its neighboring nodes. Feature aggregation module 15 is used to aggregate the updated features of all nodes to obtain a user-level cross-event joint representation; The allocation instruction generation module 16 is used to output the target user's disease risk score based on the user-level cross-event joint representation, so as to generate a corresponding medical resource allocation instruction based on the disease risk score.

[0021] The medical resource allocation system in this embodiment includes a data acquisition module 11, a graph construction module 12, a feature extraction module 13, a graph attention processing module 14, a feature aggregation module 15, and an allocation instruction generation module 16. These modules can be deployed on the hospital's server or shared by primary community health centers and higher-level hospitals in the form of cloud services.

[0022] The data acquisition module 11 is responsible for acquiring the target user's medical event code set and the time-series physiological indicator data corresponding to each medical event. The medical event code can be the International Classification of Diseases (ICD) code or a disease identifier defined by the hospital. Each code represents a health problem of the user. The time-series physiological indicator data refers to the laboratory, examination, or monitoring values ​​related to these health problems, such as blood glucose, blood pressure, heart rate, and glomerular filtration rate. Moreover, these data are recorded in chronological order, and the recording time interval is not fixed. It may be measured once a day or once at each follow-up visit. The data acquisition module 11 will automatically capture these data from the hospital's HIS, LIS, and other systems. It also supports supplementing the data through interfaces from wearable devices or the target user's self-reported mini-program. Specifically, in actual deployment, it can connect to the hospital's HIS and LIS systems through the HL7FHIR standard interface to automatically pull the diagnosis and treatment records and test results from the electronic medical records. Alternatively, it can allow the target user to upload self-test data or photos of paper reports through a WeChat mini-program, and use OCR technology to recognize the values.

[0023] After obtaining the set of medical event codes, the graph construction module 12 constructs a correlation graph. Specifically, each medical event code is treated as a node in the graph, and edges are connected between nodes. The weight of each edge represents the strength of the correlation between two medical events. This correlation strength can come from clinical guidelines, expert knowledge, or be obtained based on historical anonymized data statistics. For example, a high correlation weight is assigned between type 2 diabetes and diabetic nephropathy, while the weight between diabetes and the common cold is very low. In this way, a single graph connects multiple health problems of a user, reflecting the potential mutual influences between them.

[0024] The feature extraction module 13 extracts representative features from time-series physiological indicator data. For each indicator corresponding to each medical event, the module obtains the original measurement value sequence over a period of time and then calculates the statistical characteristics of the sequence, such as mean, standard deviation, maximum value, minimum value, the range of change from beginning to end, and the slope of change per unit time. Simultaneously, it also counts the number of times the indicator exceeds the normal range during the observation period, i.e., the number of fluctuations. These numerical features can describe the trend of an indicator's change without inputting the original sequence into the model, thus reducing the computational load.

[0025] The graph attention processing module 14 uses the temporal feature vector of each medical event output by the feature extraction module 13 as the initial feature of the corresponding node in the association graph. That is, each node initially only knows the changes in its corresponding indicators; then, the graph attention processing module 14 runs a multi-layer graph attention network on this graph. In each layer, each node weighted and aggregates the information of its neighbors based on the current features of its neighbors and the strength of their association with itself (attention coefficient), and combines it with its own original features to form the new features of this layer. After multiple layers of such message passing, the features of each node no longer only contain its own information, but integrate the comprehensive information of itself and its neighbors, and even more distant neighbors. For example, the diabetes node will eventually know that the kidney function indicators of kidney disease have recently deteriorated, and the hypertension node will also feel that its blood sugar control is not ideal.

[0026] The feature aggregation module 15 assigns an attention score to each node, representing the degree of contribution of the node to the overall condition. Then, based on these scores, the features of all nodes are weighted and summed to obtain a fixed-length vector, which is the user-level cross-event joint representation. This vector represents the information of all medical events of the user and their mutual influence.

[0027] The allocation instruction generation module 16 receives the user-level cross-event joint representation output by the feature aggregation module 15. After calculation by one or more fully connected layers, it outputs a disease risk score. This score is a continuous value and can also be mapped to high-risk, medium-risk, medium-low-risk, or low-risk levels according to a preset threshold. After obtaining the score, the allocation instruction generation module 16 automatically generates corresponding medical resource allocation instructions. For example, when the score shows a preset high-risk level, the system can issue an instruction to refer the patient to a higher-level hospital and assign a specialist doctor to be responsible. When the score is in the preset medium-risk level, indicating that the current target user's condition is stable, an instruction to adjust the follow-up frequency to once every two weeks is issued and handed over to the community health center doctor for management. When the score drops to the low-risk range, an instruction to transfer the patient to a primary community health center is issued, and a monthly follow-up is recommended. These instructions are sent to relevant workstations or nursing systems through interfaces, thereby realizing the dynamic scheduling of medical resources.

[0028] The dispatch instruction generation module 16 is also used to package all the target user's medical data (including historical test sequences, medication records, follow-up data, and the latest user-level cross-event joint representation) into a structured document when the first instruction generation unit or the second instruction generation unit issues a referral instruction to a higher-level hospital, and push it to the workstation of the attending physician through an interface. Similarly, when the fourth instruction generation unit issues a referral instruction to a primary care community health center, this unit will send back the treatment plan and follow-up suggestions from the higher-level hospital to the community health center doctor, thereby realizing the synchronization and closed-loop management of referral information and avoiding the drawbacks of missing information on traditional paper referral forms and repeated questioning of medical history by the attending physician.

[0029] It should be noted that the specific implementation of each of the above modules can be adjusted according to the actual deployment environment. For example, the number of layers in the graph attention network and the hidden layer dimension of each layer can be determined during training. The edge weights in the graph construction module 12 can be fixed in advance using medical knowledge or learned together during training. Equivalent substitutions or parameter adjustments of these modules by those skilled in the art without departing from the concept of the present invention should all fall within the protection scope of the present invention.

[0030] In this embodiment, the feature extraction module 13 includes: a raw data acquisition unit, used to acquire the raw measurement sequence of time-series physiological indicators corresponding to each medical event within a preset time window, as time-series physiological indicator data; a first feature extraction unit, used to extract corresponding time-series features from the time-series physiological indicator data; a second feature extraction unit, used to extract a context embedding vector from the time-series physiological indicator data through a convolutional network or a gated recurrent network; and a concatenation unit, used to concatenate the time-series features with the context embedding vector to obtain the time-series feature vector of the corresponding medical event.

[0031] Understandably, after acquiring the time-series physiological indicators corresponding to each medical event, the raw data acquisition unit first determines a time range, such as the past 30 days, the past 90 days, or a monitoring cycle recommended by clinical practice. This time range can be pre-configured in the system. Then, the unit extracts the raw measurements from this time range to construct a continuous sequence. For example, for the blood glucose indicators of diabetic patients, the raw data acquisition unit will extract the blood glucose values ​​measured daily over the past 30 days, arrange them chronologically, and hand them over to subsequent units for processing. This sequence is the raw, unprocessed time-series physiological indicator data. The first feature extraction unit extracts several statistical features from this raw sequence. Specifically, it calculates the mean, standard deviation, maximum value, minimum value, and the total change from the end of the sequence to the beginning (the difference between the first and last values). It also fits a straight line and calculates the slope per unit time. If the slope is positive, it indicates that the indicator is rising; if negative, it indicates that it is falling. In addition, the number of times the indicator exceeds the normal reference range during the observation period will also be counted, i.e. the number of fluctuations. These statistical characteristics summarize the basic form of time series data and have a very small computational load, making them suitable for running on grassroots community health service servers with limited resources.

[0032] The second feature extraction unit treats the original sequence as a time signal and sends it to a lightweight convolutional network or gated recurrent unit (GRU). The convolutional network can capture local patterns through a sliding window, such as the small trend of blood sugar rising for three consecutive days; while the GRU remembers the dependencies over a longer period of time, such as the process of a certain indicator slowly rising over the past few weeks. The output of this unit is a fixed-dimensional vector, the context embedding vector.

[0033] The concatenation unit combines the statistical features output by the first feature extraction unit and the context embedding vector generated by the second feature extraction unit to form a new, longer vector. This concatenated vector is the temporal feature vector of the medical event. The temporal feature vector retains explicit statistical information and incorporates patterns automatically learned by the deep network, with the two complementing each other.

[0034] In this way, each medical event can obtain a relatively complete temporal feature representation. The graph attention processing module 14 uses these features as the initial input of the nodes. It should be noted that the first feature extraction unit and the second feature extraction unit can work in parallel or in sequence, as long as they are finally spliced ​​together.

[0035] In this embodiment, the raw data acquisition unit includes: a parameter configuration unit, configured to configure a learnable time window length parameter for the time-series physiological indicators corresponding to each medical event; and a data extraction unit, configured to extract data located within the corresponding time window from the full data of the time-series physiological indicators corresponding to each medical event according to the time window length parameter, so as to obtain the raw measurement value sequence.

[0036] Understandably, because different physiological indicators exhibit vastly different rhythms in disease progression, the parameter configuration unit assigns a learnable time window length parameter to each time-series physiological indicator corresponding to each medical event in order to adapt to real-world medical scenarios. For example, blood glucose shows significant changes within a day; blood pressure fluctuations occur on a weekly basis; while glomerular filtration rate or glycated hemoglobin often takes several months to show trends. Therefore, using the same fixed window length to process all indicators can easily miss short-term mutations or be overwhelmed by long-term noise. The parameter configuration unit first assigns an initial window length to each (medical event, physiological indicator). This initial value can come from routine monitoring recommendations in clinical guidelines, such as recommending blood glucose monitoring based on the data of the last 7 days, and glycated hemoglobin based on the data of the last 90 days. However, this initial value is not completely fixed. During subsequent model training, the system continuously adjusts these window length parameters in an end-to-end manner, guiding them towards a direction that is more conducive to the final disease risk assessment. In other words, the model learns how many days of data from the past are most accurate for a user's blood glucose.

[0037] The data truncation unit is responsible for performing the actual truncation action. When the parameter configuration unit provides the current time window length (which could be the initial value or a value updated during training), the data truncation unit finds the full historical data for that indicator, such as all recorded blood glucose values ​​from the past year. Then, it counts backwards from the end of this full data set and truncates a segment of data with a length equal to the window length. This truncated data segment is the original measurement value sequence. For example, if the parameter configuration unit tells the data truncation unit that the current blood glucose indicator window length is 14 days, then the data truncation unit will extract the original values ​​from the blood glucose records of the most recent 14 days and hand them over to the subsequent first and second feature extraction units for processing.

[0038] In this way, different indicators can extract features using their most suitable time range, and this range is automatically optimized through training data. This is more flexible than all indicators sharing a single fixed window and is better suited to the complex and ever-changing clinical situations. It should be noted that although the window length parameter is updated during training, it remains fixed during actual inference.

[0039] In this embodiment, the system further includes: a strength acquisition module, used to read predefined association strengths between medical events from clinical guidelines or expert knowledge bases; or, to statistically analyze the co-occurrence frequency of historical medical data to determine the association strength between medical data; or, to determine the association strength between medical data through model training. It is understood that when constructing the association graph, each edge of the graph needs to be assigned a weight, which represents the association strength between two medical events. The association strength can be selected and used, or combined, based on actual data conditions and clinical needs. Specifically, the association strength can be directly read from clinical guidelines or expert knowledge bases. Specifically, the system has a pre-built knowledge base containing a large amount of association information between common diseases. For example, according to the "Guidelines for the Prevention and Treatment of Type 2 Diabetes in China," there are clear comorbidity association tables between diabetes and kidney disease, and between diabetes and hypertension, providing specific association levels. When constructing the association graph, the strength acquisition module only needs to find these predefined values ​​corresponding to the target user's disease as the association strength. This method of determining association strength is highly reliable, directly derived from medical authority, and does not require additional data.

[0040] Furthermore, association strength can also be determined by statistically analyzing historical medical data to calculate co-occurrence frequencies. Specifically, if the system has access to a large amount of anonymized historical medical data, such as electronic medical records of all patients in a certain region over the past few years, the strength acquisition module can traverse this data to count the number of times any two medical events occur simultaneously in the same patient, or calculate the conditional probability of one event occurring within a certain period after the occurrence of another. After normalizing these statistical values, they can be used as the association strength. This method of determining association strength does not rely on manual processing; it is entirely mined from real data and can discover associations that do not exist in guidelines but are not explicitly stated in them.

[0041] Furthermore, the association strength can also be learned through model training. Specifically, the association strength itself is also treated as part of the model parameters and optimized during the training of the entire risk grading network. The strength acquisition module initializes a learnable weight parameter for each medical event pair (usually the initial value can be set to a small random number or pre-trained based on co-occurrence frequency). Then, it uses user outcome labels in the training data (such as whether an adverse event occurred, whether a referral is required, etc.) for backpropagation to automatically adjust these weights until they can most accurately help the model predict risks. This method is the most flexible and requires certain regularization constraints on these model parameters, such as L1 regularization, to avoid learning false associations without medical rationale.

[0042] In actual deployment, the system can use only one of the above methods, or it can first use the first or second method to obtain the initial value, and then use the third method to fine-tune it in subsequent training. Regardless of the choice, the final association strength will be used as the edge weight of the association graph and input into the graph attention processing module to participate in message passing.

[0043] In this embodiment, the graph attention processing module 14 includes: a weighting unit, used to perform a weighted summation of the attention coefficients between each node and its neighboring nodes on the current layer features of the neighboring nodes to obtain aggregated features; a function processing unit, used to perform linear transformation and activation function processing on the aggregated features to obtain processed features; and a message passing unit, used to add the processed features and the current layer features of the node through a residual connection to obtain the current layer output result of the node, and add the current layer output result and the current layer features of the node through a residual connection as the input for the next layer message passing until the message passing ends. Understandably, the weighted unit aggregates information from neighboring nodes. Specifically, when processing a node in the graph, the weighted unit obtains the feature representations of all its neighboring nodes at layer l, as well as the attention coefficients from the current node to each neighbor. These coefficients reflect the importance of neighboring nodes to the current node; higher values ​​indicate more valuable information from the neighboring node. The weighted unit then sums these neighboring node features according to their attention coefficients to obtain an aggregated feature. This aggregated feature already contains information about relevant medical events in the surrounding area, but it has not yet been integrated with the current node's own information. The function processing unit feeds the aggregated feature into a fully connected layer, multiplies it by a learnable weight matrix, and then passes it through a non-linear activation function (e.g., ...). Further processing using ReLU or LeakyReLU enhances the model's expressive power, enabling the network to learn more complex mappings. The output of the function processing unit is the processed feature, which is the result of linear and nonlinear processing of the neighbor information, but it still doesn't incorporate the original information of the current node. The message passing unit combines the node's own features with the processed neighbor features. Specifically, it uses residual connections to directly add the processed features to the current node's input features at layer l (i.e., the node features passed down from the previous layer), obtaining the node's output at layer l. Residual connections allow the original information to bypass some transformations and be passed directly to the next layer, avoiding gradient vanishing or information loss problems in deep networks. This output then becomes the input feature for the next layer (layer l+1), repeating the weighting, transformation, and residual connection steps, layer by layer, until a preset number of layers L (usually L is 2 or 3) is reached. Finally, the output of each node at layer L is the updated feature that integrates its own information and multi-hop neighbor information.

[0044] It's important to note that the attention coefficients used in the above process are not fixed values. Instead, they are calculated in real-time at each layer based on the features of the current node and its neighbors. Specifically, for any two nodes i and j (where j is a neighbor of i) in layer l, the system multiplies the feature vectors of node i and node j at layer l by a learnable weight matrix, resulting in two linearly transformed vectors. This weight matrix is ​​shared among all nodes and maps the original features to a new space for easier comparison later. Then, these two transformed vectors are concatenated to form a longer combined vector. Next, this combined vector is multiplied by a learnable attention vector to obtain a scalar value. This value can be interpreted as the initial attention level of node i towards node j. A larger value indicates that node i should pay more attention to node j's information. However, because the value ranges of different neighbors can vary significantly, this initial attention level cannot be directly used as a weight. Therefore, the system repeats the above calculation for all neighboring nodes of node i to obtain a set of initial attention levels. Then, this set of values ​​is fed into a LeakyReLU function for a non-linear activation. Finally, the activated values ​​are normalized using all the neighbors of node i as the denominator. After normalization, the value corresponding to each neighbor is between 0 and 1, and the sum of the values ​​of all neighbors equals 1. This normalized value is the attention coefficient between node i and node j in the current layer.

[0045] In other words, each node looks around at its neighbors and assigns a dynamic score to each neighbor based on the neighbors' current features and its own current features. The higher the score, the more important the neighbor's information is to the updating node. Moreover, this scoring mechanism itself has learnable parameters (weight matrix and attention vector), so the model can learn during training which neighbors are worth focusing on. It is this dynamic calculation method, which depends on the current features, that makes graph attention networks more flexible than graph neural networks that use fixed adjacency weights.

[0046] In this embodiment, the feature aggregation module 15 includes: a mapping unit, used to map the updated features of each node to attention scores through a fully connected network; a normalization unit, used to normalize the attention scores of each node to obtain normalized attention scores; and a feature aggregation unit, used to use the normalized attention scores as weight parameters to perform weighted summation of the updated features of each node to obtain a user-level cross-event joint representation. It can be understood that the mapping unit feeds the updated feature vector of each node into a single-layer fully connected network, the output of which is a scalar value representing the importance of the current node in the overall condition. For example, for a user suffering from diabetes, hypertension, and kidney disease, if the kidney function indicators have recently deteriorated significantly, the updated features of the kidney disease node will receive a relatively high attention score after mapping; conversely, if a certain underlying disease is well controlled and has not fluctuated abnormally for a long time, its score will be lower. In this way, the system can automatically identify which medical events contribute more to the current risk assessment.

[0047] Then, the normalization unit normalizes the attention scores obtained by the mapping unit. Since different users have different numbers of medical events and the range of scores is not fixed, directly using the original scores for weighted summation would lead to instability. Therefore, the normalization unit applies a softmax function to the attention scores of all nodes, that is, using the scores of each node as input, it calculates the proportion of each node's score in the total score. In this way, the normalized attention scores of all nodes are between 0 and 1. These normalized scores are used as the weight parameters for weighted summation.

[0048] Finally, the weight parameters calculated by the normalization unit are used to perform a weighted summation of the updated features of all nodes. Specifically, the updated feature vector of each node is multiplied by its corresponding normalized attention score, and then the results of multiplication of all nodes are summed element-wise to obtain a fixed-length vector. This vector is the user-level cross-event joint representation, which includes the development trend of each medical event itself, as well as the mutual influence between different medical events transmitted through the graph attention network, and is finally weighted according to the current importance of each event.

[0049] In this way, it is possible to see intuitively which medical events drive the current user's risk score. Moreover, this node-level attention convergence complements the edge-level attention in the graph attention network. Edge attention focuses on how diseases influence each other, while node attention focuses on which disease is more critical in the whole.

[0050] After the feature aggregation module 15 outputs the user-level cross-event joint representation, the system can further calculate the contribution weights of each input feature to the final risk score, so that doctors can understand the basis of the model's decision-making. The weight generation module receives the user-level cross-event joint representation and feeds it into a two-layer fully connected subnetwork. The first layer of this subnetwork compresses the joint representation to a smaller dimension (e.g., 32 dimensions). After ReLU activation, the second layer maps it to a dimension with the same number of input features. Finally, the softplus function ensures that each weight value is non-negative. In this way, each original feature (e.g., the mean of a time-series indicator, the presence or absence of a disease, etc.) can obtain a corresponding weight Wi, which reflects the importance of the feature in the current patient risk score.

[0051] After obtaining the weight vector, the system multiplies and sums the standardized scores Fi of each feature with their corresponding Wi to obtain a risk score basis. This basis is then fed into different scoring branches in the instruction generation module, and after scenario calibration, the final score is output. Simultaneously, the generated weight vector can be displayed to the doctor in the form of a bar chart or radar chart. For example, a high score might be primarily due to deteriorating kidney function indicators (weight 0.32) and increased frequency of blood glucose fluctuations (weight 0.28). This interpretable design helps enhance doctors' trust in the automated scoring system.

[0052] In this embodiment, the allocation instruction generation module 16 includes: a tag acquisition unit, used to acquire the medical institution type tag of the target user's current medical visit; wherein the medical institution type includes non-community health center type and primary community health center type; a scoring generation unit, used to input the user-level cross-event joint representation into a scoring system containing a first scoring branch and a second scoring branch respectively, so as to select and activate the output of the corresponding first scoring branch or second scoring branch according to the medical institution type tag, as the target user's disease risk score; wherein the first scoring branch corresponds to the non-community health center scenario, and the second scoring branch corresponds to the primary community health center scenario; a first instruction generation unit, used to generate a referral instruction to a non-community health center and an instruction to allocate specialist doctor resources if the disease risk score belongs to a preset high-risk level; a second instruction generation unit, used to generate a referral instruction to a non-community health center if the disease risk score belongs to a preset medium-risk level; a third instruction generation unit, used to generate an instruction to adjust the follow-up frequency if the disease risk score belongs to a preset low-to-medium-risk level; and a fourth instruction generation unit, used to generate a referral instruction to a community health center if the disease risk score belongs to a preset low-risk level.

[0053] Understandably, the allocation instruction generation module 16 not only needs to calculate a disease risk score, but also select the corresponding scoring channel based on the type of medical institution the user is currently in, and automatically generate different resource allocation instructions according to the score level. Specifically, the tag acquisition unit is responsible for identifying where the user is currently seeking medical treatment. This unit will obtain a simple tag from the registration information or workstation, such as non-community health center (usually referring to a higher-level hospital, tertiary hospital) or primary community health center (community health service center). The reason for this tag is that the user groups treated by higher-level hospitals and community health centers are significantly different. Generally speaking, higher-level hospitals mainly treat complex and high-risk cases, while community health centers mainly treat stable and low-risk cases. The absolute risk value of the same user may have different meanings in the two scenarios. What is considered moderate risk in a community health center may only be low risk in a higher-level hospital. Therefore, the system needs to know the current scenario in order to give appropriate scores and instructions.

[0054] The scoring generation unit uses this label to complete the final risk score. First, it constructs a scoring system with two branches: one branch corresponds to the non-community health center scenario (referred to as the first scoring branch), and the other branch corresponds to the primary community health center scenario (referred to as the second scoring branch). These two branches share the user-level cross-event joint representation calculated by all previous modules (data acquisition, graph construction, feature extraction, graph attention processing, and feature aggregation), but each has its own independent fully connected layer and output activation function. The scoring generation unit simultaneously feeds the user-level cross-event joint representation into both branches, calculates two values, and then selects the output of the corresponding branch to activate based on the medical institution type label provided by the label acquisition unit, using it as the final disease risk score. If the label is "non-community health center," then the output of the first scoring branch is used; if the label is "primary community health center," then the output of the second scoring branch is used. In this way, the same user may receive slightly different scores at higher-level hospitals and community health centers, but these scores are consistent with the clinical practices of their respective scenarios, avoiding systematic bias.

[0055] After the risk assessment is completed, the four instruction generation units will trigger different resource allocation instructions based on the preset risk level range the score falls into. These preset risk level ranges can refer to the clinically common three-tier system: high risk, medium risk, and low risk. They can also be further refined into medium-low risk as a transitional category. The specific actions of each unit are as follows: The first instruction generation unit is triggered when the score falls within a preset high-risk level. It generates two instructions: one is a referral instruction to a non-community health center, requiring the target user to be transferred to a higher-level hospital as soon as possible; the other is a specialist physician allocation instruction, assigning a specialist physician as the target user's attending physician. For example, in the diabetes user embodiment, if the score is 78 (high risk), the system automatically notifies an endocrinologist to take over and arranges a referral.

[0056] The second instruction generation unit is triggered when the score falls within the preset medium-risk level. It only generates a referral instruction to a non-community health center, but does not force the assignment of a specialist doctor at this time. For example, if a community health center encounters a target user with poorly controlled blood pressure who needs to be ruled out for secondary hypertension, and the score is 65 (medium risk), the system will suggest a referral to the cardiology outpatient department of a higher-level hospital for further examination by the attending physician.

[0057] The third instruction generation unit is triggered when the score belongs to the preset low-to-medium risk level. This level usually corresponds to a stable condition that does not require referral, but still requires appropriate monitoring. It generates instructions to adjust the follow-up frequency, such as temporarily adjusting the original monthly follow-up to once every two weeks, or reducing it from once a week to once every two weeks. This instruction does not change the target user's medical institution, but only adjusts the follow-up rhythm of the community health center doctor or the target user.

[0058] The fourth instruction generation unit is triggered when the score falls within a preset low-risk level. It generates a transfer instruction to a community health center, requesting the transfer of the target user's daily management from the higher-level hospital to the community health center, along with a detailed treatment plan and follow-up recommendations. In this embodiment, after three months of treatment, the target user's score drops to 42 points (low risk), and the system automatically issues a transfer instruction to allow a community health center general practitioner to take over.

[0059] It should be noted that the thresholds for each of the above risk levels (high-risk threshold T1, medium-risk threshold T2, and low-to-medium risk threshold T3) can be flexibly configured according to different disease types and clinical practices. Furthermore, when the score falls into the medium-risk category, whether the second instruction generation unit triggers a referral can also be determined by considering other factors (such as whether the target user develops new symptoms or whether key indicators continue to worsen).

[0060] Furthermore, the learnable parameters in the above modules (including the weight matrix and attention vector in the graph attention network, the convolution kernel parameters in temporal feature extraction, the fully connected layer parameters in the weight generation module, and the learnable time window length parameter, etc.) are obtained through end-to-end supervised training. The training process uses historical desensitized medical data. Each sample contains the user's medical event encoding set, temporal physiological index data, medical institution type label, and expert-annotated risk level (high / medium / low). The loss function is designed as a weighted sum of three terms: the first term is cross-entropy loss, used to supervise the difference between the risk level output by the model and the expert-annotated level; the second term is ranking loss, which requires that the risk score of high-risk samples must be higher than that of low-risk samples (for sample pairs of the same disease type), thereby constraining the relative order of the scores; the third term is scene adversarial loss, which encourages the backbone of the model (i.e., the part that does not contain the scene-aware scoring branch) to learn feature representations independent of medical institution type, so that the two scene branches can better focus on their respective calibrations. The default weights of the three losses are 0.5, 0.3, and 0.2, respectively.

[0061] During training, L1 regularization constraints were applied to the edge weights in the disease association graph to prevent the model from learning spurious associations without medical rationality. The optimizer used was Adam, with an initial learning rate of 0.001. Early stopping was employed to prevent overfitting. Each mini-batch consisted of samples from higher-level hospitals and primary care communities in a 1:1 ratio to balance the sample distribution of the two scenarios. After training, the model parameters were saved and loaded for use during actual deployment.

[0062] The following is an example of triage management for diabetic patients. Specifically, a 58-year-old male patient, Mr. Zhang, visited the endocrinology department of a tertiary hospital due to poor blood sugar control and was diagnosed with type 2 diabetes mellitus complicated with hypertension and diabetic nephropathy. The system obtains his medical event code set (E10.2 type diabetes, I10 hypertension, N18.3 diabetic nephropathy) and the corresponding time-series physiological indicator data (fasting blood glucose, glycated hemoglobin, blood pressure, serum creatinine, etc. in the past 90 days) through the data acquisition module 11. The graph construction module 12 uses these three ICD codes as nodes and assigns edge weights of 0.8 for diabetes-nephropathy, 0.6 for diabetes-hypertension, and 0.5 for hypertension-nephropathy according to clinical guidelines to construct an association graph. The feature extraction module 13 calculates the time-series features for each indicator: extract the mean and slope of blood glucose in the past 7 days (which can be determined as 7 days after training with a learning window), and extract the mean and first-to-last difference of eGFR in the past 180 days. After two layers of message passing, the attention processing module 14 integrates the blood glucose fluctuation information of the nephropathy node with that of the diabetes node, and the diabetes node also integrates the eGFR decline trend of the nephropathy node. The feature aggregation module 15 outputs a user-level cross-event joint representation, and the weight generation module shows that blood glucose fluctuation and kidney function deterioration have the highest weights. The label acquisition unit identifies the current medical institution as a non-community health center, and the scoring generation unit activates the first scoring branch, outputting a disease risk score of 78 (high risk). The first instruction generation unit then generates instructions to refer the patient to the endocrinology department of the non-community health center and assign a specialist doctor, and automatically packages and pushes the patient's complete data. After three months of treatment and follow-up, the patient's blood glucose and blood pressure are under control, and the risk score is reassessed and reduced to 42 (low risk). The fourth instruction generation unit issues a transfer instruction to the primary community health center, and the follow-up frequency is adjusted to once a month.

[0063] The following is a specific example of upward referral from a primary care community health center. A 45-year-old female patient, Ms. Li, had her blood pressure at 160 / 100 mmHg discovered during a physical examination at the community health center. Initial treatment failed to control her blood pressure. The system retrieved the medical event code as I10 hypertension and her home blood pressure monitoring sequence for the past four weeks. Since there was only one medical event, the association graph had only one node, and the graph attention network degenerated into a simple transformation of itself. The feature extraction module extracted the blood pressure mean, standard deviation, and slope (showing an upward trend). The feature aggregation module output a representation of the single event, labeled as a primary care community health center. The scoring generation unit activated the second scoring branch, outputting a medium-risk score of 65. The second instruction generation unit issued a referral instruction to a non-community health center hospital. The system automatically packaged all of the patient's blood pressure records, medication history, and community health center visit records. After online review by a cardiologist at a higher-level hospital, the patient was diagnosed with essential hypertension, and the medication regimen was adjusted. One month later, the patient's blood pressure stabilized, the system re-scored her to low risk, and the fourth instruction generation unit issued a downward referral instruction. The patient returned to the community health center for routine follow-up.

[0064] By treating each medical event of the target user as a node in a correlation graph, and using the correlation strength between different medical events as edges to construct the correlation graph, a feature vector reflecting the changing trend is extracted from the time-series data such as blood glucose and blood pressure corresponding to each event. This vector serves as the initial feature for the corresponding node. A graph attention network is used to perform multi-layer message passing between these nodes, and then the information is adjusted according to the attention weights. After several rounds of the above interaction, the features of each node are integrated with the information of its neighbors. Finally, the updated features of all nodes are aggregated into a user-level comprehensive representation, and a risk score is output. In this way, the score of patients with comorbidities truly simulates the process of mutual influence of diseases in the body, and the assessment is more accurate.

[0065] like Figure 2 As shown, this invention also discloses a method for allocating medical resources based on medical event risk monitoring, comprising: Step S11: Obtain the target user's medical event code set and the time-series physiological indicator data corresponding to each medical event; Step S12: Construct an association graph using each medical event code in the medical event code set as a node and the association strength between each medical event as an edge; Step S13: Extract the temporal feature vector of the corresponding medical event from each of the temporal physiological index data; Step S14: Use the temporal feature vector as the initial feature of the corresponding node in the association graph, and perform multi-layer message passing on each node through a graph attention network to obtain the updated feature of each node after fusing the information of its neighboring nodes; Step S15: Aggregate the updated features of all nodes to obtain a user-level cross-event joint representation; Step S16: Output the target user's disease risk score based on the user-level cross-event joint representation, and generate corresponding medical resource allocation instructions based on the disease risk score.

[0066] For more detailed processing steps S11 to S16, please refer to the aforementioned disclosed embodiments; they will not be repeated here.

[0067] Furthermore, embodiments of this application also disclose an electronic device, Figure 3 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0068] Figure 3This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the medical resource allocation method based on medical event risk monitoring disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0069] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0070] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0071] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0072] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device 20 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. It can be Windows Server, Netware, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the medical resource allocation method based on medical event risk monitoring executed by the electronic device 20 as disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.

[0073] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed method for allocating medical resources based on medical event risk monitoring. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0074] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0075] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application. The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly in hardware, software modules executed by a processor, or a combination of both. The software module may be located in random access memory (RAM), memory, read-only memory (ROM), electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, removable disks, CD-ROMs (Compact Disc-Read Only Memory), or any other form of storage medium known in the art.

[0076] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0077] The solution provided by the present invention has been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A medical resource allocation system based on medical event risk monitoring, characterized in that, include: The data acquisition module is used to acquire the target user's medical event code set and the time-series physiological indicator data corresponding to each medical event; The graph construction module is used to construct an association graph using each medical event code in the medical event code set as a node and the association strength between each medical event as an edge. The feature extraction module is used to extract the time-series feature vectors of corresponding medical events from the time-series physiological index data. The graph attention processing module is used to take the temporal feature vector as the initial feature of the corresponding node in the association graph, and perform multi-layer message passing on each node through the graph attention network to obtain the updated feature of each node after fusing the information of its neighboring nodes. The feature aggregation module is used to aggregate the updated features of all nodes to obtain a user-level joint representation across events. The allocation instruction generation module is used to output the target user's disease risk score based on the user-level cross-event joint representation, so as to generate corresponding medical resource allocation instructions based on the disease risk score.

2. The medical resource allocation system based on medical event risk monitoring according to claim 1, characterized in that, The feature extraction module includes: The raw data acquisition unit is used to acquire the raw measurement value sequence of the time-series physiological indicators corresponding to each medical event within a preset time window, as time-series physiological indicator data. The first feature extraction unit is used to extract corresponding time-series features from the time-series physiological index data; The second feature extraction unit is used to extract context embedding vectors from the time-series physiological index data through a convolutional network or a gated recurrent network. The concatenation unit is used to concatenate the temporal features with the context embedding vector to obtain the temporal feature vector of the corresponding medical event.

3. The medical resource allocation system based on medical event risk monitoring according to claim 2, characterized in that, The raw data acquisition unit includes: The parameter configuration unit is used to configure a learnable time window length parameter for the time-series physiological indicators corresponding to each of the medical events. The data extraction unit is used to extract data located within the corresponding time window from the full data of the time-series physiological indicators corresponding to each medical event according to the time window length parameter, so as to obtain the original measurement value sequence.

4. The medical resource allocation system based on medical event risk monitoring according to claim 1, characterized in that, Also includes: The strength acquisition module is used to read the predefined correlation strength between various medical events from clinical guidelines or expert knowledge bases; Alternatively, the co-occurrence frequency of historical medical data can be statistically analyzed to determine the strength of the correlation between different medical data. Alternatively, the strength of the correlation between different medical data can be determined through model training.

5. The medical resource allocation system based on medical event risk monitoring according to claim 1, characterized in that, The graph attention processing module includes: The weighting unit is used to perform a weighted summation of the attention coefficients between each node and its neighboring nodes on the current layer features of the neighboring nodes to obtain aggregated features; The function processing unit is used to perform linear transformation and activation function processing on the aggregated features to obtain the processed features; The message passing unit is used to add the processed features and the current layer features of the node through a residual connection to obtain the current layer output result of the node, and add the current layer output result and the current layer features of the node through a residual connection as the input for the next layer message passing, until the message passing ends.

6. The medical resource allocation system based on medical event risk monitoring according to claim 1, characterized in that, The feature aggregation module includes: The mapping unit is used to map the updated features of each node into attention scores through a fully connected network; A normalization unit is used to normalize the attention scores of each node to obtain a normalized attention score. The feature aggregation unit is used to use the normalized attention score as a weight parameter to perform a weighted summation of the updated features of each node to obtain a user-level cross-event joint representation.

7. The medical resource allocation system based on medical event risk monitoring according to any one of claims 1 to 6, characterized in that, The allocation instruction generation module includes: The tag acquisition unit is used to acquire the tag of the type of medical institution currently visited by the target user; wherein, the type of medical institution includes non-community health center type and primary community health center type; The scoring generation unit is used to input the user-level cross-event joint representation into a scoring system containing a first scoring branch and a second scoring branch, respectively, so as to select and activate the output of the corresponding first scoring branch or second scoring branch according to the medical institution type label, as the disease risk score of the target user; wherein, the first scoring branch corresponds to the non-community health hospital scenario, and the second scoring branch corresponds to the primary community health center scenario; The first instruction generation unit is used to generate a referral instruction to a non-community health center and an instruction to allocate specialist doctor resources if the disease risk score belongs to a preset high-risk level. The second instruction generation unit is used to generate a referral instruction to a non-community health center if the disease risk score belongs to a preset medium risk level. The third instruction generation unit is used to generate an instruction to adjust the follow-up frequency if the disease risk score belongs to a preset low to medium risk level. The fourth instruction generation unit is used to generate a referral instruction to a community health center if the disease risk score belongs to a preset low-risk level.

8. A method for allocating medical resources based on medical event risk monitoring, characterized in that, include: Obtain the target user's medical event code set and the time-series physiological indicator data corresponding to each medical event; A correlation graph is constructed using each medical event code in the medical event code set as a node and the correlation strength between each medical event as an edge. Extract the temporal feature vectors of the corresponding medical events from the temporal physiological index data; The temporal feature vector is used as the initial feature of the corresponding node in the association graph. Multi-layer message passing is performed on each node through a graph attention network to obtain the updated feature of each node after fusing the information of its neighboring nodes. The updated features of all nodes are aggregated to obtain a user-level joint representation across events; The target user's disease risk score is output based on the user-level cross-event joint representation, and corresponding medical resource allocation instructions are generated based on the disease risk score.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the steps of the medical resource allocation method based on medical event risk monitoring as described in claim 8.

10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the steps of the medical resource allocation method based on medical event risk monitoring as described in claim 8.