Frequency Resource Obtaining Method Based on D2D Device Discovery in Public Safety Communication Networks