Abstract:Most of the existing knowledge graph link prediction methods focus only on the semantic relationships between a head entity h, a relationship r, and a tail entity t in a single triad in learning semantic information. They do not consider the links between related entities and entity relationships in different triads. To address this problem, this study proposes the DeepE_CL model. Firstly, the study uses the DeepE model to learn the semantic information of related triads and entities with the same entity relationship pairs or entity relationship pairs with the same entities. Secondly, the extracted semantic information of the related triads is used to calculate the corresponding scoring function and cross-entropy loss, and the extracted semantic information of entities with the same entity relationship pairs or entity relationship pairs with the same entities is optimized through the comparative learning model, so as to predict the missing information of the related triads. This paper validates the proposed method through four common datasets and compares the proposed method with other baseline models by applying four evaluation indicators, including MR, MRR, Hit@1, and Hit@10. The experimental results show that the DeepE_CL model achieves the best results in all indicators. To further validate the usefulness of the model, this study also applies the model to a real TCM dataset, and the experimental results show that compared with the DeepE model, the DeepE_CL model reduces the MR indicators by 18, and improves the MRR, Hit@1 indicators by 0.8%, 1.1%, and the Hit@10 indicators remain unchanged. The experiments demonstrate that the DeepE_CL model, introducing a comparative learning model, is very effective in improving the performance of knowledge graph link prediction.