Active noise reduction method and device

By detecting the ambient air pressure and temperature and dynamically adjusting the filter parameters of the headphones, the problem of poor noise reduction quality when the environment changes is solved, achieving more efficient noise reduction processing and user experience.

CN120021275APending Publication Date: 2025-05-20ANKER INNOVATIONS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311550197.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-20
Publication Date
2025-05-20

AI Technical Summary

Technical Problem

The existing headphones have poor noise reduction quality when the ambient air pressure and temperature change, and cannot adjust the filter parameters in time to adapt to environmental changes.

Method used

By detecting the air pressure and temperature of the external environment, calculating the air pressure change amount, determining the target gain required for the preset frequency band, and determining the ultimate output gain of the speaker based on the temperature, and then determining the filter parameters at the current moment to achieve dynamic noise reduction processing.

Benefits of technology

It improves the noise reduction quality of headphones when environmental changes are changed, ensures user experience, and has low algorithm resource requirements, and is suitable for low-cost platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120021275A_ABST
    Figure CN120021275A_ABST
Patent Text Reader

Abstract

The invention relates to an active noise reduction method and device. The method comprises the following steps: acquiring air pressure and temperature of an external environment; determining a target gain required to be increased by a preset frequency band based on the fact that the variation of the air pressure at the current moment and the air pressure at the previous moment is greater than a preset value; determining a limit output gain of the loudspeaker in a preset frequency band based on the temperature at the current moment; determining a loudspeaker output gain required at the current moment according to a target gain required to be increased by the preset frequency band; and determining a filter parameter at the current moment according to the relationship between the loudspeaker output gain required at the current moment and the limit output gain of the loudspeaker, and performing noise reduction processing based on the filter parameter. By adopting the method, the noise reduction quality of the earphone can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of signal processing, and particularly to an active noise reduction method, device, earphone, computer-readable storage medium, and computer program product. Background Art

[0002] Most of the earphones on the market currently use fixed filters or adaptive noise reduction algorithms related to ear canals and ambient noise to obtain corresponding filter parameters, and thus implement the noise reduction process for the surrounding environment based on the filter parameters.

[0003] However, when the environment where the earphone is located changes, if the previous filter parameters are still used, the noise reduction quality of the earphone will be poor. Summary of the Invention

[0004] Based on this, it is necessary to provide an active noise reduction method and device that can improve the noise reduction quality for the above technical problems.

[0005] In a first aspect, the present application provides an active noise reduction method applied to an earphone, and the earphone includes a speaker. The method includes: obtaining the air pressure and temperature of the external environment; determining the target gain to be increased in a preset frequency band based on that the change amount of the air pressure at the current moment compared with the air pressure at the previous moment is greater than a preset value; determining the limit output gain of the speaker in the preset frequency band based on the temperature at the current moment; determining the required speaker output gain at the current moment according to the target gain to be increased in the preset frequency band; and determining the filter parameters at the current moment according to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker, so as to perform noise reduction processing based on the filter parameters.

[0006] In one embodiment, the preset frequency band includes multiple frequency points, and the target gain to be increased in the preset frequency band includes the gain to be increased for each frequency point in the preset frequency band; the determining the target gain to be increased in the preset frequency band based on that the change amount of the air pressure at the current moment compared with the air pressure at the previous moment is greater than a preset value includes:

[0007] determining the gain to be increased for each frequency point in the preset frequency band based on the first frequency response curve corresponding to the air pressure at the current moment and the second frequency response curve corresponding to the air pressure at the previous moment; wherein, the first frequency response curve and the second frequency response curve are obtained based on the mapping relationship between the air pressure and the frequency response curve of the filter.

[0008] In one embodiment, the preset frequency band includes multiple frequency points, and the target gain to be increased in the preset frequency band includes the gain to be increased for each frequency point in the preset frequency band;

[0009] Determining the required speaker output gain at the current moment according to the target gain to be increased according to the preset frequency band includes:

[0010] Based on the target gain and the second frequency response curve corresponding to the air pressure at the previous moment, determining the gain coefficient corresponding to each frequency point in the preset frequency band;

[0011] Based on the gain coefficient and the second frequency response curve corresponding to the air pressure at the previous moment, obtaining the required speaker output gain at each frequency point at the current moment in the preset frequency band;

[0012] Accumulating the required speaker output gains at all frequency points at the current moment in the preset frequency band to obtain the required speaker output gain at the current moment in the preset frequency band.

[0013] In one embodiment, the determining the limit output gain of the speaker in the preset frequency band based on the temperature at the current moment includes:

[0014] Based on the mapping relationship between the temperature and the frequency response curve of the speaker and the temperature at the current moment, determining the third frequency response curve corresponding to the temperature at the current moment;

[0015] Based on the third frequency response curve, obtaining the limit output gain of the speaker in the preset frequency band.

[0016] In one embodiment, the determining the filter parameters at the current moment according to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker includes:

[0017] Picking up the ambient noise through a microphone and, based on the ambient noise, obtaining the noise energy corresponding to the first target frequency band; the preset frequency band includes the first target frequency band, and the speaker output gain corresponding to the first target frequency band is greater than the limit output gain;

[0018] Based on the speaker output gain and the noise energy corresponding to the first target frequency band, determining the filter parameters at the current moment.

[0019] In one embodiment, the number of the first target frequency bands is multiple, and the determining the filter parameters at the current moment based on the speaker output gain and the noise energy corresponding to the first target frequency band includes:

[0020] Based on the noise energy corresponding to each first target frequency band and the human ear sensitivity, obtaining the noise sensitivity value of the human ear in each first target frequency band;

[0021] Sorting the noise sensitivity values of each first target frequency band to determine the priority of each first target frequency band; wherein, the greater the noise sensitivity value, the greater the priority of the first target frequency band;

[0022] Allocate the corresponding speaker output gain to the first target frequency band according to the gain ratio corresponding to the priority of the first target frequency band, and obtain the filter parameters.

[0023] In one embodiment, the determining the filter parameters at the current moment according to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker includes:

[0024] Adjust the speaker output gain corresponding to the second target frequency band to the limit output gain, and determine the filter parameters; wherein, the preset frequency band includes the second target frequency band, and the speaker output gain corresponding to the second target frequency band is less than the limit output gain.

[0025] In a second aspect, the present application further provides an active noise reduction device, which is applied to an earphone, and the earphone includes a speaker. The device includes: a barometric pressure detection module for detecting the barometric pressure of the external environment; a temperature detection module for detecting the temperature of the external environment; a first determination module for determining the target gain to be increased for the preset frequency band based on that the change amount of the barometric pressure at the current moment and the barometric pressure at the previous moment is greater than a preset value; a second determination module for determining the limit output gain of the speaker in the preset frequency band based on the temperature at the current moment; a third determination module for determining the required speaker output gain at the current moment according to the target gain to be increased for the preset frequency band; and a processing module for determining the filter parameters at the current moment according to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker, so as to perform noise reduction processing based on the filter parameters.

[0026] In a third aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0027] Obtain the barometric pressure and temperature of the external environment;

[0028] Determine the target gain to be increased for the preset frequency band based on that the change amount of the barometric pressure at the current moment and the barometric pressure at the previous moment is greater than a preset value;

[0029] Determine the limit output gain of the speaker in the preset frequency band based on the temperature at the current moment;

[0030] Determine the required speaker output gain at the current moment according to the target gain to be increased for the preset frequency band;

[0031] Determine the filter parameters at the current moment according to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker, so as to perform noise reduction processing based on the filter parameters.

[0032] Fourthly, the present application also provides a computer program product. The computer program product includes a computer program which, when executed by a processor, implements the following steps:

[0033] Obtain the air pressure and temperature of the external environment;

[0034] Based on that the change amount of the air pressure at the current moment compared with the air pressure at the previous moment is greater than a preset value, determine the target gain to be increased for a preset frequency band;

[0035] Based on the temperature at the current moment, determine the limit output gain of the speaker in the preset frequency band;

[0036] According to the target gain to be increased for the preset frequency band, determine the required speaker output gain at the current moment;

[0037] According to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker, determine the filter parameters at the current moment, so as to perform noise reduction processing based on the filter parameters.

[0038] In the above active noise reduction method and device, by detecting the air pressure and temperature of the external environment, the change amount of the air pressure at the current moment compared with the air pressure at the previous moment can be calculated, and thus, it can be determined in time whether the environment where the earphone is located has changed based on the change amount of the air pressure, improving the timeliness of detecting the environment where the earphone is located. When the change amount of the air pressure is greater than the preset value, the target gain to be increased for the preset frequency band can be determined, and according to the target gain to be increased for the preset frequency band, the required speaker output gain at the current moment can be determined, and the limit output gain of the speaker in the preset frequency band can be determined based on the temperature at the current moment. Furthermore, according to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker, the filter parameters at the current moment can be determined. When performing noise reduction processing based on the filter parameters, when the environment where the earphone is located changes, by determining the filter parameters in time, the situation of low noise reduction quality caused by still using fixed filter parameters when the current environment of the earphone changes can be avoided, the noise reduction quality of the earphone can be improved, and the user experience is guaranteed. Description of the Drawings

[0039] Figure 1 It is a schematic flowchart of the active noise reduction method in an embodiment;

[0040] Figure 2 It is a schematic flowchart of determining the required speaker output gain at the current moment according to the target gain to be increased for the preset frequency band in an embodiment;

[0041] Figure 3 It is a schematic flowchart of determining the limit output gain of the speaker in the preset frequency band based on the temperature at the current moment in an embodiment;

[0042] Figure 4 A flowchart showing the process of determining the filter parameters at the current moment according to the relationship between the required speaker output gain and the maximum output gain of the speaker in an embodiment.

[0043] Figure 5 A flowchart showing the process of determining the filter parameters at the current moment based on the speaker output gain and the noise energy corresponding to the first target frequency band in an embodiment.

[0044] Figure 6 A flowchart showing the process of an active noise cancellation method in another embodiment.

[0045] Figure 7 A structural block diagram of an active noise cancellation device in an embodiment. Detailed implementation manners

[0046] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] Currently in the market, when the earphone is a True Wireless Stereo (TWS) earphone, the fixed filter is generally adjusted in an acoustic laboratory under standard atmospheric pressure and 25°C. However, when the user takes the earphone to high altitude, an airplane cabin or from indoors to outdoors and other scenarios, the changes in air pressure and temperature will cause the performance of the active noise cancellation (ANC) of the TWS earphone to decline, resulting in a poor user experience. The reasons are as follows: The change in air pressure will cause the noise reduction depth (i.e., the amount of noise reduction) of the filters of the TWS earphone (such as the feedforward (FF) filter and the feedback (FB) filter) to become shallower. For the FF filter, the noise reduction depth of the FF filter will become shallower in the entire frequency band, the noise reduction effect will become worse, and the noise reduction quality will be poor; the change in temperature will also cause the frequency response curve of the speaker of the TWS earphone to change, resulting in the speaker output being different from the expectation, which affects the noise reduction effect. And the adaptive noise cancellation algorithm usually requires a large amount of resource occupation. Although it can adjust the filter for the changes in air pressure and temperature, it cannot adapt to the resource limitation in some low-cost products and requires a lighter filter adjustment method. Moreover, due to the reduction of the noise reduction depth caused by the changes in air pressure and temperature, the filter parameters generated by the adaptive algorithm in a certain environment cannot reach the original noise reduction depth due to the hardware limitations of the speaker and the like, and most will cause the noise reduction depth in the entire frequency band to not reach the expected depth, resulting in low noise reduction quality.

[0048] Based on this, the present application provides an active noise reduction method, which is used to adaptively determine the filter parameters of the earphone when the environment where the earphone is located changes, so that the earphone can adapt to the current environment and improve the noise reduction quality.

[0049] In one embodiment, as Figure 1 shown, an active noise reduction method is provided. Taking the application of this method to an earphone as an example, it includes the following steps:

[0050] S102, obtain the air pressure and temperature of the external environment.

[0051] In this embodiment, the earphone may include an air pressure detection device and a temperature detection device. The air pressure detection device is used to detect the air pressure of the external environment in real time, and the temperature detection device is used to detect the temperature of the external environment in real time. For example, the air pressure detection device may include a barometer or other types of devices for detecting the air pressure in the environment, and the air pressure detection device may include a temperature sensor or other types of devices for detecting the air pressure in the environment. This embodiment does not make specific limitations.

[0052] In some embodiments, a detection period can be set. When the air pressure detection device and the temperature detection device reach the detection period, they will automatically detect the air pressure and temperature of the external environment, and the earphone will save the air pressure and temperature obtained each time.

[0053] S104, based on the change amount of the air pressure at the current moment being greater than a preset value compared with the air pressure at the previous moment, determine the target gain required for the preset frequency band.

[0054] In this embodiment, the change amount can be the absolute value of the difference between the air pressure at the current moment and the air pressure at the previous moment. For example, if the air pressure at the current moment is 0.7 atmospheres and the air pressure at the previous moment is 0.9 atmospheres, then the change amount is 0.2 atmospheres. When the preset value is 0.1 atmosphere, it can be determined that the environment where the earphone is located has changed; among them, 1 standard atmosphere (atmosphere) is equal to 101325 pascals (Pa).

[0055] In this embodiment, the preset frequency band can be determined based on the opus frequency band that conforms to the human ear's auditory perception. For example, in the opus frequency band, the preset frequency band can be 0 - 20 kilohertz (kHz). In some embodiments, the number of preset frequency bands can be multiple. Taking the opus frequency band as an example, 0 - 20 kHz can be divided into 21 frequency bands, and the preset frequency bands can be respectively: 0 hertz (Hz) - 200 Hz, 200 Hz - 400 Hz, 400 Hz - 600 Hz, 600 Hz - 800 Hz, 800 Hz - 1000 Hz, 1000 Hz - 1200 Hz, 1200 Hz - 1400 Hz, 1400 Hz - 1600 Hz, 1600 Hz - 2000 Hz, 2000 Hz - 2400 Hz, 2400 Hz - 2800 Hz, 2800 Hz - 3200 Hz, 3200 Hz - 4000 Hz, 4000 Hz - 4800 Hz, 4800 Hz - 5600 Hz, 5600 Hz - 6800 Hz, 6800 Hz - 8000 Hz, 8000 Hz - 9600 Hz, 9600 Hz - 12000 Hz, 12000 Hz - 15600 Hz, 15600 Hz - 20000 Hz.

[0056] In this embodiment, the target gain required to be increased for the preset frequency band refers to the gain that the earphone needs to increase to reach the expected noise reduction depth at the current moment. Specifically, based on the air pressure at the current moment, the air pressure at the previous moment, and the mapping relationship between the air pressure and the frequency response curve of the filter, the target gain required to be increased for the preset frequency band can be determined.

[0057] Among them, based on the mapping relationship between the air pressure and the frequency response curve of the filter, the frequency response curve of the earphone under different air pressures can be obtained. The abscissa of the frequency response curve is the frequency (Hz), and the ordinate is the decibel (dB). It should be understood that based on the frequency represented by the abscissa of the frequency response curve, the frequency response curve corresponding to the preset frequency band under different air pressures can be determined.

[0058] Among them, in an acoustic laboratory where the air pressure is controllable, the test personnel wear noise-canceling earphones. By controlling the noise of the preset frequency band (such as 200 Hz - 400 Hz, etc.) emitted by the acoustic laboratory and controlling the acoustic laboratory to be under different air pressures, the mapping relationship between the air pressure and the frequency response curve of the filter can be obtained by analyzing the obtained response signals.

[0059] S106. Determine the limit output gain of the speaker in the preset frequency band based on the temperature at the current moment.

[0060] In this embodiment, the maximum output gain of the speaker in a preset frequency band refers to the maximum gain that the speaker can output at the current moment. Specifically, based on the mapping relationship between temperature and the frequency response curve, and the temperature at the current moment, the maximum output gain of the speaker in the preset frequency band can be determined. Among them, based on the mapping relationship between temperature and the frequency response curve of the speaker, the frequency response curves of the earphone at different temperatures can be determined. The abscissa of the frequency response curve is frequency (Hz), and the ordinate is decibel (dB). It should be understood that based on the frequency represented by the abscissa of the frequency response curve, the frequency response curves corresponding to the preset frequency band at different temperatures can be determined.

[0061] Specifically, in an acoustics laboratory with controllable temperature, a tester wears noise-canceling earphones. By controlling the noise in the preset frequency band (such as 200 Hz - 400 Hz, etc.) emitted by the acoustics laboratory, and controlling the acoustics laboratory to be at different temperatures, the mapping relationship between temperature and the frequency response curve of the speaker can be obtained by analyzing the acquired response signals.

[0062] S108. Determine the required speaker output gain at the current moment according to the target gain to be increased in the preset frequency band.

[0063] In some embodiments, the required speaker output gain at the current moment can be determined according to the target gain to be increased in the preset frequency band and the mapping relationship between air pressure and the frequency response curve of the filter.

[0064] S110. Determine the filter parameters at the current moment according to the relationship between the required speaker output gain at the current moment and the maximum output gain of the speaker, so as to perform noise cancellation processing based on the filter parameters.

[0065] In some embodiments, the filter parameters can be obtained when adjusting the frequency response curve corresponding to the earphone at the current moment based on the speaker output gain and the maximum output gain.

[0066] It should be noted that when the earphone includes one filter, the filter parameters determined in this application refer to the parameters after adjustment for this filter; when the earphone includes multiple filters, the filter parameters determined in this application refer to the new filter parameters, and at least one of the multiple filters can work based on the new filter parameters.

[0067] In summary, based on Figure 1The method shown can calculate the change in air pressure between the current moment and the previous moment by detecting the air pressure and temperature of the external environment. Thus, it is possible to promptly detect whether the environment where the earphone is located has changed based on the change in air pressure, improving the timeliness of detecting the environment where the earphone is located. When the change in air pressure is greater than a preset value, the target gain to be increased for a preset frequency band can be determined, and based on the target gain to be increased for the preset frequency band, the speaker output gain required at the current moment can be determined, and the limit output gain of the speaker in the preset frequency band can be determined based on the temperature at the current moment. Furthermore, based on the relationship between the speaker output gain required at the current moment and the limit output gain of the speaker, the filter parameters at the current moment can be determined. When noise reduction processing is performed based on the filter parameters, when the environment where the earphone is located changes, by promptly determining the filter parameters, the situation of low noise reduction quality caused by still using fixed filter parameters when the current environment of the earphone changes can be avoided, improving the noise reduction quality of the earphone and ensuring the user experience.

[0068] Moreover, the method provided in this application has low algorithm computing power requirements, can be used on low-cost platforms, and the algorithm effect is more targeted. It can adapt to hardware limitations, provide a better noise reduction experience based on psychoacoustics, and based on the determined filter parameters, the earphone can achieve a better noise reduction depth, which can be closer to the expected depth compared with the prior art.

[0069] In one embodiment, the preset frequency band includes multiple frequency points, and the target gain to be increased for the preset frequency band includes the gain to be increased for each frequency point in the preset frequency band. Specifically, when determining the target gain to be increased for the preset frequency band based on the change in air pressure between the current moment and the previous moment being greater than the preset value, it can specifically be based on the first frequency response curve corresponding to the air pressure at the current moment and the second frequency response curve corresponding to the air pressure at the previous moment to determine the gain to be increased for each frequency point in the preset frequency band. Specifically, subtract the ordinate value corresponding to each frequency point in the preset frequency band in the second frequency response curve from the ordinate value corresponding to each frequency point in the preset frequency band in the first frequency response curve to obtain the difference corresponding to each frequency point in the preset frequency band, and determine the difference corresponding to each frequency point in the preset frequency band as the gain to be increased for each frequency point in the preset frequency band.

[0070] In this embodiment, the first frequency response curve and the second frequency response curve are obtained based on the mapping relationship between air pressure and the frequency response curve of the filter. Specifically, based on the mapping relationship between air pressure and the frequency response curve of the filter, the frequency response curve matching the air pressure at the current moment is determined as the first frequency response curve; based on the mapping relationship between air pressure and the frequency response curve of the filter, the frequency response curve matching the air pressure at the previous moment is determined as the first frequency response curve.

[0071] In some embodiments, the preset frequency band includes multiple frequency points. For example, Figure 2 As shown, a schematic flow chart for determining the required speaker output gain at the current moment according to the target gain required for the preset frequency band is provided. Taking the application of this method to headphones as an example, the following steps are included:

[0072] S202: Based on the target gain and the second frequency response curve corresponding to the air pressure at the previous moment, determine the gain coefficient corresponding to each frequency point in the preset frequency band.

[0073] In this embodiment, the target gain required to be increased for the preset frequency band includes the gain required to be increased for each frequency point in the preset frequency band. Specifically, based on the second frequency response curve corresponding to the air pressure at the previous moment, obtain the ordinate value corresponding to each frequency point in the preset frequency band of the second frequency response curve, and determine the ratio between the gain required to be increased for each frequency point in the preset frequency band and the ordinate value corresponding to each frequency point in the preset frequency band as the gain coefficient corresponding to each frequency point in the preset frequency band.

[0074] S204: Based on the gain coefficient and the second frequency response curve corresponding to the air pressure at the previous moment, obtain the required speaker output gain for each frequency point at the current moment in the preset frequency band.

[0075] Specifically, based on the second frequency response curve corresponding to the air pressure at the previous moment, obtain the ordinate value corresponding to each frequency point in the preset frequency band of the second frequency response curve; calculate the sum of the gain coefficient and the threshold; determine the product of the sum and the ordinate value as the required speaker output gain for each frequency point at the current moment in the preset frequency band; in this embodiment, the threshold can be 1.

[0076] S206: Accumulate the required speaker output gains for all frequency points at the current moment in the preset frequency band to obtain the required speaker output gain for the preset frequency band at the current moment.

[0077] In summary, based on the Figure 2 method shown, the required speaker output gain at the current moment can be obtained. Thus, when determining the filter parameters based on the required speaker output gain at the current moment, the noise reduction quality of the headphones can be improved.

[0078] In one embodiment, as Figure 3 shown, a schematic flow chart for determining the limit output gain of the speaker in the preset frequency band based on the temperature at the current moment is provided. Taking the application of this method to headphones as an example, the following steps are included:

[0079] S302: Based on the mapping relationship between the temperature and the frequency response curve of the speaker and the temperature at the current moment, determine the third frequency response curve corresponding to the temperature at the current moment.

[0080] S304. Obtain the limit output gain of the speaker in the preset frequency band based on the third frequency response curve.

[0081] In some embodiments, the preset frequency band includes multiple frequency points. Statistically analyze the ordinate values corresponding to each frequency point in the curve that matches the preset frequency band in the third frequency response curve, and accumulate the ordinate values corresponding to all frequency points to obtain the limit output gain of the speaker in the preset frequency band.

[0082] In some embodiments, the preset frequency band includes multiple frequency points. Integrate the curve that matches the preset frequency band in the third frequency response curve to obtain the area corresponding to the curve, and determine the area as the limit output gain of the speaker in the preset frequency band.

[0083] In summary, based on Figure 3 the method shown can obtain the limit output gain of the speaker in the preset frequency band. When determining the filter parameters based on the limit output gain, since the influence of temperature on the filter parameters is considered, the noise reduction quality can be improved when performing noise reduction processing based on the determined filter parameters.

[0084] In one embodiment, as Figure 4 shown, a schematic flowchart of determining the filter parameters at the current moment according to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker is provided. Taking the application of this method to headphones as an example, it includes the following steps:

[0085] S402. Pick up the ambient noise through a microphone and obtain the noise energy corresponding to the first target frequency band based on the ambient noise; the speaker output gain corresponding to the first target frequency band is greater than the limit output gain.

[0086] In this embodiment, the preset frequency band includes the first target frequency band. By performing frequency domain analysis on the ambient noise, the noise energy corresponding to the preset frequency band is obtained. Thus, the noise energy corresponding to each first target frequency band is obtained from the noise energy corresponding to the preset frequency band.

[0087] S404. Determine the filter parameters at the current moment based on the speaker output gain and the noise energy corresponding to the first target frequency band.

[0088] In some embodiments, the influence degree of the human ear in the first target frequency band can be determined according to the noise energy corresponding to the first target frequency band, and the filter parameters at the current moment can be determined according to the influence degree and the speaker output gain corresponding to the first target frequency band.

[0089] In summary, based on Figure 4In the method shown, when determining the filter parameters, since the influence of the noise energy corresponding to the frequency band on the filter parameters is considered, when the headset is in a noise environment and noise reduction processing is performed based on the determined filter parameters, the noise reduction quality of the headset can be improved.

[0090] In one embodiment, the number of first target frequency bands is multiple, such as Figure 5 As shown, a schematic flowchart of determining the filter parameters at the current moment based on the speaker output gain and noise energy corresponding to the first target frequency band is provided. Taking the method applied to Figure 1 the controller 104 in

[0091] S502, based on the noise energy corresponding to each first target frequency band and the human ear sensitivity, obtain the noise sensitivity value of the human ear in each first target frequency band.

[0092] In this embodiment, the human ear has different noise sensitivity values for sounds in different frequency bands. For example, the audible frequency range that the human ear can feel is between 20 - 20000 Hz, but it is most sensitive to sounds in the range of 1000 - 3000 Hz, that is, the human speech frequency is mainly between 1000 - 3000 Hz. When the sound reaches a certain intensity, it can stimulate the human auditory system to produce hearing. Thus, by setting the corresponding human ear sensitivity for each first target frequency band, the frequency bands sensitive to the human ear can be accurately found.

[0093] Specifically, the noise sensitivity value of each first target frequency band is the ratio of the noise energy corresponding to each first target frequency band to the corresponding human ear sensitivity.

[0094] S504, sort the noise sensitivity values of each first target frequency band to determine the priority of each first target frequency band.

[0095] In this embodiment, the greater the noise sensitivity value, the greater the priority of the first target frequency band. For example, the result of sorting the noise energy of the first target frequency band combined with the corresponding human ear sensitivity is: the noise sensitivity value of the frequency band in 200Hz - 400Hz is the largest, the noise sensitivity value of the frequency band in 400Hz - 600Hz is the second, and the noise sensitivity value of the frequency band in 600Hz - 800Hz is the third. Then the priority of the frequency band in 200Hz - 400Hz is greater than the priority of the frequency band in 400Hz - 600Hz, and the priority of the frequency band in 400Hz - 600Hz is greater than the priority of the frequency band in 600Hz - 800Hz.

[0096] S506, allocate the corresponding speaker output gain to the first target frequency band according to the gain ratio corresponding to the priority of the first target frequency band to obtain the filter parameters.

[0097] In this embodiment, the higher the priority of the first target frequency band, the greater the corresponding gain ratio. For example, in combination with S504, the gain ratio allocated to the frequency band of 200 Hz - 400 Hz is 50%, the gain ratio allocated to the frequency band of 400 Hz - 600 Hz is 30%, and the gain ratio allocated to the frequency band of 600 Hz - 800 Hz is 10%. Then, the corresponding speaker output gain is allocated to 200 Hz - 400 Hz according to 50%, the corresponding speaker output gain is allocated to 400 Hz - 600 Hz according to 30%, and the corresponding speaker output gain is allocated to 600 Hz - 800 Hz according to 10%. Similarly, the corresponding speaker output gain is allocated according to the gain ratio allocated to other frequency bands, so that new filter parameters can be obtained. Among them, the specific value of the gain ratio allocated to each frequency band can be set based on the actual application scenario, and this embodiment does not make specific limitations.

[0098] Based on Figure 5 As can be seen from the content shown, Figure 5 The embodiment shown performs corresponding processing on the frequency band when the speaker output gain is greater than the limit output gain to determine the filter parameters. In one embodiment, according to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker, determining the filter parameters at the current moment may further include: when adjusting the speaker output gain corresponding to the second target frequency band to the limit output gain, determining the filter parameters; where the preset frequency band includes the second target frequency band, and the speaker output gain corresponding to the second target frequency band is less than the limit output gain.

[0099] Combining the above content, the preset frequency band includes multiple frequency points, and the target gain required for the preset frequency band includes the gain required for each frequency point in the preset frequency band. For example, Figure 6 As shown, an active noise reduction method is provided. Taking the method applied to Figure 1 the controller 104 in

[0100] S602, obtain the air pressure and temperature of the external environment.

[0101] S604, based on the first frequency response curve corresponding to the air pressure at the current moment and the second frequency response curve corresponding to the air pressure at the previous moment, determine the gain required for each frequency point in the preset frequency band; based on the target gain and the second frequency response curve corresponding to the air pressure at the previous moment, determine the gain coefficient corresponding to each frequency point in the preset frequency band; based on the gain coefficient and the second frequency response curve corresponding to the air pressure at the previous moment, obtain the speaker output gain required for each frequency point at the current moment in the preset frequency band; accumulate the speaker output gains required for all frequency points at the current moment in the preset frequency band to obtain the speaker output gain required for the preset frequency band at the current moment.

[0102] Specifically, subtract the ordinate value corresponding to each frequency point in the preset frequency band of the first frequency response curve from the ordinate value corresponding to each frequency point in the preset frequency band of the second frequency response curve to obtain the difference corresponding to each frequency point in the preset frequency band, and determine the gain that each frequency point in the preset frequency band needs to increase as the difference corresponding to each frequency point in the preset frequency band.

[0103] S606. Based on the mapping relationship between temperature and the frequency response curve of the speaker, and the temperature at the current moment, determine the third frequency response curve corresponding to the temperature at the current moment; based on the third frequency response curve, obtain the limit output gain of the speaker in the preset frequency band.

[0104] Furthermore, according to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker, the filter parameters at the current moment can be determined to perform noise reduction processing based on the filter parameters. Specifically, when the speaker output gain is greater than the limit output gain, execute S608. When the speaker output gain is less than the limit output gain, execute S610.

[0105] S608. Pick up the ambient noise through the microphone, and based on the ambient noise, obtain the noise energy corresponding to the first target frequency band; the speaker output gain corresponding to each first target frequency band is greater than the limit output gain; based on the noise energy corresponding to each first target frequency band and the human ear sensitivity, obtain the noise sensitivity value of the human ear in each first target frequency band; sort the noise sensitivity values of each first target frequency band to determine the priority of each first target frequency band; allocate the corresponding speaker output gain to each first target frequency band according to the gain ratio corresponding to the priority of the first target frequency band to obtain the filter parameters at the current moment.

[0106] S610. Adjust the speaker output gain corresponding to the second target frequency band to the limit output gain to determine the filter parameters at the current moment; the speaker output gain of the second target frequency band is less than the limit output gain.

[0107] S612. Perform noise reduction processing based on the filter parameters.

[0108] Among them, the specific content of S602 - S612 can refer to the foregoing description for adaptation, and will not be elaborated here.

[0109] It should be noted that the determined filter parameters described above can refer to the filter parameters of the FF filter in the earphone, or can refer to the filter parameters of the FB filter in the earphone. In other words, when the environment where the earphone is located changes, the above - shown active noise reduction method can be used to determine the filter parameters of the FB filter and the FB filter in the earphone.

[0110] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least some of the steps or stages in other steps or other steps.

[0111] Based on the same inventive concept, an embodiment of the present application further provides an active noise reduction device for implementing the above-mentioned active noise reduction method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the active noise reduction device provided below can refer to the limitations on the active noise reduction method in the above text, and will not be repeated here.

[0112] In one embodiment, as Figure 7 shown, an active noise reduction device is provided, including: a barometric pressure detection module 702, a temperature detection module 704, a first determination module 706, a second determination module 708, a third determination module 710, and a processing module 712, where:

[0113] The barometric pressure detection module 702 is used to detect the barometric pressure of the external environment; the temperature detection module 704 is used to detect the temperature of the external environment; the first determination module 706 is used to determine the target gain to be increased in a preset frequency band based on the change amount of the barometric pressure at the current moment being greater than a preset value compared with the barometric pressure at the previous moment; the second determination module 708 is used to determine the limit output gain of the speaker in the preset frequency band based on the temperature at the current moment; the third determination module 710 is used to determine the required speaker output gain at the current moment according to the target gain to be increased in the preset frequency band; the processing module 712 is used to determine the filter parameters at the current moment according to the relationship between the required speaker output gain at the current moment and the limit output gain of the speaker, so as to perform noise reduction processing based on the filter parameters.

[0114] In one embodiment, the preset frequency band includes multiple frequency points, and the target gain to be increased in the preset frequency band includes the gain to be increased for each frequency point in the preset frequency band; the first determination module is further configured to: based on the first frequency response curve corresponding to the air pressure at the current moment and the second frequency response curve corresponding to the air pressure at the previous moment, determine the gain to be increased for each frequency point in the preset frequency band; wherein, the first frequency response curve and the second frequency response curve are obtained based on the mapping relationship between the air pressure and the frequency response curve of the filter.

[0115] In one embodiment, the preset frequency band includes multiple frequency points, and the third determination module is further configured to: based on the target gain and the second frequency response curve corresponding to the air pressure at the previous moment, determine the gain coefficient corresponding to each frequency point in the preset frequency band; based on the gain coefficient and the second frequency response curve corresponding to the air pressure at the previous moment, obtain the horn output gain required at the current moment for each frequency point in the preset frequency band; accumulate the horn output gains required at the current moment for all frequency points in the preset frequency band to obtain the horn output gain required at the current moment for the preset frequency band.

[0116] In one embodiment, the second determination module is further configured to: based on the mapping relationship between the temperature and the frequency response curve of the horn and the temperature at the current moment, determine the third frequency response curve corresponding to the temperature at the current moment; based on the third frequency response curve, obtain the limit output gain of the horn in the preset frequency band.

[0117] In one embodiment, the processing module is further configured to: pick up ambient noise through a microphone and obtain the noise energy corresponding to the first target frequency band based on the ambient noise; the preset frequency band includes the first target frequency band, and the horn output gain corresponding to the first target frequency band is greater than the limit output gain; based on the horn output gain corresponding to the first target frequency band and the noise energy, determine the filter parameters at the current moment.

[0118] In one embodiment, the number of the first target frequency bands is multiple, and the processing module is further configured to: based on the noise energy corresponding to each first target frequency band and the human ear sensitivity, obtain the noise sensitivity value of the human ear in each first target frequency band; sort the noise sensitivity values of each first target frequency band to determine the priority of each first target frequency band; wherein, the greater the noise sensitivity value, the greater the priority of the first target frequency band; allocate the corresponding horn output gain to the first target frequency band according to the gain ratio corresponding to the priority of the first target frequency band to obtain the filter parameters.

[0119] In one embodiment, the processing module is further configured to: adjust the speaker output gain corresponding to the second target frequency band to the limit output gain, and determine the filter parameters; wherein the preset frequency band includes the second target frequency band, and the speaker output gain corresponding to the second target frequency band is less than the limit output gain.

[0120] Each module in the above active noise reduction device can be implemented in whole or in part by software, hardware, and their combination. Each of the above modules can be embedded in or independent of the processor in the earphone in the form of hardware, or stored in the memory in the earphone in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0121] In one embodiment, an earphone is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0122] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0123] In one embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0124] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memories can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0125] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0126] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. An active noise reduction method, characterized in that: Applied to earphones, the earphones include a speaker, and the method includes: Get the air pressure and temperature of the external environment; Determine the target gain that needs to be increased in the preset frequency band based on the difference between the air pressure at the current moment and the air pressure at the previous moment being greater than a preset value; Determine the limit output gain of the speaker in the preset frequency band based on the temperature at the current moment; Determining the speaker output gain required at the current moment according to the target gain required to be increased in the preset frequency band; According to the relationship between the speaker output gain required at the current moment and the limit output gain of the speaker, the filter parameters at the current moment are determined, so as to perform noise reduction processing based on the filter parameters.

2. The method according to claim 1, characterized in that The preset frequency band includes a plurality of frequency points; the target gain required to be increased in the preset frequency band includes the gain required to be increased for each frequency point in the preset frequency band; the determining the target gain required to be increased in the preset frequency band based on the fact that the change between the air pressure at the current moment and the air pressure at the previous moment is greater than a preset value includes: Based on a first frequency response curve corresponding to the air pressure at the current moment and a second frequency response curve corresponding to the air pressure at the previous moment, the gain required to be increased for each frequency point in the preset frequency band is determined; wherein the first frequency response curve and the second frequency response curve are obtained based on a mapping relationship between the air pressure and the frequency response curve of the filter.

3. The method according to claim 1, characterized in that The preset frequency band includes a plurality of frequency points, and the target gain required to be increased in the preset frequency band includes the gain required to be increased for each frequency point in the preset frequency band; and determining the speaker output gain required at the current moment according to the target gain required to be increased in the preset frequency band includes: Determining a gain coefficient corresponding to each frequency point in the preset frequency band based on the target gain and a second frequency response curve corresponding to the air pressure at the previous moment; Based on the gain coefficient and the second frequency response curve corresponding to the air pressure at the previous moment, obtaining the speaker output gain required at each frequency point in the preset frequency band at the current moment; The speaker output gain required at the current moment for all frequency points in the preset frequency band is accumulated to obtain the speaker output gain required at the current moment for the preset frequency band.

4. The method according to claim 1, characterized in that: The determining of the limit output gain of the speaker based on the temperature at the current moment includes: Based on the mapping relationship between the temperature and the frequency response curve of the speaker and the temperature at the current moment, determining a third frequency response curve corresponding to the temperature at the current moment; Based on the third frequency response curve, the limit output gain of the speaker in the preset frequency band is obtained.

5. The method according to any one of claims 1 to 4, characterized in that: The determining of the filter parameters at the current moment according to the relationship between the speaker output gain required at the current moment and the speaker's limit output gain comprises: A microphone is used to pick up environmental noise, and based on the environmental noise, noise energy corresponding to a first target frequency band is obtained; the preset frequency band includes the first target frequency band, and a speaker output gain corresponding to the first target frequency band is greater than a limit output gain; The filter parameters at the current moment are determined based on the speaker output gain and noise energy corresponding to the first target frequency band.

6. The method according to claim 5, characterized in that The number of the first target frequency bands is multiple, and the determining of the filter parameters at the current moment based on the speaker output gain and noise energy corresponding to the first target frequency band includes: Based on the noise energy corresponding to each first target frequency band and the sensitivity of the human ear, obtaining the noise sensitivity value of the human ear in each first target frequency band; Sorting the noise sensitivity value of each first target frequency band to determine the priority of each first target frequency band; wherein the greater the noise sensitivity value, the greater the priority of the first target frequency band; According to the gain proportion corresponding to the priority of the first target frequency band, the corresponding speaker output gain is allocated to the first target frequency band to obtain the filter parameters.

7. The method according to any one of claims 1 to 4, characterized in that: The determining of the filter parameters at the current moment according to the relationship between the speaker output gain required at the current moment and the speaker's limit output gain comprises: The speaker output gain corresponding to the second target frequency band is adjusted to the limit output gain, and the filter parameters are determined; wherein the preset frequency band includes the second target frequency band, and the speaker output gain corresponding to the second target frequency band is less than the limit output gain.

8. An active noise reduction device, characterized in that: Applied to earphones, the earphones include a speaker, and the device includes: Air pressure detection module, used to detect the air pressure of the external environment; A temperature detection module is used to detect the temperature of the external environment; A first determination module, configured to determine a target gain to be increased in a preset frequency band based on a difference between the air pressure at a current moment and the air pressure at a previous moment being greater than a preset value; A second determination module, configured to determine a limit output gain of the speaker in the preset frequency band based on the temperature at a current moment; A third determination module is used to determine the speaker output gain required at the current moment according to the target gain required to be increased in the preset frequency band; The processing module is used to determine the filter parameters at the current moment according to the relationship between the speaker output gain required at the current moment and the limit output gain of the speaker, so as to perform noise reduction processing based on the filter parameters.

9. The device according to claim 8, characterized in that The preset frequency band includes a plurality of frequency points, and the target gain required to be increased in the preset frequency band includes the gain required to be increased for each frequency point in the preset frequency band; and the first determining module is further used to: Based on a first frequency response curve corresponding to the air pressure at the current moment and a second frequency response curve corresponding to the air pressure at the previous moment, the gain required to be increased for each frequency point in the preset frequency band is determined; wherein the first frequency response curve and the second frequency response curve are obtained based on a mapping relationship between the air pressure and the frequency response curve of the filter.

10. The device according to claim 8, characterized in that The preset frequency band includes a plurality of frequency points, and the third determining module is further used to: Determining a gain coefficient corresponding to each frequency point in the preset frequency band based on the target gain and a second frequency response curve corresponding to the air pressure at the previous moment; Based on the gain coefficient and the second frequency response curve corresponding to the air pressure at the previous moment, obtaining the speaker output gain required at each frequency point in the preset frequency band at the current moment; The speaker output gain required at the current moment for all frequency points in the preset frequency band is accumulated to obtain the speaker output gain required at the current moment for the preset frequency band.

11. The device according to claim 8, characterized in that The second determining module is further used for: Based on the mapping relationship between the temperature and the frequency response curve of the speaker and the temperature at the current moment, determining a third frequency response curve corresponding to the temperature at the current moment; Based on the third frequency response curve, the limit output gain of the speaker in the preset frequency band is obtained.

12. The device according to any one of claims 8 to 11, characterized in that: The processing module is further used for: A microphone is used to pick up environmental noise, and based on the environmental noise, noise energy corresponding to a first target frequency band is obtained; the preset frequency band includes the first target frequency band, and a speaker output gain corresponding to the first target frequency band is greater than a limit output gain; The filter parameters at the current moment are determined based on the speaker output gain and noise energy corresponding to the first target frequency band.

13. The device according to claim 12, characterized in that The number of the first target frequency bands is multiple, and the processing module is further used to: Based on the noise energy corresponding to each first target frequency band and the sensitivity of the human ear, obtaining the noise sensitivity value of the human ear in each first target frequency band; Sorting the noise sensitivity value of each first target frequency band to determine the priority of each first target frequency band; wherein the greater the noise sensitivity value, the greater the priority of the first target frequency band; According to the gain proportion corresponding to the priority of the first target frequency band, the corresponding speaker output gain is allocated to the first target frequency band to obtain the filter parameters.

14. The device according to any one of claims 8 to 11, characterized in that: The processing module is further used for: The speaker output gain corresponding to the second target frequency band is adjusted to the limit output gain, and the filter parameters are determined; wherein the preset frequency band includes the second target frequency band, and the speaker output gain corresponding to the second target frequency band is less than the limit output gain.