The invention discloses an active
noise reduction method for an earphone. The method comprises the following steps: acquiring current position information and an environment
audio signal of the earphone; detecting whether the
current electric quantity of the earphone is greater than a preset electric quantity threshold; if yes, obtaining current posture information of the earphone; determining a target scene type from preset scene types based on the environment
audio signal, the position information, the attitude information and a preset improved Transform model configured with an agency attention mechanism; if not, determining a target scene type from preset scene types according to the position information and the environment
audio signal; and obtaining a
noise reduction parameter corresponding to the target scene type as a target
noise reduction parameter. According to the invention, the function of dynamically starting the corresponding
noise reduction parameter acquisition mode based on the
current electric quantity state of the earphone is realized, the
noise reduction power consumption of the earphone is reasonably configured, the
noise reduction parameter acquisition mode is optimized, the efficiency and accuracy of adaptive noise reduction are improved, the adaptability of the earphone to the use of a user is improved, and the use experience of the user is improved.