Internet of Things will play a vital role in the public transport systems to achieve the concepts of smart cities, urban brains, etc., by mining continuously generated data from sensors deployed in public transportation. In this sense, smart cities applied artificial intelligence techniques to offload data for social governance. Bicycle sharing is the last mile of urban transport. The number of the bike in the sharing stations, to be rented in future periods, is predicted to get the vehicles ready for deployment. It is an important tool for the implementation of smart cities using artificial intelligence technologies. We propose a DBSCAN-TCN model for predicting the number of rentals at shared bicycle stations. The proposed model first clusters all shared bicycle stations using the DBSCAN clustering algorithm. Based on the results of the clustering, the data on the number of shared bicycle rentals are fed into a TCN neural network. The TCN neural network structure is optimized. The effects of convolution kernel size and Dropout rate on the model performance are discussed. Finally, the proposed DBSCAN-TCN model is compared with the LSTM model, Kalman filtering model, and autoregressive moving average model. Through experimental validation, the proposed DBSCAN-TCN model outperforms the traditional three models in terms of two metrics, root mean squared logarithmic error, and error rate, in terms of prediction performance.