###### Abstract  
The use of knowledge graphs has grown significantly in recent years. However, entities and relationships must be transformed into forms that can be processed by computers before the construction and application of a knowledge graph. Due to its simplicity, effectiveness, and great interpretability, the translation model lead by TransE has garnered the most attention among the many knowledge representation models that have been presented. However, the performance of this model is poor when dealing with complex relations such as one-to-many, many-to-one, and reflexive relations. Therefore, a knowledge representation learning model based on a relational neighborhood and flexible translation (TransRFT) is proposed in this paper. Firstly, the triples are mapped to the relational hyperplane using the idea of TransH. Then, flexible translation is applied to relax the strict restriction \(h+r=t\) in TransE. Finally, the relational neighborhood information is added to further improve the performance of the model. The experimental results show that the model has good performance in triplet classification and link prediction. k _applied_  
_sciences_  
[table]cappositionposition=top  
knowledge and unable to capture the intricate semantic relationship between them. Both logic-based and rule-based knowledge representation methods need to define a lot of logic or rules manually, which makes it difficult to update a knowledge graph in time. Moreover, in the real world, knowledge is almost endless, and it is difficult to guarantee the completeness of knowledge in the knowledge graph by artificial means. These disadvantages seriously limit the application prospects of knowledge graphs. To overcome the limitations of the manual approaches mentioned above and enable automatic learning of knowledge from data in a form that is easier to understand and process for machine learning algorithms, researchers have proposed knowledge representation learning. The goal of knowledge representation learning is to create a representation that appropriately captures knowledge so that machines can process and comprehend material more effectively. Therefore, researchers proposed a word vector model (word2 vec [15], glove [16], BERT [17], etc. ), whose basic idea is to transform words in natural language into low-dimensional dense vectors, so that words with similar semantics are closer in the vector space. This representation can enhance the correlation between data through semantic connection to realize the expression of more standardized and high-quality data. It can also capture the semantic relationship between words and other words, which is crucial to the knowledge graph's representation learning. At present, researchers have proposed many knowledge representation models: examples include the distance model (SE) [18], single layer neural network (SLM) model [19] and many other neural network models [20; 21; 22], the generative adversarial network model [23], semantic matching energy model (SME) [24], bilinear model (LFM) [25], multi-modal pretraining [26; 27; 28; 29], the translation model [30; 31; 32; 33; 34], etc. Among them, the translation model headed by TransE [30] has attracted a lot of research interest. This approach, which was put forth in 2013, follows a traditional model for knowledge graph embedding. Each entity and relationship in the TransE model is encoded as a vector, and in the vector space, the vector's angle, length, and location convey the semantic meaning of the entity or relationship, which is accurately reflected in link prediction and triplet categorization. The scoring function for the relationship (r) between the head entity (h) and the tail entity (t) can be represented as \(f_{r}(h,t)=\|h+r-t\|_{2}^{2}\), which represents the Euclidean distance between the head entity vector and the tail entity after adding the head entity vector and the relational vector. The training process for this method is simple and efficient, and the method is intuitive and easy to understand.