To address the low metering accuracy of DC electric energy metering due to the ripple contained in the output voltage and current of DC charging pile, based on the conventional DC electric energy metering algorithm, how ripple affects the accuracy of DC electric energy metering is analyzed, and the simulation results of using the classical filtering method are given to illustrate the effectiveness of the classical filtering method. An improved filtering algorithm based on wavelet threshold function denoising method is proposed to denoise the measured data for DC charging pile. Meanwhile, the simulation results of the improved function and the traditional soft and hard threshold wavelet denoising method were compared and analyzed respectively, and the DC charging data with the same trend were obtained. It is verified that the improved wavelet threshold denoising algorithm has the best effect on improving the measurement accuracy of DC charging pile.