Smart city is a new form of information city and digital city and a new type of innovative means of planning and management of city, its theoretical research and construction practice have entered a period of rapid development. In-depth understanding of concept related to smart city will contribute to avoid the one-sidedness and blindness of smart city construction. This paper collects and analyzes social media data by means of network crawler technology. Then, we build the cognitive model of the concept of smart city by using e-commerce portrait technology, and discusses definition and information label of smart city. Finally, the technology-based smart city and the sustainable smart city are compared and analyzed by using the cognitive model of the concept of smart city. The purpose is to provide revelation for the future development of smart city.