Congestion and complexity in the field of highway transportation have risen steadily in recent years, particularly because the growth rate of vehicles has far outpaced the growth rate of roads and other transportation facilities. To ensure smooth traffic, reduce traffic congestion, improve road safety, and reduce the negative impact of air pollution on the environment, an increasing number of traffic management departments are turning to new scientifically developed technology. The urban road traffic is simulated by nodes and sidelines in this study, which is combined with graph theory, and the information of real-time changes of road traffic is added to display and calculate the relevant data and parameters in the road. On this foundation, the dynamic path optimization algorithm model is discussed in the context of high informationization. Although the improved algorithm’s optimal path may not be the conventional shortest path, its actual travel time is the shortest, which is more in line with users’ actual travel needs to a large extent.