The invention relates to the field of trajectory data processing, and discloses a spatio-temporal trajectory indexing and query processing method, device, equipment and medium. According to a received trajectory query instruction, it is determined that the trajectory query instruction belongs to ID time range query, spatio-temporal range query, spatio-temporal similarity query or KNN query; according to the method, comprehensive data processing is carried out on rich queries, multi-element query types are planned as a whole, complex upper-layer applications are supported, a uniform spatial-temporal trajectory index and query processing framework which can compress data, is light and efficiently supports the query types is designed, diversified query requirements are met, and the query efficiency is improved. The technical problem of optimal management of the spatio-temporal trajectory data is solved.