A trusted execution environment (TEE) is a system-on-chip and CPU system with a wide security solution available on today's Arm application (APP) processors, which dominate the smartphone market. Generally, mobile APPs create a trusted application (TA) in the TEE to process sensitive information, such as payment or message encryption, which is transparent to the APPs running in the rich execution environments (REEs). In detail, the REE and TEE interact and eventually send back the results to the APP in the REE through the interface provided by the TA.Such an operation definitely increases the overhead of mobile APPs. In this paper, we first present a comprehensive analysis of the performance of open-source TEE encrypted text. We then propose a high energy-efficient task scheduling strategy (ETS-TEE). By leveraging the deep learning algorithm, our policy considers the complexity of TA tasks, which are dynamically scheduled between modeling on the local device and offloading to an edge server.We evaluate our approach on Raspberry Pi 3B as the local mobile device and Jetson TX2 as the edge server. The results show that compared with the default scheduling strategy on the local device, our approach achieves an average of 38.0% energy reduction and 1.6×speedup. This greatly reduces the performance loss caused by mobile devices in order to protect the safe execution of applications, so that the trusted execution environment has both security and high performance.