This application provides a method and related equipment for preprocessing game trajectory data. The method includes: converting game trajectory data into a first grid sequence; merging high-frequency adjacent grids in the first grid sequence to calculate a second grid sequence; extracting embedding vectors from the second grid sequence to calculate an embedding vector sequence; and using the embedding vector sequence as a
training set input to a
deep learning model. This application's embodiment, by converting game trajectory data into a first grid sequence, merging high-frequency adjacent grids in the first grid sequence, and then extracting embedding vectors from the second grid sequence, can capture the prior influence of environmental factors on trajectory distribution and the potential contextual
semantic information in the trajectory, achieving effective compression of long trajectory data.