The invention relates to the field of computers, in particular to a micro-service fault positioning method and device based on
causal inference and a
knowledge graph. The method comprises the following steps: firstly, collecting an original calling link, a multi-dimensional
time sequence index and
log data of a micro-
service system, analyzing the correlation of micro-service indexes by using a partial correlation
algorithm, then inferring the causal relationship of the indexes by using a structural
causal model, and mapping the causal relationship of the indexes to specific service calling by using a
principal component analysis method. And constructing a service dependency relationship. And then defining a
knowledge graph ontology, constructing a fault
dependency graph according to an index causal relationship and a service dependency relationship, and fusing the fault
dependency graph with a calling link graph to form a complete fault dependency
knowledge graph with multi-level influence. And finally, storing the graph in a
graph database, taking exception as a service node starting point, and outputting a fault
root cause candidate set through exception detection, random walk and node
score calculation. According to the invention, the efficiency and accuracy of fault positioning are improved, and the stable operation of the micro-
service system is ensured.