In apple orchard environments, challenges such as low accuracy and slow speed in pest identification persist, and single improvement strategies fail to balance these requirements effectively. Therefore, this study proposes an apple orchard pest identification method that integrates multiple heterogeneous strategies. This approach encompasses pest sample collection and enhancement, diverse construction of the MH-YOLO model, and model lightweight along with mobile deployment, significantly improving both accuracy and speed in pest identification. Firstly, the MSRCR algorithm adjusts color restoration factors and RGB channel ratios in pest images, enhancing detail and texture information. The zero-sample SAM segmentation model is then employed to accurately extract background-free pest images, providing high-quality datasets for model training. Secondly, using YOLO-v5s as the baseline network, the MH-YOLO model is constructed by integrating Swin-Transformer blocks into the first CSP2_1 module and incorporating the CBAM attention mechanism and ASFF feature fusion module. The model’s learning rate is optimized using a sparrow search algorithm based on an elite reverse strategy, achieving precise pest identification. Finally, channel pruning is applied to the MH-YOLO model for lightweight, and the model is deployed on Android devices to enhance detection efficiency. Comparative experiments with mainstream models such as YOLOv8, YOLOv7, SSD, and Faster R-CNN demonstrate that MH-YOLO exhibits superior performance with an average recognition accuracy of 94.2 %, a model size of 6.92 M, and an FPS of 86. This effectively balances performance and computational resource consumption, providing robust technical support for sustainable pest management in apple orchards.