The invention relates to a 
fog computing task unloading method for 
the Internet of Things, and belongs to the technical field of mobile communication. According to the method, bidirectional matching joint modeling are carried out task unloading decisions, transmission 
resource allocation and computing 
resource allocation, and FN and IoT equipment to minimize the total overhead problem of the 
system. Firstly, QoS requirements of the IoT equipment are analyzed based on an 
analytic hierarchy process, and priorities are established according to different QoS requirements of the IoT equipment; secondly, RB allocation is conducted on the IoT devices, and the number of RBs needed by every IoT equipment is determined; then, computing 
resource allocation is carried out, and the computing time delayis determined. Based thereon, a bi-directional 
matching game is established, and a stable association between the FN and the IoT device requesting offloading is determined. And finally, every IoT equipment makes an unloading decision according to the task local computing overhead and the task unloading computing overhead. According to the invention, the total time 
delay and the energy consumptioncost of the 
system are reduced, and the stability of IoT equipment association and the effectiveness of resource allocation are realized.