## 1 Introduction  
In today's society, as greater psychological stress is experienced, people are more prone to suffer harm caused by that high stress. High psychological stress not only reduces the efficiency of study and work; it can also endanger one's physical health. High long-term stress can even induce depression and addiction [1, 2]. Thus, people have started to pay more attention to mental health. Many methods can be used to deal with mental health. Among them, Ecological Momentary Assessment (MAE) [3] and Just-in-Time Adaptive Interventions (JITA) [4] are effective. Both require real-time monitoring of stress. With the development of wearable technology and computer technology, real-time monitoring of emotional stress through physiological parameters becomes possible. Physiologists have learned that psychological stress is related to the human autonomic nervous system, and each system can affect the other [5]. Therefore, physiological parameter monitoring methods provide the possibility of real-time monitoring of emotional stress. The autonomic nervous system includes the sympathetic nervous system (SNS) and the parasympathetic nervous system (PNS). When humans suffer from stress, the sympathetic nervous system become excited and generates adrenal hormones, which then cause the heart to beat faster and breathing to shorten. This change strengthens the human body's functions, making it easier to meet challenges [6]. After the stress is over, the parasympathetic nervous system become excited to help the body calm down, which causes the heart to beat slower and breathing to lengthen. Therefore, psychological pressure in humans can be inferred by monitoring changes in the physiological parameters, such as heart rate, breathing rate, and others. In recent years, the advent of deep learning has promoted the development of artificial intelligence, some teams have started to use deep learning techniques to speculate on psychological stress. [PERSON] built deep neural network (DNN) models and used conditional random field to classify mental stress based on information about adolescents' social behavior [7]. [PERSON] used a deep sparse neural network to monitor stress levels based on cross-media microblog data [8]. Although these results showed that the modules constructed by [PERSON] and [PERSON] were effective, the real-time monitoring still cannot be guaranteed as that model needs to input linguistic information or video information for a period of time. [PERSON] [9] categorized stress into two classes using 10 s ECG data with CNN (Convolutional Neural Networks) and LSTM (Long Short-Term Memory), but they did not realize the three categories of stress. The attention mechanism [10], which is among the latest deep learning technologies, could help the model to recognize important features and determine the global relationship between its features by adding adaptive weight coefficients to the hidden variables in the network. Identifying how to use attention mechanism has been a hot topic. [PERSON] used a visual attention mechanism to recognize the traffic signs [11]. [PERSON] proposed a convolutional attention mechanism to learn the utterance structure relevant to a task for speech emotion recognition [12]. [PERSON] used a time attention model for healthcare data analysis and was able to achieve high accuracy [13]. These research efforts definitely showed the promise of attention mechanism in deep learning. However, there is a lack of research on how to applicate attention mechanism in the subject of monitoring emotional stress based on physiological parameters. On the basis of proposing a network using CNN [14] and BiLSTM(Bi-directional Long Short-Term Memory), we added different attention mechanisms to the CNN and BiLSTM layers separately and also to the whole network to explore the effectiveness of the attention mechanism for the task of identifying emotional stress based on ECG signals.