Current trajectory data grows rapidly in a dynamic and streaming form, and unreasonable data organization causes the problems of skewed data storage and high overhead, as well as slow retrieval speed and page lag during visualization. To achieve effective spatial data organization, this paper proposes a data storage model with multi-level spatio-temporal organization. Spatially, the trajectory data is partitioned based on Hilbert curve, combined with pre-partitioning mechanism to solve the storage skewing problem of distributed database HBase; temporally, borrowing from the organization of spatio-temporal cube, the spatio-temporal hybrid coding is constructed by using the method of slicing by day and minute system coding to solve the retrieval of trajectory data into maps. The experiment proves that the organization model can effectively improve the data storage and retrieval efficiency, enhance the overall effect of trajectory visualization, and provide effective technical support for data mining and analysis.