Abstract:Aiming at the problem of weakened diagnostic effectiveness caused by disease diagnosis models relying solely on semantic feature while lacking structural feature, a diagnosis method of sheep disease was proposed based on knowledge graph and fusion of semantics and structure. Bidirectional gated recurrent unit (BiGRU) was utilized to extract semantic feature from symptom texts, and graph convolutional network (GCN) was utilized to capture latent structural feature from the symptom knowledge graph. To better integrate semantic and structural features, an improved attentional feature fusion (AFF) module was introduced. Experimental results on the sheep disease symptom dataset demonstrated that the proposed model achieved the accuracy, precision, recall, F1 score, and mean reciprocal rank of 96.86%, 97.73%, 97.32%, 97.25%, and 97.49%, respectively. Compared with models such as TextCNN, TextRCNN, TextRNN, DPCNN, LASA, HSAN-capsule, DCDKG, and CNN-BiLSTM-Attention, the accuracy was improved by at least 0.19 percentage points and up to 1.76 percentage points, the precision was improved by at least 0.18 percentage points and up to 0.84 percentage points, the recall was improved by at least 0.14 percentage points and up to 1.21 percentage points, the F1 score was improved by at least 0.21 percentage points and up to 1.50 percentage points, and the mean reciprocal rank was improved by at least 0.15 percentage points and up to 1.23 percentage points. Additionally, experiments on the public datasets Dxy and Muzhi validated the model’s robustness. To enhance the interpretability of disease diagnosis, an improved gradient-based saliency method was proposed to explain diagnostic results. The method of fusing semantic and structural features effectively improved disease diagnosis accuracy, providing technical support for sheep disease diagnosis.