A smart city is a comprehensive concept created by multiple digital industries. Smart city is a new generation of information technologies such as the Internet of Things, cloud computing, big data, and geospatial information to promote smart new ideas for urban planning, construction, management and services, power city operation and administrative management, industrial development, and public services in various fields. It is a modern high-end urban development form. A smart city is to establish a city center system by connecting terminals, applying information technology and network, and ultimately promoting the efficiency improvement and economic structure optimization in various fields. However, in the construction of smart cities, due to the sharing of a large amount of data, a lot of data leakage is caused, and data protection faces many challenges. The article first introduces the structure of smart cities, the challenges faced by smart cities in data protection and data privacy protection; then summarizes the characteristics, applications, and challenges of blockchain technology in the application of blockchain in smart cities, and makes reference to references. The corresponding comparisons are made, and the future challenges are finally summarized and proposed.