PF2RM: A Power Fault Retrieval and Recommendation Model Based on Knowledge Graph

: Energy saving and emission reduction have become common concerns in countries around the world. In China, with the implementation of the new strategy of “carbon peak and neutrality” and the rapid development of the new smart grid infrastructure, the amount of data of actual power grid dispatching and fault analysis show exponential growth, which has led to phenomena such as poor supervision effectiveness and difﬁculty in handling faults in the process of grid operation and maintenance. Existing research on retrieval recommendation methods has had a lower accuracy rate at cold-start due to a small sample of user interactions. In addition, the cumulative learning of user personalization during general retrieval results in a poor perception of potential interest. By constructing a power knowledge graph, this paper presents a power fault retrieval and recommendation model (PF2RM) based on user-polymorphic perception. This model includes two methods: the power fault retrieval method (PFR) and the user-polymorphic retrieval recommendation method (UPRR). First, we take the power grid fault dispatching business as the core and reconstruct the ontology layer of the power knowledge graph. The PFR method is used to design the graph-neighbor fault entity cluster to enhance the polymerization degree of a fault implementation scenario. This method can solve the search cold-start recommendation problem. At the same time, the UPRR method aims to form user retrieval subgraphs of the past-state and current-state and make a feature matching for the graph-neighbor fault entity cluster, and then realize the accurate prediction of the user’s general search intention. The model is compared with other current classical models through the evaluation of multiple recommendation evaluation metrics, and the experimental results show that the model has a 3–8% improvement in the cold-start recommendation effect and 2–10% improvement in regular retrieval. The model has the best average recommendation performance in multiple metrics and has good results in fault analysis and retrieval recommendation. It plays a helpful role in intelligent operation and maintenance of the power grid and auxiliary decision-making, and effectively improves the reliability of the power grid.


Introduction
As countries around the world gradually focus on energy conservation and green development, China has also put forward the environmental protection strategies of "carbon neutrality" and "carbon peaking". The current policy of building smart grids is steadily advancing, which poses new challenges for the automated operation of grids and the immediate maintenance of equipment. With the deployment of large-scale power grid terminal equipment and the expansion of power equipment maintenance scenes, the problem of how to realize the daily maintenance of power equipment and accurate fault analysis needs an efficient solution. With the development of artificial intelligence, the recommendation algorithm plays a crucial role in avoiding information overload and efficient access to information, and has been popularized in various industrial applications such as platform promotion and e-commerce.
Some existing, more typical recommendation methods mostly use collaborative filtering-based user-personalized acquisition matching [1,2], which generally includes an embedding learning module and an interactive modeling module. The embedding learning maps users and items to vectorized representations, and interactive modeling is based on vectorized representations to match user-item interaction features [3][4][5]. However, this method has limitations because it relies more on historical data viewed by users, so there is a problem of scarcity of data samples in the case of cold-start. In addition, encoding the correlation between users and items directly into the embedded representation learning makes it difficult to ensure the interpretability of information dissemination. The existing solution is to learn user and item representations in isolation. However, this leads to a loss of relevance between users and items, which makes it difficult to recommend items to users that have not been viewed but may be of interest. Recently, under the trend of systematization and structurization of knowledge, the recommendation method of incorporating a knowledge graph has become a research hotspot [4,[6][7][8]. This new recommendation model improves the above-mentioned limitations to a certain degree.
According to the feature acquisition and prediction algorithm, the knowledge recommendation models incorporating graphs/paths can be roughly categorized into the following three methods: method based on semantic embedding, method based on graph paths, and hybrid method of combining semantic embedding and graph paths. The semantic embedding-based recommendation approach aims to achieve knowledge representation through semantic mapping, followed by learning models to represent users' preferences sequentially, and finally calculating feature offsets between users and items to achieve a recommendation prognosis [6][7][8][9][10]. Although this method greatly enhances the correlation between entities and items, it focuses more on semantic relation modeling and is more suitable for knowledge inference and relation prediction. The graph path-based recommendation method fully incorporates the contextual structure of knowledge graph paths and makes an embedded representation of the path connection features between different items. They achieve search prediction by mining user interests through multi-source heterogeneous information [11][12][13]. This method relies on high-quality paths of entities within domain knowledge, and thus requires a large amount of manpower to optimize the knowledge graph. It is costly and the universality of its algorithm is poor [14]. The hybrid method uses the user-item interaction graph to realize the embedding-propagation of entity relation features and carries out preference ranking based on the extracted retrieval central entities [15]. Chen proposed a collaborative filtering method using knowledge graphs, which embeds both users and attributes into the knowledge graph and aggregates them using matrix modeling to achieve implicit recommendations. It effectively improves the cold-start retrieval [16]. However, existing hybrid methods mainly take features of interactive user embedding into the accumulation in the process of embedding-propagation, but do not take potential item affinity into the short-term [17,18]. Therefore, it suffers from a lack of timeliness of recommendation.
To solve the above limitations, we propose a Power Fault Retrieval and Recommendation Model (PF2RM) based on the knowledge graph. Combined with the power fault knowledge graph, this model designs a user-polymorphic recommendation method for both the cold-start mode and general retrieval mode. Specifically, we use the graphneighbor cluster polymerization method to update the cold-start prediction sequence for the power knowledge graph. It forms the user retrieval subgraph based on the polymorphic interaction process between users and items, and then recommends the fault maintenance treatment scheme according to the implementation scenario. Contributions: • We reconstruct the ontology layer of the power knowledge graph with grid dispatching business as the core.

•
We propose the graph-neighbor fault entity cluster to emphasize the correlation between neighboring project entities to solve the problem of search cold starts.

•
We design a user-polymorphic recommendation method to study the user's search intention from the user's past state and current state.
The rest of the paper is organized as follows. Section 2 focuses on reviewing relevant research. Section 3 describes the retrieval and recommendation method in the PF2RM. Section 4 shows the situational analysis of experimental simulations. Section 5 presents the summary and prospect for the next steps.

Related Work
As an important component of the intelligent interactive system, the recommendation model based on the knowledge graph has high research value in both industrial and academic fields, and is a hot topic in the field of artificial intelligence. In the above summary, we review the existing recommendation algorithms based on the knowledge graph. In the following, we focus on the research status of three types of recommendation algorithms and emphasize the similarities and differences between the existing algorithms and the algorithm in this paper.
In the field of research and development of the knowledge graph, Wang et al. [19] studied the typical application scenarios and cases of enterprise-level knowledge graphs. They analyzed the construction needs and problems faced by the enterprise-level knowledge graph platform. Tian et al. [20] described the knowledge representation and graph construction methods and processes of the knowledge graph platform. Hao et al. [21] presented a rapid construction method and application framework of the domain knowledge graph with universality, and proposed a solution for the rapid landing problem of the domain knowledge graph in knowledge quiz applications. Duan et al. [22] described the importance of the knowledge graph in recommendation quality improvement and made a feasibility validation comparison. The development of quiz and recommendation systems in various fields has effectively advanced the research progress of knowledge graphs and search recommendation technology. This paper focuses on the recommendation algorithm based on knowledge graphs.
The recommendation algorithm incorporating the knowledge graph was first proposed by Google [23], which represents knowledge as attribute-value pairs corresponding to entities. It expresses the relation between knowledge through the connection between entities. Huang et al. [3] proposed the neural graph personalized ranking (NGPR) to preserve the correlation between users and items by incorporating user-item interaction graphs into embedded learning. In the same way, Hu et al. [24] proposed an interactive rules-guided recommendation framework based on the knowledge graph in the user interaction field, which improves the recommendation results by constructing a connection mode between user portraits and perfect knowledge graphs through entity-relation paths and also improves the interpretability of the recommendation results. However, it needs to be optimized for optimal path selection. Chen et al. [11] proposed an automatic learning path generation method based on a knowledge graph, which serializes course objects based on entity attributes and relation paths to promote individualized learning. Li et al. [12] designed a forward search algorithm and some optimization techniques to solve the shortest path problem. The efficiency of the algorithm greatly exceeds that of traditional path methods. On the other hand, a new method based on semantic matching was proposed in reference [6]. It models the semantic concept of the input question by extracting the subgraphs of the knowledge base. Based on this, Jiao [25] proposed the concept of the multi-step relational path to discuss various semantic relations in the multi-relation path to improve recommendation performance. Wang et al. [7] made full use of the knowledge graph, combining multi-source interest knowledge and semantic correlations to reveal the internal principle and influencing factors of the knowledge graph representation model. Based on the concept of the knowledge graph, Yu et al. [4] proposed a graph attention recommendation model based on deep learning and realized the construction of a user portrait and two-end enhancement recommendation. Similarly, Xie et al. [8] proposed a potential meta-graph embedding for the item recommendation method. It made predictions by capturing users, items, and the low-dimensional and high-dimensional interactive information between their contexts based on the meta-graph. Based on the semantic embedding method, Sun et al. [1] proposed a collaborative filtering recommendation algorithm and the matrix decomposition method to realize semantic information acquisition and the knowledge token, and to alleviate the cold-start problem while generating an accurate recommendation list. Rendle et al. [5] used the series model to generate valid inference paths to infer the fundamental user-item interaction based on the knowledge graph and the preference information obtained from supplementary term information. Huang [26] and Tang [27] et al. fused existing grid multi-source data to construct a knowledge graph of power equipment for the integrated management of equipment in off-grid fault situations through intelligent search and visualization.
Although the existing recommendation methods have yielded good prediction results, some limitations remain: (1) Due to the strong complexity and centrality of the relation paths between entities in the fault knowledge graph, there is a lack of scientific path selection algorithms to measure the entity correlation degree. (2) The cold-start phase has a small sampling range and few user retrieval features, while the accuracy of the small sample recommendation in this case needs to be improved. (3) The diversity efficiency of the recommendation algorithm still needs to be improved, and the recommendation diversity should be considered in different stages of fault analysis to avoid the cocoon effect and to improve the time state perception of the search recommendation algorithm. Therefore, in this paper, we use PF2RM to make retrieval recommendations to users to solve the cold-start problem and the timeliness and diversity of the recommended content.

Methodology
Aiming at the characteristics of the strong professionalism of power data and high correlation degree of the power knowledge graph, this paper designs a power fault analysis system to realize the retrieval and troubleshooting of the power grid operation process. The architecture of the method consists of four layers: multi-source heterogeneous data layer, power graph construction layer, knowledge reasoning layer, and smart interaction layer. The intelligent analysis of the grid fault is realized through the data stream control transmission between layers, as shown in Figure 1. The multi-source heterogeneous data layer serves as the database for the experiments throughout the study. It mainly consists of textual data and operational data. For the safety standards and scheduling regulations contained in the text data, the general approach of knowledge graph construction is used for knowledge extraction to obtain the equipment entities and fault relationships. The operation data are also combined with expert experience and a failure plan as the metadata for the construction of the knowledge graph. At the same time, the business logic of the ontology layer of the knowledge graph is constructed in combination with the grid business.
The power graph construction layer is responsible for knowledge integration of the data in the knowledge graph and building a multi-business-focused ontology layer design approach. We perform knowledge processing (for example, disambiguation of entities and knowledge inference between relationships) on the entities and relationships obtained by knowledge extraction. After that, we construct and adapt the business ontology layer of the power knowledge graph to the multi-business model of the grid. Finally, we reorganize the extracted event knowledge with the aid of a troubleshooting case library in terms of entity relations to form the power fault knowledge graph for the study of retrieval recommendation methods for subsequent knowledge.
The method proposed in this paper is mainly implemented in the knowledge reasoning layer to achieve retrieval location and analysis of power faults by designing intelligent fault retrieval methods. We deeply mine user search recommendations and retrieval intentions through the power fault retrieval method (PFR) in the cold-start state. We propose a userpolymorphic retrieval recommendation method (UPRR) to predict the retrieval behavior of regular state users and then generate user search recommendations for grid operation and fault handling.
The smart interaction layer is programmed to visualize fault retrieval and assisted decision making. Based on the storage structure of the knowledge graph and the intelligent fault inference method, the relevant retrieval results of the fault problem are displayed to the user to assist the user in overhauling and troubleshooting the grid. Through this visualization, it can help users to achieve intelligent search Q&A and assist in decision making for grid operation and maintenance scheduling issues.

Intelligent Fault Analysis Method
Combining the fault data of the existing power knowledge graph, we perform the fault retrieval, as shown in Figure 2. To the left of Figure 2 is the logical process of fault retrieval, and to the right is the actual process of the corresponding algorithm. It triggers the wildcard based on template matching (" * " represents wildcard), extracts the retrieval keywords, and then creates the graph-neighbor fault entity cluster on the multi-business power knowledge graph. Finally, it realizes the retrieval and matching of fault entities through the power fault retrieval and recommendation model based on user-polymorphic perception, and assists the power grid fault retrieval and auxiliary decision-making.

Construction of Multi-Business Power Knowledge Graph
This paper is oriented to power fault analysis and retrieval auxiliary decision-making business, combining with the power grid topology to form a fault knowledge characterization. It takes the fault handling process as the entity attribute preset principle and uses user retrieval data and the fault preplan as the core event of the graph ontology layer construction. The preset method adopts the form of entity name → {relation} → attribute value.
The ontology structure of the multi-service power knowledge graph is shown in Table 1. In this paper, the ontology of the fault knowledge graph is divided into a threelayer structure. For each fault case in the mapping, relationships and attributes are extracted according to this structure. By redesigning the ontology layer, it is able to query more detailed solutions during grid equipment fault retrieval and can help the staff to analyze the cause of faults in the topology structure.  As shown in Figure 3, we present the ontology layer of the multi-service power knowledge graph with the help of the visualization tool of the knowledge graph. It differs from Table 1 in that the relationships between the layers are labeled and the key information available to the user during fault diagnosis is presented in a more intuitive way.

Graph-Neighbor Fault Entity Cluster
For the cold-start phenomenon, which is common in the current retrieval system, this paper designs a graph-neighbor fault entity correlation cluster method. It expands along the power entity relation path adjacent to the retrieval central entity. The graph entity feature is embedded in the recommendation model through extension and aggregation until beyond multi-hop to predict the user's retrieval target. Its function is to make the associated entities form a retrieval domain and enhance the effectiveness and applicability of the recommendation result. At the same time, it can explore the potential retrieval trend based on user historical retrieval information, and can automatically generate an interpretable optimal target.
In order to describe the extension and relevance of relationships between entities in the knowledge graph G, this paper uses N = {n|(r, k, t) ∈ G} to define the information of neighboring cluster entities connected to entity N. N(k) is an entity node set directly connected to the entity at the relation distance of k hops, and t is used to store the hop count to the neighbor entity node. The k-hop neighbor cluster entity sampling information of entity N on the knowledge graph is obtained recursively: Among them, m is the predefined maximum relation hop count. The quantified form of the above relation shows the correlation degree between the neighbor entities of the knowledge graph.
At the same time, the neighbor cluster nodes of each entity node set N(k) are clustered according to the relation rules and entity update to obtain the neighbor cluster node set. Then, the graph-neighbor fault entity cluster nodes set matched by keywords is considered the user's retrieval recommendation at retrieval cold-start, which reflects the extension of correlation in the retrieval recommendation of the knowledge graph. Each set sampling range is defined as: Among them, K is the preset hop count of the neighbor cluster node. The N(k) in the original entity node will also be adjusted dynamically. While realizing the dynamic adjustment of the graph, it also automatically drives the improvement of the recommendation method. It is worth noting that the greater the number of neighbor nodes between entities, the closer the connection between the entities, that is, the richer the entity features in the sampling range. In order to solve the problem where the traditional method ignores the close relation between the sampling entity and the retrieval central entity when sampling, this paper proposes a graph-neighbor fault entity correlation cluster method based on the above features to realize the clustering of the graph entity relation.
As shown in Figure 4, the circles in the figure represent the set N(k) of entity nodes with strong association degree with the retrieved keywords in the two-level sampling range (when k = 2). To facilitate the display of the association degree, we use solid circles of different colors for the entity nodes in the figure to represent them. The darker the color of the entity circles, the larger the number, which means the stronger the association with the retrieved keywords and the higher the priority in the retrieved results. Therefore, in order to define their priorities, we design the graph-neighbor fault entity cluster (Algorithm 1) to calculate the priority of each node. In the calculation process, the order of priority is indicated by numbers; the higher the number, the higher the priority and the darker the color of the entity in the graph. After the priority order of the entities is obtained by the relational calculation, we use the dark and filled entities (entity nodes marked as 3, 4, and 5) as the entities within the sampling set W(n) and display them to the user, and the light-colored and unfilled entities are ignored. The implementation steps are as follows:

•
Step 1: Retrieve the central graph-neighbor entity cluster. First, find the entity set N(k) directly connected to the retrieval central entity n, and make graph-neighbor entity cluster statistics for each neighbor node entity N(k) i stored in N(k); • Step 2: Obtain the graph-neighbor entity cluster. Compare the actual hop count from the central entity in N(k) i with the value of the sample value K. Then, recursively determine whether the 1 to K layer neighbor entity satisfies the hop count k, and use the satisfying entities as the elements within the graph-neighbor entity cluster W(k); • Step 3: Make statistics on the graph-neighbor cluster entity relations. Make traversal statistics for the element connections within the neighbor entity cluster W(k i ) according to the index list of each neighbor cluster node, and calculate the relation number of each entity R(W(k i ));

•
Step 4: Merge and sort the elements in R(N(k) K ). First, group R(W(k i )) and sort by the relation number to obtain the entity index list with sequence length N/2. Record the sort result as r. Then, compare the r of the two sorted groups of N/2 entity elements from the beginning of the sequence, and place the entity with the larger value of r in the sampling list W(n). After traversal, delete the duplicate index entity in the sampling list. Finally, the entity corresponding to the index in the sampling list is the graph-neighbor entity cluster W(n) of the retrieval central entity.

User-Polymorphic Retrieval Recommendation
In order to realize the accurate retrieval recommendation to the user and ensure the actual efficiency of the power grid fault analysis, the user's retrieval history is considered in the model prediction after the cold-start phase. Through sampling the retrieval information from the user past-state and current-state, the retrieval subgraph is formed, and the retrieval intention prediction is carried out by the benchmarking graph-neighbor fault entity cluster method. This enables long-term user retrieval behavior perception, as shown in Figure 5.

Polymorphic Feature Collection
The past-state feature collection aims to collect the long-term behavior features of the user. In order to save efficiency and reduce the burden of CPU operation, the collection method takes the implicit calculation of daemon, which triggers the collection behavior after the user retrieval behavior.
The current-state user feature collection process is as follows: First, the user incremental browsing data are extracted, including the fault entities D n (e 1 , e 2 , . . . , e n ) in which the user makes the retrieval behavior click in a short time ∆t. Then, based on the click item, the K-hop range entity set D(k) is queried in the fault graph.
The past-state user feature collection process is as follows: First, the user history browsing items H m (h 1 , h 2 , . . . , h m ) are collected, and then a query is made in the fault graph according to the click item to obtain the K-hop sampling range entity set H(k) of the item.
Finally, according to the neighbor cluster entity sampling information N(k) of the two kinds of items, the user current-state retrieval subgraph U D and the past-state retrieval subgraph U H are formed. During the general retrieval, the user retrieval knowledge graph is obtained based on these two subgraphs:

User Intention Prediction
The user retrieval knowledge graph U(V, E) is obtained through polymorphic feature collection. Then, the user retrieval knowledge graph is divided by spectral clustering to obtain high polymer user retrieval entity cluster S(k). Finally, the feature entity cluster corresponding to the retrieval central entity is sorted by the neighbor-graph fault entity cluster method, and the neighbor-graph fault entity cluster W'(n) is obtained. W'(n) is the user retrieval intention prediction result. The implementation steps are as follows.
Step 1: Define the adjacency matrix W and degree matrix D of the user retrieval knowledge graph. Use the Radial Basis Function (RBF) to define edge weights, where the edge weight between each entity v is represented as: For any point in the graph, its degree is defined as: Step 2: Calculate and construct the standardized Laplacian matrix L of the subgraph. The Laplacian matrix L = D − W. It is a symmetric matrix and satisfies the following formula for any vector f : In order to make the points within the cutting subgraph S(S 1 , S 2 , . . . , S k ) of the user retrieval knowledge graph weight high and between subgraphs weight low, the minimized Cut(S) needs to be calculated: Among them, vol(S i ) represents the sum of weights of all edges in the subset S. To achieve the optimal solution, introduce indicator vector H h 1 , h 2 , . . . , h j , j = 1, 2, . . . , k, then H T DH = I. It is defined as: Based on the nature of the Laplacian matrix and the definition of the indicator vector, we derive h T i Lhh i as follows: The optimization goal is: The final optimization goal is: Order H = D − 1 2 F, and substitute it into Equation (12): Step3: Calculate the feature vector F of the subgraph. Similarly, substitute D into: The optimization goal can be replaced by: Calculate the first k 1 feature vectors f of D − 1 2 LD − 1 2 and standardize the matrix of each corresponding feature vector f by row. Then, form the feature matrix F of the n × k 1 dimension.
Step4: Obtain the subgraph division (S 1 , S 2 , . . . , S k ) and predict the user intention. Use the rows of feature matrix F as samples to perform the K-Means clustering. The clustering dimension is k, and obtain the user retrieval subgraph S(S 1 , S 2 , . . . , S k ).
After that, perform the template matching based on user retrieval content to obtain the corresponding user retrieval subgraph S n . Obtain the neighbor entities in the 1 to K layer that satisfy the k-hop from the retrieval subgraph S n as elements within the graph-neighbor entity cluster W'(n). Obtain the graph-neighbor entity clusters W(n) of the retrieval central entity based on the graph-neighbor fault entity cluster method. W(n) is a list of predicted results, which is shown in Algorithm 2.

Power Fault Knowledge Graph
The power knowledge data are stored in the form of a knowledge graph, and the graph visual indication of the operational data is shown in Figure 6. The algorithm integrates the original power knowledge through ontology layer reconstruction. The fault event cases and dispatching specifications stored in the graph are connected by the hierarchical or the inclusive relation. The fault feature is evaluated and stored as a vector in the feature attribute unit corresponding to the entity.

Experimental Data and Model Comparison
This paper uses fault log data from grid operations in southern China, and it also includes power operation and maintenance manuals for equipment and expert cases. It consists of 5000 sentences, 255 entities, and 16 relations. After filtering, the number of training set entity pairs is 18,050, the number of relative facts is 30, the number of relations is 6, the number of testing set entity pairs is 3500, the number of relative facts is 20, and the number of relations is 6, representing 6 kinds of relation features.
The whole algorithm model is implemented in Python, and the experimental design of the PF2RM is compared with the four related recommendation algorithms mentioned in the paper: • RippleNet [13] is a hybrid recommendation model that propagates user preferences by introducing a knowledge graph, using the original features of users and items and the knowledge graph as input. • LibFM [5] is a model based on feature decomposition for click-through-rate prediction, using the original features of users and items as input. • DeepFM [28] is a deep learning recommendation model. The low-level feature and high-level feature are extracted by the neural network module and the factorization machine module, respectively, and the two extracted parts are input as features. • CKE [2] (Collaborative Knowledge Embedding) is a recommendation model based on the embedding method, which combines the collaborative filtering method to introduce the knowledge graph to accomplish the recommendation task.
There are two comparison modes for evaluating the recommendation effect. Both use the Top-50 [29] of the recommendation results as the evaluation data, and the evaluation indicators are compared by average.

Cold-Start Recommendation Effect Evaluation
In the cold-start search mode where the user feature information is scarce, the experiment uses NDCG (Normalized Discounted Cumulative Gain) and AUC (Area Under Curve) to evaluate the correlation of the recommendation effect in the cold-start situation.
As shown in Table 2, it is the average NDCG and AUC effect evaluation of the Top-50 of each recommendation model for the cold-start situation. The results show that the correlations of the recommendation result of RippleNet and CKE with the knowledge graph are much higher than those of LibFM and DeepFM, and the performance results in AUC are also better. In the cold-start situation, the high correlation retrieval result is more helpful for rapid fault analysis. The PF2RM recommendation algorithm proposed in this paper has an overall improvement on the current basis. As shown in Figure 7, the experimental analysis evaluates the NDCG and AUC of the Top-50 retrieval recommendation results. Each of the ten recommendation results are calculated as a whole and then compared by drawing a line chart. The comparison results show that the knowledge graph-based recommendation models perform better in terms of NDCG and AUC. The retrieval results of the knowledge graph-based models within the Top-20 are similar. However, from the retrieval effect in the Top-30 to 50, it can be concluded that the PF2RM model proposed in this paper improves the NDCG and AUC by 3% to 8% compared with the best model. The reason for this is that the structure of the knowledge graph is more able to integrate the data with strong correlation, which meets the need of users to retrieve high correlation issues in the cold-start situation. As shown in Figure 8, the experiment analyzes the sensitive influencing factors of the sampling hyper-parameter K to PF2RM in the cold-start situation and compares the results. With other parameters fixed, the K value is changed in turn to experiment. The experimental result shows that the NDCG and AUC effects are best when K is set to 1 or 2 in the cold-start situation, and the effects are worst when it is set to 5. This is because the neighbor feature information used to compute the central entity is too large, resulting in an increase in irrelevant entity features, which leads to a smoothing of the model.

User Click Recommendation Effect Evaluation
For the situation where users have long used the general search mode with rich feature information, the experiment uses accuracy P (Precision), F1 score, and D (Diversity) to evaluate the user click recommendation effect.
As shown in Table 3, the user click recommendation effect evaluation shows that LibFM, DeepFM, and CKE have similar recommendation effects in accuracy and F1 score. RippleNet uses path multi-hop correlation to mine the user's personality, and its recommendation effect is better than the above two. The PF2RM recommendation model proposed in this paper implements polymorphic analysis on this basis. Compared with RippleNet, the accuracy is 2% higher, the F1 score is the same, and the overall effect is better. At the same time, D is used to evaluate the richness of search recommendation results. The PF2RM algorithm also has a high domain recommendation effect, which can effectively avoid the information cocoon effect. As shown in Figure 9, the experiment analyzes and evaluates the precision, diversity, and F1 score of the Top-50 retrieval recommendation results for the five models. Similarly, each of the ten recommendation results are evaluated as a whole, and then compared by drawing a line graph. According to the comparison result, the top 10 to 20 results calculated by the recommendation algorithm are closest, and then the prediction effect declines rapidly after 20 results. The recommendation model based on the knowledge graph performs better in predicting results after 20. The reason is that the polymorphic recommendation algorithm is better able to recommend knowledge that is more consistent with the user's personalization and meets the need for user click recommendation in the general retrieval situation. The experimental results show that the models before the Top-20 retrieve similar results, but the PF2RM model proposed in this paper consistently performs best in subsequent retrievals, with 10%, 6%, 8%, and 2% improvements over the best model in terms of precision, diversity, recall, and F1 score, respectively. As shown in Figure 10, the experiment also analyzes the sensitive influencing factors of the sampling hyper-parameter K to PF2RM in the regular user search situation and compares the results. With the other parameters fixed, the K value is changed in turn to experiment. The last one in Figure 9 shows that the recommendation effect is best when K is set to 2 or 3 in the regular user search situation, and the effect is worst when it is set to 5. This is because as K increases, the excessive user feature sampling number causes the model to overfit.

Conclusions
Combined with the power fault knowledge, this paper presents a power fault retrieval and recommendation model based on a knowledge graph to perform deep mining of user search intention and finally realizes the accurate prediction and fault analysis of user search intention. It can make full use of the high-quality paths of the knowledge graph to realize the embedding learning of the neighbor retrieval entity relation, which greatly improves the user retrieval recommendation effect in the cold-start state. The polymorphic retrieval recommendation method collects the past-state and current-state features of useritem interaction retrieval through time domain awareness to realize short-term retrieval behavior learning of the general retrieval recommendation. It improves the diversity and personalization of recommendation results. Through the comparison experiments of four models, it can be concluded that our model has obvious advantages. From the comparative experiments of the four models, it can be concluded that our model has a clear advantage in terms of comprehensive evaluation. It is able to improve NDCG and AUC by 2-10% at cold-start, and by 10%, 6%, 8%, and 2% for precision, diversity, recall, and F1 scores in regular retrieval, respectively. This helps to assist the grid intelligent operation and auxiliary decision-making, and to improve the reliability of power grid.
Although the retrieval recommendation effect of this paper has been improved to a certain extent, the immediate efficiency and robustness of the model still remain to be tested in the face of sudden grid failures and massive data. Meanwhile, the structure of the knowledge representation and the method of autonomous learning still need to be studied, and the relational paths of entities in the knowledge graph have not been comprehensively considered. In addition, we will try to use graph neural networks to learn and represent the network structure information of the knowledge graph.