According to the NOMA-based Internet of Vehicles resource allocation method provided by the invention, the access capability of the network can be effectively improved, and the total transmission rateof all users is significantly improved. According to the method, firstly, a clustering concept is introduced, users are merged into clusters by a base station according to geographic positions of VUEusers, and the users in the same cluster can share the same spectrum resource. Then, in order to reduce the co-channel interference of the CUE and the V2V; CUE users and a VUE user cluster sharing the same spectrum resource are determined by adopting a Hungary algorithm, finally, the suboptimal transmitting power of each V2V sender in the VUE user cluster is obtained by adopting particle swarm optimization iterative optimization on the non-convex problem in the VUE user cluster, and the corresponding suboptimal VUE throughput is calculated. According to the method, the NOMA is applied to theV2V unicast users in communication between vehicles, the total throughput of the V2V users reaches the maximum value on the basis of ensuring the service quality of V2I and V2V communication, and a new thought is provided for the V2X resource allocation problem under the NOMA.