With the rapid development of Telematics, Vehicle Self-Organizing Networks (VANETs) play an increasingly critical role in Intelligent Transportation Systems (ITS). Especially in the environment without roadside assistance units (RSUs), how to effectively manage inter-vehicle communication and improve the stability and communication efficiency of the network has become a hot topic of current research. In this paper, a Deep Reinforcement Learning-based Intelligent QoS-optimized efficient routing algorithm for vehicular networks (DRLIQ) is proposed for VANETs with/without RSU environments, and routing methods are proposed respectively. Among them, in RSU-free environment, the DRLIQ algorithm utilizes the powerful processing capability of deep reinforcement learning to intelligently select the optimal data transmission path by dynamically learning and adapting to the changes in the vehicular network, thus effectively reducing communication interruptions and delays, and improving the accuracy of data transmission. The performance of the DRLIQ algorithm under different vehicle densities is evaluated in simulation experiments and compared with current popular algorithms. The experimental results show that the DRLIQ algorithm outperforms the comparison algorithms in reducing the number of communication interruptions, BER and network delay, especially in vehicle-dense environments. In addition, the DRLIQ algorithm shows higher adaptability and stability in coping with network topology changes and vehicle dynamics.