Abstract:D2D communication is a technique that allows two adjacent users to communicate directly and share the spectrum resources of a cellular user under the control of a base station (BS). The additional interference introduced by D2D users and shared resources of cellular users will reduce system performance, so resource allocation has become an important issue in D2D communications. In this paper, a resource allocation algorithm based on graph coloring is proposed for the maximum accessible quantity problem in D2D user intensive scenarios, in which D2D users as a vertex, cellular users resources as a cluster, vertex coloring is cluster. Simulation analysis shows that the proposed scheme can increase the maximum number of D2D users in the network, and effectively improve the system capacity.