In the context of urbanization, with the innovation of computer information technology, the target demand of intelligent transportation is also constantly improving, and the design and research of intelligent transportation system (ITS) based on artificial intelligence and virtual simulation is becoming more and more important. In the construction of the entire intelligent transportation optimization system, how to improve the accuracy of traffic flow prediction and reduce the incidence of safety accidents is currently a key issue that needs to be urgently solved. This article conducted research on the optimization methods of intelligent transportation on the Internet of Things, analyzed the application and process steps of artificial intelligence and virtual simulation in intelligent transportation, and combined intelligent transportation video and image storage calculation formulas. Based on the data results, the following conclusions were drawn through discussion: six urban intersection samples were selected through simulation experiments. The application of ITS based on artificial intelligence and virtual simulation improved the flow prediction compared with the traditional scheme, and the overall average increase was 10.35%. At the same time, the safety accident rate also improved, and the overall average decrease was 7.85%. This indicated that the intelligent transportation optimization system based on artificial intelligence and virtual simulation had good results in practical applications. This study can also optimize traffic signal control and path planning, improve traffic efficiency, save energy consumption, reduce carbon emissions, and make positive contributions to sustainable urban development.