In this paper, based on KNN and Bayesian algorithm, the basic algorithm principle of KNN (WKNN) and Bayesian is expounded. Because the KNN and Bayesian algorithm develop the signal intensity matching strategy from the perspective of mean error and probability, so one of the single algorithm can not better cope with the complex and changeable positioning scenario. For this problem, this paper proposes a new signal intensity matching criterion based on the fusion of two algorithms. The main idea of the algorithm is to change the traditional weighting method in WKNN to the weighting method considering Bayesian estimation results. In order to verify the effectiveness of the fusion algorithm, the existing visible light indoor positioning algorithm based on fingerprint recognition is compared, and the fusion algorithm based on KNN and Bayesian algorithm is proposed. This improved algorithm not only reduces the complexity of Bayesian algorithm, but also significantly improves the positioning accuracy of WKNN algorithm.