Signal preprocessing and feature extraction are two important and necessary steps of data analysis. In signal analysis, typically these two steps are implemented through multiple algorithms. Moreover, the significant parameters in most algorithms are set empirically. We have developed an algorithm that can preserve and highlight characteristic waveforms while attenuating non-feature waveforms. The parameters in the algorithm are set through difference analysis. We have conducted experiments on both clinical and open-source ECG data, obtaining effective test results.