Medical emergency system based on dynamic graph traffic prediction
By constructing a dynamic graph traffic prediction system, combining local adaptive graphs and global dynamic graphs, adaptive gated fusion graph convolution, and multi-scale time modules, the real-time and efficiency issues of traffic flow prediction in medical emergency systems are solved, enabling efficient emergency rescue in dynamic traffic and complex environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2026-04-10
AI Technical Summary
Existing traffic flow prediction methods struggle to reflect the dynamic changes in road network node dependencies in real time, lack simultaneous extraction of local and global dynamic spatial correlations, and lack effective integration with emergency medical systems, resulting in low efficiency of emergency medical systems.
A medical emergency system based on dynamic graph traffic prediction is adopted. By constructing local adaptive graphs and global dynamic graphs, spatial correlations are extracted using an adaptive gated fusion graph convolution module, and temporal dependencies are captured using a multi-scale temporal gated convolution module. Combined with patient condition classification and vital sign monitoring, an adaptive decision-making mechanism and multi-modal transport strategy are implemented.
It improves the efficiency and timeliness of the medical emergency system, enables adaptive decision-making under dynamic traffic conditions, and enhances the success rate of emergency rescue in complex environments.
Smart Images

Figure CN120412306B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of first-aid system construction in smart medical care, and particularly relates to a medical first-aid system based on dynamic graph flow prediction. BACKGROUND
[0002] Traffic flow prediction is an important technology of smart city system, which plays an important role in urban traffic management and emergency passage, and also has a relatively important impact on smart medical system. Medical emergency vehicles, as participants in the smart city traffic system and smart medical system, directly affect the life and health of patients. However, the existing traffic flow prediction method still has many deficiencies, and the prediction method effectively applied to medical emergency passage optimization is even less.
[0003] In recent years, many deep learning-based traffic flow prediction algorithms have greatly improved the accuracy of flow prediction, such as using convolutional neural network (CNN) and recurrent neural network (RNN) to learn the spatio-temporal dependence of road network. However, the CNN algorithm is only suitable for learning standard regular grid data graph, and it is difficult to effectively process the road network flow prediction of non-regular graph topology. In addition, the RNN algorithm is prone to gradient vanishing or explosion problem. Therefore, Graph Convolutional Neural Network (GCN) and Gated Tanh Unit (GTU) are used to extract the spatio-temporal dependence of non-Euclidean data of road network, and the model will have significant performance improvement.
[0004] However, the existing model mostly uses a pre-defined static adjacency matrix to represent the topological graph structure of the road, which is difficult to reflect the real dynamic changes of the node dependence relationship of the road network in real time. Secondly, although scholars have studied the mining of spatial dynamic correlation, it only stays in a single dynamic spatial correlation, does not extract local and global dynamic spatial correlation at the same time, and rarely captures multi-scale dynamic temporal dependence.
[0005] In addition, most of the existing traffic flow prediction methods lack effective connection with the medical emergency system, and the connection mechanism has not been studied in detail in the prior art, resulting in that the medical emergency system is still in a relatively inefficient state, so that some patients do not receive timely emergency treatment. (For example, the traditional medical emergency system fails to grade based on the severity of the patient's condition, implement an adaptive decision-making mechanism, and consider configuring a vital sign detection interface and a real-time path planning strategy during emergency transportation, making it difficult to adjust the transfer method in the case of sudden changes in the patient's condition. Moreover, for medical emergency transfer in adverse environments, there is a lack of multi-mode joint transfer method and road passage evaluation method, which greatly limits the application effect of prediction technology in complex emergency environment scenarios. In addition, there are such problems as this) (Of course, the above bracketed content is only an example of explanation, and it is not meant to say that the core technical solution of this time will solve all these problems)
[0006] Therefore, in the medical emergency channel transfer system, a suitable traffic flow prediction method is urgently needed to connect with a novel emergency transfer strategy to improve the efficiency and timeliness of the medical emergency system. SUMMARY
[0007] The purpose of the present application is to overcome the above-mentioned defects in the prior art and provide a medical emergency system based on dynamic graph flow prediction for improving the efficiency and timeliness of the medical emergency channel of the medical emergency system.
[0008] To achieve the above-mentioned purpose, the present application provides a medical emergency system based on dynamic graph flow prediction, characterized in that it comprises the following steps:
[0009] S1: The medical emergency center system collects traffic data recorded by various sensors, and pre-processes the traffic data;
[0010] S2: The pre-processed traffic data passes through a spatio-temporal feature embedding layer to convert its low-dimensional features into embedding vectors;
[0011] S3: A local adaptive graph is constructed by the embedding vectors, and a global dynamic graph is generated by the nodes of the local adaptive graph;
[0012] S4: The spatial correlation between the local adaptive graph and the global dynamic graph is extracted by an adaptive gated fusion graph convolution module;
[0013] S5: The time dependence of different scales is captured by a multi-scale time-gated convolution module;
[0014] S6: Steps S1-S5 form a dynamic graph flow prediction model, and the model is pre-trained;
[0015] S7: The medical emergency center system loads the trained dynamic graph traffic flow prediction model into the emergency dispatch cloud platform for real-time regulation of the medical emergency channel.
[0016] As preferred, in step S1, the traffic data recorded by various sensors collected by the medical emergency command center includes GPS positioning data on various emergency transfer vehicles, various urban traffic monitoring data, and various emergency event site crowd monitoring device data.
[0017] As preferred, in step S1, it further includes the medical emergency command center collecting patient condition classification information and real-time vital sign values of patients, and / or collecting the parking status and available status of various multi-mode traffic tools, and / or collecting weather forecast data.
[0018] As preferred, in step S2, the preprocessed traffic data passes through a space-time feature embedding layer and is combined with hyperedge embedding based on spatial features and periodic feature embedding based on time dimension, so that the low-dimensional features are converted into embedding vectors, and the processing process is as follows:
[0019] Suppose the preprocessed traffic data is X, which is converted into X data ∈R t×N×D The structure embedding based on spatial features adopts hyperedge embedding data represented as Z, which first converts the traditional graph into a hypergraph, converts the traditional edge into a hyperedge, combines the nodes and hyperedges, constructs a hypergraph structure, and then initializes a feature vector for each node. These features generated from traffic data X are mapped to a low-dimensional space, and then the hypergraph convolution network can process the information of multiple nodes in the hyperedge through convolution operation, and learn the embedding representation of the node through this operation, and then the periodic feature embedding based on time dimension adopts time coarse-grained and fine-grained data division, which divides one day into 1440 time steps and one week into seven days. Therefore, the time feature embedding passes through a fully connected layer and is respectively output as periodic time feature representation X w ∈R t×D and trend time feature representation X d ∈R t×D , and uses the basic architecture of the Transformer self-attention mechanism to design X data as relative position encoding X tq in the sequence.
[0020] The hyperedge embedding method based on the spatial feature of the road network structure is as follows:
[0021]
[0022] wherein, is a graph representing the road network in the traffic data, is a set of nodes, representing intersections in the road network, is a set of hyper-edges, each of which can connect multiple nodes, representing groups of road nodes with similar functions or specific relationships, is a hyper-edge weight matrix, representing the importance of each hyper-edge.
[0023]
[0024] where Z is the embedded road network node feature matrix, each row representing a low-dimensional embedding vector of a node, F ME-HGCN is a hyper-convolution function, Xe is the original road network node matrix, is the road network hypergraph structure, is the medical emergency related prior information, including the current position of the ambulance, the target hospital position, the event influence range,
[0025]
[0026] where Z (l) is the node feature embedding matrix of the l-th layer, σ is a nonlinear activation function, is a diagonal matrix of node degrees, is a diagonal matrix of hyper-edge degrees, H is the incidence matrix of the hypergraph, representing the membership relationship between nodes and hyper-edges, if a node belongs to a hyper-edge, then H(v, e) = 1, otherwise 0, α, β, γ are learnable exponential parameters, controlling the degree of normalization, Θ (l) is the learnable parameter matrix of the l-th layer, δ is the parameter controlling the influence degree of the emergency path selection term, Ω is the multi-factor fusion function, used to integrate the weight matrix, Ψ is the structure embedding enhancement function of path perception,
[0027] Finally, the embedding vector X embed of the embedding layer is output as:
[0028] X embed = X data + Z + X w + X d + X tq .
[0029] As a preferred, in step S3, a local adaptive graph based on local range is constructed, a modified multi-head attention processing mask matrix is used, each attention head focuses on different traffic flow patterns, and the calculated attention score is combined with the dynamic mask matrix to realize multi-dimensional traffic relationship modeling,
[0030] The global dynamic graph generated by constructing dynamic graph nodes is a graph neural network sampling strategy. The priority sampling of the neighbor information of the nodes processed by the Flow-Node2vec algorithm is used for the medical emergency scene, the dynamic feature representation of the nodes is updated, and the long-term propagation influence of the traffic flow is modeled.
[0031] 6. The medical emergency system based on dynamic graph traffic flow prediction according to claim 5, wherein in step S3, first, the self-attention formula is used to represent the query, key and value three matrices, and in order to extract the spatial correlation of the adjacent area, a mask matrix M is constructed in the stacked spatio-temporal block. local If the distance between two adjacent nodes is too small and reaches the threshold p, the edge weight is set to 1, otherwise to 0. Then the mask matrix is processed using multi-head attention, which divides the attention into multiple traffic flow characteristic heads to adaptively learn different levels of spatio-temporal dependence relationship. The processing process is as follows:
[0032]
[0033] wherein, are the query transformation weight matrix, the key transformation weight matrix and the value transformation weight matrix of the i-th head respectively, ψ i (F t ) is the traffic flow mode adjustment function corresponding to the i-th head, F t represents the traffic flow characteristics at time t, Q t is the query matrix at time t, K t is the key matrix at time t, V t is the value matrix at time t, d k is the dimension of the key vector, which is used to scale the dot product attention, is Hadamard product (element-level multiplication), and softmax() is an activation function, which is used to normalize the attention weight,
[0034] The outputs of the attention heads are merged using a concatenation strategy, and the final output local adaptive graph is:
[0035]
[0036] wherein, σ is a nonlinear activation function, and α i (t) is the weight coefficient of the time-varying attention head.
[0037] In order to effectively capture the complex changing characteristics contained in the road network, a dynamic graph node generation module is proposed in the stacked spatio-temporal block to obtain a timestamp-identified node dynamic graph. First, the embedding vector and hidden state of the current time traffic data are input into the dynamic graph node generation module. The embedding vector of the traffic data is assigned a trainable weight by multi-head attention, and its output is aggregated with the hidden state, and then the spatial dependency S eff is extracted through convolution operation. Then it is input into the Node2vec algorithm, which controls the strategy of random walk through the "bias" parameter to capture the dynamic structural relationship between nodes, and then iteratively continues to optimize to generate a learnable node embedding matrix X embed . Then element-wise multiplication is used to generate node dynamic features, whose formula is as follows:
[0038] Z flow = σ λ (S eff ⊙X embed )
[0039] where Z flow is the node dynamic feature, S eff is the learned passing spatial dependency, X embed is the learnable node embedding matrix, and λ is the saturation rate hyperparameter of the dynamically adjusted activation function σ,
[0040] Further, the Emergency-GraphSAGE sampling strategy is proposed. For emergency medical situations, the neighbor information of the nodes processed by the Flow-Node2vec algorithm is prioritized and sampled, and the dynamic feature representation of the node is updated. Then, Z flow is used as the initial node feature representation. Based on the medical emergency relevance, a number of nodes are sampled from the neighbors of all nodes, and the neighbor node information is extracted through the aggregation function. The neighbor node embedding is weighted and averaged according to the relevance of different nodes to the emergency path, and then concatenated with the embedding of the node itself, and then nonlinear transformation is performed, and finally the self-multiplication method is used to update the dynamic representation of the node, thereby generating a global dynamic graph, and Z flow is used as the initial value of , and its generation formula is as follows:
[0041]
[0042] where, represents the embedding feature of neighbor node u in the previous layer, N flow represents the neighbor set of node v after sampling, W k represents the learnable weight matrix in the kth layer, ρ(f vu ) represents the weight function of the relevance between nodes u and v, σ is a nonlinear activation function, and τ(Pdensity ) is a dynamic adjustment function of the flow density parameter P density is the generated global dynamic graph of traffic flow.
[0043] As preferred, in step S4, a spectrum domain enhanced adaptive gating fusion graph convolution module is introduced, by decomposition and reconstruction in the spectrum domain, the characteristics of the two graphs are respectively optimized at different frequency levels, and the spatial correlation between the local adaptive graph and the global dynamic graph is extracted, and the processing process is as follows:
[0044] Firstly, a multi-level feature frequency division mechanism is adopted to decompose the local adaptive graph and the global dynamic graph in the spectrum domain:
[0045]
[0046] wherein, denotes the spectrum transformation function, Ψ loc and Ψ glo are the sets of spectrum basis functions of the local and global graphs respectively,
[0047] Next, an adaptive spectrum gating unit is introduced, which dynamically adjusts the importance of different frequencies based on the flow change, and its formula is:
[0048]
[0049] wherein, B denotes the number of frequency bands, γ b (S t ) is the bth frequency band importance coefficient adaptively generated based on the current traffic state S t is the gating weight matrix of the bth frequency band, and are the components of the local graph and the global graph in the bth frequency band respectively, Φ b (X,F t ) is an enhanced function for the bth frequency band, is the corresponding bias term,
[0050] Subsequently, using the inverse transformation mechanism from the spectrum domain to the spatial domain, the spectrum representation after fusion of the learnable reconstruction basis function is restored to the spatial domain, and the formula is:
[0051]
[0052] wherein denotes the inverse spectrum transformation, Ω is the set of learnable reconstruction basis functions,
[0053] Finally, the spatial dependence characteristics of the fusion graph are extracted:
[0054]
[0055] wherein, a j (F t ) is the weight coefficient of the jth graph neural network dynamically changed according to the traffic state at the current moment, GCN j represents the jth graph neural network, Θ j is the corresponding set of learnable parameters, ResConnect() is a function of fusion of the local adaptive graph and the global dynamic graph through residual connection, and β is a balance parameter controlling the size of the residual connection.
[0056] As preferred, in step S5, the multi-scale time-gated convolution module includes GTU modules of three different scale receptive fields, the GTU module is a gated time unit module, and stacking the gated time unit modules can expand the receptive field of the time dimension, and the final output thereof is as follows:
[0057] T out = ReLU (Concat (Pooling (ε1*T), Pooling (ε2*T), Pooling (ε3*T) + T)
[0058] wherein, ε1, ε2, and ε3 are 1x3, 1x5, and 1x7 convolution kernels, T is time information processed by tanh and sigmoid, Pooling is a pooling operation, Concat is a concatenation operation, and ReLU(·) is a nonlinear activation function.
[0059] As preferred, in step S7, the medical emergency center system loads the trained dynamic graph traffic prediction model into the emergency dispatch cloud platform to predict the medical emergency channel conditions, which is used to real-time regulate the medical vehicles,
[0060] and adopt different objective functions according to the patient's condition classification to adaptively adjust the medical emergency strategy,
[0061] and configure a vital sign detection interface to facilitate the re-planning of the transfer channel when the patient's condition mutates,
[0062] and implement a three-level traffic control system according to the traffic congestion degree and the patient's condition, the three-level traffic control system being signal light optimization, regional control, and city emergency response, respectively.
[0063] As preferred, the medical emergency center system loads the trained dynamic graph traffic prediction model into the emergency dispatch cloud platform to generate real-time traffic prediction results for several hours in the future, and the medical emergency center system obtains multiple medical emergency channels according to the prediction results, adjusts the best emergency channel based on the positions of multiple hospitals, the emergency degree of the patient's condition, and the road congestion,
[0064] Meanwhile, the prediction results are presented to the medical emergency command center through a dedicated visualization interface, which includes traffic prediction graphs, congestion segment display graphs, and key information on estimated round-trip time,
[0065] In addition, to consider the characteristics of medical emergencies, an adaptive decision-making mechanism based on patient condition classification is used. In the patient condition classification strategy, the patient's condition emergency is converted into an urgency parameter, and different target functions are set for patients of different levels. The processing process is as follows:
[0066] min(T transport ) red (critical)
[0067] α·min(T transport )+(1-α)·max(M resource ) yellow (emergency)
[0068] β·min(T transport )+(1-β)·max(M distribution ) green (general)
[0069] Where T transport is the transfer time, M resource is the matching degree of medical resources, M distribution represents the balance of medical resource distribution, and α and β are balance parameters. The target function based on the patient's condition enables the medical emergency center system to adaptively adjust the priority of the decision according to the patient's urgency: for red, extremely critical patients, the system will transport the patient at the fastest speed; for yellow, emergency patients, the system will consider appropriate medical resource matching while ensuring shorter transfer time to ensure that patients can receive more appropriate treatment; for green patients, the system will focus more on the allocation of medical resources,
[0070] In addition, considering that the patient's condition may change during the transfer process, a patient vital sign monitoring interface and real-time path planning mechanism are added:
[0071] ifΔV vital >V threshold then replanning()
[0072] Where ΔV vital is the change in patient vital signs, and V threshold is the threshold matrix for measuring whether to replan. Different thresholds are set for different emergency diseases when the vital signs change, and the medical emergency transfer strategy is adjusted in time to improve the safety of the emergency process,
[0073] When replanning the emergency path, to ensure the stability and safety of the transfer process, a path transition algorithm is used:
[0074] P transition =argmin(p∈P) current ∩P new )(D(p,P current )+D(p,P new )+λ
[0075] ·R(p))
[0076] Among them, P current This is the current path, P new This is a replanned path, where D(p,P) is the distance metric from node p to path P, R(p) is the risk score of node p, and λ is the risk weight coefficient. Here, considering the optimality of the medical access route change, road risk factors are taken into account to ensure the safety of the transition point and avoid emergency access route changes on dangerous road sections.
[0077] In addition, for medical emergency situations in particularly harsh environments, a multi-modal joint transport strategy has been added. The algorithm for selecting transport points will consider methods for joint transport using multiple modes such as vehicles, ships, and helicopters.
[0078] J optimal =argmax j∈J (Q access (j)·Q safety (j)·Q resource (j)·Q weather (j))
[0079] Where J is the set of all possible transit points, Q access It is the reachability score, Q safety It's the security score, Q. resource It is the resource surplus score, Q weather It is a weather adaptability score.
[0080] In addition, considering the impact of severe weather on emergency transport, road traffic assessment indicators under severe weather conditions are set:
[0081] C weather (r,w)=C normal (r)·φ(r,w)
[0082] Where r is the road segment, w is the weather condition, and C normal (r) represents the traffic efficiency of road segment r under normal weather conditions, and φ(r,w) is the impact coefficient of severe weather, as shown in the following formula:
[0083]
[0084] Where, η i WI is the weighting coefficient for the i-th type of severe weather.i is the intensity index of the i-th severe weather, S i (r) is the sensitivity of the link r to the i-th severe weather, which combines the characteristics of different links with the severe weather factors, thereby realizing the channel optimization of the influence of severe weather,
[0085] In addition, a three-level traffic control system is arranged in the medical control center, combined with the predicted traffic conditions and the emergency conditions of the patients, the traffic control degree corresponding to the level is adopted, for the green patients or the low congestion link, the medical vehicle optimization passing is realized through the optimization of the signal lamp and the vehicle-mounted GPS system, for the yellow patients or the medium congestion link, the regional traffic control is adopted, the regional traffic control includes temporary vehicle avoidance, bus stop adjustment, bicycle parking area adjustment, for the red patients or the high congestion link, the city emergency response is used, the city emergency response includes traffic police dredging, road section closure and reverse traffic.
[0086] Compared with the prior art, the beneficial effects of the present application are that:
[0087] 1. The medical emergency system based on dynamic graph flow prediction,
[0088] Because the local adaptive graph and the global dynamic graph are modeled by using embedded data, the time-varying dynamic spatial correlation is captured by using adaptive gate fusion graph convolution, and the sensitivity to emergencies is improved;
[0089] In addition, the multi-scale time gate convolution is used, the dynamic time features of multiple time scales are captured by the GTU of different receptive fields, and the robustness of the model to complex time patterns is enhanced. The main problem to be solved is that the existing method has obvious defects in capturing local and global time-varying dynamic spatial correlation and multi-scale dynamic time dependence, which leads to large errors in prediction, low calculation efficiency and poor robustness;
[0090] 2. Through the above improvement, the demand of medical emergency channel for certain efficiency and timeliness is met, so that the adaptive decision mechanism can be further implemented based on the degree of patient condition, the vital sign detection interface and the real-time path planning strategy are configured, the problem of difficult timely adjustment of transfer method in the case of patient condition mutation is solved, in addition, for medical emergency transfer in severe environment, the multi-mode combined transfer method and road passing evaluation method are adopted, the application effect of prediction technology in complex emergency environment scene is improved, therefore, the emergency is carried out according to the different traffic conditions and different emergency conditions, so that the emergency success rate is greatly improved
[0091] 3.Overall, the medical emergency system based on dynamic graph flow prediction of the application, first, in order to improve the efficiency and timeliness of the medical emergency channel of the medical emergency system, on this basis, second, adapt to different traffic conditions, make different emergency decisions, improve the success rate of medical emergency system of medical emergency channel. BRIEF DESCRIPTION OF DRAWINGS
[0092] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor.
[0093] Fig. 1 is a flow principle diagram of the medical emergency system based on dynamic graph flow prediction provided by the embodiment of the application;
[0094] Fig. 2 is a system framework diagram of the medical emergency system based on dynamic graph flow prediction provided by the embodiment of the application;
[0095] Fig. 3 is a structure schematic diagram of constructing a global dynamic graph provided by the embodiment of the application;
[0096] Fig. 4 is a model schematic diagram of the multi-scale time gating convolution module provided by the embodiment of the application. DETAILED DESCRIPTION
[0097] The technical solutions in the embodiments of the application will be described clearly and completely below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are one of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor are within the protection scope of the application.
[0098] Please refer to Figs. 1 to 4 The embodiment of the application provides a medical emergency system based on dynamic graph flow prediction, which comprises a medical emergency system based on dynamic graph flow prediction, characterized in that it comprises the following steps:
[0099] S1: the medical emergency center system collects traffic data recorded by various sensors, and pre-processes the traffic data;
[0100] In the step S1, the medical emergency command center collects traffic data recorded by various sensors, including GPS positioning data on various emergency transfer vehicles, urban traffic monitoring data, and people flow monitoring device data at various emergency event sites.
[0101] In addition, the medical emergency command center collects patient condition classification information (such as red, yellow, and green classification of the three-level classification method), real-time vital sign values of patients, and / or collects the parking status and available status of various multi-mode transportation tools, and / or collects weather forecast data.
[0102] Specifically, the specific processing process of step S1 is as follows: In the step S1, the medical emergency center system serves as a management center system, responsible for real-time collection of data from the medical emergency center system and the urban traffic network. These data are usually from the GPS positioning on the emergency transfer vehicle, the hospital emergency resource management system, the urban traffic monitoring data, and the people flow monitoring device at various emergency event sites. These data include real-time position, speed, and destination information of the emergency vehicle, available conditions of hospital beds, specialist doctors, and emergency equipment, real-time traffic conditions such as traffic volume, speed, and occupancy rate of roads around the incident site, and on-site personnel density and flow trend of special events, updated every minute. At the same time, the system also integrates historical traffic emergency response data during special events as training samples to improve the recognition and prediction ability of the model for sudden events.
[0103] In addition, the medical emergency center system also collects patient condition classification information (such as red, yellow, and green classification of the three-level classification method), real-time vital sign values of patients (such as blood pressure, heart rate, etc.), and for rescue in special harsh environments, it also collects the parking position and available status of multi-mode transportation tools (such as the position and available status of helicopters, ship status, etc.), and for conditions in extreme weather, the system also integrates real-time weather forecast data, considering rainfall, wind speed, visibility, road conditions, etc. on the rescue road.
[0104] S2: The preprocessed traffic data passes through the spatio-temporal feature embedding layer, and its low-dimensional features are converted into embedding vectors.
[0105] Specifically, in the step S2, the preprocessed traffic data passes through the spatio-temporal feature embedding layer, and is combined with the hyper-edge embedding based on spatial features and the periodic feature embedding based on the time dimension, so that its low-dimensional features are converted into embedding vectors. The processing process is as follows:
[0106] In the complex structure of the road network of traffic data, significant periodic characteristics are shown in the time dimension, so in the spatio-temporal feature embedding layer, the input traffic data is simultaneously adopted for hyperedge embedding based on the spatial feature of the road network structure and periodic feature embedding based on the time dimension, so that the subsequent module can learn more deep spatio-temporal information, and the specific processing process is as follows:
[0107] Assuming that the pretreated traffic data is X, which is converted into X data ∈R t×N×D The structure embedding based on the spatial feature adopts hyperedge embedding data, which is expressed as Z. Firstly, the traditional graph is converted into a hypergraph, the traditional edge is converted into a hyperedge, the node and the hyperedge are combined, the hypergraph structure is constructed, and then a feature vector is initialized for each node. The features generated from the traffic data X are mapped to a low-dimensional space, and then the hypergraph convolutional network (Hypergraph Convolutional Networks) can process the information of multiple nodes in the hyperedge through convolution operation, and learn the embedding representation of the node through this operation. The convolution operation is to update the embedding vector of each node by propagating information in the hypergraph structure. The traditional graph is composed of nodes and adjacent edges, while each hyperedge of the hypergraph can connect multiple nodes, which can more naturally represent complex multi-relation data. Then, the periodic feature embedding based on the time dimension adopts time coarse-grained and fine-grained data division. One day is divided into 1440 time steps, and one week is divided into seven days. Therefore, the time feature embedding is output as periodic time feature representation X w ∈R t×D and trend time feature representation X d ∈R t×D and uses the basic architecture of the Transformer self-attention mechanism to design X data as the relative position encoding X tq in the sequence. Compared with the fixed absolute position encoding, the relative position encoding has higher flexibility and can automatically adjust the relationship between elements according to different contexts. Therefore, it can better adapt to different data structures, especially when the length of the data sequence changes.
[0108] Data usually have the problem of data scarcity, especially in some remote roads or areas. By modeling the road network structure embedding through the hypergraph, the similarity and adjacent relationship between nodes are effectively utilized, and the model can obtain more information from the traffic data of the adjacent area or road, which makes up for the problem of incomplete data. Through periodic feature embedding, the model can use known time patterns to infer the data of incomplete time periods, which is helpful for processing some traffic data missing or abnormal in some time periods.
[0109] The method for hyperedge embedding of the road network structure based on the spatial feature is:
[0110]
[0111] wherein, is a graph representing the road network in the traffic data, is a set of nodes representing intersections in the road network, is a set of hyper-edges, each of which can connect multiple nodes, representing groups of road nodes that are functionally similar or have specific relationships, is a hyper-edge weight matrix representing the importance of each hyper-edge;
[0112]
[0113] wherein Z is the embedded road network node feature matrix, each row representing a low-dimensional embedding vector of a node, F ME-HGCN is a hyper convolution function, Xe is the original road network node matrix containing traffic flow, speed, etc. features, is the road network hypergraph structure, is the medical emergency related prior information, including the current position of the ambulance, the target hospital position, the event influence range, etc.
[0114] Further,
[0115]
[0116] wherein Z (l) is the node feature embedding matrix of the lth layer, σ is a nonlinear activation function, is a diagonal matrix of node degrees, is a diagonal matrix of hyper-edge degrees, H is the incidence matrix of the hypergraph, representing the membership relationship between nodes and hyper-edges, if a node belongs to a hyper-edge, then H(v, e) = 1, otherwise 0, α, β, γ are learnable exponential parameters, controlling the degree of normalization, Θ (l) is the learnable parameter matrix of the lth layer, δ is a parameter controlling the influence degree of the emergency path selection term, Ω is a multi-factor fusion function used to integrate the weight matrix, Ψ is a path-aware structure embedding enhancement function,
[0117] Finally, the embedding vector X embed of the embedding layer is output as:
[0118] X embed = X data + Z + X w + X d + X tq .
[0119] The advantage of the above processing is that in the subsequent local adaptive graph construction process, the spatial relationship information in the hyper-embedding feature determines the spatial proximity between nodes, thereby generating a more accurate masking matrix and solving the data scarcity problem. In the subsequent global dynamic graph construction, the periodic feature embedding based on the time dimension helps the Flow-Node2vec algorithm more accurately capture the traffic trend in different time periods and more accurately generate traffic-aware node dynamic features.
[0120] S3: constructing a local adaptive graph and a global dynamic graph generated by the dynamic graph node through embedding vectors;
[0121] In step S3, a local adaptive graph based on a local range is constructed, and a dynamic masking matrix is processed using an improved multi-head attention, each attention head focusing on different traffic flow patterns (such as commuter flow, commercial flow, and occasional flow), and the calculated attention score is combined with the dynamic masking matrix to achieve multi-dimensional traffic relationship modeling.
[0122] The global dynamic graph generated by the dynamic graph node is constructed, that is, the neighbor information of the node processed by the Flow-Node2vec algorithm is prioritized and sampled using a graph neural network sampling strategy, the dynamic feature representation of the node is updated, the long-term propagation influence of the traffic flow is modeled, and the dual construction mechanism of the local adaptive graph and the global dynamic graph is proposed, the former can accurately capture the local fluctuations of the emergency event, and the latter can model the long-term propagation influence of the traffic flow through the Flow-Node2vec algorithm.
[0123] In step S3, first, the query, key, and value three matrices are represented using self-attention formulas, and in order to extract the spatial correlation of the adjacent area, a masking matrix M is constructed in the stacked spatiotemporal block local That is, if the distance between two adjacent nodes is too small and reaches a threshold p, the edge weight is set to 1, otherwise to 0, so that the influence of distant nodes can be shielded, the masking matrix makes the connection between distant nodes be ignored, thereby reducing the calculation amount and paying more attention to the dependence relationship between adjacent nodes, then the masking matrix is processed using multi-head attention, by dividing the attention into multiple traffic flow characteristic heads to adaptively learn different levels of spatiotemporal dependence relationship, different attention heads focus on different traffic flow patterns (such as commuter flow, commercial flow, etc.), and the calculated attention is combined with the dynamic masking matrix to achieve multi-dimensional traffic pattern modeling. The processing process is as follows:
[0124]
[0125] wherein, is the query transformation weight matrix, the key transformation weight matrix, and the value transformation weight matrix of the i-th head, and ψ i (Ft ) is the flow pattern adjustment function corresponding to the i-th head, F t represents the traffic flow characteristics at time t, Q t is the query matrix at time t, K t is the key matrix at time t, V t is the value matrix at time t, d k is the dimension of the key vector, used to scale the dot product attention, is the Hadamard product (element-wise multiplication), softmax() is the activation function used to normalize the attention weights,
[0126] The outputs of the attention heads are merged using the concatenation strategy, and the final local adaptive graph output is:
[0127]
[0128] where σ is a nonlinear activation function, α i (t) is the weight coefficient of the time-varying attention head; the local adaptive graph construction method adaptively focuses on the main node relationships under different traffic patterns, significantly improving the model prediction performance. In the local adaptive graph construction process, the spatial relationship information in the super-embedding feature can determine the spatial similarity between nodes, thereby forming a more accurate mask matrix.
[0129] In order to effectively capture the complex and changing characteristics of the road network, a dynamic graph node generation module is proposed in the stacked spatio-temporal block to obtain a timestamp-identified node dynamic graph. First, the embedding vector and hidden state of the current time traffic data are input into the dynamic graph node generation module. The embedding vector of this traffic data is assigned a trainable weight by multi-head attention, allowing the network to automatically focus more on valuable information, further enhancing the representation of dynamic spatio-temporal dependencies, and the output is aggregated with the hidden state, then the spatial dependency S eff is extracted through convolution operation, and then input into the Node2vec algorithm, which controls the strategy of random walk through the "bias" parameter to capture the dynamic structural relationship between nodes, and then iteratively optimizes to generate a learnable node embedding matrix X embed , followed by element-wise multiplication to generate node dynamic features, whose formula is as follows:
[0130] Z flow =σ λ (S eff ⊙X embed )
[0131] where Z flow is the node dynamic feature, S eff is the learned passing spatial dependency, and X embedis the learnable node embedding matrix, and λ is a dynamically adjusted saturation rate hyperparameter of the activation function σ,
[0132] Further, the Emergency-GraphSAGE sampling strategy is proposed, which prioritizes the sampling of neighbor information of nodes processed by the Flow-Node2vec algorithm for emergency medical situations, updates the dynamic feature representation of the nodes, and then uses Z flow As the initial node feature representation, by sampling a number of nodes from the neighbors of all nodes based on medical emergency relevance and extracting the information of neighbor nodes through an aggregation function, a more comprehensive global dynamic graph is generated. This combination can better capture the complex dynamic spatial and temporal dependencies between nodes, so that the final node embedding not only contains dynamic information of medical emergencies, but also considers the allocation characteristics of global nodes. According to the relevance of different nodes to the emergency path, the neighbor node embedding is weighted and averaged, then concatenated with the embedding of the node itself, and then subjected to a nonlinear transformation. Finally, the self-multiplication method is used to update the dynamic representation of the node, thereby generating a global dynamic graph, which updates Z flow as the initial value, the formula for generating it is as follows:
[0133]
[0134]
[0135] wherein, represents the embedding feature of neighbor node u in the previous layer, N flow represents the neighbor set of node v after sampling, W k represents the learnable weight matrix at the kth layer, ρ(f vu ) represents the weight function of the relevance between nodes u and v, σ is a nonlinear activation function, and τ(P density ) is a dynamic adjustment function of the flow density parameter P density is the generated global dynamic graph of traffic flow. In the construction of the global dynamic graph, the periodic feature embedding based on the time dimension helps the Flow-Node2vec algorithm to more accurately capture the flow direction relationship in different time periods, thereby more accurately generating the node dynamic features sensitive to traffic flow.
[0136] S4: Extract the spatial correlation between the local adaptive graph and the global dynamic graph through the adaptive gating fusion graph convolution module.
[0137] In step S4, the spectrum domain enhanced adaptive gating fusion graph convolution module is introduced, which effectively solves the heterogeneity problem between the local adaptive graph and the global dynamic graph through the decomposition and reconstruction of the spectrum domain. Through the innovative spectrum decomposition and reconstruction technology, the characteristics of the two graphs are optimized at different frequency levels, retaining the sensitivity of the local graph to sudden events and the modeling ability of the global graph to long-term dependence, extracting the local and global dynamic spatial correlation. The specific processing process is as follows:
[0138] First, the multi-level feature frequency division mechanism is used to decompose the local adaptive graph and the global dynamic graph in the spectrum domain:
[0139]
[0140] wherein, denotes the spectrum transformation function, and loc and glo are the sets of spectrum basis functions of the local and global graphs respectively,
[0141] Next, the adaptive spectrum gating unit (ASGU) is introduced, which dynamically adjusts the importance of different frequencies based on traffic changes, and the formula is:
[0142]
[0143] wherein, B denotes the number of frequency bands, and b (S t ) is the bth frequency band importance coefficient adaptively generated based on the current traffic state S t , is the gating weight matrix of the bth frequency band, and are the components of the local graph and the global graph in the bth frequency band respectively, and b (X,F t ) is the enhancement function for the bth frequency band, is the corresponding bias term,
[0144] Subsequently, the inverse transformation mechanism from the spectrum domain to the spatial domain is used to restore the spectrum representation after the fusion of the learnable reconstruction basis function to the spatial domain, and the formula is:
[0145]
[0146] wherein denotes the inverse spectrum transformation, and
[0147] Finally, the spatial dependence characteristics of the fusion graph are extracted:
[0148]
[0149] wherein, α j (F t ) is the weight coefficient of the jth graph neural network dynamically changed according to the flow state at the current moment, GCN j represents the jth graph neural network, Θ j is the corresponding set of learnable parameters, ResConnect() is a function of fusion of the local adaptive graph and the global dynamic graph through residual connection, and β is a balance parameter controlling the size of the residual connection.
[0150] The introduced spectrum domain enhanced adaptive gating fusion graph convolution module effectively solves the heterogeneous fusion problem between the local adaptive graph and the global dynamic graph through decomposition and reconstruction in the spectrum domain. The local adaptive graph focuses on capturing the correlation of adjacent nodes in the road network and can effectively model the local influence of the incident. The global dynamic graph focuses on describing the long-term influence of the flow and is good at capturing the diffusion effect of the nodes at a long distance. Through decomposition and fusion in the spectrum domain, the module can optimize the characteristics of the two graphs at different frequencies, retaining the feature extraction ability of the local graph on the incident and taking into account the modeling ability of the global graph on the long-term dependence.
[0151] S5: capturing different scales of time dependence through the multi-scale time gating convolution module, so as to learn short-term time dynamics and long-term stability, and capture different scales of time dependence.
[0152] In step S5, a new multi-scale time gating convolution module is used to extract short-term time dynamics and long-term stability in the data. The traditional GTU uses a convolution kernel to double the number of channels, and the kernel size is generally 1x1, which is difficult to capture the long-term time dependence in the data. Therefore, the multi-scale time gating convolution module is improved on this basis. The multi-scale time gating convolution module includes three GTU modules with different scale receptive fields. The GTU module is a gating time unit module. Stacking the gating time unit modules can expand the receptive field of the time dimension and solve the problem of missing long-term time information. The final output of the multi-scale time gating convolution module is as follows:
[0153] T out =ReLU(Concat(Pooling(ε1*T),Pooling(ε2*T),Pooling(ε3*T))+T)
[0154] wherein, ε1, ε2, and ε3 are 1x3, 1x5, and 1x7 convolution kernels, T is time information processed by tanh and sigmoid, Pooling is a pooling operation, Concat is a concatenation operation, and ReLU(·) is a nonlinear activation function.
[0155] The GTUs with different convolution kernels have completely different receptive fields, and can obtain time information from different ranges of traffic data. A small convolution kernel can capture the dependency relationship in a short time interval, which is very effective for capturing short-term patterns, sudden events or local dynamic at a moment. A large convolution kernel can focus on the time dependency relationship in a long time span, which is suitable for capturing long-term trend information. By using convolution kernels of different sizes, the GTU can obtain feature information at different time scales in the time dimension, thereby better modeling the short-term dynamics and long-term stability of traffic data. The concatenation operation can combine the multi-scale time features extracted by different GTUs to obtain a fusion feature containing short-term dynamic and long-term stable information. After dimension reduction by the pooling layer, the calculation amount can be reduced, the feature representation can be generalized, and overfitting to the training data can be avoided. In this process, the use of skip connection more efficiently utilizes the learned features, making the training converge faster. Finally, the GTU combined with the residual connection can well reduce the risk of gradient vanishing or explosion, and improve the training effect of the model.
[0156] S6: Steps S1-S5 form a dynamic graph traffic flow prediction model, which is pre-trained;
[0157] S7: The medical emergency center system loads the trained dynamic graph traffic flow prediction model into the emergency dispatch cloud platform for real-time regulation of the medical emergency channel.
[0158] In step S7, the medical emergency center system loads the trained dynamic graph traffic flow prediction model into the emergency dispatch cloud platform to predict the medical emergency channel condition (ambulance channel), which is used for real-time regulation of the medical vehicle, and different objective functions are adopted according to the patient's condition classification (green / yellow / red) to adaptively adjust the medical emergency strategy, and the vital sign detection interface is configured to facilitate the re-planning of the transfer channel when the patient's condition changes, and a three-level traffic control system is implemented according to the traffic congestion degree and the patient's condition, and the three-level traffic control system is signal light optimization, regional control, and city emergency response, respectively. Based on the real-time adjustment of traffic flow prediction, the patient's destination is prevented from being too concentrated in medical emergency resources;
[0159] Further, a multi-mode joint transfer mechanism can be introduced. Under comprehensive consideration, vehicles, ships, helicopters and other joint transfer methods are used, which are suitable for different patients to quickly reach the hospital. Road pass evaluation indicators for evaluating adverse weather can also be introduced, and the channel can be optimized based on road characteristics and weather conditions to establish an all-weather emergency route library and preset multiple backup routes for different adverse weather. The difference between the actual travel time and the predicted time is recorded to continuously optimize the medical transfer channel.
[0160] More specifically, the processing procedure of step S7 is as follows:
[0161] The medical emergency center system loads a trained dynamic graph traffic prediction model into the emergency dispatch cloud platform, processes the traffic data, emergency vehicles, weather information, etc. as the input of the model, and generates real-time traffic prediction results for the next few hours. The medical emergency center system obtains multiple medical emergency channels according to the predicted results, and adjusts the best emergency channel based on the positions of multiple hospitals, the emergency degree of the patient's condition, and the road congestion situation,
[0162] At the same time, the prediction results are presented to the medical emergency command center through a special visualization interface, which includes traffic prediction graphs, congestion section display graphs, and predicted round-trip time and other key information,
[0163] In order to consider the characteristics of medical emergency, an adaptive decision mechanism based on patient condition classification is used. In the patient condition classification strategy, the emergency of the patient's condition is converted into an emergency parameter, and different target functions are set for patients of different levels. The processing process is as follows:
[0164] min(T transport ) red (critical)
[0165] α·min(T transport )+(1-α)·max(M resource ) yellow (emergency)
[0166] β·min(T transport )+(1-β)·max(M distribution ) green (general)
[0167] Where T transport is the transfer time, M resource is the matching degree of medical resources, M distribution represents the balance degree of medical resource distribution, and α and β are balance parameters. The target function based on the patient's condition enables the medical emergency center system to adaptively adjust the priority of the decision according to the emergency degree of the patient: for red patients in critical condition, the system will transport the patient at the fastest speed; for yellow patients in emergency, the system will consider appropriate medical resource matching degree while ensuring shorter transfer time, to ensure that the patient can receive more appropriate treatment; for green patients, the system focuses more on the allocation of medical resources; avoid too much resource concentration in a hospital, so as to effectively improve the efficiency of medical treatment;
[0168] Considering that the patient's condition may change during the transfer process, a patient vital sign monitoring interface and a path real-time planning mechanism are added:
[0169] ifΔV vital >V threshold then replanning()
[0170] where ΔV vital is the change degree of patient's vital signs, V threshold is the threshold matrix for measuring whether to re-plan, different threshold values are set for different emergency diseases, when the vital signs change suddenly, the medical emergency transfer strategy is adjusted in time to improve the safety of the emergency process,
[0171] When re-planning the emergency channel, in order to ensure the stability and safety of the transfer process, the path transition algorithm is used:
[0172] P transition = argmin (p e P current ∩ P new )(D(p, P current )+ D(p, P new )+ λ
[0173] · R(p))
[0174] where P current is the current path, P new is the re-planned path, D(p, P) is the distance measure from node p to path P, R(p) is the risk score of node p, and λ is the risk weight coefficient. In this case, the road risk factor is considered to ensure the safety of the conversion location and avoid emergency channel conversion in dangerous sections such as sharp turns and steep slopes.
[0175] In addition, for medical emergency situations in special harsh environments, a multi-mode joint transfer strategy is added, and the selection algorithm for the transfer point considers multi-mode joint transfer methods such as vehicles, ships, and helicopters:
[0176] J optimal = argmax j∈J (Q access (j) · Q safety (j) · Q resource (j) · Q weather (j))
[0177] where J is the set of all possible transfer locations, Q access is the accessibility score, Q safety is the safety score, Q resource is the resource remaining score, and Q weather is the weather adaptability score. In the face of complex and variable transfer environments such as mountainous areas, flood or snow disaster areas, the medical emergency center system can adjust the multi-mode joint transfer vehicle in real time according to the specific score, and consider the selectability of the transfer location;
[0178] In addition, considering the influence of adverse weather on emergency transfer, an evaluation index of road traffic under adverse weather conditions is set:
[0179] C weather (r,w)=C normal (r)·φ(r,w)
[0180] wherein r is a road segment, w is the weather condition, C normal (r) is the traffic efficiency of road segment r under normal weather, and φ(r,w) is the adverse weather influence coefficient, and the formula is as follows:
[0181]
[0182] wherein η i is the weight coefficient of the i-th adverse weather, WI i is the intensity index of the i-th adverse weather, and S i (r) is the sensitivity of road segment r to the i-th adverse weather, which combines the characteristics of different road segments with adverse weather factors, for example, low road segments are more affected in the case of rain, and elevated road segments are more affected in the case of strong wind, so as to realize the optimization of the channel under adverse weather;
[0183] Therefore, the medical emergency center system establishes an all-weather emergency route library in the city, and sets multiple groups of backup routes in advance for different adverse weather (such as heavy rain, hail, etc.). Different adverse weather uses different alternative routes. For example, in heavy snow weather, the medical channel of the ambulance prefers road segments with less snowfall or snow melting equipment;
[0184] In addition, in order to achieve the purpose of optimizing the medical emergency channel, a three-level traffic control system is set in the medical emergency center system, combined with the predicted traffic conditions and the emergency situation of the patient, the corresponding level of traffic control is adopted,
[0185] For green patients or low congestion road segments, the medical vehicle optimization traffic is realized through the optimization of the signal lamp and the vehicle-mounted GPS system, for yellow patients or medium congestion road segments, regional traffic control is adopted, including temporary vehicle avoidance, bus stop adjustment, and bicycle parking area adjustment, for red patients or high congestion road segments, city-wide emergency response is used, including traffic police guidance, road segment closure, and reverse traffic.
[0186] On the basis of embedding medical resource information, the patient destination is adaptively adjusted. According to the real-time changes of the patient's condition and road conditions, when the evaluation index reaches a certain degree, a better hospital can be selected for the patient. In addition, the medical emergency center system also predicts the remaining medical resources of the hospital to avoid too many ambulances going to the same hospital causing emergency congestion.
[0187] The medical emergency center system can also deploy the location of the emergency vehicle in advance according to the severity of the patient's illness, weather conditions and road congestion, adjust the vehicle to the area where the influence of adverse weather is the smallest, or prefer other emergency transportation tools to shorten the time to reach the patient's destination. For the emergency vehicle in the patient transportation process, the center will dynamically adjust the speed and route in real time by detecting the road conditions and checking the meteorological data, and temporarily avoid risks in emergency situations.
[0188] In addition, the medical emergency center system also records the difference between the actual travel time and the predicted time of each emergency task, establishes a traffic time curve analysis diagram of the dedicated transportation tool, and continuously optimizes the medical channel. According to the predicted traffic conditions, the best departure point and target hospital are selected, remote medical guidance is started in advance in congested conditions, and multi-vehicle cooperative rescue strategies are optimized.
[0189] In summary, the embodiments of the present application provide a medical emergency system based on dynamic graph flow prediction, which can be seamlessly integrated into the medical emergency management center of the smart city system, and has the advantages of:
[0190] The local adaptive graph and global dynamic graph are modeled using embedded data, the adaptive gating fusion graph convolution enhanced in the spectral domain is used to capture the time-varying dynamic spatial correlation, and the sensitivity to emergencies is improved; secondly, the multi-scale time gating convolution is used to capture the dynamic time features of different receptive fields through GTU, and the robustness of the model to complex time patterns is enhanced. To mainly solve the obvious shortcomings of the existing methods in capturing local and global time-varying dynamic spatial correlation and multi-scale dynamic time dependence, resulting in large errors in prediction, low calculation efficiency and poor robustness. In addition, based on the severity of the patient's condition, an adaptive decision mechanism is implemented, a vital sign detection interface and a real-time path planning strategy are configured, and the problem of difficult timely adjustment of the transfer method in the case of patient condition mutation is solved.
[0191] Secondly, for medical emergency transfer in adverse environments, a multi-mode joint transfer method and a road traffic evaluation method are adopted to improve the application effect of the prediction technology in complex emergency environment scenarios.
[0192] Finally, in the case of large-scale events, disaster events or major emergencies, emergency personnel can effectively reach the incident site and send patients to the hospital in a complex and variable traffic environment, while the traditional fixed green channel strategy often fails to cope with such dynamic changes in traffic conditions.
[0193] Therefore, the medical emergency system based on dynamic graph flow prediction not only improves the efficiency and timeliness of the medical emergency channel of the medical emergency system, but also adapts to different traffic conditions and makes different emergency decisions, thereby improving the emergency success rate of the medical emergency channel of the medical emergency system.
[0194] The above only is the preferred embodiment of the present application, and is not used to limit the present application, any modification, equivalent replacement, improvement and the like within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims
1. A medical emergency system based on dynamic graph traffic prediction, characterized by, It comprises the following steps: S1: The medical emergency center system collects traffic data recorded by various sensors, and pre-processes the traffic data; S2: The pre-processed traffic data passes through a space-time feature embedding layer, and the low-dimensional features are converted into embedding vectors; S3: A local adaptive graph is constructed based on a local range, and an improved multi-head attention processing mask matrix is used, with each attention head focusing on different traffic flow patterns. The calculated attention score is combined with a dynamic mask matrix to achieve multi-dimensional traffic relationship modeling. S4: An adaptive gate fusion graph convolution module is used to extract the spatial correlation between the local adaptive graph and the global dynamic graph. S5: A multi-scale time gate convolution module is used to capture different scales of time dependence. S6: Steps S1-S5 form a dynamic graph traffic prediction model, which is pre-trained. S7: The medical emergency center system loads the trained dynamic graph traffic prediction model into the emergency dispatch cloud platform for real-time regulation and control of medical emergency channels. In step S1, the medical emergency command center collects traffic data recorded by various sensors, including GPS positioning data on various emergency transfer vehicles, various urban traffic monitoring data, and various emergency event site crowd monitoring device data. In step S1, the medical emergency command center also collects patient condition classification information and real-time vital sign values, and / or collects the parking status and available status of various multi-modal transportation tools, and / or collects weather forecast data. In step S2, the pre-processed traffic data passes through a space-time feature embedding layer and is combined with a space feature-based hyper-edge embedding and a time dimension-based periodic feature embedding, which converts the low-dimensional features into embedding vectors. Assuming that the pretreated traffic data is X, it is converted into , the structure embedding based on spatial features adopts hyperedge embedding data representation , first, the traditional graph is converted into a hypergraph, the traditional edge is converted into a hyperedge, the nodes and hyperedges are combined, the hypergraph structure is constructed, then a feature vector is initialized for each node, the features generated from the traffic data X are mapped to a low-dimensional space, then the hypergraph convolution network can process the information of multiple nodes in the hyperedge through convolution operation, and learn the embedding representation of the nodes through this operation, then, the periodic feature embedding based on the time dimension adopts time coarse and fine granularity division data, divides a day into 1440 time steps, and a week into seven days, therefore, the time feature embedding is output as periodic time feature representation and trend time feature representation through a fully connected layer respectively, and uses the basic architecture of the Transformer self-attention mechanism, designed to encapsulate the relative position coding in the sequence ; The space feature-based road network structure hyper-edge embedding method is as follows: ; wherein, is a graph representing a road network in the traffic data, is a set of nodes representing intersections in the road network, is a set of hyper-edges, each of which can connect multiple nodes, representing groups of road nodes that are functionally similar or have a certain relationship, is a hyper-edge weight matrix representing the importance of each hyper-edge; ; wherein, is the embedded road network node feature matrix, each row represents a low-dimensional embedding vector of a node, is a hyper-convolution function, is the original road network node matrix, is the road network hypergraph structure, is the medical emergency related prior information, including the current position of the ambulance, the target hospital position, the event influence range, ; wherein, is the node feature embedding matrix of the l-th layer, is a non-linear activation function, is a diagonal matrix of node degrees, is a diagonal matrix of hyperedge degrees, is the incidence matrix of the hypergraph, indicating the membership of nodes and hyperedges, if a node belongs to a hyperedge, then , otherwise 0, is a learnable exponential parameter, controlling the degree of normalization, is the learnable parameter matrix of the l-th layer, is a parameter controlling the influence degree of the emergency path selection term, is a multi-factor fusion function, used to integrate the weight matrix, is a path-aware structure embedding enhancement function, Finally, the embedding vectors of the embedding layer The output is represented as: 。 2. The medical emergency system based on dynamic graph traffic prediction of claim 1, wherein, In step S3, a local adaptive graph is constructed based on a local range, and an improved multi-head attention processing mask matrix is used, with each attention head focusing on different traffic flow patterns. The calculated attention score is combined with a dynamic mask matrix to achieve multi-dimensional traffic relationship modeling. In step S3, a global dynamic graph is constructed based on a dynamic graph node generation, which uses a graph neural network sampling strategy to prioritize the neighbor information of the nodes processed by the Flow-Node2vec algorithm in the medical emergency scenario, updates the dynamic feature representation of the nodes, and models the long-term propagation influence of the traffic flow.
3. The medical emergency system based on dynamic graph traffic prediction of claim 2, wherein, In the step S3, first, the query, key and value three matrices are expressed by using the self-attention formula, and in order to extract the spatial correlation of the adjacent area, a mask matrix is constructed in the stacked space-time block That is, if the distance between two adjacent nodes is less than the threshold p, the edge weight is set to 1, otherwise to 0, and then the mask matrix is processed by using multi-head attention, and by dividing the attention into multiple traffic flow characteristic heads, different levels of space-time dependence relationship is adaptively learned, and the processing process is as follows: ; where, , , are the query, key and value transformation weight matrices for the i-th head respectively, is the traffic pattern adjustment function corresponding to the i-th head, denotes the traffic flow feature at time t, is the query matrix at time t, is the key matrix at time t, is the value matrix at time t, is the dimension of the key vector, used to scale the dot-product attention, is the Hadamard product (element-wise multiplication), () is an activation function, used to normalize the attention weights, In step S3, a global dynamic graph is constructed based on a dynamic graph node generation, which uses a graph neural network sampling strategy to prioritize the neighbor information of the nodes processed by the Flow-Node2vec algorithm in the medical emergency scenario, updates the dynamic feature representation of the nodes, and models the long-term propagation influence of the traffic flow. ; wherein, is a non-linear activation function, is a weight coefficient of the time-varying attention head; In order to effectively capture the complex changing characteristics contained in the road network, a dynamic graph node generation module is proposed in the stacked spatio-temporal block to obtain a timestamp-identified node dynamic graph. First, the embedding vector and hidden state of the current time traffic data are input into the dynamic graph node generation module. The embedding vector of the traffic data is assigned a trainable weight by multi-head attention, and the output thereof is aggregated with the hidden state, and then the spatial dependency is extracted by convolution operation The output is then input into the Node2vec algorithm, which controls the strategy of random walk through the "bias" parameter to capture the dynamic structural relationship between nodes, and then iteratively continues to optimize to generate a learnable node embedding matrix Then, element-wise multiplication is used to generate node dynamic features, and the formula is as follows: ; wherein, is a node dynamic feature, is a learned passing space dependency, is a learnable node embedding matrix, is a dynamically adjusted activation function a saturation rate hyperparameter, Further, the Emergency-GraphSAGE sampling strategy is proposed, which samples the neighbor information of the nodes processed by the Flow-Node2vec algorithm in the emergency medical situation according to the priority, updates the dynamic feature representation of the node, and then As the initial node feature representation, a certain number of nodes are sampled from the neighbors of all nodes based on the medical emergency correlation, the information of the neighbor nodes is extracted by the aggregation function, the neighbor node embedding is weighted and averaged according to the correlation of different nodes with the emergency path, then it is spliced with the embedding of the node itself, and then a nonlinear transformation is performed, and finally the dynamic representation of the node is updated using the self-multiplication method, thereby generating a global dynamic graph, which is used as the initial value, and the formula for generating it is as follows: ; ; in, This represents the embedding features of the neighbor node u in the previous layer. This represents the set of neighbors of node v after sampling. This represents the learnable weight matrix at the k-th layer. The weight function represents the correlation between nodes u and v. It is a non-linear activation function. It is a flow density parameter The dynamic adjustment function, It is a generated global dynamic map of traffic flow.
4. The medical emergency system based on dynamic graph traffic prediction of claim 1, wherein, In step S4, an adaptive gate fusion graph convolution module enhanced in the frequency domain is introduced, which decomposes and reconstructs in the frequency domain to optimize the characteristics of the two graphs at different frequency levels, and extracts the spatial correlation between the local adaptive graph and the global dynamic graph. First, a multi-level feature frequency division mechanism is used to decompose the local adaptive graph and the global dynamic graph in the frequency domain. ; ; wherein, denotes a spectral transform function, and are sets of local and global spectral basis functions of the graph, respectively, Next, an adaptive frequency gating unit is introduced to dynamically adjust the importance of different frequencies based on traffic changes, with the formula as follows: ; where B denotes the number of frequency bands, is based on the current traffic state the b-th frequency band importance coefficient adaptively generated, is the gating weight matrix of the b-th frequency band, and are the components of the local map and the global map in the b-th frequency band, respectively, is the enhancement function for the b-th frequency band, is the corresponding bias term, Then, a frequency domain to spatial domain inverse transformation mechanism is used to restore the frequency representation after fusion of the learnable reconstruction basis function to the spatial domain, with the formula as follows: ; wherein denotes the inverse spectral transform, is a set of learnable reconstruction basis functions, Finally, the spatial dependence characteristics of the fusion graph are extracted. ; wherein, is the weight coefficient of the jth graph neural network according to the dynamic change of the flow state at the current moment, denotes the jth graph neural network, is the corresponding set of learnable parameters, is a function of the fusion of the local adaptive graph and the global dynamic graph through the residual connection, is a balance parameter that controls the size of the residual connection.
5. The medical emergency system based on dynamic graph traffic prediction of claim 1, wherein, In step S5, the multi-scale time-gated convolution module includes three GTU modules of different scales, and the GTU module is a gated time unit module. The stacked gated time unit modules can expand the receptive field of the time dimension, and the final output is as follows: ); wherein, , is a 1x3, 1x5, 1x7 convolution kernel, is time information processed by tanh and sigmoid, is a pooling operation, is a concatenation operation, is a nonlinear activation function.
6. The medical emergency system based on dynamic graph traffic prediction of claim 1, wherein, In step S7, the medical emergency center system loads the trained dynamic graph flow prediction model into the emergency dispatch cloud platform to predict the medical emergency channel conditions, and to real-time regulate the medical vehicles, and uses different objective functions according to the patient condition classification to adaptively adjust the medical emergency strategy, and configures a vital sign detection interface to facilitate re-planning of the transfer channel when the patient's condition mutates, and implements a three-level traffic control system according to the traffic congestion degree and the patient condition, and the three-level traffic control system is signal light optimization, regional control, and city emergency response respectively.
7. The medical emergency system based on dynamic graph traffic prediction of claim 6, wherein, The medical emergency center system loads the trained dynamic graph flow prediction model into the emergency dispatch cloud platform to generate real-time flow prediction results for the next several hours. The medical emergency center system obtains multiple medical emergency channels based on the prediction results, the locations of multiple hospitals, the patient condition emergency degree, and the road congestion situation, and adjusts the optimal emergency channel, Meanwhile, the prediction results are presented to the medical emergency command center through a special visualization interface, which includes a flow prediction graph, a congestion section display graph, and key information of the predicted round-trip time, In addition, considering the characteristics of medical emergency, an adaptive decision mechanism based on patient condition classification is used. In the patient condition classification strategy, the patient's condition emergency is converted into an emergency degree parameter, and different objective functions are set for patients of different levels. The processing process is as follows: wherein, is the time of transportation, is the matching degree of medical resources, represents the balance degree of medical resource distribution, and is a balance parameter, based on the target function of patient condition, enabling the medical emergency center system to adaptively adjust the priority of decision according to the emergency degree of the patient: for the red extremely critical patient, the system will transport the patient in the fastest way; for the yellow emergency patient, the system considers the appropriate medical resource matching degree while ensuring a shorter transportation time, to ensure that the patient can receive more appropriate treatment; for the green patient, the system pays more attention to the allocation of medical resources, In addition, considering that the patient's condition may mutate during the transfer process, a patient vital sign monitoring interface and a path real-time planning mechanism are added: ; Wherein, is the change degree of patient vital signs, is a threshold matrix for measuring whether to re-plan, different threshold values are set for different emergency diseases, when the vital signs appear mutation, timely adjustment of medical emergency transfer strategy is obtained, and the safety of emergency process is improved. When re-planning the emergency channel, the path transition algorithm is used to ensure the stability and safety of the transfer process: ; wherein, is the current path, is the re-planned path, is the distance metric from node p to path P, is the risk score of node p, is the risk weight coefficient, in which the road risk factor is considered in view of the optimality of medical channel conversion, which can ensure the safety of the conversion site and avoid the conversion of the emergency channel at the dangerous section. In addition, for medical emergency situations in special harsh environments, a multi-mode joint transfer strategy is added. The transfer point selection algorithm considers the use of vehicles, ships, and helicopters for joint transfer: ; wherein, is the set of all possible transport locations, is the reachability score, is the safety score, is the resource residuality score, is the weather suitability score, In addition, considering the impact of adverse weather on emergency transfer, an evaluation index of road traffic under adverse weather conditions is set: ; wherein, is a road segment, is a weather condition, is the travel efficiency of the road segment r under normal weather, is a bad weather impact coefficient, given by the formula: ; wherein, is a weight coefficient of the ith adverse weather, is an intensity index of the ith adverse weather, is a sensitivity of the road segment r to the ith adverse weather, which combines the characteristics of different road segments with adverse weather factors to achieve channel optimization of adverse weather impact, In addition, a three-level traffic control system is set in the medical control center. Combined with the predicted traffic conditions and the patient condition emergency, the corresponding level of traffic control is adopted. For green patients or low congestion road sections, the medical vehicle is optimized to pass through the optimization of the signal light and the vehicle-mounted GPS system. For yellow patients or medium congestion road sections, regional traffic control is used, which includes temporary vehicle avoidance, bus stop adjustment, and single vehicle parking area adjustment. For red patients or high congestion road sections, city emergency response is used, which includes traffic police guidance, road section closure, and reverse traffic.
Citation Information
Patent Citations
Traffic flow prediction method and system based on time-space synchronization dynamic graph attention network
CN117671952A
Traffic flow prediction method based on dynamic multi-view space-time fusion graph convolutional network
CN119252032A