Headphone control method, device, electronic device and storage medium
By obtaining the acceleration of the person wearing the headset, it automatically switches the headset audio processing mode to balance the air pressure inside and outside the ear, solving the problem of earphone discomfort in special scenarios and improving the user experience.
Patent Information
- Application Number
- CN202110496882.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-05-07
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-05-07
AI Technical Summary
In special scenarios such as aircraft taking off and landing or high-speed elevator operation, changes in air pressure inside and outside the ears cause discomfort when wearing headphones. Existing technology cannot achieve automatic adjustment and requires users to actively adjust.
By acquiring the acceleration of the person wearing the headset, it automatically switches the audio processing mode of the headset, such as switching to strong noise reduction mode in an overweight state and switching to transparency mode in a weightless state to balance the air pressure inside and outside the ear.
It realizes the automatic adjustment of the audio processing mode according to the changes in the headset acceleration, reduces the discomfort when wearing the headset, and improves the user experience.
Smart Images

Figure CN115314790B
Abstract
Description
Technical Field
[0001] The present application relates to the field of device control technology, and more specifically, to an earphone control method, device, electronic device and storage medium. Background Art
[0002] With the development of smart terminal technology, the types of headphones are becoming more and more diverse, such as noise reduction headphones, stereo headphones, etc., which bring users a rich and colorful auditory experience. However, when wearing headphones in some special scenarios, it may cause discomfort to the user's ears, seriously affecting the user experience. Summary of the invention
[0003] The present application proposes an earphone control method, device, electronic device and storage medium to improve the above-mentioned problems.
[0004] In a first aspect, an embodiment of the present application provides an earphone control method, the method comprising: obtaining a first acceleration, the first acceleration representing the acceleration of an object wearing the earphone; based on the first acceleration, switching the audio processing mode of the earphone to a specified mode, the specified mode being used to balance the air pressure inside and outside the ear of the wearing object.
[0005] In a second aspect, an embodiment of the present application provides an earphone control device, the device comprising: a data acquisition module for acquiring a first acceleration, the first acceleration representing the acceleration of an object wearing the earphone; a control module for switching the audio processing mode of the earphone to a specified mode based on the first acceleration, the specified mode being used to balance the air pressure inside and outside the ear of the wearing object.
[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the headphone control method provided in the first aspect above.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the headphone control method provided in the first aspect above.
[0008] The present application provides a headset control method, device, electronic device and storage medium, which obtains a first acceleration, which represents the acceleration of the wearer of the headset; based on the first acceleration, the audio processing mode of the headset is switched to a specified mode, which is used to balance the air pressure inside and outside the ear of the wearer. Thus, the above method realizes the automatic switching of the audio processing mode of the headset according to the acceleration of the headset, so that the audio processing mode of the headset can be adjusted in time, reducing the discomfort of wearing the headset in special scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0010] Figure 1 A flow chart of a headset control method provided by an embodiment of the present application is shown.
[0011] Figure 2 A schematic diagram showing a user ascending in a high-speed elevator provided by an embodiment of the present application is shown.
[0012] Figure 3 A schematic diagram showing a user descending in a high-speed elevator provided by an embodiment of the present application is shown.
[0013] Figure 4 A flow chart of a headphone control method provided by another embodiment of the present application is shown.
[0014] Figure 5 An exemplary diagram showing the effect of adjusting the extension degree of a coil according to coil extension parameters provided in an embodiment of the present application is shown.
[0015] Figure 6 Another example diagram of the effect of adjusting the expansion and contraction degree of the coil according to the coil expansion and contraction parameters provided in an embodiment of the present application is shown.
[0016] Figure 7 A flowchart of a headphone control method provided by yet another embodiment of the present application is shown.
[0017] Figure 8 A structural block diagram of an earphone control device provided in an embodiment of the present application is shown.
[0018] Fig. 9 A structural block diagram of an electronic device provided in an embodiment of the present application is shown.
[0019] Fig.10A storage unit for storing or carrying a program code for implementing the earphone control method according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0020] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0021] With the advancement of technology, users have higher and higher requirements for consumer products such as headphones. Not only sound quality and comfort, but also the experience that headphones can bring to users, especially in some special application environments, has gradually become an important criterion for judging a pair of headphones.
[0022] When an airplane takes off, it will be overweight, and when it lands, it will cause weightlessness. When a high-speed elevator rises, it will cause overweight, and when it descends, it will cause weightlessness. These phenomena will cause changes in the air pressure in the ear, which will cause a sense of pressure on the eardrum and cause physical discomfort. As a way to relieve physical discomfort, you can adjust the air pressure in the ear by chewing gum or wearing earplugs to relieve physical discomfort. However, chewing gum or wearing earplugs are active behaviors initiated by the user, which cannot achieve self-regulation and are not very convenient to implement. In addition, items such as gum and earplugs need to be replenished regularly and need to be carried with you, which may make it inconvenient for users to travel. At present, there is no headset that can reduce the pressure of the air pressure inside and outside the ear on the eardrum in an overweight or weightless environment, thereby alleviating physical discomfort.
[0023] After long-term research, the inventor found that the first acceleration can be obtained, and the first acceleration represents the acceleration of the wearer of the headset; based on the first acceleration, the audio processing mode of the headset is switched to a specified mode, and the specified mode is used to balance the air pressure inside and outside the ear of the wearer. Thus, the above method can realize the automatic switching of the audio processing mode of the headset according to the change of the acceleration of the headset, so that the audio processing mode of the headset can be adjusted in time, reducing the discomfort of wearing the headset in special scenarios.
[0024] Therefore, in order to improve the above-mentioned problems, the inventor proposed the headphone control method, device, electronic device and storage medium provided in the present application, which can automatically switch the audio processing mode of the headphone according to the change of the acceleration of the headphone, so that the audio processing mode of the headphone can be adjusted in time to reduce the discomfort of wearing the headphone in special scenarios.
[0025] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0026] See also Figure 1, shows a flow chart of a headset control method provided by an embodiment of the present application. This embodiment provides a headset control method, which can be applied to electronic devices, wherein the electronic device in this embodiment can be a mobile communication device with a network connection function such as a mobile phone, a watch, or an audio device such as a headset. When the electronic device is a headset, an acceleration sensor can be separately provided in the headset. The headset in this embodiment can be a Bluetooth headset, and in some other possible implementations, the headset can also be a wired headset. The method includes:
[0027] Step S110: Acquire a first acceleration, where the first acceleration represents the acceleration of the person wearing the headset.
[0028] In this embodiment, when the electronic device is a mobile phone, a watch or other device, the mobile phone or the watch can exchange data with the headset, and the first acceleration can be obtained by the accelerometer, gyroscope or acceleration sensor in the mobile phone or the watch. An accelerometer is an instrument for measuring acceleration, which is composed of a detection mass (also called a sensitive mass), a support, a potentiometer, a spring, a damper and a housing. An acceleration sensor is a device that can continuously give an acceleration signal.
[0029] When the electronic device is a headset, the first acceleration can be obtained by the acceleration sensor in the headset. The first acceleration can be understood as the acceleration of the wearer of the headset (i.e., the user). When the user takes a high-speed elevator or airplane, the first acceleration can also be understood as the real-time acceleration of the high-speed elevator or airplane.
[0030] Step S120: based on the first acceleration, switching the audio processing mode of the headset to a specified mode, wherein the specified mode is used to balance the air pressure inside and outside the ear of the wearer.
[0031] In this embodiment, the audio processing mode of the headset may include a normal mode, a transparent mode, and a strong noise reduction mode. Among them, the headset in the transparent mode may have no noise reduction effect, or the noise reduction effect of the headset in the transparent mode is weaker than the noise reduction effect of the headset in the normal mode. The headset in the strong noise reduction mode has a stronger noise reduction effect, that is, the noise reduction effect is stronger than the noise reduction effect of the headset in the normal mode.
[0032] In this embodiment, the direction of the first acceleration may be upward or downward. Optionally, if the user is riding in a high-speed elevator, when the direction of the first acceleration is upward, it can be determined that the user or the high-speed elevator is in an overweight state, and when the direction of the first acceleration is downward, it can be determined that the user or the high-speed elevator is in a weightless state.
[0033] When a high-speed elevator descends, the air pressure outside the elevator will increase as the height decreases. In order to maintain balance, the air pressure inside the elevator will also increase, causing the eardrum to collapse, causing discomfort to the user. When a high-speed elevator ascends, the air pressure outside the elevator will decrease as the height increases. In order to maintain balance, the air pressure outside the elevator will also decrease, causing the eardrum to expand outward, causing discomfort to the user. In order to improve the above problems, in this embodiment, the audio processing mode of the headset can be adjusted based on the direction of the first acceleration obtained, so that the internal and external air pressure of the user's ear can be relatively balanced after the adjustment, thereby reducing or avoiding the discomfort of wearing headphones when riding a high-speed elevator.
[0034] In this embodiment, the earphone may include an ear cap, and a dynamic coil may be disposed in the ear cap, and the number of coils may be unlimited. The degree of expansion and contraction of the coil may be adjusted, and the degree of fit between the ear cap and the ear may be different depending on the expansion and contraction degree of the coil. As a method, the expansion and contraction degree of the coil in the ear cap may be adjusted based on the direction of the first acceleration obtained, thereby adjusting the audio processing mode of the earphone.
[0035] As an implementation method, Figure 2 As shown in the figure, when a user takes a high-speed elevator to rise, if the direction of the first acceleration is upward, it can be determined that the elevator is in an overweight state. If the user in the elevator wears headphones (not shown in the figure) at this time, in order to reduce the pressure on the eardrum of the user due to the decrease in air pressure during the elevator's ascent, the audio processing mode of the headphones can be switched to a strong noise reduction mode, so as to increase the air pressure in the user's ear and reduce discomfort.
[0036] In the present embodiment, in the strong noise reduction mode, the fit between the ear cap of the headset and the ear can be detected. If a gap is detected between the ear cap and the ear, the fit between the ear cap and the ear can be calibrated. For example, the ear cap of the headset can be made to fit tightly against the ear by increasing the expansion and contraction degree of the coil inside the ear cap, thereby increasing the airtightness (sealing) between the ear cap and the ear to isolate external sounds, thereby increasing the air pressure inside the ear and achieving a better noise reduction effect.
[0037] In addition to increasing the degree of expansion and contraction of the coil in the ear cap, the electrical signal corresponding to the sound in the earphone (the sound of the earphone is an electrical signal in the earphone) can also be actively fitted through relevant algorithms (such as positive feedback algorithms) to make the electrical signal smoother, thereby obtaining a sound signal with a better auditory experience. Thus, through the above method, when the audio processing mode is switched to the strong noise reduction mode, the sound heard in the user's ear is more comfortable, and the sound outside the ear can also be better isolated, thereby effectively reducing the user's discomfort when wearing headphones in an overweight state.
[0038] As another embodiment, Figure 3 As shown, when a user takes a high-speed elevator to descend, if the direction of the first acceleration is downward, it can be determined that the elevator is in a weightless state. If the user in the elevator wears headphones (not shown in the figure) at this time, in order to reduce the pressure on the eardrum of the user's ear due to the increase in air pressure during the descent of the elevator, the audio processing mode of the headphones can be switched to a transparent mode, so as to reduce the air pressure in the user's ear and reduce discomfort. In this embodiment, in the transparent mode, the external environment sound is transmitted to the ear so that the sound of the outside world can be heard, thereby reducing the air pressure in the ear.
[0039] It should be noted that before the audio processing mode of the headphones in this embodiment is switched, the audio processing mode of the headphones may not be restricted. For example, before the audio processing mode of the headphones is switched to the strong noise reduction mode, the audio processing mode of the headphones may be the normal mode or the transparent mode. Similarly, before the audio processing mode of the headphones is switched to the transparent mode, the audio processing mode of the headphones may be the normal mode or the strong noise reduction mode.
[0040] Optionally, if the audio processing mode of the headset is in the strong noise reduction mode before the audio processing mode of the headset is switched to the strong noise reduction mode, then the strong noise reduction mode can be maintained, that is, the mode is not repeatedly switched in the same state. For example, when a user is ascending in a high-speed elevator, there may be multiple floors where the high-speed elevator stops. If the direction of the first acceleration is upward during the process of stopping at multiple floors, then after the audio processing mode of the headset is switched to the strong noise reduction mode for the first time, there is no need to repeatedly switch the audio processing mode until the elevator runs to the top stop floor.
[0041] Optionally, before switching the audio processing mode of the headset to a specified mode, an audio processing mode change instruction may be sent to the headset first, the change instruction is used to prompt the headset to change the audio processing mode, and then instruct the headset to switch the audio processing mode of the headset to the specified mode based on the change instruction. For example, in a specific application scenario, if the electronic device is a mobile phone, the mobile phone and the headset may be connected via wireless communication methods such as Bluetooth. When the mobile phone detects that the direction of the elevator acceleration of the user wearing the headset is upward, an audio processing mode change instruction may be generated and sent to the headset. When the headset receives the change instruction, since the direction of the elevator acceleration is upward at this time, the audio processing mode of the headset may be switched to a strong noise reduction mode. Correspondingly, if the mobile phone detects that the direction of the elevator acceleration of the user wearing the headset is downward, a change instruction may be sent to the headset to instruct the headset to switch the audio processing mode to a transparent mode based on the change instruction.
[0042] The headphone control method provided in this embodiment obtains a first acceleration, which represents the acceleration of the person wearing the headphone; based on the first acceleration, the audio processing mode of the headphone is switched to a specified mode, which is used to balance the air pressure inside and outside the ear of the person wearing the headphone. Thus, the audio processing mode of the headphone is automatically switched according to the acceleration of the headphone, so that the audio processing mode of the headphone can be adjusted in time, reducing the discomfort of wearing the headphone in special scenarios.
[0043] See also Figure 4 , shows a flow chart of an earphone control method provided by another embodiment of the present application. This embodiment provides an earphone control method, which can be applied to an electronic device. The method includes:
[0044] Step S210: Acquire a first acceleration, where the first acceleration represents the acceleration of the person wearing the headset.
[0045] Step S220: obtaining a difference to be detected based on the first acceleration and the second acceleration, where the second acceleration represents gravitational acceleration.
[0046] In this embodiment, the second acceleration represents the gravity acceleration of the environment in which the user is located. For example, when the user takes a high-speed elevator, the second acceleration can be understood as the gravity acceleration of the elevator, and when the user takes an airplane, the second acceleration can be understood as the gravity acceleration of the airplane. As a method, the geographical location of the elevator or airplane can be determined first, and then the gravity acceleration of the elevator or airplane can be determined based on the geographical location.
[0047] In order to more accurately help users reduce the discomfort of wearing headphones in an overweight or weightless environment, a difference to be detected can be obtained based on the first acceleration and the second acceleration, so that the difference to be detected can be compared with the target threshold later, and then determine whether to switch the audio processing mode of the headphones based on the comparison result.
[0048] In this embodiment, the user's environment is an elevator as an example for explanation. When the elevator is in an overweight state, the direction of the first acceleration may be opposite to the direction of the second acceleration, and when the elevator is in a weightless state, the direction of the first acceleration may be the same as the direction of the second acceleration. Optionally, the value of the first acceleration may be greater than the value of the second acceleration, and the value of the first acceleration may also be less than the value of the second acceleration. When the elevator is in an overweight state, the upward direction may be taken as the positive direction, and when the elevator is in a weightless state, the downward direction may be taken as the positive direction.
[0049] As an implementation method, if the direction of the first acceleration is the same as the direction of the second acceleration (the default direction of gravity acceleration is vertically downward), it can be determined that the elevator is in a weightless state. In this way, the second acceleration can be subtracted from the first acceleration to obtain the difference to be detected.
[0050] As another implementation, if the direction of the first acceleration is opposite to the direction of the second acceleration, it can be determined that the elevator is in an overweight state. In this way, the second acceleration can be subtracted from the first acceleration to obtain the difference to be detected. In this embodiment, the difference to be detected is a positive value.
[0051] Step S230: If the difference to be detected is greater than the target threshold, the audio processing mode of the headset is switched to a specified mode, where the specified mode is used to balance the air pressure inside and outside the ear of the wearer.
[0052] Among them, by comparing the calculated difference to be detected with the target threshold, it can be accurately determined whether the current air pressure in the elevator brings a strong sense of eardrum pressure to the user. Optionally, if the difference to be detected is greater than the target threshold, it can be determined that the current air pressure in the elevator brings a strong sense of eardrum pressure to the user. When the difference to be detected is less than or equal to the target threshold, it can be determined that the current air pressure in the elevator is within the range that the user's ears can bear, that is, the current air pressure in the elevator does not bring a strong sense of eardrum pressure to the user.
[0053] In this embodiment, the target thresholds are different depending on the state of the elevator. When the elevator is in an overweight state, the corresponding target threshold may be a first threshold, and when the elevator is in a weightless state, the corresponding target threshold may be a second threshold. The value of the first threshold is different from the value of the second threshold, and the values of the first threshold and the second threshold are not limited in this embodiment.
[0054] In one embodiment, if the direction of the first acceleration is the same as the direction of the second acceleration, it indicates that the elevator is in a weightless state. At this time, if the difference to be detected is greater than the target threshold (here, the second threshold), the audio processing mode of the headset can be switched to the first mode (here, the transparent mode). When the difference to be detected is less than or equal to the second threshold, re-detection can be performed, that is, the first acceleration in the weightless state can be re-acquired until the difference to be detected is greater than the second threshold.
[0055] In another embodiment, if the direction of the first acceleration is opposite to the direction of the second acceleration, it indicates that the elevator is in an overweight state. At this time, if the difference to be detected is greater than the target threshold (here is the first threshold), the audio processing mode of the headset can be switched to the second mode (here is the strong noise reduction mode). When the difference to be detected is less than or equal to the second threshold, re-detection can be performed, that is, the first acceleration under the overweight state is re-acquired until the difference to be detected is greater than the first threshold. Among them, the strong noise reduction mode is different from the transparent mode. The amount of audio allowed to pass through the strong noise reduction mode in this embodiment is less than the amount of audio allowed to pass through the transparent mode. By allowing less audio to pass through the headset, the air pressure in the ear can be increased, thereby ensuring the noise reduction effect in the strong noise reduction mode; by allowing more audio to pass through the headset, the air pressure in the ear can be reduced so that the sound of the outside world can be heard. Optionally, the noise reduction effect in the strong noise reduction mode is stronger than the noise reduction effect in the transparent mode.
[0056] Optionally, when the difference to be detected is less than or equal to the target threshold (the target threshold may be the aforementioned first threshold or second threshold), the first acceleration may be re-detected, including re-detecting the first acceleration in an overweight state, or re-detecting the first acceleration in a weightless state. At this time, if the difference to be detected is still less than or equal to the target threshold after the number of times the first acceleration is re-detected reaches a specified number of times (for example, 6 times, the specific value of the specified number of times may not be limited), it indicates that the first acceleration is relatively stable at this time, and detection may no longer be continued, and the audio processing mode of the headset may not be adjusted. Optionally, if the difference to be detected is greater than the target threshold after the number of times the first acceleration is re-detected reaches a specified number of times, the audio processing mode of the headset may be adjusted according to the aforementioned adjustment method, for example, the audio processing mode of the headset in an overweight state is adjusted to a strong noise reduction mode, and the audio processing mode of the headset in a weightless state is adjusted to a transparent mode.
[0057] As a method, if the direction of the first acceleration is the same as the direction of the second acceleration, it indicates that the elevator is in a weightless state. At this time, when the difference to be detected is less than or equal to the target threshold, the noise reduction processing of the headphone audio can be suspended. Specifically, the noise reduction processing function of the headphone can be temporarily turned off, or the noise reduction processing of the current audio signal can be suspended, so that a small amount of external ear sound can enter the ear, thereby reducing the air pressure in the ear and reducing discomfort.
[0058] As another way, if the direction of the first acceleration is opposite to the direction of the second acceleration, it indicates that the elevator is in an overweight state. At this time, when the difference to be detected is less than or equal to the target threshold, the intensity of the noise reduction processing of the headphone audio can be increased. Among them, increasing the intensity of the noise reduction processing of the headphone audio can include: adding one or more noise reduction processing processes in the audio processing mode currently in which the headphone is located, or setting a new mode and switching the current audio processing mode of the headphone to the new mode.
[0059] For example, in a specific application scenario, in addition to the normal mode, strong noise reduction mode and transparent mode described in the aforementioned embodiments, the audio processing mode of the headset may also include a "noise reduction mode", and the noise reduction degree of the noise reduction mode may be weaker than that of the strong noise reduction mode. Optionally, when the direction of the first acceleration is opposite to the direction of the second acceleration, when the difference to be detected is less than or equal to the target threshold, the audio processing mode of the headset may be switched to the noise reduction mode first, so that when there is a difference between the first acceleration and the second acceleration, the air pressure in the ear of the headset used in an overweight state may be adjusted in time, thereby reducing the discomfort.
[0060] Optionally, taking the electronic device as a watch as an example, a communication connection is established between the watch and the earphone. If the watch detects that the difference to be detected is greater than the target threshold, a change instruction for changing the audio processing mode of the earphone can be generated and the change instruction can be sent to the earphone, thereby instructing the earphone to switch the audio processing mode of the earphone to a specified mode based on the change instruction.
[0061] Optionally, the earphone in this embodiment may include an ear cap, and a dynamic coil may be provided in the ear cap, and the number of coils may be unlimited. The coil expansion parameters corresponding to different modes may be preset, and the coil expansion parameters corresponding to different modes are different. As a method, the electronic device may obtain the coil expansion parameters corresponding to the specified mode, and the audio signal processing parameters corresponding to the earphone, and then adjust the expansion degree of the coil according to the coil expansion parameters, or adjust the expansion degree of the coil according to the coil expansion parameters and process the audio signal of the earphone according to the audio signal processing parameters.
[0062] In a specific application scenario, see Figure 5 , shows an example diagram of the effect of adjusting the extension degree of the coil according to the coil extension parameter provided by this embodiment. Figure 5 As shown, if the specified mode is the strong noise reduction mode, Figure 5 The left dotted line shows the extension degree of the coil before the audio processing mode of the headset is switched to the strong noise reduction mode. In order to isolate the external noise as much as possible and increase the air pressure in the ear, the extension degree of the coil can be increased according to the coil extension parameter corresponding to the strong noise reduction mode. Figure 5 The coil with a degree of expansion and contraction shown by the dotted line in the middle right makes the ear cap fit the ear as closely as possible, forming a closed space, thereby increasing the air pressure in the ear while isolating external noise.
[0063] In another specific application scenario, see Figure 6 , shows another example of the effect of adjusting the extension degree of the coil according to the coil extension parameter provided by this embodiment. Figure 6 As shown, if the specified mode is transparent mode, Figure 6 The left dotted line shows the expansion and contraction degree of the coil before the audio processing mode of the earphone is switched to the transparent mode. In order to allow external sound to enter the ear as much as possible and reduce the air pressure in the ear, the expansion and contraction degree of the coil can be reduced according to the coil expansion and contraction parameters corresponding to the transparent mode. Figure 6 The coil with the degree of expansion and contraction shown by the dotted line in the middle right allows the ear cap to maintain as much space as possible from the ear, thereby reducing the air pressure in the ear while allowing external sounds to be heard.
[0064] In another specific application scenario, if the designated mode is the strong noise reduction mode, on the basis of adjusting the expansion and contraction degree of the coil according to the coil expansion and contraction parameters corresponding to the strong noise reduction mode, the audio signal of the earphone can also be processed according to the audio signal processing parameters corresponding to the earphone. For example, the audio signal quality of the earphone can be adjusted through a positive feedback algorithm, or the audio signal of the earphone can be fit-processed through the audio signal processing parameters to make the audio signal smoother and reduce the discomfort caused by overly sharp sound.
[0065] The headphone control method provided in this embodiment obtains a first acceleration, which represents the acceleration of the person wearing the headphone; obtains a second acceleration, which represents the acceleration of gravity; obtains a difference to be detected based on the first acceleration and the second acceleration; if the difference to be detected is greater than a target threshold, switches the audio processing mode of the headphone to a specified mode, which is used to balance the air pressure inside and outside the ear of the person wearing the headphone. Thus, the above method realizes the automatic switching of the audio processing mode of the headphone according to the change of the acceleration of the headphone, so that the audio processing mode of the headphone can be adjusted in time, reducing the discomfort of wearing the headphone in special scenarios.
[0066] See also Figure 7 , shows a flow chart of an earphone control method provided by another embodiment of the present application. This embodiment provides an earphone control method, which can be applied to an electronic device. The method includes:
[0067] Step S310: Acquire a first acceleration, where the first acceleration represents the acceleration of the person wearing the headset.
[0068] Step S320: Based on the direction and magnitude of the first acceleration, or based on the direction and duration of the first acceleration, or based on the direction, magnitude and duration of the first acceleration, switch the audio processing mode of the headset to a specified mode, and the specified mode is used to balance the air pressure inside and outside the ear of the wearer.
[0069] In this embodiment, as an implementation method, the audio processing mode of the headset can be switched to a specified mode based on the direction and magnitude of the first acceleration. For example, when it is determined that the direction of the first acceleration is in an upward state, if the magnitude of the first acceleration exceeds a preset threshold, then the audio processing mode of the headset can be immediately switched to a strong noise reduction mode, and if the magnitude of the first acceleration does not exceed the preset threshold, then the audio processing mode of the headset may not be adjusted. Similarly, when it is determined that the direction of the first acceleration is in a downward state, if the magnitude of the first acceleration exceeds a preset threshold, then the audio processing mode of the headset can be immediately switched to a transparent mode to reduce the user's discomfort when wearing the headset.
[0070] As another implementation, the audio processing mode of the headset can be switched to a specified mode based on the direction and duration of the first acceleration. For example, when it is determined that the direction of the first acceleration is in an upward state, if the upward state of the first acceleration is maintained for 30 seconds (the specific duration may not be limited), then the audio processing mode of the headset can be directly switched to a strong noise reduction mode, and if the duration does not reach 30 seconds, then the audio processing mode of the headset may not be adjusted. Similarly, when it is determined that the direction of the first acceleration is in a downward state, if the downward state of the first acceleration is maintained for 80 seconds (the specific duration may not be limited), then the audio processing mode of the headset can be directly switched to a transparent mode.
[0071] As another implementation, the audio processing mode of the headset can be switched to a specified mode based on the direction, magnitude, and duration of the first acceleration to reduce the discomfort of wearing the headset. For example, when it is determined that the direction of the first acceleration is upward, if the magnitude of the first acceleration is 10m / s 2 (Assume the preset threshold is 8m / s 2 ), if the first acceleration is in the upward direction and has a magnitude of 10 m / s 2 If the noise level lasts for 30 seconds, the audio processing mode of the headset can be directly switched to the strong noise reduction mode. Similarly, when the direction of the first acceleration is determined to be downward, if the magnitude of the first acceleration is 12 m / s 2 (Assume the preset threshold is 8m / s 2 ), if the first acceleration is downward and its magnitude is 12 m / s 2If it lasts for 15 seconds, you can directly switch the audio processing mode of the headphones to transparency mode.
[0072] The headphone control method provided in this embodiment obtains a first acceleration, which represents the acceleration of the person wearing the headphone; based on the direction and magnitude of the first acceleration, or based on the direction and duration of the first acceleration, or based on the direction, magnitude and duration of the first acceleration, the audio processing mode of the headphone is switched to a specified mode, and the specified mode is used to balance the air pressure inside and outside the ear of the person wearing the headphone. Thus, the above method realizes the automatic switching of the audio processing mode of the headphone according to the changes in the direction, magnitude and / or duration of the acceleration of the headphone, so that the audio processing mode of the headphone can be adjusted in time to reduce the discomfort of wearing the headphone in special scenarios.
[0073] See also Figure 8 , is a structural block diagram of an earphone control device provided in an embodiment of the present application. This embodiment provides an earphone control device 400, which can be run on an electronic device. The device 400 includes: a data acquisition module 410 and a control module 420:
[0074] The data acquisition module 410 is used to acquire a first acceleration, where the first acceleration represents the acceleration of the person wearing the headset.
[0075] Optionally, the data acquisition module 410 in this embodiment can also be used to acquire a second acceleration before the control module 420 switches the audio processing mode of the headset to a specified mode based on the first acceleration, wherein the second acceleration represents the acceleration of gravity. Optionally, the second acceleration in this embodiment can also be a known acceleration of gravity, for example, it can be the acceleration of gravity of the environment where the user is located (such as a high-speed elevator or airplane that the user is riding). Optionally, the acceleration of gravity corresponding to different locations or different environments can be different.
[0076] The control module 420 is used to switch the audio processing mode of the headset to a specified mode based on the first acceleration, and the specified mode is used to balance the air pressure inside and outside the ear of the wearer.
[0077] As a method, the control module 420 can be used to obtain the difference to be detected based on the first acceleration and the second acceleration; if the difference to be detected is greater than the target threshold, the audio processing mode of the headset is switched to a specified mode. The step of obtaining the difference to be detected based on the first acceleration and the second acceleration includes: if the direction of the first acceleration is the same as the direction of the second acceleration, subtracting the first acceleration from the second acceleration to obtain the difference to be detected; if the direction of the first acceleration is opposite to the direction of the second acceleration, subtracting the second acceleration from the first acceleration to obtain the difference to be detected.
[0078] Among them, if the difference to be detected is greater than the target threshold, the step of switching the audio processing mode of the headset to the specified mode may include: if the direction of the first acceleration is the same as the direction of the second acceleration, when the difference to be detected is greater than the target threshold, the audio processing mode of the headset is switched to the first mode; when the direction of the first acceleration is opposite to the direction of the second acceleration, if the difference to be detected is greater than the target threshold, the audio processing mode of the headset is switched to the second mode, the second mode is different from the first mode, and the amount of audio allowed to pass through the second mode is less than the amount of audio allowed to pass through the first mode.
[0079] As another way, the control module 420 can be used to reacquire the first acceleration when the difference to be detected is less than or equal to the target threshold value until the difference to be detected is greater than the target threshold value. Specifically, if the direction of the first acceleration is the same as or opposite to the direction of the second acceleration, if the difference to be detected is less than or equal to the target threshold value, the first acceleration can be reacquired until the difference to be detected is greater than the target threshold value.
[0080] As another embodiment, the control module 420 can be used to suspend the noise reduction processing of the audio of the headset if the direction of the first acceleration is the same as the direction of the second acceleration, and the difference to be detected is less than or equal to the target threshold; if the direction of the first acceleration is the same as the direction of the second acceleration, and the difference to be detected is less than or equal to the target threshold, increase the intensity of the noise reduction processing of the audio of the headset.
[0081] Optionally, the control module 420 can be used to switch the audio processing mode of the headset to a specified mode based on the direction and magnitude of the first acceleration, or based on the direction and duration of the first acceleration, or based on the direction, magnitude and duration of the first acceleration.
[0082] Optionally, the control module 420 may be configured to send an audio processing mode change instruction to the headset; and switch the audio processing mode of the headset to a specified mode based on the change instruction.
[0083] The earphone in this embodiment may include an ear cap, in which a coil is disposed. In this manner, the data acquisition module 410 may be used to obtain coil expansion parameters corresponding to a specified mode, and audio signal processing parameters corresponding to the earphone. In this manner, the control module 420 may be used to adjust the expansion degree of the coil according to the coil expansion parameters, or to adjust the expansion degree of the coil according to the coil expansion parameters and process the audio signal of the earphone according to the audio signal processing parameters.
[0084] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0085] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.
[0086] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.
[0087] See also Fig. 9 Based on the above-mentioned headset control method and device, the embodiment of the present application further provides an electronic device 100 that can execute the above-mentioned headset control method. The electronic device 100 includes a memory 102 and one or more (only one is shown in the figure) processors 104 coupled to each other, and the memory 102 and the processor 104 are connected by a communication line. The memory 102 stores a program that can execute the content of the above-mentioned embodiment, and the processor 104 can execute the program stored in the memory 102.
[0088] Among them, the processor 104 may include one or more processing cores. The processor 104 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 102, and calling data stored in the memory 102. Optionally, the processor 104 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 104 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 104, but may be implemented separately through a communication chip.
[0089] The memory 102 may include a random access memory (RAM) or a read-only memory (ROM). The memory 102 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 102 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the aforementioned embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.
[0090] Please refer to Fig.10 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 500 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.
[0091] The computer-readable storage medium 500 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer-readable storage medium 500 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 500 has storage space for program code 510 that performs any method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code 510 can be compressed, for example, in an appropriate form.
[0092] In summary, the embodiment of the present application provides a headset control method, device, electronic device and storage medium, which obtains a first acceleration, and the first acceleration represents the acceleration of the wearer of the headset; based on the first acceleration, the audio processing mode of the headset is switched to a specified mode, and the specified mode is used to balance the air pressure inside and outside the ear of the wearer. Thus, the above method realizes the automatic switching of the audio processing mode of the headset according to the acceleration of the headset, so that the audio processing mode of the headset can be adjusted in time, reducing the discomfort of wearing the headset in special scenarios.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for controlling headphones, It is characterized in that Applied to electronic equipment, the method comprises: Acquire a first acceleration, where the first acceleration represents an acceleration of a person wearing the headset; Based on the first acceleration, the audio processing mode of the headset is switched to a specified mode, the specified mode is used to balance the air pressure inside and outside the ear of the wearer, the headset includes an ear cap, and a coil is arranged in the ear cap. Before switching the audio processing mode of the headset to the specified mode, the method further includes: obtaining a coil expansion parameter corresponding to the specified mode and an audio signal processing parameter corresponding to the headset; The step of switching the audio processing mode of the headset to a specified mode includes: The expansion and contraction degree of the coil is adjusted according to the coil expansion and contraction parameter, or the expansion and contraction degree of the coil is adjusted according to the coil expansion and contraction parameter and the audio signal of the earphone is processed according to the audio signal processing parameter.
2. The method according to claim 1, It is characterized in that The step of switching the audio processing mode of the headset to a specified mode based on the first acceleration includes: Acquire a difference to be detected based on the first acceleration and a second acceleration, where the second acceleration represents gravitational acceleration; If the difference to be detected is greater than the target threshold, the audio processing mode of the headset is switched to a specified mode.
3. The method according to claim 2, It is characterized in that The obtaining a difference to be detected based on the first acceleration and the second acceleration includes: If the direction of the first acceleration is the same as the direction of the second acceleration, subtract the first acceleration from the second acceleration to obtain a difference to be detected; If the direction of the first acceleration is opposite to the direction of the second acceleration, the second acceleration is subtracted from the first acceleration to obtain a difference to be detected.
4. The method according to claim 2, It is characterized in that If the difference to be detected is greater than a target threshold, switching the audio processing mode of the headset to a specified mode includes: If the direction of the first acceleration is the same as the direction of the second acceleration, when the difference to be detected is greater than a target threshold, switching the audio processing mode of the headset to the first mode; If the direction of the first acceleration is opposite to the direction of the second acceleration, when the difference to be detected is greater than the target threshold, the audio processing mode of the headset is switched to a second mode, the second mode is different from the first mode, and the amount of audio allowed to pass through the second mode is less than the amount of audio allowed to pass through the first mode.
5. The method according to claim 2, It is characterized in that The method further comprises: When the difference to be detected is less than or equal to the target threshold, the first acceleration is acquired again until the difference to be detected is greater than the target threshold.
6. The method according to claim 2, It is characterized in that The method further comprises: If the direction of the first acceleration is the same as the direction of the second acceleration, and when the difference to be detected is less than or equal to a target threshold, suspending the noise reduction processing of the audio of the headset; If the direction of the first acceleration is opposite to the direction of the second acceleration, and when the difference to be detected is less than or equal to a target threshold, the intensity of the noise reduction processing performed on the audio of the headset is increased.
7. The method according to claim 1, It is characterized in that The step of switching the audio processing mode of the headset to a specified mode based on the first acceleration includes: Based on the direction and magnitude of the first acceleration, or based on the direction and duration of the first acceleration, or based on the direction, magnitude and duration of the first acceleration, the audio processing mode of the headset is switched to a specified mode.
8. The method according to any one of claims 1 to 7, It is characterized in that The step of switching the audio processing mode of the headset to a specified mode includes: Sending a change instruction of audio processing mode to the headset; The audio processing mode of the headset is switched to a specified mode based on the change instruction.
9. A headphone control device, It is characterized in that Running on an electronic device, the device comprises: A data acquisition module, configured to acquire a first acceleration, wherein the first acceleration represents an acceleration of an object wearing the headset, wherein the headset comprises an ear cap, and a coil is disposed in the ear cap; The data acquisition module is further used to acquire coil expansion and contraction parameters corresponding to the specified mode and audio signal processing parameters corresponding to the earphone; a control module, configured to switch the audio processing mode of the headset to a specified mode based on the first acceleration, wherein the specified mode is configured to balance the air pressure inside and outside the ear of the wearer; The control module is further used to adjust the extension degree of the coil according to the coil extension parameter, or to adjust the extension degree of the coil according to the coil extension parameter and process the audio signal of the earphone according to the audio signal processing parameter.
10. An electronic device, It is characterized in that including one or more processors and memory; One or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores program code, wherein when the program code is executed by a processor, the method according to any one of claims 1 to 8 is executed.
