Internet of things is a wireless data communications technology, while radio frequency identification (RFID) is an emerging technology in the automatic identification of the Internet of things. In fact, it means the use of RFID system identification technology through the Internet to achieve the application of information interconnection and sharing. In this paper, the author analyzes an improved RFID middleware architecture and optimal algorithm based on internet of things. Through the analysis of RFID middleware technology, we put forward an optimized load balancing algorithm. The results show that the optimization algorithm is superior to the existing algorithms in the average time of load balancing and label processing.