Lots of resource-consuming intelligent tasks need to be handled in vehicular networks, and traditional resource allocation schemes are hard to meet the intelligent demands. Therefore, this paper proposes a task-oriented resource allocation scheme for intelligent tasks in vehicular networks. First, we propose a task-oriented communication system and formulate a resource allocation problem, which is aimed at maximizing the task performance. Second, based on the system model, an intelligent task-oriented resource allocation optimization criterion is proposed, which is formulated as a mathematical model, and its parameters are solved by the proposed gradient descent-based algorithm. Third, to solve resource allocation problem, a multiagent deep
Q
-network- (MADQN-) based algorithm is proposed, whose convergence and complexity are further analyzed. Last, experiments on real datasets verify the performance advantages of our proposed algorithms.