This application relates to a method for switching headphone operating
modes, a headphone, a computer-readable storage medium, and a
computer program product. Applied to
headphones, the
headphones include a vent valve and an active
noise cancellation module. The method includes: acquiring
head posture data; adjusting the operating state of the vent valve and the active
noise cancellation module based on the
head posture data to switch the current operating mode; wherein the vent valve is used to allow or
restrict external ambient sound from entering the ear; the active
noise cancellation mode neutralizes the ambient sound through reverse sound
waves. Using this method, on the one hand, switching headphone
modes does not require physical contact with the
headphones or through a
mobile device application, greatly simplifying the operation process and improving operational convenience and efficiency. On the other hand, it achieves a balance between noise cancellation and wearing comfort in the headphones.