The existing privacy protection schemes for Location-Based Service (LBS) only protect users' location privacy or query privacy, which can not adopt both of the privacy protections simultaneously in the LBS system. Moreover, these schemes cannot take into account the spatial-temporal correlation and background knowledge. In response to the above mentioned questions, the LBS Privacy Protection Scheme Based on Differential Privacy (DPLQ) is proposed. The method contains two kinds of privacy protection algorithms: users' location privacy protection algorithm and users' query privacy protection algorithm. The users' location privacy protection algorithm divides the map using the Voronoi diagram, choosing l fake location points based on the improved k-means algorithm and l-diversity idea, and protects users' location privacy with the Laplace mechanism. Based on the k-anonymous algorithm, the users' query privacy protection algorithm builds a query k-anonymous set according to the neighbour users' query requests at the same time t in the cluster and the historical query probability of the region's POI and protects users' query privacy with the exponential mechanism. Through setting the privacy protection intensity of the algorithm by the users, the generated location dataset and query k-anonymous set can resist a variety of attacks from malicious attackers. Theoretical analysis and experimental results show that the scheme can effectively protect the location privacy and query privacy of users.This is an open access article under the terms of the Creative Commons Attribution License, which permits use, distribution and reproduction in any medium, provided the original work is properly cited.