As an information sharing center, university library covers almost all languages and various carriers of information, so how to effectively use information resources and give full play to the service role of the library is very important. Nowadays, with the rapid development of the Internet, big data and cloud computing, the undifferentiated recommended content of the existing library management system has been unable to meet the diverse and personalized needs of users; for a large number of user data accumulated in the library management system over the years, the value of data needs to be excavated. Therefore, the use of data technology for innovation has become a new driving force for the development and transformation of libraries. User portrait is a kind of data analysis tool which can process the data related to users, extract the user feature vector, and then get the user feature model to display the user panorama intuitively. This paper applies the user portrait to the library field, constructs the portrait model through data analysis, and uses the portrait to effectively predict user preferences, user interests and user behavior, which can be used as a basis to achieve accurate recommendation of library books and meet the personalized needs of readers.