After analyzing the characteristics of rock salt and the feasibility and importance of using underground rock salt cavern as energy stockpiles, this paper explains in detail about the principle of sonar detection technology in cavern measuring and its data organization. This paper studies the technology of three-dimensional surface topological reconstruction of underground rock salt cavern based on sonar detection data with half-edge data structure and boundary representation models. Meanwhile, by conducting validity check for constructed surface model and repair of possible defects, the paper finds correct and effective three-dimensional surface models of underground rock salt cavern, and provides effective data base for the stability analysis, creep analysis and other numerical simulations of underground rock salt cavern. This method, with important economic and social significance, can provide a scientific basis and technological support for the construction of caverns, especially for the safe and rational use of underground rock salt cavern.