I. Introduction
Owing to extensive application of wireless sensor networks (WSNs), many scenarios require a guaranteed quality of service (QoS) for data flows in the network. These scenarios include factory production line monitoring systems, medical service systems, and smoke alarm systems. Owing to the limited bandwidth and many-to-one data flow characteristics of WSNs, providing differentiated services is challenging. The data in WSNs can be divided into real-time and non-real-time data according to business types. For example, in an industrial production line monitoring system, alarms for an abnormal operating state of the equipment are time-sensitive. The data from such alarms are called real-time data. Real-time data must be transmitted to the destination node as soon as possible to ensure that the delay requirements are satisfied. In multi-hop forwarding, packets in WSNs need to be queued within nodes. The queue waiting time on multiple nodes is an important factor that affects the end-to-end delay of packets. Therefore, a scheduling algorithm is required to schedule the packet forwarding process.