One algorithm for echo searching and two algorithms for time difference measuring are proposed based on the analysis of ultrasonic echo signal. The efficiency of these algorithms is verified with the actual echo signal.By means of the echo auto-searching algorithm, the measuring time is shortaned. Furthermore, the accuracy of time difference measure is improved greatly by using the passing-zero algorithm and the correlation algorithm. Finally methods to implement these algorithms are presented also.