Emergency vehicle priority scheduling method and system, electronic equipment and storage medium

The emergency vehicle priority dispatching method uses a graph convolutional network with a hard attention mechanism and gated recurrent unit to enhance real-time traffic flow prediction and signal control, ensuring priority passage and reducing delays.

CN119207139APending Publication Date: 2024-12-27CHONGQING DIMA IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411289308.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

Traditional traffic flow prediction and emergency vehicle dispatching methods fail to ensure priority passage due to lack of real-time response to dynamic traffic environments, leading to delays in emergency vehicle operations.

Method used

An emergency vehicle priority dispatching method utilizing a graph convolutional network with a hard attention mechanism and a gated recurrent unit to predict traffic flow and optimize signal light control strategies based on road network and emergency vehicle characteristics.

Benefits of technology

Accurately predicts future traffic flow and ensures priority passage of emergency vehicles, reducing delays and optimizing urban transportation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119207139A_ABST
    Figure CN119207139A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent traffic, in particular to an emergency vehicle priority scheduling method and system, electronic equipment and a storage medium, and the method comprises the steps: obtaining road network features and emergency vehicle features; inputting the road network features and the emergency vehicle features into a preset graph convolutional network, and performing attention weight distribution on nodes corresponding to each road intersection by using a hard attention mechanism in the graph convolutional network to obtain target features output by the graph convolutional network; according to the target characteristics, traffic flow prediction is carried out to obtain a traffic flow prediction result and time required for the emergency vehicle to pass through the road intersection; obtaining a target strategy according to the traffic flow prediction result, the time required for the emergency vehicle to pass through the road intersection and a preset signal lamp control strategy; and performing signal lamp control based on the target strategy. According to the method, the future traffic flow can be accurately predicted, and the priority passing of the emergency vehicle can be well ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent transportation technology, and in particular to an emergency vehicle priority dispatching method, system, electronic equipment and storage medium. Background Art

[0002] With the acceleration of urbanization, the complexity of urban transportation systems and the increasing traffic volume have led to increasingly serious traffic congestion problems. This not only affects the traffic efficiency of ordinary vehicles, but also poses a great challenge to the rapid response of emergency vehicles (such as ambulances, fire trucks, and police cars). In urban traffic management and planning, how to improve the accuracy of traffic flow prediction and the priority dispatching capabilities of emergency vehicles has become a problem that needs to be solved urgently.

[0003] Traditional traffic flow prediction methods and emergency vehicle dispatch strategies are usually based on historical traffic data and preset priority rules, but due to the lack of real-time response capabilities to dynamic traffic environments, these methods often do not work well in practical applications. Especially in the case of traffic congestion, complex signal control, and interaction with other vehicles, traditional methods are difficult to ensure that emergency vehicles have priority, causing delays in the task. Summary of the invention

[0004] The present invention provides an emergency vehicle priority dispatching method, system, electronic equipment and storage medium to solve the problem in the prior art that it is difficult to ensure the priority passage of emergency vehicles, resulting in task delays.

[0005] The present invention provides an emergency vehicle priority dispatching method, the method comprising: obtaining road network characteristics and emergency vehicle characteristics, the road network characteristics comprising: road intersection information, road segment information, and the number of vehicles on each road segment, the emergency vehicle characteristics comprising: the speed, location, route, and priority characteristics of the emergency vehicle, the priority characteristics comprising the type of emergency vehicle and the type of mission;

[0006] Inputting the road network features and the emergency vehicle features into a preset graph convolutional network, and using a hard attention mechanism in the graph convolutional network to perform attention weight allocation on nodes corresponding to each road intersection, thereby obtaining a target feature output by the graph convolutional network, wherein the target feature includes a weighted road network feature;

[0007] According to the target characteristics, traffic flow prediction is performed to obtain traffic flow prediction results and the time required for emergency vehicles to pass through the road intersection;

[0008] According to the traffic flow prediction results, the time required for emergency vehicles to pass through the road intersection, and the preset signal light control strategy, a target strategy is obtained; based on the target strategy, the signal light control is performed.

[0009] In one embodiment of the present invention, the step of obtaining road network characteristics includes:

[0010] Constructing an undirected weighted graph of a target road network, the undirected weighted graph comprising: a node set, an edge set, and an adjacency matrix, the node set comprising a plurality of node indexes, the node indexes corresponding one-to-one to road intersections of the target road network, the edge set comprising a plurality of edges, the edges corresponding one-to-one to road segments connecting road intersections in the target road network;

[0011] Acquiring vehicle quantity information, the vehicle quantity information including the number of vehicles on each road segment, and integrating the undirected weighted graph and the vehicle quantity information to obtain integrated information;

[0012] Feature extraction is performed on the integrated information to obtain the road network features.

[0013] In one embodiment of the present invention, the steps of performing traffic flow prediction according to the target features and obtaining traffic flow prediction results and the time required for emergency vehicles to pass through the road intersection include:

[0014] Acquire a historical target feature set, wherein the historical target feature set includes the target feature corresponding to each historical moment in a preset historical time sequence, wherein the historical time sequence includes multiple historical moments;

[0015] Inputting the historical target feature set into a preset gated recurrent unit to perform feature extraction to obtain a hidden state vector at each historical moment;

[0016] Based on the hidden state vector, and the reset gate and the update gate in the gated recurrent unit, a target hidden state matrix is ​​obtained, wherein the target hidden state matrix includes the final hidden state outputted by the hidden state vector at each historical moment after passing through the reset gate and the update gate;

[0017] Traffic flow prediction is performed according to the target hidden state matrix to obtain the traffic flow prediction result and the time required for emergency vehicles to pass through the road intersection.

[0018] In one embodiment of the present invention, the step of obtaining a target hidden state matrix based on the hidden state vector and the reset gate and the update gate in the gated recurrent unit includes:

[0019] Determine the current hidden state vector as a target hidden state vector, and determine the road segment matrix at the next moment corresponding to the target hidden state vector as a target road segment matrix, wherein the road segment matrix includes the number of vehicles in each road segment;

[0020] Inputting the target hidden state vector and the target road segment matrix into the reset gate to obtain a candidate hidden state vector;

[0021] Inputting the candidate hidden state vector and the target hidden state vector into the update gate to obtain the final hidden state;

[0022] The target hidden state matrix is ​​obtained by acquiring the final hidden states corresponding to each of the multiple hidden state vectors.

[0023] In one embodiment of the present invention, the steps of performing traffic flow prediction according to the target hidden state matrix and obtaining the traffic flow prediction result and the time required for the emergency vehicle to pass through the road intersection include:

[0024] Based on the target hidden state matrix and a preset soft attention mechanism, obtaining an importance weight vector of each final hidden state in the target hidden state matrix;

[0025] Using the importance weight vector, weighted aggregation is performed on the target hidden state matrix to obtain a final feature vector;

[0026] Based on the final feature vector, traffic flow prediction is performed to obtain the traffic flow prediction result and the time required for the emergency vehicle to pass through the road intersection.

[0027] In one embodiment of the present invention, the step of obtaining a target strategy according to the traffic flow prediction result, the time required for an emergency vehicle to pass through a road intersection, and a preset signal light control strategy includes:

[0028] If the time required for the emergency vehicle to pass through the road intersection is a null value, then obtaining the target strategy according to the traffic flow prediction result and the signal light control strategy;

[0029] If there is only one emergency vehicle, the target strategy is obtained according to the traffic flow prediction result, the signal light control strategy, and the time required for the emergency vehicle to pass through the road intersection;

[0030] If there are multiple emergency vehicles, the target strategy is obtained according to the traffic flow prediction result, the signal light control strategy, the speed, location, route, and priority characteristics of the emergency vehicles.

[0031] In one embodiment of the present invention, the graph convolutional network and the gated recurrent unit both belong to a traffic scheduling model, and the training steps of the traffic scheduling model include:

[0032] Acquire a training set, the training set including feature samples at multiple historical moments and real labels corresponding to the feature samples, the feature samples including road network feature samples and emergency vehicle feature samples, the real labels including: traffic flow labels and real time labels required for emergency vehicles to pass through road intersections;

[0033] Inputting the training set into the traffic dispatch model to obtain traffic flow prediction information output by the traffic dispatch model and the predicted time required for emergency vehicles to pass through the road intersection;

[0034] Based on a preset first loss function, the traffic flow prediction information, and a corresponding traffic flow label, a first loss is obtained;

[0035] Obtaining a second loss based on a preset second loss function, the predicted time, and the corresponding real time;

[0036] Determine a product of a first loss and a preset first weight as a first intermediate value, and determine a product of a second loss and a preset second weight as a second intermediate value, wherein a sum of the first weight and the second weight is 1;

[0037] determining a sum of the first intermediate value and the second intermediate value as a final loss;

[0038] The traffic scheduling model is trained based on the final loss.

[0039] The present invention also provides an emergency vehicle priority dispatch system, the system comprising: a feature acquisition module, used to acquire road network features and emergency vehicle features, the road network features comprising: road intersection information, road segment information, and the number of vehicles on each road segment, the emergency vehicle features comprising: the speed, location, route, and priority features of the emergency vehicle, the priority features comprising the type of emergency vehicle and the type of mission;

[0040] A feature fusion module, used to input the road network features and the emergency vehicle features into a preset graph convolutional network, so as to use the hard attention mechanism in the graph convolutional network to allocate attention weights to the nodes corresponding to each road intersection, and obtain target features output by the graph convolutional network, wherein the target features include weighted road network features;

[0041] A prediction module, used to perform traffic flow prediction based on the target characteristics, and obtain traffic flow prediction results and the time required for emergency vehicles to pass through the road intersection;

[0042] The control module is used to obtain a target strategy based on the traffic flow prediction result, the time required for an emergency vehicle to pass through a road intersection, and a preset signal light control strategy; and perform signal light control based on the target strategy.

[0043] The present invention also provides an electronic device, comprising a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute a computer program stored in the memory to implement the emergency vehicle priority dispatch method provided in any of the above embodiments.

[0044] The present invention also provides a computer-readable storage medium on which a computer program is stored, wherein the computer program is used to enable a computer to execute the emergency vehicle priority dispatching method provided in any one of the above embodiments.

[0045] Beneficial effects of the present invention: The emergency vehicle priority dispatching method, system, electronic device and storage medium proposed by the present invention, the method obtains road network features and emergency vehicle features, the road network features include: road intersection information, road section information, and the number of vehicles in each road section, the emergency vehicle features include: the speed, position, route, and priority features of the emergency vehicle, and the priority features include the type of emergency vehicle and the type of task; the road network features and emergency vehicle features are input into a preset graph convolutional network, so as to use the hard attention mechanism in the graph convolutional network to allocate attention weights to the nodes corresponding to each road intersection, and obtain the target features output by the graph convolutional network, and the target features include weighted road network features; according to the target features, traffic flow prediction is performed to obtain the traffic flow prediction results and the time required for the emergency vehicle to pass the road intersection; according to the traffic flow prediction results, the time required for the emergency vehicle to pass the road intersection, and the preset signal light control strategy, the target strategy is obtained; based on the target strategy, the signal light is controlled. The method can realize the accurate prediction of future traffic flow, and can better ensure the priority passage of emergency vehicles, avoiding the delay of the emergency vehicle's task. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 A schematic diagram of a flow chart of an emergency vehicle priority dispatching method provided by an embodiment of the present invention;

[0047] Figure 2 A schematic diagram of the structure of a traffic dispatch model in an emergency vehicle priority dispatch method provided in one embodiment of the present invention;

[0048] Figure 3 A schematic diagram of the structure of an emergency vehicle priority dispatch system provided by an embodiment of the present invention;

[0049] Figure 4A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] The following describes the embodiments of the present invention by specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0051] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0052] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.

[0053] Combine the following Figures 1 to 4 , the emergency vehicle priority dispatch method, system, electronic device and storage medium in this embodiment are explained.

[0054] See also Figure 1 , Figure 1 A flow chart of a method for emergency vehicle priority dispatching provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method includes:

[0055] S110: Obtain road network features and emergency vehicle features, the road network features include: road intersection information, road segment information, and the number of vehicles on each road segment, the emergency vehicle features include: the speed, location, route, and priority features of the emergency vehicle, the priority features include the emergency vehicle type and mission type. The emergency vehicle features also include a timestamp, etc.

[0056] S120: Input the road network features and the emergency vehicle features into a preset graph convolutional network (GCN) to utilize the hard attention mechanism in the graph convolutional network to assign attention weights to the nodes corresponding to each road intersection, and obtain the target features output by the graph convolutional network, wherein the target features include weighted road network features.

[0057] It should be noted that by inputting road network features and emergency vehicle features into the preset graph convolutional network, it is possible to achieve the fusion of heterogeneous features, that is, to fuse emergency vehicle features with road network features, and use the hard attention mechanism to assign higher weights to nodes (road intersections) where emergency vehicles are about to pass, thereby facilitating the subsequent priority dispatch of emergency vehicles and ensuring that emergency vehicles receive priority in traffic dispatch. This attention weight determines the "time required for emergency vehicles to pass road intersections" output in the subsequent traffic flow prediction process.

[0058] S130: Perform traffic flow prediction based on the target characteristics to obtain traffic flow prediction results and the time required for emergency vehicles to pass through the road intersection.

[0059] It should be noted that the traffic flow prediction result refers to the number of vehicles that will pass through each road intersection.

[0060] S140: Obtain a target strategy according to the traffic flow prediction result, the time required for an emergency vehicle to pass through a road intersection, and a preset signal light control strategy; and perform signal light control based on the target strategy.

[0061] It should be noted that through the above steps, while achieving accurate prediction of traffic flow, priority dispatch of emergency vehicles can be achieved, that is, ensuring that emergency vehicles can pass through road intersections smoothly and optimizing the overall operating efficiency of the urban transportation system.

[0062] In some embodiments, the step of obtaining road network characteristics includes:

[0063] 1. Construct an undirected weighted graph of a target road network, the undirected weighted graph comprising: a node set, an edge set, and an adjacency matrix, the node set comprising a plurality of node indexes, the node indexes corresponding one-to-one to road intersections (crossroads) of the target road network, the edge set comprising a plurality of edges, the edges corresponding one-to-one to road segments connecting road intersections in the target road network.

[0064] It should be noted that the mathematical expression of the undirected weighted graph is: G = (V, E, A), where V represents a node set, E represents an edge set, and A represents an adjacency matrix. Each road intersection corresponds to a unique node index, which is an integer index value.

[0065] 2. Obtain vehicle quantity information, the vehicle quantity information including the vehicle quantity of each road segment, and integrate the undirected weighted graph and the vehicle quantity information to obtain integrated information. The vehicle quantity information refers to the vehicle quantity of each road segment at the current moment.

[0066] 3. Extracting features from the integrated information to obtain the road network features. It should be noted that, through the above steps, the undirected weighted graph and the vehicle quantity information can be integrated to facilitate the subsequent prediction steps.

[0067] In order to further capture the time dependency between features, in some embodiments, the steps of performing traffic flow prediction based on the target feature and obtaining the traffic flow prediction result and the time required for the emergency vehicle to pass through the road intersection include:

[0068] 1. Obtain a historical target feature set, wherein the historical target feature set includes the target features corresponding to each historical moment in a preset historical time sequence, wherein the historical time sequence includes multiple historical moments. Specifically, obtain target features of multiple historical moments, wherein each target feature corresponds to a historical moment, and multiple historical moments constitute the historical time sequence.

[0069] Second, the historical target feature set is input into a preset gated recurrent unit (GRU) to extract features and obtain the hidden state vector of each historical moment. Specifically, feature extraction is performed on the target features corresponding to each historical moment to obtain the hidden state vector of each target feature. Assuming that there are m historical moments, there are m target features {F1, F2, ..., Fm}. By extracting features from the m target features, m hidden state vectors {h1, h2, ..., h m}.

[0070] 3. Based on the hidden state vector, and the reset gate and update gate in the gated recurrent unit, a target hidden state matrix is ​​obtained, wherein the target hidden state matrix includes the final hidden state outputted by the hidden state vector at each historical moment after passing through the reset gate and the update gate.

[0071] Fourth, according to the target hidden state matrix, traffic flow prediction is performed to obtain the traffic flow prediction result and the time required for the emergency vehicle to pass the road intersection. It should be noted that through the above steps, the time dependency between the hidden state vectors at different times, that is, the long-term dependency relationship, can be captured, thereby improving the accuracy of traffic flow prediction.

[0072] In some embodiments, based on the hidden state vector, and the reset gate and the update gate in the gated recurrent unit, the step of obtaining the target hidden state matrix includes:

[0073] 1. Determine the current hidden state vector as the target hidden state vector, and determine the road segment matrix at the next moment corresponding to the target hidden state vector as the target road segment matrix, wherein the road segment matrix includes the number of vehicles on each road segment.

[0074] 2. Input the target hidden state vector and the target road segment matrix into the reset gate to obtain a candidate hidden state vector.

[0075] 3. Input the candidate hidden state vector and the target hidden state vector into the update gate to obtain the final hidden state.

[0076] 4. Obtain the target hidden state matrix by obtaining the final hidden states corresponding to each of the multiple hidden state vectors.

[0077] u t =σ(W u ×[GC(A,X t ,h t-1 )]+b u )

[0078] r t =σ(W r ×[GC(A,X t ,h t-1 )]+b r )

[0079] c t =tanh(W c ×[GC(A,X t ,(r t ×h t-1 ))]+b c )

[0080] h t =u t ×h t-1 +(1-u t )×c t

[0081] Among them, c t represents the candidate hidden state vector, tanh represents the hyperbolic tangent activation function, u t represents the update gate matrix, r t represents the reset gate matrix, σ is the sigmoid activation function, W u is the preset first weight matrix, “×” represents the multiplication sign, GC represents the graph convolution process, X t represents the road segment matrix at time t, where the value range of t is [1, m], h t-1represents the hidden state vector at time t-1, that is, the target hidden state vector, b u Represents the preset first bias, W r is the preset second weight matrix, b r Indicates the preset second bias, W c is the preset third weight matrix, b c Indicates the preset third bias, h t represents the final hidden state at time t. The final hidden states corresponding to the multiple hidden state vectors constitute the target hidden state matrix.

[0082] In some embodiments, the step of performing traffic flow prediction according to the target hidden state matrix to obtain the traffic flow prediction result and the time required for the emergency vehicle to pass through the road intersection includes:

[0083] 1. Based on the target hidden state matrix and the preset soft attention mechanism (soft attention mechanism network), the importance weight vector of each final hidden state in the target hidden state matrix is ​​obtained. It should be noted that this embodiment uses the Softmax function to obtain the importance weight vector of each final hidden state in the target hidden state matrix. The soft attention mechanism is used to more accurately capture traffic flow changes and trends and improve traffic congestion by dynamically adjusting feature weights.

[0084] It should be noted that, based on the target hidden state matrix and the preset soft attention mechanism, the mathematical expression of the importance weight vector of each final hidden state in the target hidden state matrix is ​​obtained as follows:

[0085] Y = Softmax(W × (H × U) T )

[0086] Among them, Y represents the importance weight vector, W represents the preset matrix of learnable attention weights, H represents the target hidden state matrix, U represents the learnable parameter matrix, and T represents transpose.

[0087] 2. Using the importance weight vector, perform weighted aggregation on the target hidden state matrix to obtain a final feature vector. Specifically, using the importance weight vector, perform weighted aggregation on multiple final hidden states in the target hidden state matrix to obtain a final feature vector.

[0088] It should be noted that the mathematical expression of the final eigenvector is:

[0089] Z=Y×H

[0090] Among them, Z represents the final eigenvector.

[0091] 3. Based on the final feature vector, traffic flow prediction is performed to obtain the traffic flow prediction result and the time required for the emergency vehicle to pass the road intersection. Specifically, the final feature vector is input into a preset fully connected layer to perform traffic flow prediction to obtain the traffic flow prediction result and the time required for the emergency vehicle to pass the road intersection.

[0092] It should be noted that, through the above steps, the importance of features can be adjusted according to the dynamic characteristics of traffic flow, so as to more accurately identify changes and patterns of traffic flow.

[0093] In some embodiments, the step of obtaining a target strategy according to the traffic flow prediction result, the time required for an emergency vehicle to pass through a road intersection, and a preset signal light control strategy includes:

[0094] 1. If the time required for an emergency vehicle to pass through a road intersection is a null value, the target strategy is obtained according to the traffic flow prediction result and the signal light control strategy.

[0095] It should be noted that if the time required for an emergency vehicle to pass through a road intersection is a null value, it means that there is no emergency vehicle in the current road network. Therefore, the target strategy is obtained according to the traffic flow prediction result and the signal light control strategy. When there is no emergency vehicle in the road network, different traffic flow prediction results in the signal light control strategy correspond to different target strategies.

[0096] 2. If there is only one emergency vehicle, the target strategy is obtained based on the traffic flow prediction result, the signal light control strategy, and the time required for the emergency vehicle to pass through the road intersection.

[0097] It should be noted that if there is only one emergency vehicle, the green light duration of the road intersection that the emergency vehicle is about to pass is determined based on the time required for the emergency vehicle to pass through the road intersection, and the target strategy is obtained based on the green light duration of the road intersection, the traffic flow prediction result, and the signal light control strategy. It can be understood that when the green light duration of a road intersection has been determined, strategy matching is performed based on the traffic flow prediction result and the signal light control strategy to obtain the target strategy.

[0098] 3. If there are multiple emergency vehicles, the target strategy is obtained based on the traffic flow prediction results, the signal light control strategy, the speed, location, route, and priority characteristics of the emergency vehicles.

[0099] It should be noted that if there are multiple emergency vehicles, the green light durations of multiple road intersections are determined based on the time required for multiple emergency vehicles to pass through the corresponding road intersections, and the green light durations of the remaining road intersections are matched based on the traffic flow prediction results and the signal light control strategy to obtain the target strategy. Different priority features in the target strategy correspond to different green light durations. In the specific implementation process, the phase of the green light control signal for each traffic light can be adjusted according to the priority of each emergency vehicle, thereby realizing the dispatch of emergency vehicles of different priorities to maintain order and smooth traffic.

[0100] The following table 1 provides an exemplary description of the priorities of different emergency vehicles:

[0101] Table 1 Priority list

[0102]

[0103] Figure 2 This is a structural diagram of a traffic dispatch model in an emergency vehicle priority dispatch method provided in an embodiment of the present invention. Please refer to Figure 2 The traffic dispatch model includes a graph convolutional network, a gated recurrent unit (GRU), a soft attention mechanism network, and a fully connected layer. The input of the graph convolutional network includes road network features and emergency vehicle features at multiple historical moments (such as Figure 2 Road network feature 1, emergency vehicle feature 1,..., road network feature m, emergency vehicle feature m).

[0104] In some embodiments, the graph convolutional network and the gated recurrent unit both belong to a traffic scheduling model, and the training steps of the traffic scheduling model include:

[0105] 1. Obtain a training set, wherein the training set includes feature samples of multiple historical moments and real labels corresponding to the feature samples, wherein the feature samples include road network feature samples and emergency vehicle feature samples, and the real labels include: traffic flow labels and real time labels required for emergency vehicles to pass through road intersections.

[0106] 2. Inputting the training set into the traffic dispatch model to obtain the traffic flow prediction information output by the traffic dispatch model and the predicted time required for emergency vehicles to pass through the road intersection.

[0107] 3. Based on the preset first loss function, the traffic flow prediction information, and the corresponding traffic flow label, a first loss is obtained.

[0108] The mathematical expression of the first loss function is:

[0109] L1=(QG) 2

[0110] Among them, L1 represents the first loss, Q represents the traffic flow label, and G represents the traffic flow prediction information.

[0111] 4. Based on the preset second loss function, the predicted time, and the corresponding real time, a second loss is obtained.

[0112] The mathematical expression of the second loss function is:

[0113] L2=(T actual -T predicted ) 2

[0114] Among them, L2 represents the second loss, T actual Indicates real time, T predicted Indicates the prediction time.

[0115] 5. Determine the product of the first loss and a preset first weight as a first intermediate value, and determine the product of the second loss and a preset second weight as a second intermediate value, and the sum of the first weight and the second weight is 1.

[0116] 6. Determine the sum of the first intermediate value and the second intermediate value as the final loss.

[0117] The mathematical expression of the final loss is:

[0118] L total =λ·L1+(1-λ)·L2

[0119] Among them, λ is the preset hyperparameter, that is, the first weight, and 1-λ is the second weight. By adjusting the hyperparameter λ, the focus of the model between traffic flow prediction accuracy and emergency vehicle priority can be controlled, and “·” represents multiplication.

[0120] 7. Based on the final loss, the traffic dispatch model is trained. Through the above steps, the traffic dispatch model can be optimized well, thereby achieving accurate prediction.

[0121] The emergency vehicle priority dispatch system provided by the present invention is described below. The emergency vehicle priority dispatch system described below and the emergency vehicle priority dispatch method described above can be referred to each other.

[0122] Please refer to Figure 3 The emergency vehicle priority dispatching system provided in this embodiment includes:

[0123] The feature acquisition module 310 is used to acquire road network features and emergency vehicle features, wherein the road network features include: road intersection information, road segment information, and the number of vehicles on each road segment; the emergency vehicle features include: the speed, location, route, and priority features of the emergency vehicle, wherein the priority features include the type of emergency vehicle and the type of mission;

[0124] A feature fusion module 320 is used to input the road network features and the emergency vehicle features into a preset graph convolutional network, so as to use the hard attention mechanism in the graph convolutional network to allocate attention weights to the nodes corresponding to each road intersection, and obtain target features output by the graph convolutional network, wherein the target features include weighted road network features;

[0125] A prediction module 330 is used to perform traffic flow prediction based on the target characteristics to obtain traffic flow prediction results and the time required for emergency vehicles to pass through the road intersection;

[0126] The control module 340 is used to obtain a target strategy based on the traffic flow prediction result, the time required for the emergency vehicle to pass the road intersection, and the preset signal light control strategy; and perform signal light control based on the target strategy. The emergency vehicle priority dispatching system in this embodiment can achieve accurate prediction of future traffic flow, and can better ensure the priority passage of emergency vehicles, avoid delays in the mission of emergency vehicles, and has low cost.

[0127] In some embodiments, the feature acquisition module 310 is specifically used to construct an undirected weighted graph of the target road network, the undirected weighted graph comprising: a node set, an edge set, and an adjacency matrix, the node set comprising a plurality of node indexes, the node indexes corresponding one-to-one to the road intersections of the target road network, the edge set comprising a plurality of edges, the edges corresponding one-to-one to the road segments connecting the road intersections in the target road network;

[0128] Acquiring vehicle quantity information, the vehicle quantity information including the number of vehicles on each road segment, and integrating the undirected weighted graph and the vehicle quantity information to obtain integrated information;

[0129] Feature extraction is performed on the integrated information to obtain the road network features.

[0130] In some embodiments, the prediction module 330 is specifically used to obtain a historical target feature set, wherein the historical target feature set includes the target feature corresponding to each historical moment in a preset historical time series, and the historical time series includes multiple historical moments;

[0131] Inputting the historical target feature set into a preset gated recurrent unit to perform feature extraction to obtain a hidden state vector at each historical moment;

[0132] Based on the hidden state vector, and the reset gate and the update gate in the gated recurrent unit, a target hidden state matrix is ​​obtained, wherein the target hidden state matrix includes the final hidden state outputted by the hidden state vector at each historical moment after passing through the reset gate and the update gate;

[0133] Traffic flow prediction is performed according to the target hidden state matrix to obtain the traffic flow prediction result and the time required for emergency vehicles to pass through the road intersection.

[0134] In some embodiments, the prediction module 330 is further specifically configured to determine the current hidden state vector as a target hidden state vector, and determine a road segment matrix at a next moment corresponding to the target hidden state vector as a target road segment matrix, wherein the road segment matrix includes the number of vehicles in each road segment;

[0135] Inputting the target hidden state vector and the target road segment matrix into the reset gate to obtain a candidate hidden state vector;

[0136] Inputting the candidate hidden state vector and the target hidden state vector into the update gate to obtain the final hidden state;

[0137] The target hidden state matrix is ​​obtained by acquiring the final hidden states corresponding to each of the multiple hidden state vectors.

[0138] In some embodiments, the prediction module 330 is further specifically used to obtain an importance weight vector of each final hidden state in the target hidden state matrix based on the target hidden state matrix and a preset soft attention mechanism;

[0139] Using the importance weight vector, weighted aggregation is performed on the target hidden state matrix to obtain a final feature vector;

[0140] Based on the final feature vector, traffic flow prediction is performed to obtain the traffic flow prediction result and the time required for the emergency vehicle to pass through the road intersection.

[0141] In some embodiments, the control module 340 is specifically used to obtain the target strategy according to the traffic flow prediction result and the signal light control strategy if the time required for the emergency vehicle to pass through the road intersection is a null value;

[0142] If there is only one emergency vehicle, the target strategy is obtained according to the traffic flow prediction result, the signal light control strategy, and the time required for the emergency vehicle to pass through the road intersection;

[0143] If there are multiple emergency vehicles, the target strategy is obtained according to the traffic flow prediction result, the signal light control strategy, the speed, location, route, and priority characteristics of the emergency vehicles.

[0144] In some embodiments, it further includes: a training module, used to obtain a training set, the training set includes feature samples at multiple historical moments, and real labels corresponding to the feature samples, the feature samples include road network feature samples and emergency vehicle feature samples, and the real labels include: traffic flow labels and real time labels required for emergency vehicles to pass through road intersections;

[0145] Inputting the training set into the traffic dispatch model to obtain traffic flow prediction information output by the traffic dispatch model and the predicted time required for emergency vehicles to pass through the road intersection;

[0146] Based on a preset first loss function, the traffic flow prediction information, and a corresponding traffic flow label, a first loss is obtained;

[0147] Obtaining a second loss based on a preset second loss function, the predicted time, and the corresponding real time;

[0148] Determine a product of a first loss and a preset first weight as a first intermediate value, and determine a product of a second loss and a preset second weight as a second intermediate value, wherein a sum of the first weight and the second weight is 1;

[0149] determining a sum of the first intermediate value and the second intermediate value as a final loss;

[0150] The traffic scheduling model is trained based on the final loss.

[0151] In some embodiments, an electronic device is also provided, which may be a server, and its internal structure is shown in FIG. Figure 4 As shown. The electronic device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, the functions or steps on the server side of the above method are implemented.

[0152] In some embodiments, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: obtaining road network features and emergency vehicle features, the road network features comprising: road intersection information, road segment information, and the number of vehicles on each road segment, the emergency vehicle features comprising: the speed, location, route, and priority features of the emergency vehicle, the priority features comprising the type of emergency vehicle and the type of mission; inputting the road network features and the emergency vehicle features into a preset graph convolutional network, and utilizing the hard attention mechanism in the graph convolutional network to assign attention weights to the nodes corresponding to each road intersection, and obtaining target features output by the graph convolutional network, the target features comprising weighted road network features; performing traffic flow prediction based on the target features, and obtaining traffic flow prediction results and the time required for the emergency vehicle to pass through the road intersection; obtaining a target strategy based on the traffic flow prediction results, the time required for the emergency vehicle to pass through the road intersection, and a preset signal light control strategy; and performing signal light control based on the target strategy.

[0153] In some embodiments, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: obtaining road network features and emergency vehicle features, the road network features including: road intersection information, road segment information, and the number of vehicles on each road segment, the emergency vehicle features including: the speed, location, route, and priority features of the emergency vehicle, and the priority features including the type of emergency vehicle and the type of mission; inputting the road network features and the emergency vehicle features into a preset graph convolutional network, so as to utilize the hard attention mechanism in the graph convolutional network to assign attention weights to the nodes corresponding to each road intersection, and obtain target features output by the graph convolutional network, the target features including weighted road network features; performing traffic flow prediction based on the target features, and obtaining traffic flow prediction results and the time required for the emergency vehicle to pass through the road intersection; obtaining a target strategy based on the traffic flow prediction results, the time required for the emergency vehicle to pass through the road intersection, and the preset signal light control strategy; and performing signal light control based on the target strategy.

[0154] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or electronic device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

[0155] The flow chart and block diagram in the accompanying drawings illustrate the possible implementation architecture, function and operation of the method and computer program product according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the module, the program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented with an urgent hardware-based system that performs a specified function or operation, or can be implemented with a combination of urgent hardware and computer instructions.

[0156] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for dispatching emergency vehicles with priority, characterized in that: include: Acquire road network characteristics and emergency vehicle characteristics, wherein the road network characteristics include: road intersection information, road segment information, and the number of vehicles on each road segment, and the emergency vehicle characteristics include: the speed, location, route, and priority characteristics of the emergency vehicle, wherein the priority characteristics include the type of emergency vehicle and the type of mission; Inputting the road network features and the emergency vehicle features into a preset graph convolutional network, and using a hard attention mechanism in the graph convolutional network to perform attention weight allocation on nodes corresponding to each road intersection, thereby obtaining a target feature output by the graph convolutional network, wherein the target feature includes a weighted road network feature; According to the target characteristics, traffic flow prediction is performed to obtain traffic flow prediction results and the time required for emergency vehicles to pass through the road intersection; According to the traffic flow prediction results, the time required for emergency vehicles to pass through the road intersection, and the preset signal light control strategy, a target strategy is obtained; based on the target strategy, the signal light control is performed.

2. The emergency vehicle priority dispatching method according to claim 1, characterized in that: The steps to obtain road network characteristics include: Constructing an undirected weighted graph of a target road network, the undirected weighted graph comprising: a node set, an edge set, and an adjacency matrix, the node set comprising a plurality of node indexes, the node indexes corresponding one-to-one to road intersections of the target road network, the edge set comprising a plurality of edges, the edges corresponding one-to-one to road segments connecting road intersections in the target road network; Acquiring vehicle quantity information, the vehicle quantity information including the number of vehicles on each road segment, and integrating the undirected weighted graph and the vehicle quantity information to obtain integrated information; Feature extraction is performed on the integrated information to obtain the road network features.

3. The emergency vehicle priority dispatching method according to claim 1, characterized in that: According to the target characteristics, the steps of performing traffic flow prediction and obtaining traffic flow prediction results and the time required for emergency vehicles to pass through the road intersection include: Acquire a historical target feature set, wherein the historical target feature set includes the target feature corresponding to each historical moment in a preset historical time sequence, wherein the historical time sequence includes multiple historical moments; Inputting the historical target feature set into a preset gated recurrent unit to perform feature extraction to obtain a hidden state vector at each historical moment; Based on the hidden state vector, and the reset gate and the update gate in the gated recurrent unit, a target hidden state matrix is ​​obtained, wherein the target hidden state matrix includes the final hidden state outputted by the hidden state vector at each historical moment after passing through the reset gate and the update gate; Traffic flow prediction is performed according to the target hidden state matrix to obtain the traffic flow prediction result and the time required for emergency vehicles to pass through the road intersection.

4. The emergency vehicle priority dispatching method according to claim 3, characterized in that: Based on the hidden state vector, and the reset gate and the update gate in the gated recurrent unit, the step of obtaining a target hidden state matrix includes: Determine the current hidden state vector as a target hidden state vector, and determine the road segment matrix at the next moment corresponding to the target hidden state vector as a target road segment matrix, wherein the road segment matrix includes the number of vehicles in each road segment; Inputting the target hidden state vector and the target road segment matrix into the reset gate to obtain a candidate hidden state vector; Inputting the candidate hidden state vector and the target hidden state vector into the update gate to obtain the final hidden state; The target hidden state matrix is ​​obtained by acquiring the final hidden states corresponding to each of the multiple hidden state vectors.

5. The emergency vehicle priority dispatching method according to claim 3, characterized in that: The steps of performing traffic flow prediction according to the target hidden state matrix and obtaining the traffic flow prediction result and the time required for the emergency vehicle to pass through the road intersection include: Based on the target hidden state matrix and a preset soft attention mechanism, obtaining an importance weight vector of each final hidden state in the target hidden state matrix; Using the importance weight vector, weighted aggregation is performed on the target hidden state matrix to obtain a final feature vector; Based on the final feature vector, traffic flow prediction is performed to obtain the traffic flow prediction result and the time required for the emergency vehicle to pass through the road intersection.

6. The emergency vehicle priority dispatching method according to claim 1, characterized in that: According to the traffic flow prediction result, the time required for the emergency vehicle to pass the road intersection, and the preset signal light control strategy, the step of obtaining the target strategy includes: If the time required for the emergency vehicle to pass through the road intersection is a null value, then obtaining the target strategy according to the traffic flow prediction result and the signal light control strategy; If there is only one emergency vehicle, the target strategy is obtained according to the traffic flow prediction result, the signal light control strategy, and the time required for the emergency vehicle to pass through the road intersection; If there are multiple emergency vehicles, the target strategy is obtained according to the traffic flow prediction result, the signal light control strategy, the speed, location, route, and priority characteristics of the emergency vehicles.

7. The emergency vehicle priority dispatching method according to claim 3, characterized in that: The graph convolutional network and the gated recurrent unit both belong to a traffic scheduling model, and the training steps of the traffic scheduling model include: Acquire a training set, the training set including feature samples at multiple historical moments and real labels corresponding to the feature samples, the feature samples including road network feature samples and emergency vehicle feature samples, the real labels including: traffic flow labels and real time labels required for emergency vehicles to pass through road intersections; Inputting the training set into the traffic dispatch model to obtain traffic flow prediction information output by the traffic dispatch model and the predicted time required for emergency vehicles to pass through the road intersection; Based on a preset first loss function, the traffic flow prediction information, and a corresponding traffic flow label, a first loss is obtained; Obtaining a second loss based on a preset second loss function, the predicted time, and the corresponding real time; Determine a product of a first loss and a preset first weight as a first intermediate value, and determine a product of a second loss and a preset second weight as a second intermediate value, wherein a sum of the first weight and the second weight is 1; determining a sum of the first intermediate value and the second intermediate value as a final loss; The traffic scheduling model is trained based on the final loss.

8. An emergency vehicle priority dispatch system, characterized in that: include: A feature acquisition module, used to acquire road network features and emergency vehicle features, wherein the road network features include: road intersection information, road segment information, and the number of vehicles on each road segment, and the emergency vehicle features include: the speed, location, route, and priority features of the emergency vehicle, wherein the priority features include the type of emergency vehicle and the type of mission; A feature fusion module, used to input the road network features and the emergency vehicle features into a preset graph convolutional network, so as to use the hard attention mechanism in the graph convolutional network to allocate attention weights to the nodes corresponding to each road intersection, and obtain target features output by the graph convolutional network, wherein the target features include weighted road network features; A prediction module, used to perform traffic flow prediction based on the target characteristics, and obtain traffic flow prediction results and the time required for emergency vehicles to pass through the road intersection; The control module is used to obtain a target strategy based on the traffic flow prediction result, the time required for an emergency vehicle to pass through a road intersection, and a preset signal light control strategy; and perform signal light control based on the target strategy.

9. An electronic device, characterized in that: It comprises a processor, a memory and a communication bus; the communication bus is used to connect the processor and the memory; the processor is used to execute the computer program stored in the memory to implement the emergency vehicle priority dispatch method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is used to enable a computer to execute the emergency vehicle priority dispatch method as described in any one of claims 1 to 7.