Passing time estimation method based on deep learning in complex environment

By using deep learning-based pass time estimation method in complex environments, a model including embedded layer, Transformer encoding layer and decoding layer is constructed, which solves the accuracy of pass time estimation in complex environments in the prior art, and achieves higher estimation reliability and adaptability.

CN119783036APending Publication Date: 2025-04-08BEIJING UNIV OF CHEM TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411973915.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

The prior art is difficult to accurately estimate the travel time in complex environments, and the lack of specialized characteristic design for terrain and weather factors leads to a reduced prediction accuracy.

Method used

A deep learning-based method is adopted to build a pass time estimation model by obtaining trajectory data sets in complex environments, including GPS coordinates, slopes, angle angles, weather categories and pass time. The model includes an embedding layer, a Transformer encoding layer and a decoding layer. It extracts features through a multi-head self-attention mechanism to capture the impact of terrain and weather on travel time.

Benefits of technology

It improves the reliability and accuracy of pass time estimation, and enhances the model's adaptability and generalization ability to complex environmental terrain and weather factors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119783036A_ABST
    Figure CN119783036A_ABST
Patent Text Reader

Abstract

The invention provides a traffic time estimation method based on deep learning in a complex environment, and the method comprises the steps: firstly, obtaining a track data set comprising a plateau environment region and a mountain environment region; the trajectory data set is then divided into a training data set, a verification data set, and a test data set. Next, constructing a transit time estimation model, and training and optimizing the transit time estimation model according to the training data set and the verification data set to obtain an optimized transit time estimation model; and testing the optimized transit time estimation model according to the test data set, and determining a model evaluation index value. And finally, under the condition that the model evaluation index value meets the index threshold value, inputting to-be-estimated data into the optimized passing time estimation model, and outputting to obtain a passing time estimation result. According to the method, the adaptability of the traffic time estimation model to modeling of complex environmental terrains and weather factors is improved, so that the accuracy of estimating the traffic time in a complex environment can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of traffic management and planning, and in particular to a travel time estimation method based on deep learning in a complex environment. Background Art

[0002] With the rapid development of Internet technology and intelligent transportation technology, navigation functions are widely used in daily life. When a user wants to pass a route, he can estimate the travel time on the target route based on the starting point and end point of the target route, thus bringing convenience to the user's travel.

[0003] In the related art, a time estimation model can be generally used to estimate the travel time. For example, the FMA-ETA model comprehensively considers the potential impact of traffic volume, driver proficiency, and travel mode on the travel time estimation to estimate the travel time.

[0004] However, the relevant technologies are mainly used in urban scenarios, and the time estimation models usually rely on the characteristic patterns of the urban environment. They show insufficient adaptability when dealing with complex environments and find it difficult to effectively capture long-distance dependencies in travel trajectories. The relevant technologies usually lack specialized feature designs for terrain and weather factors, and fail to accurately reflect the actual influencing factors in complex terrain environments, resulting in reduced prediction accuracy. Moreover, since the factors affecting travel time in complex environments are complex and changeable, the time estimation models used in the relevant technologies are difficult to achieve efficient generalization in different environments, and the accuracy and reliability of the prediction results are limited. Therefore, the relevant technologies have problems such as insufficient feature design, poor model adaptability, and limited generalization ability, which lead to the inability to accurately estimate travel time. Summary of the invention

[0005] The technical problem to be solved by the present invention is the problem that the travel time cannot be accurately estimated.

[0006] In order to solve the above technical problems, the present invention provides a method for estimating travel time based on deep learning in a complex environment, which specifically adopts the following technical solutions:

[0007] The present invention provides a travel time estimation method based on deep learning in a complex environment, comprising: first, obtaining a trajectory data set of a target area. The target area includes: a plateau environment area and a mountain environment area, and the trajectory data set includes: a plurality of trajectory points, and the global positioning system GPS coordinates, slope, turning angle, weather category and travel time corresponding to the plurality of trajectory points. Then, the trajectory data set is divided into: a training data set, a verification data set and a test data set according to a preset division ratio. Next, a travel time estimation model is constructed, and the travel time estimation model is used to estimate the travel time. Secondly, the travel time estimation model is trained and optimized according to the training data set and the verification data set to obtain an optimized travel time estimation model. The optimized travel time estimation model is tested according to the test data set, and the model evaluation index value is determined. Finally, when the model evaluation index value meets the index threshold, the data to be estimated is input into the optimized travel time estimation model, and the travel time estimation result is output.

[0008] This method can perform feature design and model optimization for complex environment terrain and weather, that is, by integrating trajectory data sets with multiple features such as GPS coordinates, slope, turning angle and weather category in complex environments (plateau environment and mountain environment). The constructed travel time estimation model is trained, optimized and tested through the trajectory data set, so that the optimized travel time estimation model can more comprehensively understand the complex travel conditions in complex environments, accurately capture the impact of variable terrain and weather on travel, and combine terrain and weather and other influencing factors to evaluate travel time. In this way, the reliability of travel time estimation can be effectively improved through the optimized travel time estimation model, and the adaptability of modeling complex environment terrain and weather factors in the travel time estimation method is improved, so that the accuracy of estimating travel time in complex environments can be effectively improved.

[0009] In an optional implementation, the travel time estimation model includes: an embedding layer, a Transformer encoding layer and a decoding layer; the embedding layer is connected to the Transformer encoding layer, and the Transformer encoding layer is connected to the decoding layer. Among them, the embedding layer is used to convert the slope, turning angle and weather category respectively and output the slope embedding vector, the turning angle embedding vector and the weather embedding vector of preset dimensions, and output the GPS coordinate difference; the GPS coordinate difference is determined based on the GPS coordinates of the trajectory point and the GPS coordinates of the adjacent trajectory points. The Transformer encoding layer is used to extract features based on the slope embedding vector, the turning angle embedding vector, the weather embedding vector and the GPS coordinate difference, and generate and output the corresponding slope feature matrix, the turning angle feature matrix, the weather feature matrix and the coordinate feature matrix. The decoding layer is used to perform weighted fusion and decoding based on the slope feature matrix, the turning angle feature matrix, the weather feature matrix and the coordinate feature matrix, and determine and output the travel time estimation result.

[0010] In this implementation, the travel time estimation model can convert the slope, turning angle and weather category into fixed-dimensional embedding vectors through the embedding layer. The Transformer encoding layer can use the multi-head self-attention mechanism to extract sequence features and integrate features from different data to enhance the correlation and complementarity between data. The decoding layer can weightedly fuse the four types of features in plateau and mountainous environments through the self-attention mechanism to capture the complex relationship between these features. In this way, the accuracy of the travel time estimation model in estimating travel time in complex environments can be improved.

[0011] In an optional implementation, the slope, corner angle and weather category are converted and output into a slope embedding vector, a corner embedding vector and a weather embedding vector of preset dimensions, respectively. The embedding layer is specifically used to: first, convert the slope, corner angle and weather category into corresponding slope high-dimensional sparse vectors, corner high-dimensional sparse vectors and weather high-dimensional sparse vectors respectively through One-Hot encoding. Then, the slope high-dimensional sparse vector, corner high-dimensional sparse vector and weather high-dimensional sparse vector are mapped to a low-dimensional space through an embedding matrix and converted into a slope embedding vector, a corner embedding vector and a weather embedding vector.

[0012] In an optional implementation, the above-mentioned feature extraction is performed based on the slope embedding vector, the corner embedding vector, the weather embedding vector and the GPS coordinate difference, and the corresponding slope feature matrix, corner feature matrix, weather feature matrix and coordinate feature matrix are generated and outputted in sequence. The Transformer encoding layer is specifically used to: first, position encoding is performed on the slope embedding vector, the corner embedding vector, the weather embedding vector and the GPS coordinate difference, and the corresponding slope self-attention output result, corner self-attention output result, weather self-attention output result and coordinate self-attention output result are determined through the self-attention mechanism. Then, the slope self-attention output result, the corner self-attention output result, the weather self-attention output result and the coordinate self-attention output result are spliced ​​through the multi-head self-attention mechanism to obtain the multi-head self-attention output result. Finally, the multi-head self-attention output result is processed by a feedforward neural network to generate a slope feature matrix, a corner feature matrix, a weather feature matrix and a coordinate feature matrix.

[0013] In an optional implementation, in the above-mentioned weighted fusion and decoding based on the slope feature matrix, the corner feature matrix, the weather feature matrix and the coordinate feature matrix to determine and output the travel time estimation result, the decoding layer is specifically used to: splice the slope feature matrix, the corner feature matrix, the weather feature matrix and the coordinate feature matrix to obtain a feature fusion splicing matrix. Perform attention weighted fusion on the feature fusion splicing matrix to obtain a feature weighted fusion matrix. Decode the feature weighted fusion matrix through a residual fully connected network to determine the travel time estimation result.

[0014] In an optional implementation, the travel time estimation model is trained and optimized based on the training data set and the validation data set to obtain an optimized travel time estimation model, including: using a meta-learning framework based on the training data set and the validation data set, and determining model parameters of the optimized travel time estimation model through an inner loop and an outer loop.

[0015] In this implementation, a meta-learning framework is used to train and optimize the travel time estimation model through inner and outer loops, which can improve the generalization ability of the travel time estimation model in different environments.

[0016] In an optional implementation, the algorithm used for training and optimizing the travel time estimation model based on the training data set and the validation data set is a gradient descent algorithm.

[0017] In an optional implementation, the above model parameters are trained and optimized using the Adam optimizer; the loss function used to train and optimize the travel time estimation model based on the training data set and the validation data set is: mean absolute error MAE.

[0018] In an optional implementation, the above model evaluation index value is: mean absolute percentage error MAPE.

[0019] In an optional implementation, the weather category is one of the following: sunny, cloudy, overcast, light rain, moderate rain, heavy rain, thunderstorm, mist, dense fog, light snow, moderate snow, heavy snow, sleet, strong wind and hail.

[0020] In this implementation, the above-mentioned weather categories cover weather conditions in complex environments, so that the factors affecting travel time in complex environments can be accurately reflected, which helps to estimate travel time under different meteorological conditions, thereby improving the accuracy of time estimation. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of a flow chart of a method for estimating travel time based on deep learning in a complex environment provided by an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of the structure of a travel time estimation model provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.

[0024] With the rapid development of Internet technology and intelligent transportation technology, navigation functions are widely used in daily life. When a user wants to pass a route, he can estimate the travel time on the target route based on the starting point and end point of the target route, thus bringing convenience to the user's travel.

[0025] In the related art, a time estimation model can be generally used to estimate the travel time. For example, the FMA-ETA model comprehensively considers the potential impact of traffic volume, driver proficiency, and travel mode on the travel time estimation to estimate the travel time.

[0026] However, the relevant technologies are mainly used in urban scenarios, and the time estimation models usually rely on the characteristic patterns of the urban environment. They show insufficient adaptability when dealing with complex environments and find it difficult to effectively capture long-distance dependencies in travel trajectories. The relevant technologies usually lack specialized feature designs for terrain and weather factors, and fail to accurately reflect the actual influencing factors in complex terrain environments, resulting in reduced prediction accuracy. Moreover, since the factors affecting travel time in complex environments are complex and changeable, the time estimation models used in the relevant technologies are difficult to achieve efficient generalization in different environments, and the accuracy and reliability of the prediction results are limited. Therefore, the relevant technologies have problems such as insufficient feature design, poor model adaptability, and limited generalization ability in estimating travel time in complex environments, which leads to the inability to accurately estimate travel time.

[0027] In order to solve the above problems, an embodiment of the present application provides a deep learning-based travel time estimation method in a complex environment. The method can perform feature design and model optimization for complex environment terrain and weather, so as to improve the adaptability of the travel time estimation method in modeling complex environment terrain and weather factors, thereby effectively improving the accuracy of estimating the travel time in a complex environment.

[0028] The solution provided by the embodiment of the present application is introduced below in conjunction with the accompanying drawings.

[0029] For details, see Figure 1 , which is a flow chart of a method for estimating travel time based on deep learning in a complex environment provided by an embodiment of the present invention, such as Figure 1 As shown, the travel time estimation method based on deep learning in a complex environment provided by the present invention includes the following steps S101-S106:

[0030] S101, obtaining a trajectory dataset of a target area.

[0031] In the embodiment of the present application, in order to meet the needs of estimating travel time in complex environments, the target area may include: plateau environment area and mountainous environment area. Since plateau environment area and mountainous environment area usually include complex environments, such as complex terrain, complex weather, etc. In this way, the trajectory data set passing through the target area can be feature designed and model optimized based on the complex environment terrain and climate.

[0032] Specifically, the trajectory data set of the target area includes: a plurality of trajectory points, and GPS coordinates, slopes, turning angles, weather types, and travel times corresponding to the plurality of trajectory points, wherein the travel time is set as a data label of the trajectory data set.

[0033] Among them, the GPS coordinates, weather categories and travel time in the trajectory data set can be obtained through the collection device. For example, taking the collection device set on the collection vehicle as an example, the collection vehicle can travel in the target area, and the GPS coordinates can be collected every 2-3 seconds during the driving process. The recorded GPS points are used as trajectory points, and the weather category and collection time of the trajectory points are obtained. Furthermore, the travel time between two trajectory points can be determined based on the collection time of the two trajectory points. For example, the travel time from trajectory point A to trajectory point B is the difference between the collection time of trajectory point B and the collection time of trajectory point A.

[0034] The slope in the trajectory dataset can be determined based on the digital elevation model (DEM) data of the target area. DEM data can be obtained by drones or remote sensing satellites. DEM data covers the target area and is represented by a regular rectangular grid.

[0035] In one implementation, the slope can be calculated from the DEM data using a plane method, that is, the DEM data is projected onto a two-dimensional plane in the elevation direction, and the slope is represented by the maximum elevation change rate in the direction of adjacent grids. Specifically, the slope expression is:

[0036]

[0037] in,

[0038]

[0039] Where slope e represents the slope of trajectory point e, It represents the rate of change of the elevation of the trajectory point e in the horizontal direction, Indicates the rate of change of the elevation of trajectory point e in the vertical direction.

[0040] z a 、z b 、z c 、z d 、z f 、z g 、z h and z iRespectively represent the elevation values ​​of track point a, track point b, track point c, track point d, track point f, track point g, track point h and track point i. Track point a, track point b, track point c, track point d, track point f, track point g, track point h and track point i are all neighboring points of track point e. x_celsize represents the size of the grid in the x direction, y_celsize represents the size of the grid in the y direction, and for example, x_celsize and y_celsize can both be 0.5m. wight1 represents the weight of the neighboring grid of track point e in the direction of the line connecting track point c, track point f and track point i, wight2 represents the weight of the neighboring grid of track point e in the direction of the line connecting track point a, track point d and track point g, wight3 represents the weight of the neighboring grid of track point e in the direction of the line connecting track point g, track point h and track point i, and wight4 represents the weight of the neighboring grid of track point e in the direction of the line connecting track point a, track point b and track point c. wight1, wight2, wight3 and wight4 can be preset according to the actual application requirements.

[0041] The slope angle in the trajectory data set is used to characterize the curvature of the driving path of the trajectory point, and the slope angle can be determined by the GPS coordinates of the trajectory point.

[0042] For example, track point A, track point B and track point C are three consecutive track points, and the GPS coordinates of track point A, track point B and track point C are (x1, y1), (x2, y2) and (x3, y3) respectively. The slope angle of track point B can be determined according to the direction angles of line segments AB and BC. Specifically, the expression of the slope angle of track point B can be:

[0043] α B =|θ2-θ1|;

[0044] in,

[0045]

[0046] In the formula, α B represents the slope angle of trajectory point B, θ1 represents the direction angle of line segment AB, and θ2 represents the direction angle of line segment BC.

[0047] In some embodiments, the weather category is one of the following: sunny, cloudy, overcast, light rain, moderate rain, heavy rain, thunderstorm, mist, dense fog, light snow, moderate snow, heavy snow, sleet, strong wind and hail. The above weather categories cover weather conditions in complex environments, so that the factors affecting the travel time in complex environments can be accurately reflected, which is helpful for estimating the travel time under different meteorological conditions, thereby improving the accuracy of time estimation.

[0048] S102: dividing the trajectory data set into: a training data set, a validation data set, and a test data set according to a preset division ratio.

[0049] Specifically, to facilitate the training and optimization of the travel time estimation model, the embodiment of the present application can divide the trajectory data set obtained in S101 into: a training data set, a verification data set, and a test data set. Among them, the training data set is used to train the travel time estimation model, the verification data set is used to optimize the model parameters of the travel time estimation model, and the test data set is used to test the generalization ability of the travel time estimation model to ensure its effect in practical applications.

[0050] In some embodiments, the preset division ratio may be 6:2:2 for training data set: validation data set: test data set. In this way, the travel time estimation model can be effectively trained by a relatively large training data set to improve the accuracy of the travel time estimation model.

[0051] S103: Construct a travel time estimation model.

[0052] In the embodiment of the present application, a method based on deep learning is used to estimate the travel time. First, a travel time estimation model is constructed, and the travel time estimation model can be used to estimate the travel time.

[0053] In some embodiments, Figure 2 A schematic diagram of the structure of the travel time estimation model provided by an embodiment of the present invention is shown in FIG. Figure 2 As shown, the travel time estimation model includes: an embedding layer, a Transformer encoding layer, and a decoding layer; the embedding layer is connected to the Transformer encoding layer, and the Transformer encoding layer is connected to the decoding layer.

[0054] The embedding layer is used to convert the slope, turning angle and weather category respectively and output the slope embedding vector, turning angle embedding vector and weather embedding vector of preset dimensions, and output the GPS coordinate difference. The GPS coordinate difference is determined according to the GPS coordinates of the track point and the GPS coordinates of the adjacent track points.

[0055] The preset dimension may be, for example, 256, so that a balance can be achieved between expression capability and computing resources. The present application does not specifically limit the preset dimension, and the preset dimension may be preset according to actual application requirements.

[0056] The Transformer encoding layer is used to extract features based on the slope embedding vector, the turning angle embedding vector, the weather embedding vector and the GPS coordinate difference, and generate and output the corresponding slope feature matrix, turning angle feature matrix, weather feature matrix and coordinate feature matrix.

[0057] like Figure 2 As shown, the Transformer encoding layer includes multiple Transformer blocks, and the multiple Transformer blocks can respectively perform feature extraction processing on the slope embedding vector, the angle embedding vector, the weather embedding vector and the GPS coordinate difference.

[0058] The decoding layer is used to perform weighted fusion and decoding based on the slope feature matrix, the turning angle feature matrix, the weather feature matrix and the coordinate feature matrix to determine and output the travel time estimation result.

[0059] In some embodiments, the above-mentioned conversion of the slope, the turning angle and the weather category into a slope embedding vector, a turning angle embedding vector and a weather embedding vector of preset dimensions respectively and outputting the embedding layer is specifically used for:

[0060] First, the embedding layer converts the slope, turning angle, and weather category into corresponding high-dimensional sparse vectors of slope, turning angle, and weather through One-Hot encoding. In this way, the travel time estimation model can distinguish the feature values ​​of different categories and capture the feature relationships in specific environments (e.g., plateau environment areas, mountainous environment areas).

[0061] Then, the embedding layer maps the slope high-dimensional sparse vector, the corner high-dimensional sparse vector and the weather high-dimensional sparse vector to the low-dimensional space through the embedding matrix and converts them into the slope embedding vector, the corner embedding vector and the weather embedding vector.

[0062] In some embodiments, in order to more intuitively represent the distance relationship in plateau environment areas and mountainous environment areas, the GPS coordinates in the embedding layer can use the difference between adjacent points, that is, the GPS coordinate difference (for example, Δp1, Δp2) as direct input and output, omitting the one-hot encoding and embedding steps.

[0063] In some embodiments, the expression of the above embedding matrix can be:

[0064]

[0065] Where W E represents the embedding matrix, C represents the dimension of the high-dimensional space where the classification value is located, and E represents the dimension of the low-dimensional space. Among them, the embedding matrix W EThe parameters in are the model parameters of the travel time estimation model to be optimized. By optimizing the embedding matrix W E The parameters in can adjust the distance between similar data points in the embedding space (i.e., the embedding layer) to enhance the feature learning ability of the travel time estimation model.

[0066] In some embodiments, the embedding process of the embedding layer, that is, converting the original feature vector (i.e., the above-mentioned slope, corner angle, and weather category) into an embedding vector (i.e., the above-mentioned slope embedding vector, corner embedding vector, and weather embedding vector) can be expressed as:

[0067]

[0068] Where Z represents the embedding vector, represents the One-Hot mapping function, x represents the original feature vector, and W represents the embedding matrix.

[0069] In some embodiments, in complex environments such as plateau environments and mountainous environments, the complexity of the terrain requires that the travel time estimation model can effectively capture the long-distance dependencies between trajectory points. The Transformer encoding layer can effectively extract sequence features through a multi-head self-attention mechanism. Specifically, the above feature extraction is performed based on the slope embedding vector, the corner embedding vector, the weather embedding vector and the GPS coordinate difference, and the corresponding slope feature matrix, corner feature matrix, weather feature matrix and coordinate feature matrix are generated and output in sequence. The Transformer encoding layer is specifically used for:

[0070] First, the Transformer encoding layer performs position encoding on the slope embedding vector, angle embedding vector, weather embedding vector and GPS coordinate difference respectively, and determines the corresponding slope self-attention output result, angle self-attention output result, weather self-attention output result and coordinate self-attention output result through the self-attention mechanism.

[0071] Specifically, the maximum position coding length in the position coding process is set to 10000, so that the feature extraction requirements of long sequences can be met.

[0072] The above self-attention mechanism includes multiple attention heads, each of which independently calculates self-attention to capture the dependencies between feature points. The self-attention calculation expression is:

[0073]

[0074] In the formula, Attention(Q,K,V) represents the self-attention output result, softmax(·) represents the normalized exponential function, Q represents the query vector (Query), K represents the key vector (Key), V represents the value vector (Value), and d K Represents the dimension of the key vector K.

[0075] Then, the Transformer encoding layer concatenates the slope self-attention output results, the corner self-attention output results, the weather self-attention output results, and the coordinate self-attention output results through a multi-head self-attention mechanism to obtain the multi-head self-attention output results.

[0076] Specifically, the Transformer encoding layer can concatenate the attention output results of multiple self-attention heads through the multi-head self-attention mechanism to obtain the final representation of the multi-head attention (i.e., the multi-head self-attention output result). The expression of the multi-head self-attention output result is:

[0077] MultiHead(Q,K,V)=Concat(head1,…,head h )W O ;

[0078]

[0079] Where MultiHead(Q,K,V) represents the output of multi-head self-attention, Concat(·) represents the combination function, head represents the attention head, h represents the number of attention heads, and W O represents the linear transformation matrix, d V Represents the dimension of the value vector V, d model Represents the dimensions of the input and output vectors in the Transformer encoding layer.

[0080] Exemplarily, the number of attention heads h can be set to 8. In this way, the Transformer encoding layer can strike a balance between capturing information and reducing redundancy.

[0081] Finally, the Transformer encoding layer processes the multi-head self-attention output results through a feedforward neural network to generate the slope feature matrix, corner feature matrix, weather feature matrix, and coordinate feature matrix.

[0082] Specifically, the output result (i.e., feature matrix) of the multi-head self-attention output processed by the feedforward neural network is expressed as:

[0083] FFN(X)=ReLU(XW1+b1)W2+b2;

[0084]

[0085]

[0086] In the formula, FFN(X) represents the output result of the feedforward neural network processing, X represents the output result of the multi-head self-attention, ReLU(·) represents the linear rectification function, and W T1 and W T2 Represents the trainable parameter matrix. Among them, X is transformed into a matrix with dimension d ff b1 represents the bias vector associated with the first layer, and b1 also has dimension d ff , b2 represents the bias vector of the second layer.

[0087] For example, ff Can be set to 512, d model It can be set to 256. In this way, the travel time estimation model can effectively extract the complex features in plateau and mountainous environments.

[0088] In some embodiments, Figure 2 As shown, the decoding layer includes: Fusion Block Residual Fully Connected Network (Residual-FCNS). Through the decoding layer, the four types of features (coordinates, slope, angle and weather) in the plateau environment and mountain environment can be weighted and fused through the self-attention mechanism to capture the complex relationship between these features. Specifically, the above-mentioned weighted fusion and decoding based on the slope feature matrix, the angle feature matrix, the weather feature matrix and the coordinate feature matrix to determine and output the travel time estimation result, the decoding layer is specifically used for:

[0089] First, the slope feature matrix, the corner feature matrix, the weather feature matrix and the coordinate feature matrix are concatenated to obtain the feature fusion concatenation matrix. The expression of the feature fusion concatenation matrix is:

[0090] X all =[X p ,X s ,X a ,X t ];

[0091]

[0092] Where, X all represents the feature fusion concatenation matrix, X p represents the coordinate feature matrix, X s represents the slope characteristic matrix, X a represents the corner feature matrix, X t represents the weather feature matrix, and N represents the number of feature channels.

[0093] Then, the feature fusion concatenation matrix is ​​subjected to attention weighted fusion to obtain the feature weighted fusion matrix.

[0094] Specifically, attention weights can be assigned to each type of feature (coordinates, slope, angle, and weather) to weight the contribution of different features during fusion. The expression of the feature weighted fusion matrix is:

[0095]

[0096] Where, X f represents the feature weighted fusion matrix, a i represents the attention weight of the i-th feature, a i It can be preset according to actual application requirements to ensure that the complex relationship between features can be effectively utilized in plateau environments and mountain environments. F represents the total number of feature categories. In the embodiment of the present application, F can be set to 4.

[0097] Finally, the feature weighted fusion matrix is ​​decoded through the residual fully connected network to determine the travel time estimation result. Specifically, the expression of the travel time estimation result is:

[0098] Y=FC estimation (FCs(X f )+X f );

[0099] FCs(X f )=FC1(FC2(FC3(FC4(X f ))));

[0100]

[0101] Where Y represents the estimated travel time, FC estimation (·) represents the output result of the residual fully connected network, FC i represents the i-th fully connected layer in the residual fully connected network, i∈[1, 2, 3, 4], W Fi represents the trainable matrix of the i-th fully connected layer, FCs(X f ) represents the output result after stacking four fully connected layers, FC i (s) represents the linear transformation formula of the i-th fully connected layer, and c represents the offset vector in the fully connected layer transformation. In the case of i=1, s represents the feature weighted fusion matrix X f , when i>1, s represents the output result of the i-1th fully connected layer.

[0102] Exemplarily, the number of units in the four fully connected layers can be set to 1024, 512, 256, and 256, respectively.

[0103] S104: Train and optimize the travel time estimation model according to the training data set and the verification data set to obtain an optimized travel time estimation model.

[0104] In an embodiment of the present application, in order to achieve travel time estimation in complex environments (such as plateau environments and mountainous environments), the initialization of the travel time estimation model can be completed by introducing data sets of plateau environments and mountainous environments. This data set setting allows the travel time estimation model to capture characteristic patterns in different environments during the training process. By alternately training on this plateau environment data set and the mountainous environment data set, the time estimation model can learn different influencing factors and characteristic relationships in the plateau environment and the mountainous environment.

[0105] In some embodiments, the travel time estimation model is trained and optimized according to the training data set and the validation data set to obtain an optimized travel time estimation model, including:

[0106] A meta-learning framework is adopted according to the training dataset and the validation dataset to determine the model parameters of the optimized travel time estimation model through inner and outer loops.

[0107] The model parameters of the travel time estimation model include: the embedding matrix W E The parameters in the Transformer encoding layer can be trained. T1 and W T2 The parameters in , and the trainable parameter matrix W of the decoding layer Fi Parameters in .

[0108] Specifically, the meta-learning framework is used to train and optimize the travel time estimation model, which can improve the generalization ability of the travel time estimation model in different environments.

[0109] For example, taking the training of the travel time estimation model based on the training data set as an example, the training data set includes: a plateau environment data set and a mountain environment data set. The meta-learning framework is used to train the travel time estimation model, which specifically includes two steps: an inner loop and an outer loop:

[0110] Inner loop: The travel time estimation model is learned on a single data set of a plateau environment data set or a mountain environment data set, and the model is trained with a small amount of data to adapt the travel time estimation model to the specific characteristics of the current environment. The specific process includes: at the beginning of each inner loop, the initial parameters of the model are μ1; after several iterative optimizations, the model parameters are updated to μ2, so that the specific characteristics of the current environment can be captured. Among them, the data in the plateau environment data set or the mountain environment data set selected in the inner loop are random to prevent the travel time estimation model from being biased in a specific environment and to ensure that the travel time estimation model performs well in both plateau and mountain environments.

[0111] Outer loop: The outer loop performs global optimization on the model on multiple tasks to further improve the generalization ability of the model. At the beginning of each outer loop, that is, at the beginning of the first inner loop in the outer loop, the model parameters are μ1. After multiple inner loop optimizations, the model parameters are updated to μ2. Finally, the expression of the optimized model parameters is:

[0112]

[0113] In the formula, μ f represents the optimized model parameters, r represents the number of iterations of the current outer loop, η is the maximum number of outer loop iterations, and β is the learning rate of the outer loop. The outer loop integrates the optimization results of the inner loop to enable the travel time estimation model to adapt to different travel time estimation tasks, so as to improve the generalization of the travel time estimation model in complex environments such as plateau environments and mountainous environments.

[0114] In some embodiments, the algorithm used to train and optimize the travel time estimation model based on the training data set and the validation data set is: a gradient descent algorithm.

[0115] In some embodiments, the model parameters of the travel time estimation model may be trained and optimized using an Adam optimizer, wherein the loss function used to train and optimize the travel time estimation model based on the training data set and the validation data set is: mean absolute error MAE.

[0116] Exemplarily, the process of training and optimizing the model parameters of the travel time estimation model using the Adam optimizer includes:

[0117] First, at the beginning of each outer loop, a plateau environment dataset or a mountain environment dataset is randomly selected from the training dataset for training, and the model parameters are updated through n inner loops.

[0118] Then, in the inner loop, m iterations are performed on the randomly selected training data set to gradually adapt the travel time estimation model to the data characteristics of the current travel time estimation task.

[0119] Next, after completing n inner loops, the model parameters of the travel time estimation model are updated to adapt the travel time estimation model to the data characteristics of the current travel time estimation task.

[0120] Finally, the current iteration result is used as the initial parameter of the next outer loop, and the process is repeated until the maximum number of iterations is reached. For example, the maximum number of iterations can be set to 100 times. When the maximum number of iterations is reached, the training is stopped to obtain the final optimized model parameters.

[0121] S105. Test the optimized travel time estimation model according to the test data set and determine the model evaluation index value.

[0122] Furthermore, the travel time estimation model optimized in S104 may be tested according to the test data set to evaluate the generalization ability of the optimized travel time estimation model. Specifically, the generalization ability of the optimized travel time estimation model may be quantitatively evaluated through the model evaluation index value.

[0123] In some embodiments, the model evaluation index value may be: mean absolute percentage error MAPE. The smaller the MAPE, the higher the generalization ability of the optimized travel time estimation model, and the higher the accuracy of the estimated travel time.

[0124] S106. When the model evaluation index value meets the index threshold, the data to be estimated is input into the optimized travel time estimation model, and the travel time estimation result is output.

[0125] Finally, when the model evaluation index value meets the index threshold, it can be determined that the optimized travel time estimation model can meet the application requirements. Among them, the index threshold can be preset according to the model evaluation index and the actual application requirements.

[0126] Furthermore, when the model evaluation index value meets the index threshold, the data to be estimated can be input into the optimized travel time estimation model. The data to be estimated can include: GPS coordinates, slope, turning angle and weather category corresponding to the time to be estimated. Then, the optimized travel time estimation model can estimate the travel time according to the data to be estimated, and output the travel time estimation result.

[0127] The travel time estimation method based on deep learning in a complex environment provided by an embodiment of the present invention can perform feature design and model optimization for complex environment terrain and weather, that is, by integrating a trajectory data set of multiple features such as GPS coordinates, slope, turning angle and weather category in a complex environment (plateau environment and mountain environment). The constructed travel time estimation model is trained, optimized and tested through the trajectory data set, so that the optimized travel time estimation model can more comprehensively understand the complex travel conditions in a complex environment, accurately capture the impact of changeable terrain and weather on travel, and combine terrain, weather and other influencing factors to evaluate the travel time. In this way, the reliability of the travel time estimation can be effectively improved through the optimized travel time estimation model, and the adaptability of the travel time estimation method for modeling complex environment terrain and weather factors is improved, thereby effectively improving the accuracy of estimating the travel time in a complex environment.

[0128] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0129] In the description of the present invention, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0130] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0131] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0132] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the general concept of this application and do not constitute a limitation on the protection scope of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without creative work belong to the protection scope of this application.

Claims

1. A travel time estimation method based on deep learning in complex environments, characterized in that: include: Obtain the trajectory dataset of the target area; The target area includes: a plateau environment area and a mountain environment area, and the trajectory data set includes: a plurality of trajectory points, and the global positioning system GPS coordinates, slopes, turning angles, weather types and travel times corresponding to the plurality of trajectory points respectively; Dividing the trajectory data set into: a training data set, a validation data set and a test data set according to a preset division ratio; Constructing a travel time estimation model, wherein the travel time estimation model is used to estimate the travel time; Training and optimizing the travel time estimation model according to the training data set and the verification data set to obtain an optimized travel time estimation model; Testing the optimized travel time estimation model according to the test data set and determining a model evaluation index value; When the model evaluation index value satisfies the index threshold, the data to be estimated is input into the optimized travel time estimation model, and the travel time estimation result is output.

2. The method according to claim 1, characterized in that: The travel time estimation model comprises: an embedding layer, a Transformer encoding layer and a decoding layer; the embedding layer is connected to the Transformer encoding layer, and the Transformer encoding layer is connected to the decoding layer; The embedding layer is used to convert the slope, the turning angle and the weather category respectively and output a slope embedding vector, a turning angle embedding vector and a weather embedding vector of preset dimensions, and output a GPS coordinate difference; the GPS coordinate difference is determined according to the GPS coordinates of the track point and the GPS coordinates of the adjacent track points; The Transformer encoding layer is used to extract features according to the slope embedding vector, the corner embedding vector, the weather embedding vector and the GPS coordinate difference, and generate and output the corresponding slope feature matrix, corner feature matrix, weather feature matrix and coordinate feature matrix in sequence; The decoding layer is used to perform weighted fusion and decoding according to the slope feature matrix, the turning angle feature matrix, the weather feature matrix and the coordinate feature matrix, and determine and output a travel time estimation result.

3. The method according to claim 2, characterized in that The slope, the turning angle and the weather category are converted and output into a slope embedding vector, a turning angle embedding vector and a weather embedding vector of preset dimensions respectively, and the embedding layer is specifically used for: The slope, the turning angle and the weather category are respectively converted into corresponding slope high-dimensional sparse vector, turning angle high-dimensional sparse vector and weather high-dimensional sparse vector by One-Hot encoding; The slope high-dimensional sparse vector, the corner high-dimensional sparse vector and the weather high-dimensional sparse vector are mapped to a low-dimensional space through an embedding matrix and converted into the slope embedding vector, the corner embedding vector and the weather embedding vector.

4. The method according to claim 2, characterized in that: The feature extraction is performed according to the slope embedding vector, the corner embedding vector, the weather embedding vector and the GPS coordinate difference, and the corresponding slope feature matrix, corner feature matrix, weather feature matrix and coordinate feature matrix are generated and outputted in sequence. The Transformer encoding layer is specifically used for: Performing position encoding processing on the slope embedding vector, the turning angle embedding vector, the weather embedding vector and the GPS coordinate difference respectively, and determining the corresponding slope self-attention output result, turning angle self-attention output result, weather self-attention output result and coordinate self-attention output result through a self-attention mechanism; The slope self-attention output result, the corner self-attention output result, the weather self-attention output result and the coordinate self-attention output result are spliced ​​through a multi-head self-attention mechanism to obtain a multi-head self-attention output result; The multi-head self-attention output results are processed through a feedforward neural network to generate the slope feature matrix, the corner feature matrix, the weather feature matrix and the coordinate feature matrix.

5. The method according to claim 2, characterized in that: In the step of performing weighted fusion and decoding according to the slope feature matrix, the corner feature matrix, the weather feature matrix and the coordinate feature matrix to determine and output the travel time estimation result, the decoding layer is specifically used for: The slope feature matrix, the corner feature matrix, the weather feature matrix and the coordinate feature matrix are spliced ​​to obtain a feature fusion splicing matrix; Performing attention weighted fusion on the feature fusion splicing matrix to obtain a feature weighted fusion matrix; The feature weighted fusion matrix is ​​decoded through a residual fully connected network to determine the travel time estimation result.

6. The method according to claim 1, characterized in that The step of training and optimizing the travel time estimation model according to the training data set and the verification data set to obtain an optimized travel time estimation model includes: A meta-learning framework is adopted according to the training data set and the validation data set to determine model parameters of the optimized travel time estimation model through an inner loop and an outer loop.

7. The method according to claim 1, characterized in that The algorithm used to train and optimize the travel time estimation model based on the training data set and the verification data set is: gradient descent algorithm.

8. The method according to claim 6, characterized in that The model parameters are trained and optimized using the Adam optimizer; the loss function used to train and optimize the travel time estimation model based on the training data set and the verification data set is: mean absolute error MAE.

9. The method according to claim 1, characterized in that: The model evaluation index value is: mean absolute percentage error MAPE.

10. The method according to claim 1, characterized in that The weather category is one of the following: sunny, cloudy, overcast, light rain, moderate rain, heavy rain, thunderstorm, mist, dense fog, light snow, moderate snow, heavy snow, sleet, strong wind and hail.

Citation Information

Cited By

  • Passing time estimation method, system and equipment combined with large model, and medium

    CN121505864A