Today, the development of in-vehicle networks, the realization of intelligent vehicle connectivity, and the improvement of urban traffic safety, traffic congestion, energy and environmental protection, etc., are various social problems that we urgently need to solve. At present, the communication mechanism in terms of in-vehicle cloud service architecture and in-vehicle edge computing cannot meet the needs of business growth in the 5G era. This paper mainly studies the new optimization ideas based on the network access part of the vehicle fog calculation model. Based on the ant colony optimization algorithm, how to choose more effective nodes as the relay nodes of the network access part, so that the network resources can be effectively used, such as increasing the resource bandwidth available at the edge of the network is to avoid congestion problems as much as possible, which greatly relieves the pressure of computing and data processing in the cloud.