Wireless Sensor Networks (WSN) play a vital role in the Internet of Things (IoT) and show great potential in monitoring applications. However, due to harsh environmental conditions and unreliable communication links, WSN often encounter partial data loss during data collection, which inevitably affects the quality of service. To address this challenge, researchers have employed matrix completion techniques to recover missing data by exploiting the low-rank features in the data, but its accuracy is not satisfactory. This paper argues that the spatiotemporal characteristics of the data underlie its low-rank nature, enabling a more accurate capture of the intrinsic patterns within the data. Drawing on this insight, we propose a missing data recovery algorithm based on Temporal Smoothness and Time-Varying Similarity (TSTVS). Unlike traditional low-rank methods, the TSTVS algorithm directly utilizes the structural features of data in the spatiotemporal domain to establish a missing data completion model. Subsequently, the model is converted into an unconstrained optimization problem using the penalty function method, and the gradient descent method is applied to solve it, reconstructing the complete data matrix. Finally, simulation experiments were conducted on three real-world monitoring datasets, comparing the TSTVS with three low-rank methods, Efficient Data Collection Approach (EDCA), Matrix factorization with Smoothness constraints (MFS) and Data Recovery Based on Low Rank and Short-Term Stability(DRLRSS). The experimental results indicate that the proposed TSTVS algorithm consistently outperforms the three low-rank based algorithms in terms of recovery accuracy across different datasets and missing rate scenarios.