A heart rate detection method and device. The method comprises: measuring the heart rate of a user to be detected by means of a built-in sensor of a terminal to obtain a signal to be detected (S102); configuring a sliding window of a preset duration (S104); segmenting the signal to be detected according to the sliding window and a preset step size to obtain N segments, N being a natural number greater than 1 (S106); determining whether the signal within each segment among the N segments is strong noise (S108); if the signal within an i-th segment is strong noise, determining the i-th segment to be a target segment, i being a natural number, and i being 1 to N sequentially (S110); combining all target segments to obtain a strong noise region (S112); deleting the strong noise region in the signal to be detected to obtain an effective signal region (S114); and detecting a heart rate signal in the effective signal region (S116). The technical solution may solve the problem in the existing technology wherein the accuracy of heart rate detection is low.
展开▼