| With the booming economy in recent years,the number of vehicles in the city also increases,which not only facilitates the travel of residents but also causes a large number of congestion problems and brings much inconvenience to the urban traffic planning.Therefore,how to efficiently realize the vehicle path planning has become the top priority of urban traffic planning.Based on the A*algorithm,this paper proposes a vehicle path planning method based on traffic flow prediction and driving cost according to the variation rules of traffic flow data and the driving cost of vehicles.To fully extract the spatiotemporal correlation in traffic flow data,this paper proposes an attention-based spatiotemporal fusion convolutional network prediction model.It predicts the road speed at different moments according to the traffic conditions of the road to obtain the predicted passing time of other roads,which is an essential parameter of the subsequent A*algorithm.Aiming at the execution efficiency of the A*algorithm,this paper improves its execution efficiency while retaining the heuristic search characteristics of the A*algorithm,integrates the calculation method of vehicle fuel consumption with the evaluation function of the A*algorithm,and applies the A*algorithm based on traffic flow prediction and driving cost to the path planning research of this paper.The main research contents of this paper are as follows:(1)Based on the characteristics of existing traffic flow prediction methods,this paper proposes an attention-based spatiotemporal fusion convolutional network prediction model to predict traffic flow by combining the traffic flow variation rules of different roads in the road network with the prediction model.Based on the traffic flow distribution of other nodes in the road network,this paper first uses the Temporal Convolutional Network(TCN)and the attention mechanism to capture the temporal associations in the traffic flow data.Because of the deep spatial dependence on the road network,this paper proposes the corresponding spatial connectivity subgraph and traffic flow characteristic similar subgraph and uses the Graph Attention Network(GAT)to update the corresponding road weight matrix of the two subgraphs.The Graph Convolutional Network(GCN)extracts the spatial features.This paper uses the spatiotemporal fusion layer to complete the fusion process of features and then completes the corresponding traffic flow prediction task for the extracted spatiotemporal features.(2)Based on the unique pathfinding advantages of the A*algorithm and to improve the execution efficiency of the A*algorithm,this paper replaces the original OPEN table structure of the A*algorithm with the minimum heap to complete the selection of relevant nodes with low time complexity.Considering the large number of traversal operations involved in the pathfinding process,this paper uses the hash table to determine whether the owning node is already in the OPEN table to avoid many invalid procedures.Based on the complexity of the road network,this paper uses the diagonal distance as the distance calculation method in the A*algorithm,which not only takes into account the advantages of the Euclidean distance and Manhattan distance but also makes the obtained path more in line with the actual driving habits and has more vital practical significance.(3)Aiming at the congestion degree of different roads in the road network,this paper proposes a dynamic road network congestion algorithm based on the road’s stable state.That is,using the congestion coefficient matrix to describe the congestion degree of different roads and judging whether the traffic condition of the road is in a stable state according to the average speed difference between the current and the last moment.For the road in an unstable state,the vehicle speed at the next moment should be predicted according to the prediction model above to obtain the corresponding road passing time and complete the update of the congestion coefficient matrix.Then,according to the driving characteristics of vehicles,a new calculation method for fuel consumption is proposed in this paper.According to the fuel consumption per 100 km and the proportion of vehicles with different displacements,the overall mathematical expectation is used to replace its fuel consumption level.Among them,the driving fuel consumption can be calculated by the driving distance,the idling fuel consumption can be calculated by the idling time,and the idling time mainly comes from the idling time at the red lights.After obtaining the corresponding fuel consumption,this paper integrates the calculation method of fuel consumption with the evaluation function of the A*algorithm.It introduces the road passing time predicted above into the heuristic function to find the optimal path with the corresponding minimum fuel consumption and complete the path planning.Experimental results show that the path planning method proposed in this paper based on traffic flow prediction and driving cost can effectively save driving costs,avoid congestion,and significantly save vehicles’ idling fuel consumption and total fuel consumption,thus realizing efficient travel. |