Abstract:Equine husbandry is constrained by limited technical expertise among practitioners and a shortage of experienced frontline experts. Texts on equine disease diagnosis and treatment contain frequent entity overlaps and complex relation semantics. To address these problems, a CP-Uni-based method was proposed to construct a knowledge graph for equine disease diagnosis and treatment. First, a dataset containing 16 entity types and 15 relation types was constructed according to the characteristics of the corpus. The dataset covered the key entities and relation types involved in the diagnosis and treatment process. Second, Chinese-MacBERT-base was used as the encoder. A Candidate-Pruned Decoding strategy was designed to reduce invalid span combinations. A Prior-Guided Head Routing module and a Context-Adaptive Prior-Guided Head Routing module were introduced. Differentiated modeling of the head, tail, and span interaction maps by different attention heads was thereby enhanced. The experimental results show that the proposed model achieves a precision of 91.09%, a recall of 87.13%, and an F1 score of 89.07%. Finally, a knowledge graph for equine disease diagnosis and treatment was constructed from the extraction results. Neo4j was used for knowledge storage, visualization, and representative query validation. The results indicate that the proposed method supports knowledge management, retrieval, and application for equine disease diagnosis and treatment.