Constructing digital twin water conservancy construction knowledge graph to mine the potential relationships between water conservancy construction objects can help the relevant personnel to optimize the water conservancy construction design scheme and decision-making process. Aiming at the interdisciplinary and complex knowledge structure of digital twin water conservancy construction, and the problems such as insufficient learning and low extraction accuracy of knowledge of general knowledge extraction models in water conservancy domain, a Digital Twin water conservancy construction Knowledge Extraction method based on Large Language Model (DTKE-LLM) was proposed to improve the accuracy of knowledge extraction. In this method, by deploying local Large Language Model (LLM) through LangChain and integrating digital twin water conservancy domain knowledge, prompt learning was used to fine-tune the LLM. In the LLM, semantic understanding and generation capabilities were utilized to extract knowledge. At the same time, a heterogeneous entity alignment strategy was designed to optimize the entity extraction results. Comparison experiments and ablation experiments were carried out on the water conservancy domain corpus to verify the effectiveness of DTKE-LLM. Results of the comparison experiments demonstrate that DTKE-LLM outperforms the deep learning-based BiLSTM-CRF (Bidirectional Long Short-Term Memory Conditional Random Field) named entity recognition model and the general Information extraction model UIE (Universal Information Extraction) in precision. Results of the ablation experiments show that compared with the ChatGLM2-6B (Chat Generative Language Model 2.6 Billion), DTKE-LLM has the F1 scores of entity extraction and relation extraction improved by 5.5 and 3.2 percentage points respectively. It can be seen that the proposed method realizes the construction of digital twin water conservancy construction knowledge graph on the basis of ensuring the quality of knowledge graph construction.