The application of Internet of Vehicles (IoV) technology has greatly improved users' driving experience, but it also faces some challenges: 1) the central server is not powerful enough to support the rapid growth of IoV identity authentication requests and 2) there is a privacy leakage issue during vehicle authentication. To address these issues, we propose an anonymous authentication scheme based on trustworthy roadside unit group (TRUG)-PBFT main secondary chains and zero-knowledge proof (ZKP). First, to enhance authentication efficiency, we propose the TRUG-PBFT consensus algorithm. It improves the traditional PBFT by optimizing the PBFT consensus process, reducing the number of consensus nodes using fractional grouping, and selecting main node using verifiable random functions (VRFs). Second, we use a lattice-based ZKP scheme to achieve anonymous authentication of vehicles, and important data in the vehicle authentication process is stored by the main chain maintained by the base station group and the secondary chain maintained by the roadside unit group. Finally, experimental results demonstrate that compared to PBFT consensus, TRUG-PBFT in terms of consensus efficiency is improved by approximately 33%, and the authentication scheme's computational cost is only 7.08 ms, superior to existing authentication schemes.