A user hearing protection method, comprising: enabling, by an electronic device, a hearing protection mode, if a current sound output mode of the electronic device is a headset mode, obtaining current-frame sound source data; obtaining, based on the current-frame sound source data, sound pressure output by a headset connected to the electronic device; comparing the sound pressure with a predetermined sound pressure threshold; and if the sound pressure is greater than the predetermined sound pressure threshold, performing an instantaneous sound pressure over-standard warning and an instantaneous sound pressure over-standard protection operation; wherein the obtaining, based on the current-frame sound source data, sound pressure output by a headset connected to the electronic device comprises: obtaining a current usage scenario of the headset by a scenario obtaining submodule of an obtaining module, wherein the current usage scenario comprises audio play, video play, gaming, or making a call; obtaining, based on the current-frame sound source data and a sound effect change and a gain value that are of a channel corresponding to the usage scenario, a digital signal value output to a headset interface of the electronic device; obtaining, based on the digital signal value and a digital-to-electrical conversion gain value of the electronic device, a voltage value output to the headset interface; and obtaining, based on the voltage value and an electro-acoustic conversion coefficient of the headset, sound pressure output by the headset. enabling, by an electronic device, a hearing protection mode, if a current sound output mode of the electronic device is a headset mode, obtaining current-frame sound source data; obtaining, based on the current-frame sound source data, sound pressure output by a headset connected to the electronic device; comparing the sound pressure with a predetermined sound pressure threshold; and if the sound pressure is greater than the predetermined sound pressure threshold, performing an instantaneous sound pressure over-standard warning and an instantaneous sound pressure over-standard protection operation; wherein the obtaining, based on the current-frame sound source data, sound pressure output by a headset connected to the electronic device comprises: obtaining a current usage scenario of the headset by a scenario obtaining submodule of an obtaining module, wherein the current usage scenario comprises audio play, video play, gaming, or making a call; obtaining, based on the current-frame sound source data and a sound effect change and a gain value that are of a channel corresponding to the usage scenario, a digital signal value output to a headset interface of the electronic device; obtaining, based on the digital signal value and a digital-to-electrical conversion gain value of the electronic device, a voltage value output to the headset interface; and obtaining, based on the voltage value and an electro-acoustic conversion coefficient of the headset, sound pressure output by the headset. obtaining a current usage scenario of the headset by a scenario obtaining submodule of an obtaining module, wherein the current usage scenario comprises audio play, video play, gaming, or making a call; obtaining, based on the current-frame sound source data and a sound effect change and a gain value that are of a channel corresponding to the usage scenario, a digital signal value output to a headset interface of the electronic device; obtaining, based on the digital signal value and a digital-to-electrical conversion gain value of the electronic device, a voltage value output to the headset interface; and obtaining, based on the voltage value and an electro-acoustic conversion coefficient of the headset, sound pressure output by the headset.