## 2 Knowledge Graph-Based Spacecraft Anomaly Detection Algorithm Architecture and Framework  
### Knowledge Graph-Based Spacecraft Anomaly Detection Algorithm Architecture  
Spacecraft anomaly detection represents a complex and challenging task, given that it involves a myriad of interrelated factors. For instance, the temperature of spacecraft equipment could be influenced by the electrical load of various devices and the space environment's ambient conditions. As such, it is evident that merely relying on preset alert thresholds for identifying abnormal states doesn't yield reliable results. This study aims to bridge this gap by integrating spacecraft anomaly detection prior knowledge with spacecraft telemetry data using knowledge graphs. These knowledge graphs, consisting of nodes representing different data points and edges representing relationships between them, can effectively map out intricate dependencies among various factors influencing spacecraft equipment. This integration provides a more holistic and reliable approach to spacecraft anomaly detection compared to traditional methods.  
The knowledge graphs group and extract pertinent features from the telemetry data and then compare these real-time telemetry data with reference data that are generated by the knowledge graph itself. This approach is based on the hypothesis that data deviations in abnormal situations are significantly larger than those in historical normal data. If the deviation is found to be too large, the situation is marked as an abnormal state. The overall architecture of the algorithm is depicted in Figure 1.  
The first step in the process involves the collection of spacecraft equipment data and expert knowledge. These resources are used to construct a comprehensive spacecraft equipment knowledge graph through the knowledge extraction process that is built into this article. After this, feature data are extracted from historical telemetry data in accordance with the spacecraft mission log. These feature data are then seamlessly integrated with the knowledge graph, creating a multidimensional and interconnected dataset.  
The second step involves generating a reference dataset that accurately describes the current state characteristics of the spacecraft. This is accomplished through the knowledge graph. The reference dataset's primary function is to detect anomalies in orbiting spacecraft by comparing the telemetry data with the reference dataset. This comparison allows for an objective, data-driven assessment of the spacecraft's current state and any potential deviations.  
The third step is the construction of a spacecraft anomaly event graph. This graph is based on spacecraft anomaly reports and disposal plans. When abnormal data are detected, this graph is queried using abnormal keywords to determine the cause of the anomaly and the corresponding disposal plan. This proactive approach helps in mitigating risks and ensuring the spacecraft's safe operation.  
The final step is undertaken if the cause of the anomaly is still unknown after querying the event graph. In such cases, further knowledge extraction and manual completion are carried out. Once the anomalies are resolved, they are recorded in the event graph. This serves as a valuable future reference, ensuring an ongoing accumulation of knowledge and facilitating more efficient anomaly detection and resolution in subsequent operations.  
Figure 1: Knowledge graph-based spacecraft anomaly detection algorithm architecture.