A method, system, computer device, and storage medium for predicting vehicle travel time
By combining the multi-head self-attention neural network and deep forest method, the problem of insufficient accuracy of vehicle travel time prediction in the prior art is solved, especially the problem of information loss during long-term propagation of the LSTM method, which achieves higher prediction accuracy and reliability of travel time planning.
Patent Information
- Application Number
- CN202210039330.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-13
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-01-13
AI Technical Summary
The existing vehicle travel time prediction methods are insufficient in terms of accuracy, especially the LSTM-based method has the problem of information loss during long-term propagation, which makes it difficult to effectively improve the accuracy of vehicle travel time prediction.
The method of combining multi-head self-attention neural network and deep forest is used to transform and process vehicle travel data, and the graph convolution network is used to extract the traffic characteristics of the road segment, and predict the prediction with a fully connected neural network. The prediction accuracy is improved through multi-layer multi-head self-attention neural network and cascade forest.
It effectively improves the accuracy of vehicle travel time prediction, ensures the effectiveness and accuracy of travel time planning, and improves the efficiency of intelligent transportation systems.
Smart Images

Figure CN114638395B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of deep learning and big data processing technology, and in particular to a method, system, computer device and storage medium for predicting vehicle travel time. Background Art
[0002] Travel time prediction, which estimates the time it takes for a vehicle to travel from its starting point to its destination, is a location-based digital map and navigation system service widely used in ride-hailing platforms, food delivery, and public transportation. Ride-hailing platforms display the estimated time a vehicle will reach the passenger's location, food delivery displays the time it will take for a delivery to arrive, and public transportation displays the time it will take for the bus to arrive at the destination—all of these issues are part of travel time estimates. The displayed travel time is crucial for consumers' time planning, and it is crucial to ensure that the estimated travel time is within a reasonable range. Therefore, the estimated time of arrival (ETA) has become a key reference for services such as route selection, vehicle scheduling, and ridesharing.
[0003] Recent breakthroughs in deep learning in fields such as computer vision and natural language processing have demonstrated its powerful representational capabilities for various types of data. Vehicle trajectory data contains both time series data, similar to sentence sequence features in natural language processing, and road network features suitable for graph convolutional networks (GCNs). Deep learning-based travel time prediction requires integrating techniques from various fields, making it an extremely challenging task. In recent years, vehicle travel time prediction has shifted from traditional statistical methods to machine learning and deep learning. In the field of deep learning, in particular, due to its powerful ability to learn from massive amounts of data and the diverse application scenarios of different network structures, neural networks integrating various modules have become the most mainstream and accurate travel time prediction methods. Attention mechanisms can effectively capture temporal correlations between traffic data, and graph convolutional networks can be used to model changes in road flow characteristics. However, current research in this area is relatively limited compared to other areas, and many important issues remain to be resolved. Therefore, deep learning-based spatiotemporal traffic data prediction is not only technically feasible and challenging, but also has broad real-world applications.
[0004] After searching the existing technical literature, it was found that existing solutions for vehicle travel time prediction tasks can be divided into two categories. The first category is path-based solutions, which use intuitive physical models to represent travel time: the total travel time of a given route is expressed as the sum of the travel time through each road section and the delay time at each intersection; the second category is data-driven solutions, which use location-based data to build rich features and establish high-dimensional feature maps for them. The first category of solutions has the advantage of strong interpretability. The travel time is the sum of the time of a single road section and intersection. However, since this method predicts different road sections and intersections separately, the errors of multiple road sections accumulate, making the prediction accuracy not high. The second category of solutions is also the most accurate and popular processing method at present. This method mainly uses a method based on the Long Short-Term Memory Network (LSTM) in the time dimension. However, the LSTM-based method has the problem of information loss during long-term transmission. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method for predicting vehicle travel time, so as to effectively improve the accuracy of vehicle travel time prediction.
[0006] The present invention provides a method for predicting vehicle travel time, comprising:
[0007] Preprocessing the vehicle's travel data, wherein the travel data includes trajectory data and static data;
[0008] Performing feature conversion on the preprocessed trajectory data;
[0009] Use a multi-head self-attention neural network to perform ETA transformation on the feature-converted data to obtain the first data;
[0010] Processing the pre-processed static data using a deep forest to obtain second data;
[0011] The first data and the second data are processed by a fully connected neural network FCN to obtain a prediction result.
[0012] Furthermore, the performing feature conversion on the preprocessed trajectory data includes:
[0013] A multi-layer graph convolutional network is used to extract the road flow characteristics in the preprocessed trajectory data.
[0014] A time feature of each trajectory point in the preprocessed trajectory data is extracted using a learned vector representation of time.
[0015] Furthermore, the use of a multi-head self-attention neural network to perform ETA transformation on the feature-converted data includes:
[0016] The data after feature conversion is passed through the first multi-layer multi-head self-attention neural network to extract road network features, and then output to the second FCN for encoding to obtain encoded features;
[0017] The data after feature conversion is subjected to a second multi-layer multi-head self-attention neural network to extract road network features and the encoded features as the input of a third multi-head self-attention neural network. The output of the third multi-head self-attention neural network is processed by a third FCN to obtain the first data.
[0018] Furthermore, the using a deep forest to process the pre-processed static data to obtain second data includes:
[0019] After the pre-processed static data is processed by the fourth FCN, a multi-granularity scanning method is used to generate an input feature vector of the cascade forest;
[0020] Each forest layer in the cascade forest combines the prediction result of the previous forest layer and the input feature vector as the input of the next forest layer, and averages the output of the last forest layer to obtain the second data.
[0021] A device for predicting vehicle travel time, comprising:
[0022] A preprocessing module, configured to preprocess the vehicle's travel data, wherein the travel data includes trajectory data and static data;
[0023] An input feature conversion module is used to perform feature conversion on the pre-processed trajectory data;
[0024] An ETA transformation module is used to use multi-head self-attention to perform an estimated time of arrival (ETA) transformation on the feature-converted data to obtain first data;
[0025] A deep forest module, configured to process the pre-processed static data using a deep forest to obtain second data;
[0026] The prediction module is used to obtain a prediction result by passing the first data and the second data through a first fully connected neural network FCN.
[0027] Furthermore, the input feature transformation module includes: a graph convolutional network module and a vector representation module for learning time, wherein the graph convolutional network module includes a multi-layer graph convolutional network unit for extracting the road section traffic characteristics in the preprocessed trajectory data, and the vector representation module for learning time is used to extract the time characteristics of each trajectory point in the preprocessed trajectory data.
[0028] Furthermore, the ETA conversion module includes an encoder and a decoder, wherein:
[0029] The encoder includes a first multi-head self-attention neural network module and a second FCN unit, wherein,
[0030] The input of the first multi-head self-attention neural network module is the feature-converted data output by the input feature conversion module. The first multi-head self-attention neural network module includes multiple layers of multi-head self-attention neural network units. The output of the multi-head self-attention neural network unit in the previous layer is the input of the multi-head self-attention neural network unit in the next layer. The output of the multi-head self-attention neural network unit in the last layer is encoded by the second FCN unit to obtain an encoded feature, and the encoded feature is input into the decoder.
[0031] The decoder includes a second multi-head self-attention neural network module, a third multi-head self-attention neural network module and a third FCN unit, wherein,
[0032] The input of the second multi-head self-attention neural network module is the feature-converted data output by the input feature transformation module. The second multi-head self-attention neural network module includes multiple layers of multi-head self-attention neural network units. The output of the previous layer of multi-head self-attention neural network units is the input of the next layer of multi-head self-attention neural network units. The output of the last layer of multi-head self-attention neural network units is input to the third multi-head self-attention neural network module.
[0033] The input of the third multi-head self-attention neural network module is the output of the second multi-head self-attention neural network module and the encoding features of the encoder output. The third multi-head self-attention neural network module includes multiple layers of multi-head self-attention neural network units. The output of the previous layer of multi-head self-attention neural network units and the encoding features of the encoder output are the input of the next layer of multi-head self-attention neural network units. The output of the last layer of multi-head self-attention neural network units is processed by the third FCN unit to obtain the first data.
[0034] Furthermore, the deep forest module includes a fourth FCN unit and a deep forest unit, wherein:
[0035] The pre-processed static data is processed by the fourth FCN unit and input to the deep forest unit.
[0036] The deep forest unit includes a multi-granularity scanning unit and a cascade forest. The multi-granularity scanning unit uses sliding windows of different dimensions to extract the second feature and input it to the cascade forest. The cascade forest contains multiple layers of forests. The output of the previous layer of forest and the second feature are used as inputs to the next layer of forest. The output of the last layer of forest is averaged to obtain the second data.
[0037] A computer device includes one or more processors and one or more memories, wherein the one or more memories store at least one program code, and when the program code is loaded and executed by the one or more processors, it implements the functions of the vehicle travel time prediction method described above.
[0038] A computer storage medium stores at least one program code, which, when loaded and executed by a processor, implements the functions of the vehicle travel time prediction method described above.
[0039] In summary, the method and system for predicting vehicle travel time provided by the present invention can effectively improve the accuracy of vehicle travel time prediction and ensure people's effective travel time planning and arrangement. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 Schematic diagram of road traffic changes at different times;
[0041] Figure 2 Schematic diagram of using graph convolutional networks to learn road flow features;
[0042] Figure 3 A schematic diagram of a vehicle travel time prediction system according to an embodiment of the present invention;
[0043] Figure 4 is a schematic diagram of a deep forest unit according to an embodiment of the present invention;
[0044] Figure 5 A schematic diagram of data acquisition by a multi-granularity scanning unit according to an embodiment of the present invention;
[0045] Figure 6 This is a flowchart of a method for predicting vehicle travel time according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] To make the purpose, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, unless there is a conflict, the embodiments and features in the embodiments of the present application can be combined with each other in any manner.
[0047] The purpose of this invention is to address the shortcomings of existing technologies in the problem of vehicle travel time prediction in real life. The traffic flow of different sections at different times changes with time, resulting in uncertainty in the traffic flow change, which is difficult to accurately characterize. Figure 1 As shown in the figure, at 8 a.m., the traffic volume on the section from A to B is heavy and the driving is slow. At 3 p.m., the driving on the section from A to B is smooth. The traffic volume on the section changes with time, and the change is random. Therefore, all sections in the road network have the characteristic that the section traffic volume cannot be accurately represented.
[0048] Based on the above problems, the present invention proposes a method for predicting vehicle travel time, which can effectively improve the accuracy of vehicle travel time prediction and ensure people's effective travel time planning and arrangement.
[0049] Figure 3 FIG. 1 is a schematic diagram of a vehicle travel time prediction system according to an embodiment of the present invention, Figure 3 As shown, the vehicle travel time prediction system of this embodiment mainly includes: an input feature transformation module, an ETA transformation module and a deep forest module, wherein the input feature transformation module uses a graph convolutional network to extract road flow features, the deep forest module mainly processes static data, and the ETA transformation module extracts features from dynamic trajectory data.
[0050] The vehicle travel time prediction system of this embodiment may further include: a data preprocessing module for preprocessing vehicle travel data.
[0051] Vehicle travel data is divided into trajectory data and static data. Static data refers to data used primarily for control or reference during operation. It remains constant over long periods of time and generally does not change with operation. Static data includes start time, arrival time, origin, destination, vehicle ID, and so on. For static data, missing values are first deduplicated to reduce the impact of noise. The original time features are then split into year, month, week, day, hour, and minute. These split time features and other static features are used as input. For trajectory data, map-matching is used to map data points onto a real-world map (data is collected at intervals along the vehicle's trajectory, so the data for the entire trajectory is a series of discrete data points distributed on the map). The number of vehicles on each road segment within a time period n is then counted as the traffic flow information for that segment during that time period.
[0052] In this embodiment, the input feature transformation module may include a GCN module and a learning vector representation of time (Time2Vec) module, wherein the GCN module is used to extract the road section flow characteristics in the trajectory data. The GCN module includes multiple layers of GCN units. After the road section flow characteristics are input into the GCN module, they are processed layer by layer by GCN units to realize the time iteration of the flow data of each road section in the road network. From time k to time k+N, the iterative prediction of future flow data is realized to realize the prediction of the change of road network flow. The Time2Vec module is used to process the time characteristics of each trajectory point in the trajectory data. The outputs of the GCN module and the Time2Vec module are simultaneously input into the encoder and decoder in the ETA transformation module.
[0053] In this embodiment, the ETA conversion module includes an encoder and a decoder, wherein:
[0054] The encoder includes a first multi-head self-attention neural network module and a second FCN unit, wherein,
[0055] The input of the first multi-head self-attention neural network module is the feature-converted data output by the input feature conversion module. The first multi-head self-attention neural network module includes multiple layers of multi-head self-attention neural network units. The output of the multi-head self-attention neural network unit in the previous layer is the input of the multi-head self-attention neural network unit in the next layer. The output of the multi-head self-attention neural network unit in the last layer is encoded by the second FCN unit to obtain an encoded feature, and the encoded feature is input into the decoder.
[0056] The decoder includes a second multi-head self-attention neural network module, a third multi-head self-attention neural network module and a third FCN unit, wherein,
[0057] The input of the second multi-head self-attention neural network module is the feature-converted data output by the input feature transformation module. The second multi-head self-attention neural network module includes multiple layers of multi-head self-attention neural network units. The output of the previous layer of multi-head self-attention neural network units is the input of the next layer of multi-head self-attention neural network units. The output of the last layer of multi-head self-attention neural network units is input to the third multi-head self-attention neural network module.
[0058] The input of the third multi-head self-attention neural network module is the output of the second multi-head self-attention neural network module and the encoding features of the encoder output. The third multi-head self-attention neural network module includes multiple layers of multi-head self-attention neural network units. The output of the previous layer of multi-head self-attention neural network units and the encoding features of the encoder output are the input of the next layer of multi-head self-attention neural network units. The output of the last layer of multi-head self-attention neural network units is processed by the third FCN unit to obtain the first data.
[0059] In this example, based on the scale of the map and data, both the encoder and decoder use a five-layer multi-head self-attention neural network to extract road network features layer by layer. The number of layers in the multi-head self-attention neural network needs to be trained and optimized based on the data volume, neural network framework, and prediction results.
[0060] In this embodiment, the deep forest module includes the fourth FCN unit and the deep forest unit. The fourth FCN unit extracts the road network features from the pre-processed static data and inputs them into the deep forest unit. The deep forest unit consists of two parts: a multi-granularity scanning unit and a cascade forest. Figure 4 As shown in the figure, static data is first input into the multi-granularity scanning module. Sliding windows of different dimensions are used to slide over the raw data to extract features. The output vectors are then concatenated and input into the cascade forest. The outputs of the last layer of the cascade forest are averaged to obtain the final output vector, the second data, which is then input into the fourth FCN unit.
[0061] The fourth FCN unit extracts road network features from the received first data and second data to obtain a prediction result.
[0062] In another embodiment, the input feature transformation module may include a first transformation unit and a second transformation unit, wherein the first transformation unit and the second transformation unit respectively include a GCN module and a Time2Vec module, the output of the first transformation unit is input to the encoder in the ETA transformation module, and the output of the second transformation unit is input to the decoder in the ETA transformation module.
[0063] The vehicle travel time prediction system of this embodiment can effectively improve the accuracy of vehicle travel time prediction and ensure people's effective travel time planning and arrangement.
[0064] Figure 5 Flowchart of the method for predicting vehicle travel time according to an embodiment of the present invention. Figure 5 As shown, the method of this embodiment includes the following steps:
[0065] Step S1: Preprocessing the vehicle's travel data.
[0066] Vehicle travel data is divided into trajectory data and static data. Static data refers to data used primarily for control or reference during operation. It remains constant over long periods of time and generally does not change with operation. Static data includes start time, arrival time, origin, destination, and vehicle ID.
[0067] For static data, we first deduplicate data with missing values to reduce the impact of noise data; split the original time features into year, month, week, day, hour, and minute; and use the split time features and other static features as input; for trajectory data, we use the map-matching method to map the data points to the actual map (that is, data is collected at every time interval in the vehicle's driving trajectory, so the data of the entire trajectory is a number of discontinuous data points on this trajectory, distributed on the map). Then, we count the number of vehicles on each road section within a period of time n as the traffic information of this section during this period.
[0068] The statistical time interval n can be determined according to the experimental results of the validation set. In this embodiment, 15 minutes is used as the experimental sampling interval.
[0069] Step S2: performing feature conversion on the pre-processed trajectory data.
[0070] Each road section is abstracted as a node in the graph. If two road sections are connected, there is an edge connection between the nodes. The traffic of this road section in the current time period is used as the feature of the corresponding node. For each node, the information of its adjacent nodes is used to update the node feature. That is, the traffic of the upstream and downstream road sections is used to update the traffic of the road section, such as Figure 2 shown.
[0071] Using GCN to extract road flow characteristics from trajectory data can take into account the graph structure of the road network, avoid extracting useless information, or avoid sparse matrix feature extraction, making the extraction of road network feature information more accurate.
[0072] After being input into the GCN module, the traffic flow information of the road section passes through m layers of GCN units, and the current characteristics of the node (i.e. the current traffic flow of the road section) are input into the GCN module. Through the processing of each layer of GCN units, the traffic flow data of each section in the road network is iterated over time. From time k to time k+N, the traffic flow changes of the road network are predicted through iterative prediction of future traffic data.
[0073] The number of m can be determined according to the convergence degree of data in GCN. In this embodiment, 3 layers are used as the number of layers of GCN.
[0074] Trajectory data exhibits both periodic and aperiodic characteristics. During processing, road traffic flow remains constant within a selected time interval and does not fluctuate randomly. Based on these characteristics, learning a time vector representation (Time2Vec) is suitable for processing the temporal information of each trajectory point in trajectory data.
[0075] The following formula can be used, taking the timestamp information in the trajectory data as input, and τ represents the original time series feature, and ω are the weight coefficients to be learned, This is a periodic activation function, typically a sine function, where k represents the Time2vec dimension. When i = 0, aperiodic patterns are captured, while when 1 ≤ i ≤ k, periodic patterns are captured. Time information is represented as a vector and used as temporal feature data to be input into a deep neural network.
[0076]
[0077] Step S3: Use multi-head self-attention to perform ETA transformation on the feature-converted data to obtain first data;
[0078] In this embodiment, the output of step S2 is used as the input of the ETA converter module. The ETA converter module is divided into two parts: Encoder and Decoder.
[0079] In this embodiment, the encoder uses five identical processing units, a multi-layer multi-head self-attention neural network unit and a fully connected neural network (FCN) unit. The transformed trajectory data is input into the multi-head self-attention neural network unit, and the output is input into the fully connected neural network unit after regularization. The encoded vector is input into the decoder. The multi-head attention mechanism is to set up multiple multi-head attention mechanisms at the same time, process information at different stages respectively, and then integrate the processing results. The multi-head attention mechanism can improve the ability of the neural network to process information. The information at different stages here can be understood as information at different time stages, such as hours, days, months, years, etc. Since traffic flow information has regular information at different stages, the multi-head attention mechanism is used to capture the data regularity at different stages and integrate them by summing the regular features of different stages.
[0080] Existing techniques for extracting sequence features primarily use CNN (Convolutional Neural Network) and RNN (Recurrent Neural Network) modules. CNN-based methods assume that local information is interdependent. Local feature information is extracted from the data based on the size of the convolution kernel, but global information cannot be extracted. RNN-based methods, on the other hand, rely on long-range dependencies and maintain information flow during propagation. However, because information flow must be executed sequentially from start to finish, parallel processing is not possible. Self-attention methods, however, address both of these issues simultaneously. Multi-head self-attention is similar to the multi-core method in CNNs, which learns different relationships.
[0081] The multi-head self-attention unit learns the trajectory data information output from the input feature transformation module. The calculation process of the multi-head self-attention is shown in the following formula, where Q, K, and V are all linear mappings of the input Y, and dk is the dimension of the Key vector.
[0082]
[0083] Each head in the multi-head first undergoes linear transformation and then Attention, as shown below:
[0084]
[0085] Then multiple heads are spliced together and then a linear transformation is performed to obtain the final output of the multiple heads, as shown below:
[0086]
[0087] Finally, after regularization, it is input into the fully connected network FCN.
[0088]
[0089] The output is regularized and fed into a fully connected neural network. The encoded vector is then fed into the multi-head self-attention unit in the decoder. The fully connected neural network maps the distributed features into the sample label space, aggregates the features, and outputs a single feature value, which is the predicted result.
[0090] In this embodiment, the decoder also uses 5 identical units, each of which has an additional multi-head self-attention unit compared to the encoder. This multi-head self-attention unit is used to establish the correlation between the outputs of the encoder and decoder.
[0091] The encoder input is information data, which is exported to the decoder using FCN. The decoder output is reconstructed data, which should be the same as the encoder input. The decoder receives the original data after feature transformation and the reconstructed data derived by the encoder, restores the features of the reconstructed data, and converts it into an executable data form.
[0092] Step S4: using Deep Forest to process the pre-processed static data to obtain second data;
[0093] The static data obtained from the preprocessing in step S1 is used as the input of the deep forest module. The static data is first extracted by FCN to extract the road network features and then input into the deep forest unit. The deep forest unit consists of two parts: a multi-granularity scanning unit and a cascade forest. Figure 4 As shown in , first, static data is input into the multi-granularity scanning unit. For sequence data, assuming that the input feature has 400 dimensions, a sliding window with a size of 100 dimensions is used to extract features by sliding on the original data. Figure 5 As shown in the figure, after one sliding step, 301 feature vectors are obtained. For spatial data (e.g., a 20×20 image), 121 feature vectors are obtained after using a 10×10 sliding window. These output vectors are then concatenated and fed into the cascade forest. The output of the last layer of the cascade forest is averaged to obtain the final output vector, i.e., the second data.
[0094] Figure 4 There are three sliding windows in the model: 100-dim, 200-dim, and 300-dim. These three windows extract features of different granularity (segments of different information lengths) to satisfy multi-angle sampling and consideration of the data. In this embodiment, the output data enters two forests: a fully random forest and a random forest.
[0095] Super strong representation learning ability is the main reason for the success of deep neural networks. In deep learning, the key to representation learning is layer-by-layer processing. Cascade forests introduce the mechanism of layer-by-layer processing of deep learning to achieve better feature learning capabilities. In this embodiment, the four forests are 2 random forests and 2 completely random forests. The degree of randomness of the randomly selected data is different, which increases the diversity of data selection. Each layer combines the prediction results of the previous layer with the original data as the input of the next layer, and performs feature extraction layer by layer. The data of each layer includes the four random decision vectors obtained in the previous layer, as well as the random decision feature vector initially obtained. Deep feature extraction is performed through multi-layer operations. Data of different granularities are alternately extracted layer by layer to increase the universality and diversity of deep random forests.
[0096] In this embodiment, the deep forest module is primarily used to process static data. A cascaded forest is a layered, sequential structure, where the output of the previous layer serves as the input to the next layer. The outputs of the four forests and the original input feature vector are concatenated as the input to the next layer. Finally, the output vector is obtained by averaging the outputs of the four forests in the final layer.
[0097] Theoretically, the more forests in each layer, the better, but the computational complexity will increase. The selected number is adjusted and optimized based on the output results.
[0098] Step S5: The first data and the second data are passed through a fully connected neural network to obtain the final prediction result.
[0099] The method proposed in the embodiment of the present invention solves the problem that road traffic characteristics are not effectively considered in previous methods and that information is lost during long-term transmission in LSTM-based methods. It provides a reliable prediction method for accurately predicting travel time and improving the efficiency of intelligent transportation.
[0100] An embodiment of the present invention also provides a computer device, which includes one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and when the program code is loaded and executed by the one or more processors, the function of the above-mentioned vehicle travel time prediction method is implemented.
[0101] An embodiment of the present invention further provides a computer storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the above-mentioned method for predicting vehicle travel time.
[0102] Those skilled in the art will appreciate that all or part of the steps in the above method can be performed by a program instructing the relevant hardware, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps in the above embodiment can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiment can be implemented in the form of hardware or in the form of software functional modules. The present invention is not limited to any particular combination of hardware and software.
[0103] The above are only preferred embodiments of the present invention. Of course, the present invention may have many other embodiments. Without departing from the spirit and essence of the present invention, those skilled in the art may make various corresponding changes and modifications based on the present invention, but these corresponding changes and modifications should all fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for predicting vehicle travel time, comprising: Preprocessing the vehicle's travel data, the travel data including trajectory data and static data, the static data including: start time, arrival time, start location, destination, and vehicle ID; Performing feature conversion on the preprocessed trajectory data; Use a multi-head self-attention neural network to perform ETA transformation on the feature-converted data to obtain the first data; Processing the pre-processed static data using a deep forest to obtain second data, including: processing the pre-processed static data with a fourth FCN, and then generating an input feature vector for a cascade forest using a multi-granularity scanning method; combining the prediction results of each forest layer in the cascade forest with the input feature vector as the input of the next forest layer, and averaging the outputs of the last forest layer to obtain the second data; The first data and the second data are processed by a first fully connected neural network FCN to obtain a prediction result, The use of a multi-head self-attention neural network to perform ETA transformation on the feature-converted data includes: The data after feature conversion is subjected to the first multi-layer multi-head self-attention neural network to extract the road network features, and then output to the second FCN for encoding to obtain the coding features, wherein the output of the previous layer of multi-head self-attention neural network unit in the first multi-layer multi-head self-attention neural network is the input of the next layer of multi-head self-attention neural network unit, and the output of the last layer of multi-head self-attention neural network unit is encoded by the second FCN unit to obtain the coding features, and the coding features are input to the third multi-layer multi-head self-attention neural network; the data after feature conversion is subjected to the second multi-layer multi-head self-attention neural network to extract the road network features and the coding features as the input of the third multi-head self-attention neural network The output of the third multi-layer multi-head self-attention neural network is input to the third FCN for processing to obtain the first data, wherein the output of the previous layer of multi-head self-attention neural network unit in the second multi-layer multi-head self-attention neural network is the input of the next layer of multi-head self-attention neural network unit, and the output of the last layer of multi-head self-attention neural network unit is input to the third multi-layer multi-head self-attention neural network, the output of the previous layer of multi-head self-attention neural network in the third multi-layer multi-head self-attention neural network and the encoding feature are the input of the next layer of multi-head self-attention neural network, and the output of the last layer of multi-head self-attention neural network is processed by the third FCN to obtain the first data.
2. The method according to claim 1, wherein The performing feature conversion on the pre-processed trajectory data includes: A multi-layer graph convolutional network is used to extract the road flow characteristics in the preprocessed trajectory data. A time feature of each trajectory point in the preprocessed trajectory data is extracted using a learned vector representation of time.
3. A vehicle travel time prediction system, characterized in that: For executing the method according to any one of claims 1 to 2, the system comprises: A preprocessing module, configured to preprocess the vehicle's travel data, wherein the travel data includes trajectory data and static data; An input feature conversion module is used to perform feature conversion on the pre-processed trajectory data; An ETA transformation module is used to use multi-head self-attention to perform an estimated time of arrival (ETA) transformation on the feature-converted data to obtain first data; A deep forest module, configured to process the pre-processed static data using a deep forest to obtain second data; The prediction module is used to obtain a prediction result by passing the first data and the second data through a first fully connected neural network FCN.
4. The system according to claim 3, wherein: The input feature transformation module includes: a graph convolutional network module and a vector representation module for learning time. The graph convolutional network module includes a multi-layer graph convolutional network unit, which is used to extract the road section traffic characteristics in the preprocessed trajectory data. The vector representation module for learning time is used to extract the time characteristics of each trajectory point in the preprocessed trajectory data.
5. The system according to claim 3, wherein: The ETA conversion module includes an encoder and a decoder, wherein: The encoder includes a first multi-head self-attention neural network module and a second FCN unit, wherein, The input of the first multi-head self-attention neural network module is the feature-converted data output by the input feature conversion module. The first multi-head self-attention neural network module includes multiple layers of multi-head self-attention neural network units. The output of the multi-head self-attention neural network unit in the previous layer is the input of the multi-head self-attention neural network unit in the next layer. The output of the multi-head self-attention neural network unit in the last layer is encoded by the second FCN unit to obtain an encoded feature, and the encoded feature is input into the decoder. The decoder includes a second multi-head self-attention neural network module, a third multi-head self-attention neural network module and a third FCN unit, wherein, The input of the second multi-head self-attention neural network module is the feature-converted data output by the input feature transformation module. The second multi-head self-attention neural network module includes multiple layers of multi-head self-attention neural network units. The output of the previous layer of multi-head self-attention neural network units is the input of the next layer of multi-head self-attention neural network units. The output of the last layer of multi-head self-attention neural network units is input to the third multi-head self-attention neural network module. The input of the third multi-head self-attention neural network module is the output of the second multi-head self-attention neural network module and the encoding features of the encoder output. The third multi-head self-attention neural network module includes multiple layers of multi-head self-attention neural network units. The output of the previous layer of multi-head self-attention neural network units and the encoding features of the encoder output are the input of the next layer of multi-head self-attention neural network units. The output of the last layer of multi-head self-attention neural network units is processed by the third FCN unit to obtain the first data.
6. The system according to any one of claims 3 to 5, characterized in that: The deep forest module includes a fourth FCN unit and a deep forest unit, wherein, The pre-processed static data is processed by the fourth FCN unit and input to the deep forest unit. The deep forest unit includes a multi-granularity scanning unit and a cascade forest. The multi-granularity scanning unit uses sliding windows of different dimensions to extract the second feature and input it to the cascade forest. The cascade forest contains multiple layers of forests. The output of the previous layer of forest and the second feature are used as inputs to the next layer of forest. The output of the last layer of forest is averaged to obtain the second data.
7. A computer device, characterized in that: The computer device includes one or more processors and one or more memories, and the one or more memories store at least one program code. When the program code is loaded and executed by the one or more processors, it implements the function of the vehicle travel time prediction method as claimed in any one of claims 1 to 2.
8. A computer storage medium, characterized in that The computer storage medium stores at least one program code, and when the program code is loaded and executed by the processor, the function of the vehicle travel time prediction method according to any one of claims 1 to 2 is realized.
Citation Information
Patent Citations
Bus section running time prediction method based on improved depth forest
CN109741597A
Estimated arrival time prediction method and device based on deep neural network
CN110942211A
Traffic data prediction method and system
CN112785848A