# A Novel Dual-Strategy Approach for Constructing Knowledge Graphs in the Home Appliance Fault Domain
## 3 Methodology
### Knowledge Fusion  
To address the issues of entity nesting or semantic redundancy commonly observed in entities extracted from unstructured appliance fault repair cases, knowledge fusion methods are employed to merge redundant fault knowledge. This approach ensures the construction of a higher-quality knowledge graph. Knowledge fusion refers to the integration of knowledge from diverse sources and forms, encompassing identical entities across different knowledge bases, multiple distinct knowledge graphs, and multi-source  
Figure 5: Example of progressive prompt design.  
heterogeneous external knowledge. Its primary objective is to identify and reconcile equivalent instances, categories, and attributes within knowledge graphs, thereby enabling the updating and refinement of existing knowledge graphs. Key tasks in this process include coreference resolution and entity disambiguation.  
Coreference resolution involves merging entities in the text that refer to the same real-world object, addressing issues such as synonyms and nested entities. For instance, in the entities extracted from appliance-related texts, terms like \"heating tube\" and \"heat pipe\" both refer to the same entity, \"electric heating tube\", despite using different names. This inconsistency arises because appliance fault datasets are often derived from human-written or spoken descriptions, lacking standardization and professional terminology. Conducting coreference resolution experiments helps to standardize the knowledge graph and enhance its consistency.  
Entity disambiguation refers to resolving the ambiguity and vagueness of entity names in a text, ensuring that each entity name accurately corresponds to its intended object. This process primarily addresses the issue of homonyms--entities with the same name but different meanings. However, since the source data in this study is entirely derived from the appliance fault domain, such issues are largely absent.  
This study employs the Chinese Word Vectors 0.2.0 released by Tencent AI Lab to represent entities as word vectors. Compared to other models, this word vector model offers broader coverage and higher accuracy. Entities are merged by calculating the cosine similarity between their vectors and applying a threshold, with entities exceeding the threshold being fused. Cosine similarity is a commonly used metric for measuring the angle between two non-zero vectors, assessing their directional similarity in a multidimensional space. In natural language processing, particularly in applications involving word vectors, cosine similarity is frequently utilized to evaluate the semantic closeness of two words. The formula is as follows:  
\[Similarity=\frac{A\cdot B}{\|A\|\|B\|}=\frac{\sum_{i=1}^{n}A_{i}B_{i}}{\sqrt{ \sum_{i=1}^{n}{A_{i}}^{2}}\sqrt{\sum_{i=1}^{n}{B_{i}}^{2}}} \tag{15}\]  
where \(A\) and \(B\) represent the entities, \(A_{i}\) and \(B_{i}\) denote their respective values in the \(i\) dimension.  
When the directions of the two word vectors are perfectly aligned (i.e., the angle between them is 0 degrees), the cosine similarity equals 1.  
When the directions are completely opposite (i.e., the angle is 180 degrees), the cosine similarity equals \(-1\).  
When the two word vectors are orthogonal (i.e., the angle is 90 degrees), the cosine similarity equals 0.  
When the directions of the two word vectors are partially similar but not completely aligned (i.e., the angle between them is between 0 and 90 degrees), the cosine similarity value falls between 0 and 1, indicating a certain degree of similarity between them.  
The computed similarity results for entities are shown in Table 3.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Entity 1** & **Entity 2** & **Similarity** \\ \hline Condenser & Evaporator & 0.9464 \\ Refrigerant & Cryogen & 0.9319 \\ Liquefied gas stove & Gas stove & 0.8518 \\ Temperature controller & Thermostat & 0.8838 \\ Indoor unit & Air conditioning indoor unit & 0.8987 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Entity similarity table.