1. An electronic device, comprising: a processor; and a storage device configured to store a plurality of instructions, which when executed by the processor, causes the processor to: receive at least three initial frames; generate differential frames between the at least three initial frames; check continuity of each differential frame to adjust the differential frames; generate an original background frame and a new background frame based on the adjusted differential frames; generate a differential background and a subtracted background based on the original background frame and the new background frame; convert the subtracted background into the differential background by thresholding, and retain values equal to zero in the subtracted background as zero in the differential background and convert other values in the subtracted background to value one in the differential background during the thresholding; calculate a proportion of the number of zero values to the sum of the number of zero values and non-zero values in the differential background; determine that the new background frame is stable when the proportion is more than 99%; receive a reference frame; determine a moving target in the reference frame based on the new background frame; receive a target frame for tracking the moving target included in a search reference of the reference frame; set at least one first detecting region in the target frame; determine at least one similarity between the search reference and the at least one first detecting region; determine a specific one of the at least one first detecting region in the target frame based on the at least one similarity; and determine an actual position of the moving target based on the specific first detecting region.