###### Abstract
However, it still has some limitations. TransE performs poorly in handling complex relationships and cannot accurately infer one-to-many, many-to-one, many-to-many, and reflexive relationships. Therefore, there is significant room for improvement in this method, and many researchers have made various enhancements to the TransE model. Study [31] analyzed that the \(h+r\approx t\) constraint in the TransE model was too strong, which led to the learning error with complex relations. Based on TransE, the head entity \(h\) and tail entity \(t\) are projected onto a hyperplane, relaxing TransE's strict assumption of \(h+r\approx t\). Study [32] proposed the TransR model. On the basis of TransH, a corresponding vector space was constructed for each relation, effectively solving the problem that TransH entities and relations are in the same vector space, which makes it impossible to distinguish two entities with similar semantics. In order to successfully reduce the computational complexity, study [33] created the TransD model and updated the mapping function on the basis of TransR. Study [35] proposed a knowledge graph embedding method based on a double restriction score (DLS), which effectively improves the effect of link prediction and triplet classification. Study [36] proposed a knowledge graph embedding method based on adaptive double-limited loss (ADL), which effectively improves the accuracy of link prediction. Study [37] proposed a transliteration-based model building method (TransCoRe) based on relational correlation, and tested it on WordNet and Freebase datasets, effectively improving the accuracy of link prediction and triplet classification. In study [38], a TransModE approach was proposed. The relational vector in the knowledge graph was based on TransE, which effectively minimized the computing complexity by representing it as a transition of modular space. A distributed translation-based knowledge graph embedding model (DTransE) was suggested in study [39]. The Gather-Apply-Scatter model, which is based on the TransE model, is used in this method to significantly increase the model's calculation speed. The link prediction, triplet classification, and model calculation degree are all enhanced in the aforementioned method. However, the models in the above approaches either ignore the neighborhood information of the triples when modeling the triples in the knowledge base, resulting in the inability to deal with rare entities with less associative knowledge, or fail to adaptively extract the most relevant neighboring node attributes for each entity when introducing the neighborhood information, resulting in the introduction of redundant information. To solve the above problems, a knowledge representation learning model (TransRFT) based on a relational neighborhood and flexible translation is proposed in this paper, which is implemented as follows:  
Firstly, by means of the hyperplane projection of TransH, the vectorization of head entity, relation, and tail entity is carried out to effectively represent the complex relation. Secondly, the idea of flexible translation is introduced, and \(h,r,t\) is no longer regarded as a fixed vector, but as a plane within a range, which effectively alleviates the strict assumptions of the TransE model \(h+r\approx t\) and enhances the ability of the model to deal with complex relationships. Finally, the neighborhood information of different relationships is integrated to further improve the performance of the model. This paper is divided into the following sections: The TransRFT model's guiding principle and model training methodology are introduced in Section 2. The experimental findings and a model performance analysis are presented in Section 3. The conclusion of this paper is found in Section 4. Section 2 introduces the principle of the TransRFT model and the model training methodology. Section 3 gives the experimental results and performance analysis of the model. Section 4 is the conclusion of this paper.