Differential power analysis attacks are the most commonly used means to break cryptographic devices within the side-channel attack technology. Since there is a lot of noise in the energy trace of cryptographic devices, a large number of energy traces are needed to carry out the attack, resulting in a high computational cost. To solve this problem, this study starts with an analysis of the characteristics of power waveform formation from the inherent properties of the complementary metal oxide semiconductor circuit. Then, based on the Hamming distance classification method and the results of power waveform analysis, the useful information interval in the energy trace is located, that is, the interval with a strong correlation with the key. Thus, we achieve energy trace compression. Finally, a system on chip with a 128-bit AES algorithm is used to conduct various attack experiments in the effective interval. The results show that the calculation is cut off by 96%, which greatly reduces the computational cost for differential power analysis attacks.