The goal of this article is to study the application of Internet of Things RFID technology in public libraries, and to find better algorithms to improve the efficiency of RFID technology in public libraries. The method is to find the problems that affect the efficiency of the RFID system according to the actual needs of the system in the public library, and try to optimize and improve the algorithm. This article first uses the principle of RFID technology as an entry point and introduces the principle of pure ALOHA algorithm in detail. Given its throughput rate curve with the amount of communication tags, this paper introduces the improved frame slot ALOHA algorithm based on the slot ALOHA algorithm. Then it introduces the tag quantity estimation mechanism, tag polling mechanism and privacy protection mechanism, analyzes several commonly used RFID tag quantity estimation mechanisms, and discusses the three RFID privacy protection mechanisms in detail and compares them with each other. Finally, the application of RFID technology in public libraries in China and the United States in the past decade has been investigated. It is found that the number of public libraries in both countries adopting RFID technology is in a rapid growth trend and the use rate of book tags and bookshelf tags is high. The experimental results show that compared with the pure ALOHA algorithm, the frame slot ALOHA algorithm has a significant increase in throughput. When the frame length is equal to the number of tags to be read, the throughput rate reaches the highest 36.78%. As the frame length is closer to the value of the tag to be read, the system efficiency is higher, so in practical applications, the dynamic frame slot ALOHA algorithm can be used, so that the frame length can be adjusted in real time according to the number of tags, which can effectively maintain the highest efficiency in real time.