This application provides a method, apparatus, electronic device, and storage medium for detecting the direction of movement of an object. The method includes: within each detection cycle, controlling multiple transmitting units at different positions to sequentially transmit detection signals according to preset multiple
time windows, wherein the multiple transmitting units form at least two transmitting unit modules; obtaining detection data for each time window through a receiving unit located between the multiple transmitting units; obtaining a sampling
signal corresponding to each time window based on the detection data obtained within multiple consecutive detection cycles; determining a target sampling
signal corresponding to each transmitting unit module based on the sampling signals corresponding to each time window; performing differential
processing on at least one pair of target sampling signals to obtain corresponding differential signals; determining whether a moving object appears in the target area based on the amplitude of the differential
signal; and determining the direction of movement of the
object based on the
changing trend of the differential signal in response to the appearance of a moving object in the target area.