Abstract:To address the limitations of existing intrusion detection models, namely, low accuracy, high false positive rates in multi-class detection, and the difficulty of efficient deployment on resource-constrained edge devices such as those used in the Internet of Things (IoT), this paper proposes a deep learning model named the convolutional long short-term self-attention network (CLSA-Net). The proposed CLSA-Net first employs a cascaded structure comprising an adaptive convolutional module, a long short-term memory network, and an improved self-attention mechanism to enhance its capability in capturing diverse temporal attack features. Subsequently, the trained model is converted into the TFLite (TensorFlow Lite) format to enable efficient deployment on low-cost ESP32-S3 embedded platforms. Comprehensive comparative experiments were conducted on multiple public datasets, along with deployment tests on the ESP32-S3 platform. The experimental results demonstrate that CLSA-Net outperforms existing mainstream models on various public datasets, including UNSW-NB15 and CICIoT2023, achieving an overall detection rate and accuracy of 98.60% and 97.48%, respectively. Furthermore, in edge deployment tests, the optimized model maintained an accuracy exceeding 80% on the ESP32-S3 platform while achieving real-time detection under low power consumption. This study validates the feasibility and practical value of deploying high-performance intrusion detection systems in resource-constrained IoT edge computing environments, striking an effective balance between high-accuracy detection and low-power operation, thus providing a practical solution for edge security defense.