## 1 Introduction  
Elevators, as highly integrated vertical transportation systems, play an indispensable role in modern urban life [1]. They not only significantly reduce the demand for ground space but also enhance the functionality of buildings and improve the efficiency of human mobility. However, given the complexity of elevator systems and their widespread use in daily life, ensuring their continuous and safe operation is of paramount importance. Elevator malfunctions can lead to severe consequences, including personal injuries and economic losses, often resulting from a combination of factors such as equipment wear, manufacturing defects, electrical failures, or improper operation. Historically, the maintenance and inspection of elevators have relied primarily on periodic checks, which is a method that is costly and may not capture all potential fault conditions, especially intermittent or concealed issues. With the advancement of deep learning [2], the Internet of Things [3], and big data technologies [4], the abundant operational data generated within elevator systems has become a valuable resource. This temporal information, detailing various parameters at each point in time, such as elevator speed, door opening and closing frequency, and load weight, provides crucial evidence for analyzing and reflecting the real-time operational status of elevators. By leveraging this growing body of elevator operational temporal information and incorporating advanced deep learning techniques [5], it is possible to develop an efficient and precise time series-based elevator fault prediction model [6]. Such a model can predict elevator malfunctions by analyzing historical time series data, enabling the timely detection of potential fault risks and providing early warnings to ensure passenger safety. At the same time, the elevator fault prediction system can offer auxiliary information for elevator maintenance, allowing for precise fault forecasting and avoiding unnecessary comprehensive inspections, thereby reducing maintenance costs and improving maintenance efficiency. But, the application of deep learning technologies in elevator fault prediction still faces the following challenges:  
1. Many existing elevator fault prediction models primarily focus on dynamic temporal features while neglecting the interaction between static features (such as model type, component specifications, etc.) and dynamic temporal features. This leads to insufficient feature extraction capability, preventing the model from fully uncovering the potential risks of elevator malfunctions. 2. Current elevator fault prediction models still primarily rely on traditional sequential models like LSTM (Long Short-Term Memory) and the RNN (Recurrent Neural Network) to process data. However, these models show limited performance in capturing long-range temporal dependencies when handling long sequences. As the sequence length increases, the model gradually loses its memory of earlier inputs, making it difficult to capture complex patterns over long time spans. 3. Current Transformer models, when dealing with elevator operational time series data, fail to effectively simplify the sequence, leading to the stacking of multiple network layers. This results in memory bottlenecks, and as the number of layers increases, the temporal position information is gradually lost, which negatively impacts the model's performance. This study presents a Risk Prediction Model for Elevators based on a Transformer and Self-temporal Compression Mechanism (RPM-ETC). The model takes elevator operational temporal information collected as input, utilizes a Transformer to capture the temporal relationships between sequences, and employs a temporal compression mechanism to condense temporal sequence information, thereby enhancing the model's prediction speed. Additionally, the model introduces a feature embedding layer that maps discrete data into dense latent vectors, reducing the learning difficulty and improving generalization ability.