The term structure of interest rates has been a hot topic in the financial sector. With the accelerating process of interest rate liberalization, to seek a representative benchmark interest rate of the market is basis for the fixed income products pricing. This paper using Nelson-Siegel-Svensson model and polynomial spline model fitting analysis is carried out on bond transaction data of Shanghai stock exchange in China, through analysis and comparison of the two models, to choose the appropriate method to fit the term structure of interest rates.