In view of the need of automatic monitoring of oil field station, a joint algorithm for vibration monitoring of water injection pump in oil field is proposed. The algorithm combines the advantages of time domain algorithm and frequency domain algorithm, which filters the noise of original signals in time domain based on the digital signals collected by chip ADXL345, and gets the acceleration, velocity and displacement by Fourier series, to realize the purpose of double integral and optimization by using the relationship of Fourier series. Then combined with low-frequency cutoff algorithm in frequency domain, the accurate conversion between acceleration and displacement can be realized quickly. The algorithm can be effectively applied to vibration and displacement measurement of water injection pump.