The linear trace indicates the external morphological structure of the contact portion of clamping and cutting tools, which is not easy to be destroyed, has a high occurrence rate and high significant on identification. It is of great significance for prosecutor to determine the nature of the case and determine the tools used in the crime so as to find the criminals. The traditional linear trace analyzing methods include microscopy, manual comparison of characteristics, image recognition and three-dimensional scanning methods. The single-point laser picks up the toolmark detection signal, and the longest common substring is obtained after noise reduction. In addition, the improved dynamic programming algorithm calculates and generates matching results. Finally, the effectiveness of the algorithm is verified by the actual detection data.