Nuclear magnetic resonance (NMR) logging technology is a kind of technology developed gradually in recent decades, which has great significance for the development of logging technology. Nuclear magnetic resonance logging technology compared to traditional logging technology, not only has the ideal signal - hydrogen nuclei, and the exploration of the original signal is not affected by the influence of the rock skeleton, is the only provides information that is unrelated to formation rock porosity, can better provide the formation permeability, movable fluid, oil and gas content, such as information, It is a kind of logging method suitable for low porosity and low permeability and complex special lithology, and overcomes the defects of traditional logging methods .With the development of NMR theory, NMR has been applied to the analysis of well logging data. The original NMR logging data are the spin-echo string observed by the spin echo string, and its amplitude decays with time. The T2 spectrum can be inversely calculated from the measured logging data, and then the T2 spectrum can be further solved to obtain key data such as permeability and porosity. In this paper, a simulated T2 spectrum is constructed by forward modeling, and the inversion is carried out under different SNR. On this basis, the specific relationship between the optimal number of singular values retained and the change of SNR is summarized, and an improved singular value decomposition algorithm is proposed. Inverse problem can be converted to nonlinear fitting optimization problems with nonnegative constraints, linear truncation algorithm on calculation precision has increased significantly, compared with the traditional singular value decomposition inversion algorithm, a new algorithm of signal-to-noise ratio on the solution of smaller and has better stability, and through the improvement of nonnegative constraint processing structure was more rapid inversion iteration algorithm.