Leveraging multiple microsensor modules in smartphones for navigation and positioning has emerged as a significant area of research. This is achieved through Pedestrian Dead Reckoning (PDR) technology. Due to hardware errors and environmental noise, traditional PDR algorithms generally exhibit trajectory divergence over time or distance, reflecting poor positioning stability. This paper optimizes the processes of traditional step frequency detection, step length estimation, and heading calculation individually. Firstly, a sliding window is employed for the real-time analysis of walking acceleration waveforms, with thresholds dynamically adjusted to accommodate varying walking speeds. The Tent Chaos Mapping Improved Sparrow Search Algorithm (SSA) is applied to globally optimize the learning rate, regularization parameters, and hidden layer neuron parameters in the Gated Recurrent Unit (GRU) network. This constructs a Tent-SSA-GRU step-length estimation model and performs high-precision step-length training, using motion parameters obtained at each walking step. Following this, a cascading filter is developed, which integrates adaptive Kalman filtering (AKF) and biased Kalman filtering (BKF). This filter utilizes a sliding window to adaptively modify the covariance of both process and measurement noise, making the technical details more digestible for readers unfamiliar with the concept. Moreover, the original gyroscope and magnetometer data undergo noise reduction processing, and biased parameter estimation is introduced to adjust the Kalman filter’s mean square error estimation results. The calculated heading angles are then merged using biased Kalman filtering to compute a pedestrian’s single-step heading, yielding the refined PDR positioning trajectory. Experimental results show that the proposed method can obtain more accurate step length and heading calculation results, reducing the average positioning error by 68.19% compared to traditional PDR positioning methods.