A travel time prediction method fusing uncertainty modeling
By integrating uncertainty modeling methods and utilizing multi-layer graph convolutional neural networks and quantile regression, the problem of insufficient spatiotemporal dynamics in travel time prediction is solved, resulting in more accurate and reliable predictions and providing upper and lower bounds and error ranges for time prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING JIAOTONG UNIV
- Filing Date
- 2023-03-21
- Publication Date
- 2026-05-01
AI Technical Summary
Existing methods for travel time prediction fail to adequately consider the complex spatiotemporal dynamics, resulting in insufficient prediction accuracy and precision, and an inability to effectively quantify the uncertainty of prediction results.
By employing a method that integrates uncertainty modeling, a spatiotemporal data integration module, a spatiotemporal modeling and coding module, a mutual information module, and an uncertainty fusion module are constructed. Combined with a multi-layer graph convolutional neural network and quantile regression, the upper and lower bounds of arrival time are quantified, providing more reliable prediction results.
It improves the accuracy and reliability of travel time prediction, provides the error range of specific time results, offers users more accurate decision-making basis, and enhances service level.
Smart Images

Figure CN116502778B_ABST
Abstract
Description
A method for travel time prediction that incorporates uncertainty modeling Technical Field
[0001] This invention belongs to the field of intelligent transportation and navigation, and specifically relates to a travel time prediction method that integrates uncertainty modeling. Background Technology
[0002] Estimated Time of Arrival (ETA) is the estimated travel time between a point of origin and a destination. It predicts the time required to reach a specified destination from a given point of origin at a future request time by analyzing historical traffic data and analyzing historical patterns in route travel times. It is a crucial location-based service in digital maps and navigation systems, and a vital backend service in ride-hailing applications, becoming a core component influencing decisions at different stages of the online ride-hailing process. As ETA becomes increasingly important and widely used, there is a continuous need to improve its accuracy and precision.
[0003] Currently, the common application of ETA (Estimated Time of Arrival) is to input the origin and destination points, and then generate the corresponding path based on the service provider's specific path decision algorithm, outputting the estimated arrival time. With the development of deep learning, more and more deep learning methods are being applied to the ETA problem. For example, some scholars have proposed a deep learning-based generalized and deep-loop learning model, which overcomes the shortcomings of existing methods such as insufficient data coverage, weak generalization ability, and insufficient information utilization by proposing such a systematic machine learning solution. However, existing ETA prediction methods do not fully consider the complex spatiotemporal dynamics, and the accuracy and precision of the predictions still need to be improved. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, the present invention aims to provide a travel time prediction method that integrates uncertainty modeling to quantify the uncertainty of the time prediction results. In addition to providing specific time results, it also outputs the error range of the results, providing users with more reliable information, helping customers make more accurate decisions when choosing routes, and improving the service level for users.
[0005] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:
[0006] A travel time prediction method incorporating uncertainty modeling includes:
[0007] Step S1: Obtain the static road network characteristics, dynamic traffic characteristics, and external characteristics of road segments in the area to be predicted;
[0008] Step S2: Based on the map matching algorithm, the sampling sequence under the vehicle's GPS coordinates is converted into a road segment sequence on the electronic map, and a directed road network graph G is constructed based on the road segment sequence;
[0009] Step S3, define a route R = (t, L, F) in the directed graph G of the road network, where t is the requested time and L = [l1, l2, l3, ..., l N ] represents the set of road segments in route R, N is the number of road segments in route R, and F is the external characteristics of all road segments in route R;
[0010] Step S4: Find the feature values corresponding to the road segments in route R from the static road network features, dynamic traffic features, and external road segment features to form route features, which are used as input data for the model; the route features include: request time, road segment type, road segment length, road segment speed limit, number of lanes in the road segment, driving direction, road segment relationship, vehicle speed, and traffic flow.
[0011] Step S5: Construct a prediction model. The constructed prediction model includes a spatiotemporal data integration module, a spatiotemporal modeling and coding module, a mutual information module, an uncertainty fusion module, and an output layer.
[0012] Step S6: The spatiotemporal data integration module preprocesses the input data, constructing initial node embeddings and initial edge embeddings based on feature values, wherein the dimension of the initial node embedding is D. node The initial edge embedding dimension is D. edge ;
[0013] Step S7: The initial node embedding and initial edge embedding are used as the initial values of the spatiotemporal modeling coding module. The interaction between the node embedding and edge embedding is modeled through each layer of the graph convolutional network in the spatiotemporal modeling coding module, and the node embedding and edge embedding are updated simultaneously to obtain the iterative node embedding P. e ;
[0014] Step S8: The mutual information module performs location encoding on the set L of road segments in route R, using a location encoding matrix. Provide sequence information to construct matrix PE; then use position-encoded matrix PE and node embedding P e Construct route embedding R e Embedded by route Multiple D-dimensional route embedding vectors are generated, and multi-head attention is applied before outputting the route embeddings. Then embed R into the output route. e Perform average pooling with an N×1 pooling layer. The resulting arrival time representation has a 1×D dimension, where D is the specified dimension. Represents a number field of size N×D;
[0015] Step S9: The uncertain fusion module processes the arrival time representation, obtains the arrival time and its upper and lower bounds through a linear layer, and then corrects the arrival time and its upper and lower bounds through a loss function to obtain the predicted arrival time and its upper and lower bounds.
[0016] Step S10: The output layer outputs the predicted arrival time and its upper and lower bounds.
[0017] In a preferred embodiment of the present invention, the prediction model constructed in step S5 includes:
[0018] The spatiotemporal data integration module includes a matrix encoding component and a matrix operation component; the spatiotemporal modeling encoding module consists of a multi-layer graph convolutional neural network, used to extract the spatiotemporal correlation of the data and output the corresponding edge embeddings and node embeddings; the mutual information module includes a position encoder, a route embedding calculation component, a multi-head attention component, and a pooling layer; the uncertainty fusion module includes a linear layer and a loss function calculation component.
[0019] In a preferred embodiment of the present invention, the static road network features include road segment type, road segment length, road segment speed limit, number of lanes in the road segment, driving direction, and road segment relationship; the dynamic traffic features include vehicle speed; and the external features of the road segment include traffic flow.
[0020] In a preferred embodiment of the present invention, the directed graph G of the road network is defined as G = (V, E) and l ∈ V, e ij ∈E, where l∈V are nodes in the directed graph, representing a road segment, and V is the set of nodes in the directed graph G, representing the set of road segments; e ij ∈E is an edge in a directed graph, representing a path segment l. i and road section l j They are connected, if road segment l i and l j If they are connected, then the edge e between them is... ij If road segment l exists i and l j If they are not connected, then the edge e between them... ij It does not exist; E is the set of edges in the directed graph G, representing the set of adjacency relationships between road segments.
[0021] As a preferred embodiment of the present invention, the external feature F of the road segment in step S3 is obtained according to the route R; when the external feature F is a traffic flow feature, the specific operation is as follows: the corresponding area is obtained according to the latitude and longitude range of the road network, and then the area is divided into grids of equal size according to a predetermined size. At the requested time t, the number of vehicles in all grids passed by the route R is queried, and the traffic flow involved in all road segments is counted and added to F as a traffic flow feature statistic.
[0022] In a preferred embodiment of the present invention, in step S6, the features related to the initial node embedding include: request time, road segment type, road segment length, road segment speed limit, number of lanes in the road segment, driving direction, vehicle speed, and traffic flow. The features related to the initial edge embedding include road segment relationships.
[0023] In a preferred embodiment of the present invention, step S7, in each layer of the graph convolutional network, involves the following process of information aggregation graph convolution of nodes and edges:
[0024] Input initial node embedding:
[0025]
[0026] In equation (1), This indicates a dimension size of N×D node The number field, P 0 Indicates initial node embedding; and
[0027] Initial edge embedding:
[0028]
[0029] In equation (2), This indicates a dimension size of N×D edge The number field, S 0 Indicates the initial edge embedding;
[0030] Iterate through node embedding and edge embedding separately;
[0031] The operation formula for node embedding iteration is as follows:
[0032]
[0033] In equation (3), p i m p represents the embedding of the i-th node in the m-th layer graph convolution. i m+1 This represents the embedding of the i-th node in the (m+1)-th layer graph convolution. N represents the edge embedding between the i-th node and the j-th node in the m-th layer graph convolution. i Let Agg represent the set of neighbors centered at node i, and let Agg(·) be the aggregation function. The update function f consists of nonlinear transformations, specifically defined as follows:
[0034]
[0035] In equation (4), ReLU represents the activation function for training a multi-layer graph convolutional network, BN represents the batch normalization operation, σ represents the Sigmoid activation function, and ⊙ represents the Hadamard product. These are learnable parameters;
[0036] The operation formula for edge embedding iteration is as follows:
[0037]
[0038] In equation (5), s ij m+1 p represents the edge embedding between the i-th node and the j-th node in the (m+1)-th layer graph convolution. j m The function g represents the embedding of the j-th node in the m-th layer graph convolution; the function g represents the nonlinear transformation, specifically:
[0039]
[0040] In equation (6), These are learnable parameters;
[0041] The final node embeddings and final edge embeddings obtained after graph convolution are:
[0042] Final node embedding:
[0043] Final edge embedding:
[0044] In a preferred embodiment of the present invention, in step S8, matrix PE is constructed, and the elements in row a, column 2b, and column (2b+1) of PE are:
[0045]
[0046]
[0047] In equations (7-1) and (7-2), sin and cos represent the sine and cosine functions, respectively.
[0048] In a preferred embodiment of the present invention, step S8 employs a position encoding matrix PE and a node embedding P. e Construct route embedding R e Specifically, by embedding P through nodes e The route embedding R is obtained by adding the location encoding matrix. e :
[0049]
[0050] In equation (8), Indicates a join operation, R e Embed the route output by the model.
[0051] In a preferred embodiment of the present invention, step S9 employs quantile regression for uncertainty analysis, wherein the quantile regression loss function is as follows:
[0052]
[0053] In equation (10), y represents the actual arrival time. Indicates the lower bound of the prediction. Represents the predicted arrival time. q represents the upper bound of the prediction. l q f q u , where each represents its corresponding quantile. This invention has the following beneficial effects:
[0054] The travel time prediction method based on uncertainty modeling provided in this invention, compared to previous ETA models, employs a multi-layer graph convolutional fusion attention mechanism to model travel time, resulting in more accurate predictions. By using quantile regression for uncertainty modeling, it provides upper and lower bounds and the mean of arrival times, quantifying the uncertainty of the time prediction results. In addition to providing specific time results, it also outputs the error range of the results, providing users with more reliable information, helping customers make more accurate decisions when choosing routes, and improving service levels for users. At the same time, the uncertainty quantification results can also serve as an evaluation indicator for ETA models, contributing to the development of the ETA field.
[0055] Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0056] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 is a flowchart of the travel time prediction method that incorporates uncertainty modeling according to an embodiment of the present invention;
[0058] Figure 2 is a schematic diagram of the road network to be predicted in an embodiment of the present invention;
[0059] Figure 3 is a schematic diagram of a directed graph of a road network constructed based on the road network shown in Figure 2;
[0060] Figure 4 is a schematic diagram of the travel time prediction model constructed in the embodiment of the present invention. Detailed Implementation
[0061] After discovering the aforementioned problems, the inventors of this application conducted in-depth research on existing ETA prediction methods. The research revealed that some scholars have proposed multi-task representation learning to study OD (Original Distance) travel time estimation, while others have established DeepGTT models to study path time prediction under real-time traffic conditions, providing a temporal probability density distribution to directly estimate the travel time of the entire path. Still others have proposed an end-to-end deep learning framework for travel time estimation, integrating geographic information into classical convolutions and performing geographic convolution operations. However, none of these methods consider the complex spatiotemporal dynamics of real road networks, thus failing to quantify the uncertainty, or fluctuation range, of the prediction results. In practical applications, uncertainty quantification is crucial for ETA problems. For example, traffic flow correlation changes dynamically over time; while peak hours typically occur in the morning and evening, their exact times can vary significantly from day to day and month to month. Congestion on one side road can affect the next major intersection, something maps often cannot monitor in real time. Furthermore, factors such as road quality, speed limits, accidents, and road closures all complicate the prediction model, resulting in significant uncertainty in the estimated arrival time.
[0062] For example, in taxi-hailing services, the platform provides estimated arrival times for accepted taxis at the user's location and at the destination. In map navigation services, the platform offers several routes and corresponding time estimates based on the user's selected destination for decision-making. Route time prediction is indispensable in these services, but existing ETA models can only provide a single point estimate for this task. Furthermore, due to uncertainties such as the dynamic and complex characteristics of road conditions, the results often deviate from reality.
[0063] Therefore, simply estimating the expected arrival time is not always sufficient; forecasting uncertainty is also essential. The significance of uncertainty quantification lies in providing the upper and lower bounds of the possible fluctuations of the point estimate of the obtained travel time forecast, and giving a confidence interval. This allows users to not only see the expected value when making travel mode choices, but also to understand the probability of different values occurring, providing a reliable basis for users to make the wisest choice.
[0064] It should be noted that the defects in the above-mentioned prior art solutions are all the result of the inventors' practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present invention in the following text should be the inventors' contributions to the present invention.
[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. It should be noted that, without conflict, the embodiments and features in the embodiments of the present invention can also be combined with each other.
[0066] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In the description of this invention, the terms "first," "second," "third," "fourth," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0067] Based on the above analysis, this application provides a travel time prediction method that integrates uncertainty modeling. For a given route, it provides both point estimates and uncertainty quantification for travel time prediction. For the first time, uncertainty quantification is integrated with ETA prediction, which improves accuracy and quantifies uncertainty, providing more comprehensive and reliable information for travel.
[0068] As shown in Figure 1, the travel time prediction method incorporating uncertainty modeling includes the following steps:
[0069] Step S1: Obtain the static road network characteristics, dynamic traffic characteristics, and external characteristics of road segments in the area to be predicted.
[0070] In this step, the static road network features are characteristics of data that do not change over time, including road segment type, road segment length, road segment speed limit, number of lanes per segment, travel direction, and road segment relationships; the dynamic traffic features are characteristics of data that change over time, including vehicle speed; and the external features of the road segments include traffic flow. These road segment features can be obtained from traffic big data or trip trajectory data from urban ride-hailing operators.
[0071] Step S2: Based on the map matching algorithm, the sampling sequence under the vehicle's GPS coordinates is converted into a road segment sequence on the electronic map, and a directed road network graph G is constructed based on the road segment sequence.
[0072] In this step, as shown in Figures 2 and 3, the directed graph G of the road network is defined as G = (V, E) and l ∈ V, e ij ∈E, where l is a node in the directed graph G, representing a road segment, and V is the set of nodes in the directed graph G, representing the set of road segments; e ij Let l be an edge in a directed graph G, representing a road segment l. i and road section l j They are connected, if road segment l i and l j If they are connected, then the edge e between them is... ij If road segment l exists i and l j If they are not connected, then the edge e between them... ij No, E is the set of edges in the directed graph G, representing the set of adjacency relationships between road segments, usually represented by an adjacency matrix.
[0073] Step S3, define a route R = (t, L, F) in the directed graph G of the road network, where t is the requested time and L = [l1, l2, l3, ..., l N Let ] represent the set of road segments in route R, N be the number of road segments in route R, and F be the external characteristics of all road segments in route R, such as traffic flow. Typically, a route contains dozens or hundreds of road segments. For a given starting point and destination, the navigation service generates multiple candidate routes based on the corresponding road network structure.
[0074] In this step, the external feature F of the road segment is obtained based on the route R. Taking the traffic flow feature in the external feature F as an example, the specific operation is as follows: the corresponding area is obtained according to the latitude and longitude range of the road network, and then the area is divided into grids of equal size according to a predetermined size. At the requested time t, the number of vehicles in all grids passed by the route R is queried, and the traffic flow of all road segments involved is counted and added to F as a traffic flow feature statistic.
[0075] Step S4: Find the feature values corresponding to the road segments in route R from the static road network features, dynamic traffic features, and external road segment features to form route features, which are used as input data for the model. The route features include: request time t, road segment type, road segment length, road segment speed limit, number of lanes in the road segment, driving direction, road segment relationship, vehicle speed, and traffic flow, etc.
[0076] In this step, the route features mentioned above are selected based on the model features in this embodiment, which not only fully reflects the requirements of the model, but also fully considers the factors affecting the route travel time.
[0077] Step S5: Construct a prediction model. The constructed prediction model includes a spatiotemporal data integration module, a spatiotemporal modeling and coding module, a mutual information module, an uncertainty fusion module, and an output layer.
[0078] As shown in Figure 4, in this step, the spatiotemporal data integration module of the constructed model includes a matrix encoding component and a matrix operation component; the spatiotemporal modeling encoding module consists of a multi-layer graph convolutional neural network, used to extract the spatiotemporal correlation of the data and output the corresponding edge and node embeddings; the mutual information module includes a position encoder, a route embedding calculation component, a multi-head attention component, and a pooling layer; the uncertainty fusion module includes an uncertainty quantization component and a linear layer. The uncertainty quantization component is fused into the model in combination with a specific uncertainty quantization method (such as quantile regression), and the linear layer maps the prediction results to obtain upper and lower bounds based on the uncertainty quantization component, thereby realizing interval prediction.
[0079] Step S6: The spatiotemporal data integration module preprocesses the input data, the matrix encoding component preprocesses the feature values, and the matrix operation component constructs initial node embeddings and initial edge embeddings based on the feature values. The dimension of the initial node embedding is D. node The initial edge embedding dimension is D. edge The D node and D edge The value of is a positive integer, and the specific value is related to the static road network characteristics, dynamic traffic characteristics, and external characteristics of the road segment.
[0080] In this step, the features related to the initial node embedding include: request time, road segment type, road segment length, road segment speed limit, number of lanes in the road segment, driving direction, vehicle speed, and traffic flow. The features related to the initial edge embedding include road segment relationships.
[0081] Step S7: The initial node embedding and initial edge embedding are used as the initial values of the spatiotemporal modeling coding module. The interaction between the node embedding and edge embedding is modeled through each layer of the graph convolutional network in the spatiotemporal modeling coding module, and the node embedding and edge embedding are updated simultaneously to obtain the iterative node embedding P. e .
[0082] In this step, the process of aggregating node and edge information into graph convolution in each layer of the graph convolutional network is as follows:
[0083] Input initial node embedding:
[0084]
[0085] In equation (1), This indicates a dimension size of N×D node The number field, P 0 Indicates initial node embedding; and
[0086] Initial edge embedding:
[0087]
[0088] In equation (2), This indicates a dimension size of N×D edge The number field, S 0 This indicates the initial edge embedding.
[0089] Iterate through node embedding and edge embedding respectively.
[0090] The operation formula for node embedding iteration is as follows:
[0091]
[0092] In equation (3), p i m p represents the embedding of the i-th node in the m-th layer graph convolution. i m+1 This represents the embedding of the i-th node in the (m+1)-th layer graph convolution. N represents the edge embedding between the i-th node and the j-th node in the m-th layer graph convolution. i Let Agg represent the set of neighbors centered at node i, and let Agg(·) be the aggregation function. The update function f consists of nonlinear transformations, specifically defined as follows:
[0093]
[0094] In equation (4), ReLU represents the activation function for training a multi-layer graph convolutional network, BN represents the batch normalization operation, σ represents the Sigmoid activation function, and ⊙ represents the Hadamard product. These are learnable parameters. By using the mean and variance of mini-batches to adjust the intermediate outputs of the neural network, the data becomes more stable, addressing issues such as slow training and small learning rates caused by constantly changing data distributions.
[0095] The operation formula for edge embedding iteration is as follows:
[0096]
[0097] In equation (5), s ij m+1 p represents the edge embedding between the i-th node and the j-th node in the (m+1)-th layer graph convolution. j m This represents the embedding of the j-th node in the m-th layer graph convolution. The function g represents a nonlinear transformation, specifically:
[0098]
[0099] In equation (6), These are learnable parameters.
[0100] The final node embeddings and final edge embeddings obtained after graph convolution are:
[0101] Final node embedding:
[0102] Final edge embedding:
[0103] Where D is the specified dimension size. This represents a number field with dimensions of N×D.
[0104] Step S8, the mutual information module performs position encoding on the set of road segments L in route R using a position encoder, and uses a position encoding matrix. Provide the order information and construct matrix PE. The elements in row a, column 2b, and column (2b+1) of PE are:
[0105]
[0106]
[0107] In equations (7-1) and (7-2), sin and cos represent the sine and cosine functions, respectively.
[0108] The route embedding calculation component uses node embedding P. e Construct route embedding R e Specifically, by embedding P through nodes e The route embedding R is obtained by adding the location encoding matrix. e :
[0109]
[0110] In equation (8), Indicates a join operation, R e Embed the route output by the model.
[0111] Embedded by route Multiple D-dimensional route embedding vectors are generated, and multi-head attention is applied before outputting the route embeddings.
[0112] In this step, the multi-head attention component is specifically defined as follows:
[0113]
[0114]
[0115]
[0116] In equation (9), Attention represents the attention calculation function, Q represents the query vector, K represents the key vector, and V represents the value vector, which is derived from the route embedding R. e It is constructed through linear layers, where softmax represents the normalized exponential function; MHSelfAttention represents multi-head attention computation, head1, ..., head2. h Let represent the 1st, ..., hth heads of multi-head attention, where h is the number of heads receiving attention. t This represents the t-th head of multi-head attention. Let W be the mapping matrix acting on Q, K, and V of the t-th head respectively. O This is the final output mapping matrix. The final route embedding R is obtained and output by the multi-head attention mechanism MHSelfAttention. e ′.
[0117] The pooling layer then embeds R into the output route. e Perform average pooling, then embed R into the output route. e Perform average pooling, with the pooling layer having a dimension of N×1, resulting in an arrival time representation with a dimension of 1×D.
[0118] Step S9: The uncertain fusion module processes the arrival time representation, obtains the arrival time and its upper and lower bounds through a linear layer, and then corrects the arrival time and its upper and lower bounds through a loss function.
[0119] In this step, for the task of predicting arrival time, not only is a single time estimate provided, but also a range of arrival times and upper and lower bounds for the predicted arrival time results, thus achieving interval prediction. The confidence interval of the prediction result is given through interval prediction, reflecting the possible error range of the prediction result. Then, the obtained arrival time and its upper and lower bounds are corrected using a loss function. Preferably, the loss function adopts a quantile regression method, wherein the quantile regression loss function is as follows:
[0120]
[0121] In equation (10), y represents the actual arrival time. Indicates the lower bound of the prediction. Represents the predicted arrival time. q represents the upper bound of the prediction. l qf q u , where represents their respective quantiles.
[0122] Step S10: The output layer outputs the predicted arrival time and its upper and lower bounds.
[0123] As can be seen from the above technical solutions, the travel time prediction method based on fusion uncertainty modeling provided in this invention, compared with previous ETA models, adopts a multi-layer graph convolution fusion attention mechanism to model travel time, making the prediction results more accurate. By using quantile regression for uncertainty modeling, it provides upper and lower bounds and the mean of arrival time, quantifying the uncertainty of the time prediction results. In addition to providing specific time results, it also outputs the error range of the results, providing users with more reliable information, helping customers make more accurate decisions when choosing routes, and improving the service level for users. At the same time, the uncertainty quantification results can also be used as an evaluation index for ETA models, which is conducive to the development of the ETA field.
[0124] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed, and is not intended to limit the scope of the claimed invention, but merely to illustrate preferred embodiments of the invention. Those skilled in the art should understand that the scope of the invention is not limited to the specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
Claims
1. A travel time prediction method incorporating uncertainty modeling, characterized in that, The prediction method includes: Step S1, obtaining the static road network features, dynamic traffic features, and external features of road segments in the area to be predicted; Step S2, based on a map matching algorithm, converting the sampling sequence under vehicle GPS coordinates into a road segment sequence on an electronic map, and constructing a directed road network graph G based on the road segment sequence; Step S3, defining routes R = (t, L, F) in the directed road network graph G, where t is the requested time, and L = [l1, l2, l3, ..., l N Let ] represent the set of road segments in route R, N be the number of road segments in route R, and F be the external features of all road segments in route R; Step S4: Find the feature values corresponding to the road segments in route R from the static road network features, dynamic traffic features, and external features of road segments to form route features, which are used as input data for the model; The route features include: request time, road segment type, road segment length, road segment speed limit, number of lanes in the road segment, driving direction, road segment relationship, vehicle speed, and traffic flow; Step S5: Construct a prediction model, which includes a spatiotemporal data integration module, a spatiotemporal modeling and coding module, a mutual information module, an uncertainty fusion module, and an output layer; Step S6: The spatiotemporal data integration module preprocesses the input data and constructs initial node embeddings and initial edge embeddings based on the feature values, wherein the dimension of the initial node embedding is D. node The initial edge embedding dimension is D. edge Step S7: The initial node embedding and initial edge embedding are used as the initial values of the spatiotemporal modeling coding module. The interaction between the node embedding and edge embedding is modeled through each layer of the graph convolutional network in the spatiotemporal modeling coding module, and the node embedding and edge embedding are updated simultaneously to obtain the iterative node embedding P. e Step S8: The mutual information module performs location encoding on the set L of road segments in route R, using a location encoding matrix. Provide sequence information to construct matrix PE; then use position-encoded matrix PE and node embedding P e Construct route embedding R e Embedded by route Multiple D-dimensional route embedding vectors are generated, and multi-head attention is applied before outputting the route embeddings. Then embed R into the output route. e Perform average pooling with an N×1 pooling layer. The resulting arrival time representation has a 1×D dimension, where D is the specified dimension. The number field has a dimension of N×D; Step S9, the uncertain fusion module processes the arrival time representation, obtains the arrival time and the upper and lower bounds of the arrival time through the linear layer, and then corrects the arrival time and its upper and lower bounds through the loss function to obtain the predicted arrival time and the upper and lower bounds; Step S10, the output layer outputs the predicted arrival time and the upper and lower bounds.
2. The travel time prediction method based on fusion uncertainty modeling according to claim 1, characterized in that, In the prediction model constructed in step S5: the spatiotemporal data integration module includes a matrix encoding component and a matrix operation component; the spatiotemporal modeling encoding module consists of a multi-layer graph convolutional neural network, which is used to extract the spatiotemporal correlation of the data and output the corresponding edge embedding and node embedding; the mutual information module includes a position encoder, a route embedding calculation component, a multi-head attention component, and a pooling layer; the uncertainty fusion module includes a linear layer and a loss function calculation component.
3. The travel time prediction method based on fusion uncertainty modeling according to claim 1, characterized in that, The static road network characteristics include road segment type, road segment length, road segment speed limit, number of lanes per road segment, driving direction, and road segment relationship; The dynamic traffic characteristics include vehicle speed; the external characteristics of the road segment include traffic flow.
4. The travel time prediction method incorporating uncertainty modeling according to claim 1, characterized in that, The directed graph G of the road network is defined as G = (V, E) and l ∈ V, e ij ∈E, where l∈V are nodes in the directed graph, representing a road segment, and V is the set of nodes in the directed graph G, representing the set of road segments; e ij ∈E is an edge in a directed graph, representing a path segment l. i and road section l j They are connected, if road segment l i and l j If they are connected, then the edge e between them is... ij If road segment l exists i and l j If they are not connected, then the edge e between them... ij It does not exist; E is the set of edges in the directed graph G, representing the set of adjacency relationships between road segments.
5. The travel time prediction method incorporating uncertainty modeling according to claim 1, characterized in that, The external feature F of the road segment mentioned in step S3 is obtained based on the route R. When the external feature F is a traffic flow feature, the specific operation is as follows: the corresponding area is obtained according to the latitude and longitude range of the road network, and then the area is divided into grids of equal size according to a predetermined size. At the requested time t, the number of vehicles in all grids passed by the route R is queried, and the traffic flow involved in all road segments is counted and added to F as a traffic flow feature statistic.
6. The travel time prediction method incorporating uncertainty modeling according to claim 1, characterized in that, In step S6, the features related to the initial node embedding include: request time, road segment type, road segment length, road segment speed limit, number of lanes in the road segment, driving direction, vehicle speed, and traffic flow. The features related to the initial edge embedding include road segment relationships.
7. The travel time prediction method incorporating uncertainty modeling according to claim 6, characterized in that, Step S7: In each layer of the graph convolutional network, the process of aggregating node and edge information in the graph convolution is as follows: Input initial node embeddings: In equation (1), This indicates a dimension size of N×D node The number field, P 0 Indicates the initial node embedding; and initial edge embedding: In equation (2), This indicates a dimension size of N×D edge The number field, S 0 Let represent the initial edge embedding; then iterate through the node embedding and edge embedding respectively; the operation formula for the node embedding iteration is as follows: In equation (3), p i m p represents the embedding of the i-th node in the m-th layer graph convolution. i m+1 This represents the embedding of the i-th node in the (m+1)-th layer graph convolution. N represents the edge embedding between the i-th node and the j-th node in the m-th layer graph convolution. i Let Agg represent the set of neighbors centered at node i, and let Agg(·) be the aggregation function. The update function f consists of nonlinear transformations, specifically defined as follows: In equation (4), ReLU represents the activation function for training a multi-layer graph convolutional network, BN represents the batch normalization operation, σ represents the Sigmoid activation function, and ⊙ represents the Hadamard product. The parameters are learnable; the operation formula for edge embedding iteration is as follows: In equation (5), s ij m+1 p represents the edge embedding between the i-th node and the j-th node in the (m+1)-th layer graph convolution. j m The function g represents the embedding of the j-th node in the m-th layer graph convolution; the function g represents the nonlinear transformation, specifically: In equation (6), These are learnable parameters; the final node embedding and final edge embedding after graph convolution are obtained as follows: Final node embedding: Final edge embedding:
8. The travel time prediction method based on fusion uncertainty modeling according to claim 1, characterized in that, In step S8, matrix PE is constructed. The elements in row a, column 2b, and column (2b+1) of PE are: In equations (7-1) and (7-2), sin and cos represent the sine and cosine functions, respectively.
9. The travel time prediction method incorporating uncertainty modeling according to claim 1, characterized in that, In step S8, the position encoding matrix PE and the node embedding P are used. e Construct route embedding R e Specifically, by embedding P through nodes e The route embedding R is obtained by adding the location encoding matrix. e : In equation (8), Indicates a join operation, R e Embed the route output by the model.
10. The travel time prediction method incorporating uncertainty modeling according to claim 1, characterized in that, In step S9, quantile regression is used to analyze uncertainty, and the quantile regression loss function is as follows: In equation (10), y represents the actual arrival time. Indicates the lower bound of the prediction. Represents the predicted arrival time. q represents the upper bound of the prediction. l q f q u , where represents their respective quantiles.