As one of the main risks of long-distance oil and gas pipelines, the consequences of pipeline accidents caused by third-party damage (TPD) are usually catastrophic. At present, TPD prevention approaches mainly include manual line patrol, fiber-optical vibration warning, and unmanned aerial vehicle (UAV) line patrol, but there are some limitations such as untimely warning, false alarm, and the missed report. As the location technology of mobile device matures, the user group provides massive data sources for the collection of location information, with which the tracks and features of the third-party activity along the pipeline can be directly obtained. Therefore, this paper proposes a method to identify the TPD behavior based on the location data of mobile devices. Firstly, the characteristics of relevant destruction behaviors were extracted from the historical destruction events. Then, the location information of the third-party activity near the target pipeline is obtained and the data is processed to remove the influence of noise, to reduce the computational burden of the subsequent identification process. Finally, calculate the difference degree of neighborhood trajectory and the similarity with the TPD features based on the data feature grouping (Difference feature and Similarity feature) to classify the type of third-party activity. Taking a 10km pipeline segment as an example, the method of this paper is used to preprocess the collected data and calculate the difference degree and similarity, 232 suspected TPD events are identified. After the on-site verification of the suspected damage by the line patrol, the results show that the method can better identify the third-party activities near the pipeline.