This paper proposes a recommendation algorithm for user RNN encoder and item encoder based on knowledge graph, which integrates the structured information of knowledge graph into the algorithm. The RNN encoder helps to understand users' preferences, and the item encoder helps to mine \(v\) 's high-level information. These are beneficial to the generation of better users' representation vectors and items' representation vectors, make full use of knowledge graphs, and solve the limitations of the three methods. URIR effectively alleviates the sparsity problem and improves the accuracy of recommendation systems. Experiments were carried out on 3 real-world data sets. we use AUC, Precision, Recall and MRR as the evaluation indicators of the models. URIR was compared with FM, NFM [1]}, KPRN [2]}, Wide&Deep [3]}, RKGE [4]}, RippleNet [5]}, KGCN [6]}. Our experiment results demonstrate that URIR is generally better than the advanced algorithm on three data sets, can provide users with more accurate recommendation results, and has strong flexibility in fusing heterogeneous data. Good performance in AUC, Precision and Recall shows that it can be applied to classification tasks or tasks where users rate items. Achieving better performance in MRR indicates that it can be applied to the task of sorting items.
