With the rapid development of cloud computing and other related services, higher requirements are put forward for network transmission and delay. Due to the inherent distributed characteristics of traditional networks, machine learning technology is difficult to be applied and deployed in network control. The emergence of SDN technology provides new opportunities and challenges for the application of machine learning technology in network management. A load balancing algorithm of Internet of things controller based on data center SDN architecture is proposed. The Bayesian network is used to predict the degree of load congestion, combining reinforcement learning algorithm to make optimal action decision, self-adjusting parameter weight to adjust the controller load congestion, to achieve load balance, improve network security and stability.