VecLSTM: Trajectory Data Processing and Management for Activity Recognition through LSTM Vectorization and Database Integration
Solmaz Seyed Monir, Dongfang Zhao
TL;DR
VecLSTM tackles scalable trajectory-based activity recognition by introducing a vectorization layer that converts GPS sequences into a structured grid, enabling a CNN-LSTM hybrid to learn both spatial and temporal patterns. The methodology includes integration with a MySQL vector database to support large-scale data management, and a two-LSTM, CNN-based architecture that merges spatial and temporal features for prediction. Experimental results on a GeoLife-derived dataset show substantial improvements in accuracy (validation 85.57%, test 85.47%, weighted F1 0.86) and notable reductions in training time (up to ~74.2% overall when comparing vectorized vs non-vectorized baselines). The work demonstrates strong practical potential for real-time trajectory analysis and scalable trajectory data management, with future work focused on refining vectorization and exploring orthogonal data representations.
Abstract
Activity recognition is a challenging task due to the large scale of trajectory data and the need for prompt and efficient processing. Existing methods have attempted to mitigate this problem by employing traditional LSTM architectures, but these approaches often suffer from inefficiencies in processing large datasets. In response to this challenge, we propose VecLSTM, a novel framework that enhances the performance and efficiency of LSTM-based neural networks. Unlike conventional approaches, VecLSTM incorporates vectorization layers, leveraging optimized mathematical operations to process input sequences more efficiently. We have implemented VecLSTM and incorporated it into the MySQL database. To evaluate the effectiveness of VecLSTM, we compare its performance against a conventional LSTM model using a dataset comprising 1,467,652 samples with seven unique labels. Experimental results demonstrate superior accuracy and efficiency compared to the state-of-the-art, with VecLSTM achieving a validation accuracy of 85.57\%, a test accuracy of 85.47\%, and a weighted F1-score of 0.86. Furthermore, VecLSTM significantly reduces training time, offering a 26.2\% reduction compared to traditional LSTM models.
