The development of IoT and big data technology has generated massive personal travel data. While most of the data is anonymized, it still provides more possibilities for analyzing individual travel behavior. It is worthwhile to keep exploring how to more accurately infer travel purposes based on trajectory data, smart card fare data, or shared bicycle data. In this paper, an improved research framework is proposed for travel purpose inference by applying the gravity model, Bayesian criterion and spatial clustering method. The gravity model and Bayesian rule are used to calculate the probability of users traveling to nearby POIs, and the clustering algorithm is used to identify the locations regularly visited by users. Through the identification of maximum probability POI and regular trips, different travel purposes represented by POI can be distinguished. The results showed that the identification of regular trips could verify and complement the recognition of trip purposes by POIs. Using Xi'an city of China as an example for the study, the results show that regular trips accounted for 32% of the week's trips. Of these regular trips, 30% of the trips are most likely togo to malls, restaurants, hospitals, or recreational areas. While these POIs often represent trip purposes such as shopping, eating, medical care, and entertainment, the purpose of these trips is more likely to be commuting due to the regularity of the trip. Ultimately, there are 10% of the trips reflect different trip purposes for the same POI. And there is a distance worth noting. 70% of the users have a parking error of fewer than 100 meters when going to the exact location. This distance can provide a reference for the study of bicycle commuting. Finally, we analyzed the different trip purposes' spatial and temporal distribution characteristics. The analysis of the spatial and temporal distribution can provide suggestions for the operation of bike-sharing enterprises and the management of regulators.