Adaptive active noise cancellation method and apparatus for headset, storage medium, and headset
By calculating the ear canal transfer function and selecting the appropriate filter coefficient, the problem of poor noise reduction effect caused by ear canal differences is solved, and rapid adaptability and high-quality noise reduction effect is achieved.
Patent Information
- Application Number
- PCT/CN2024/072813
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-17
- Publication Date
- 2025-07-24
AI Technical Summary
The existing active noise reduction headphones have inconsistent ear canal and wearing habits, resulting in incorrect calculation of the ear canal transfer function, affecting the noise reduction effect, and even increasing noise.
By calculating the current ear canal transfer function of the ear canal system, determine whether it meets the preset conditions. If it is not met, select the filter coefficient from the historical ear canal transfer parameter table for noise reduction. After meeting the conditions, it will be stored in the table to optimize the selection of the filter coefficient to adapt to the current ear canal system.
It quickly adapts to the current ear canal system, improves noise reduction effect, avoids long-term waiting, and takes into account adaptability and noise reduction speed.
Smart Images

Figure CN2024072813_24072025_PF_FP_ABST
Abstract
Description
Method, device, storage medium and earphone for adaptive active noise reduction of earphones Technical Field
[0001] The present invention relates to the field of headphones, and in particular to a method, device, storage medium and headphones for adaptive active noise reduction of headphones. Background Art
[0002] In recent years, wireless headphones have been gaining increasing market and consumer acceptance. The basic operating principle of active noise-canceling headphones is that when the headphones are worn, a speaker located inside the ear canal plays a signal that is roughly equal in amplitude and opposite in phase to the noise detected outside the ear canal, canceling out the noise reaching the ear, thereby creating a noise-canceling zone within the ear canal.
[0003] Since everyone's ear canal, auricle, and even headphone wearing habits are different, active noise-cancelling headphones need to calculate the ear canal transfer function of the ear canal system's response to sound through methods such as prompt sounds, and then perform active noise reduction based on the ear canal transfer function.
[0004] When the audio signal obtained by the microphone is subject to external interference, such as large human movements and bone conduction vibrations when speaking, it will cause errors in the calculation of the ear canal transfer function, resulting in the inability to correctly play signals that are roughly equal in amplitude and opposite in phase to the noise, ultimately impairing the noise reduction effect, and in severe cases even causing noise increase.
[0005] Summary of the Invention
[0006] Based on the above situation, the main purpose of the present invention is to provide a method, device, storage medium and earphone for adaptive active noise reduction of earphones, so as to take into account the adaptability with the current ear canal system and the speed of entering noise reduction.
[0007] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0008] A method for adaptive active noise reduction for headphones, comprising the following steps: S100, when the headphone is worn on the ear, calculating a current ear canal transfer function and a corresponding current filter coefficient of the ear canal system's response to sound, wherein the ear canal system includes an ambient microphone, an error microphone, and a speaker of the headphone; S200, determining whether the current ear canal transfer function satisfies a first preset condition, and if not, executing step S300; otherwise, executing step S400; S300, selecting a historical filter coefficient corresponding to a historical ear canal transfer function from a historical ear canal transfer parameter table as a filter coefficient for the speaker, and performing active noise reduction for the headphone; S400, selecting the current filter coefficient as the filter coefficient for the speaker, performing active noise reduction for the headphone, and determining whether the current ear canal transfer function satisfies a second preset condition, and if so, storing the current ear canal transfer function and the current filter coefficient in the historical ear canal transfer parameter table; if not, not storing the current ear canal transfer function and the current filter coefficient in the historical ear canal transfer parameter table; wherein the second preset condition imposes stricter restrictions on the current ear canal transfer function than the first preset condition.
[0009] Preferably, the first preset condition includes: the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value within the set frequency distance is less than a first jitter threshold, and the deviation between the current ear canal transfer function and the reference ear canal transfer function is less than a first deviation threshold.
[0010] Preferably, the second preset condition includes: the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value within the set frequency distance is less than a second jitter threshold, and the deviation between the current ear canal transfer function and the reference ear canal transfer function is less than a second deviation threshold; wherein, the second jitter threshold is less than the first jitter threshold, and the second deviation threshold is less than the first deviation threshold.
[0011] Preferably, in step S400, when the historical ear canal transfer functions stored in the historical ear canal transfer parameter table reaches a set upper limit, then: the deviation between each historical ear canal transfer function in the historical ear canal transfer parameter table and the current ear canal transfer function is calculated respectively, and the current ear canal transfer function is replaced with the historical ear canal transfer function corresponding to the largest deviation in the historical ear canal transfer parameter table.
[0012] Preferably, the deviation of the two ear canal transfer functions is the sum of the absolute values of the difference between the power values of the two ear canal transfer functions at any frequency.
[0013] Preferably, in step S300, the deviation between each historical ear canal transfer function in the historical ear canal transfer parameter table and the current ear canal transfer function is calculated respectively, and the historical ear canal transfer function corresponding to the minimum deviation is used as the certain historical ear canal transfer function.
[0014] Preferably, the difference between the power value at any frequency of the current ear canal transfer function and the power value within the set frequency distance is less than the first jitter threshold, specifically including: the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the first adjacent frequency within the set frequency distance is less than the first adjacent jitter threshold, and the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the first adjacent frequency within the set frequency distance is less than the first adjacent jitter threshold.
[0015] Preferably, the difference between the power value at any frequency of the current ear canal transfer function and the power value within the set frequency distance is less than the second jitter threshold, specifically including: the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the second adjacent frequency within the set frequency distance is less than the second adjacent jitter threshold, and the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the second adjacent frequency within the set frequency distance is less than the second adjacent jitter threshold.
[0016] The present invention also provides a device for adaptive active noise reduction of headphones, comprising: a calculation unit, for calculating, when the headphones are worn on the ears, a current ear canal transfer function and a corresponding current filter coefficient of the ear canal system's response to sound, wherein the ear canal system includes an ambient microphone, an error microphone, and a speaker of the headphones; a judgment unit, for judging whether the current ear canal transfer function satisfies a first preset condition, and if so, triggering the operation of the first processing unit; otherwise, triggering the operation of the second processing unit; the first processing unit, for selecting, from a historical ear canal transfer parameter table, a historical filter coefficient corresponding to a certain historical ear canal transfer function as the filter coefficient of the speaker, to perform active noise reduction on the headphones; and the second processing unit, for selecting the current filter coefficient as the filter coefficient of the speaker, to perform active noise reduction on the headphones, and judging whether the current ear canal transfer function satisfies a second preset condition, and if so, storing the current ear canal transfer function and the current filter coefficient in the historical ear canal transfer parameter table; otherwise, not storing the current ear canal transfer function and the current filter coefficient in the historical ear canal transfer parameter table; wherein the second preset condition imposes stricter restrictions on the current ear canal transfer function than the first preset condition.
[0017] Preferably, the first preset condition includes: the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value within the set frequency distance is less than a first jitter threshold, and the deviation between the current ear canal transfer function and the reference ear canal transfer function is less than a first deviation threshold.
[0018] Preferably, the second preset condition includes: the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value within the set frequency distance is less than a second jitter threshold, and the deviation between the current ear canal transfer function and the reference ear canal transfer function is less than a second deviation threshold; wherein, the second jitter threshold is less than the first jitter threshold, and the second deviation threshold is less than the first deviation threshold.
[0019] Preferably, in the second processing unit, when the historical ear canal transfer functions stored in the historical ear canal transfer parameter table reaches a set upper limit, then: the deviation between each historical ear canal transfer function in the historical ear canal transfer parameter table and the current ear canal transfer function is calculated respectively, and the current ear canal transfer function is replaced by the historical ear canal transfer function corresponding to the largest deviation in the historical ear canal transfer parameter table.
[0020] Preferably, in the first processing unit, the deviation between each historical ear canal transfer function in the historical ear canal transfer parameter table and the current ear canal transfer function is calculated respectively, and the historical ear canal transfer function corresponding to the minimum deviation is used as the certain historical ear canal transfer function.
[0021] Preferably, the difference between the power value at any frequency of the current ear canal transfer function and the power value within the set frequency distance is less than the first jitter threshold, specifically including: the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the first adjacent frequency within the set frequency distance is less than the first adjacent jitter threshold, and the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the first adjacent frequency within the set frequency distance is less than the first adjacent jitter threshold.
[0022] Preferably, the difference between the power value at any frequency of the current ear canal transfer function and the power value within the set frequency distance is less than the second jitter threshold, specifically including: the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the second adjacent frequency within the set frequency distance is less than the second adjacent jitter threshold, and the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the second adjacent frequency within the set frequency distance is less than the second adjacent jitter threshold.
[0023] The present invention also provides a computer storage medium storing a computer program, wherein the computer program is executed by a processor as any of the above-mentioned methods for adaptive active noise reduction of headphones.
[0024] The present invention also provides a headset for executing any of the above-mentioned methods for adaptive active noise reduction of headsets, or a device including any of the above-mentioned devices for adaptive active noise reduction of headsets.
[0025] In the above scheme, if the current ear canal transfer function meets the first preset condition, the current filter coefficient corresponding to the current ear canal transfer function can be preferentially used for headphone active noise reduction to better suit the current ear canal system. If the current ear canal transfer function does not meet the first preset condition, the historical filter coefficient is selected as the filter coefficient of the speaker for headphone active noise reduction, so that the headphone active noise reduction of higher quality can be entered at a faster speed, without making the user wait for a long time. It can be seen that the adaptive active noise reduction of this embodiment takes into account both the adaptability to the current ear canal system and the speed of entering noise reduction. In addition, if the current ear canal transfer function meets the first preset condition, it is further determined whether the current ear canal transfer function meets the second preset condition. If so, the current ear canal transfer function and the current filter coefficient are stored in the historical ear canal transfer parameter table. If not, they are not stored in the historical ear canal transfer parameter table. In this way, the higher-quality current ear canal transfer function can be used again later.
[0026] Other beneficial effects of the present invention will be explained through the introduction of specific technical features and technical solutions in the specific implementation methods. Those skilled in the art should be able to understand the beneficial technical effects brought about by the introduction of these technical features and technical solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings.
[0028] FIG1 is a schematic diagram of the components of an earphone according to a preferred embodiment of the present invention;
[0029] FIG2 is a flow chart of a method for adaptive active noise reduction for headphones according to a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0030] The present invention is described below based on the following embodiments, but the present invention is not limited to these embodiments. In the following detailed description of the present invention, some specific details are described in detail. In order to avoid obscuring the essence of the present invention, well-known methods, processes, procedures, and components are not described in detail.
[0031] Furthermore, persons of ordinary skill in the art will appreciate that the figures provided herein are for illustration purposes only and are not necessarily drawn to scale.
[0032] Unless the context clearly requires otherwise, throughout the specification and claims, the words "include," "comprising," and similar words should be construed in an inclusive sense rather than an exclusive or exhaustive sense; that is, in the sense of "including but not limited to."
[0033] In the description of the present invention, it should be understood that the terms "first", "second", etc. are used for descriptive purposes only and should not be understood to indicate or imply relative importance. In addition, in the description of the present invention, unless otherwise specified, "plurality" means two or more.
[0034] FIG1 is a diagram of the composition of an earphone according to an embodiment of the present invention, which includes a main control unit (such as a CPU), an ambient microphone (or a reference microphone), an error microphone, a speaker, a filter, and a memory. The main control unit is used to control the operation of the remaining units (including the ambient microphone, the error microphone, the speaker, the filter, and the memory). When the earphone is worn on the ear, the ambient microphone is located outside the ear, while the error microphone and the speaker are both located in the ear canal. In this case, the ambient microphone can detect ambient noise, the speaker can play sounds used to calculate the current ear canal transfer function and sounds for active noise reduction, and the error microphone can detect the effect of active noise reduction. The relevant filter coefficients can be configured in the filter to adjust the amplitude of the noise reduction audio signal to be sent to the speaker, thereby achieving compensation for the ear canal transfer function (for example, generating a compensation function that is the inverse of the ear canal transfer function), thereby achieving active noise reduction of the earphone.
[0035] FIG2 is a method for adaptive active noise reduction of headphones according to an embodiment of the present invention, which includes the following steps.
[0036] S100: When the earphone is worn on the ear, calculate the current ear canal transfer function and corresponding current filter coefficients of the ear canal system's response to sound, wherein the ear canal system includes the earphone's ambient microphone, error microphone, and speaker. Specifically, in this embodiment, the current ear canal transfer function is: during the ear canal system detection process, the ratio of the signal amplitude detected by the current ambient microphone to the signal amplitude detected by the error microphone, and then the ratio of the signal amplitude sent to the speaker. In the prior art, the ear canal transfer function is commonly defined as the ratio of the signal amplitude detected by the ambient microphone to the signal amplitude detected by the error microphone (correspondingly, the ear canal system includes the earphone's ambient microphone and error microphone). This calculation method only considers the characteristics of the path from the ambient microphone to the error microphone to sound response, and does not consider the characteristics of the path from the speaker to the error microphone to sound response. Therefore, its noise reduction effect is easily affected by the path from the speaker to the error microphone. In contrast, in this embodiment, the ear canal transfer function calculation method considers the path from the ambient microphone to the error microphone and the path from the speaker to the error microphone. Therefore, it can reduce the impact of the path from the speaker to the error microphone, thereby improving the noise reduction effect. Once the current ear canal transfer function is calculated, the filter coefficient in the speaker's filter (for example, the filter coefficient at any frequency) can be calculated. When the filter uses the filter coefficient to filter the noise reduction audio signal without being affected by other interference sources other than noise (such as large-scale movements of the human body, etc.), the amplitude of the noise reduction audio signal output by the speaker based on the filtered noise reduction audio signal is equal to or nearly equal to the amplitude of the residual noise signal after the external environmental noise is attenuated through the ear canal, and the phase is opposite, thereby achieving active noise reduction. The filter coefficient at this time is used as the current filter coefficient corresponding to the current ear canal transfer function.
[0037] S200, determine whether the current ear canal transfer function meets the first preset condition. If not, execute step S300; otherwise, execute step S400. As mentioned above, under the influence of other interference sources other than the current noise (for example, large movements of the human body), the calculated current ear canal transfer function will be abnormal. In other words, the current ear canal transfer function reflects the characteristics of the interference source. Therefore, this current ear canal transfer function should be regarded as abnormal and processed. To this end, a first preset condition is set to evaluate whether the current ear canal transfer function is normal (for example, the jitter between the power values at adjacent frequency points is less than the jitter threshold, etc.). When the current ear canal transfer function meets the first preset condition, it is determined that the current ear canal transfer function is normal, and the processing in step S400 is performed. If the first preset condition is not met, it is determined that the current ear canal transfer function is abnormal, and the processing in step S300 is performed. As an example, the power value P(x) of the current ear canal transfer function H(x) is calculated as follows: P(x)=10*log10[real(H(x))*real(H(x))+imag(H(x))*imag(H(x))];
[0038] Wherein, x represents the frequency of the current ear canal transfer function, real(H(x)) represents the real part of the current ear canal transfer function, and imag(H(x)) represents the imaginary part of the current ear canal transfer function.
[0039] S300, select a historical filter coefficient corresponding to a certain historical ear canal transfer function from the historical ear canal transfer parameter table as the filter coefficient of the speaker to perform active noise reduction on the earphone. The historical ear canal transfer parameter table can be stored in a memory, and a plurality of transfer parameter groups are stored in the historical ear canal transfer parameter table, each group of transfer parameters includes a historical ear canal transfer function and a corresponding historical filter coefficient. Before leaving the factory, these transfer parameter groups can be written into the historical ear canal transfer parameter table during the earphone test process. After leaving the factory, as the user uses the earphone for active noise reduction, certain current ear canal transfer functions that meet the above-mentioned first preset condition (as described below, those current ear canal transfer functions that meet the second preset condition) and the corresponding current filter coefficients will be written into the historical ear canal transfer parameter table. Specifically, as described above, when the calculated current ear canal transfer function does not meet the first preset condition (i.e., it is abnormal), a certain historical ear canal transfer function is selected from the historical ear canal transfer parameter table, and its corresponding historical filter coefficient is used as the filter coefficient of the speaker. Then, the noise reduction audio signal is filtered by the filter with the filter coefficient and sent to the speaker, and the speaker then outputs the corresponding noise reduction audio signal, thereby realizing active noise reduction of the headphones. In some embodiments, the deviation between each historical ear canal transfer function in the historical ear canal transfer parameter table and the current ear canal transfer function is calculated respectively, and the historical ear canal transfer function corresponding to the smallest deviation is used as the certain historical ear canal transfer function, that is, the historical ear canal transfer function corresponding to the smallest deviation is selected.
[0040] S400, select the current filter coefficient as the filter coefficient of the speaker, perform active noise reduction on the headphones, and determine whether the current ear canal transfer function meets the second preset condition. If so, store the current ear canal transfer function and the current filter coefficient in the historical ear canal transfer parameter table; otherwise, do not store them in the historical ear canal transfer parameter table; wherein, the second preset condition has stricter restrictions on the current ear canal transfer function than the first preset condition. Specifically, as mentioned above, when the calculated current ear canal transfer function meets the first condition (i.e., normal), the corresponding current filter coefficient is used as the filter coefficient of the speaker, and then, the noise reduction audio signal is filtered by the filter with the filter coefficient and sent to the speaker, which then outputs the corresponding noise reduction audio signal, thereby achieving active noise reduction on the headphones. In addition, it is necessary to further determine whether the current ear canal transfer function is of sufficient quality for subsequent use. To this end, a second preset condition with stricter restrictions on the current ear canal transfer function is further set to evaluate whether the current ear canal transfer function is of sufficient quality (for example, the jitter between the power values at adjacent frequency points is less than the jitter threshold in the first preset condition). When the current ear canal transfer function meets the second preset condition, it is determined that the current ear canal transfer function is of sufficient quality, and the current ear canal transfer function and the current filter coefficient are stored in the historical ear canal transfer parameter table for subsequent use; when the current ear canal transfer function does not meet the second preset condition, it is determined that the current ear canal transfer function is not of sufficient quality, and it is not stored in the historical ear canal transfer parameter table.
[0041] In the above embodiment, if the current ear canal transfer function satisfies the first preset condition, the current filter coefficient corresponding to the current ear canal transfer function can be preferentially used for headphone active noise reduction to better suit the current ear canal system. If the current ear canal transfer function does not meet the first preset condition, the historical filter coefficient is selected as the filter coefficient of the speaker for headphone active noise reduction, thereby enabling faster access to higher-quality headphone active noise reduction without requiring the user to wait for a long time. It can be seen that the adaptive active noise reduction of this embodiment takes into account both compatibility with the current ear canal system and the speed of entering noise reduction. In addition, if the current ear canal transfer function meets the first preset condition, it is further determined whether the current ear canal transfer function meets the second preset condition. If so, the current ear canal transfer function and the current filter coefficient are stored in the historical ear canal transfer parameter table. If not, they are not stored in the historical ear canal transfer parameter table. In this way, the higher-quality current ear canal transfer function can be used again later.
[0042] In some embodiments, the first preset condition includes: any frequency f of the current ear canal transfer function nThe absolute value of the difference between the power value at the frequency and the power value within the set frequency distance Δf is less than the first jitter threshold, and the deviation between the current ear canal transfer function and the reference ear canal transfer function is less than the first deviation threshold. n , the frequency f within the set frequency distance Δf is: f n -Δf≤f≤f n +Δf, the power value at any frequency f within this range is equal to the power value at frequency f n For example, the absolute value of the difference between the power values on the current ear canal transfer function is less than the first jitter threshold. n The power value on the frequency is the same as the first adjacent frequency f within the set frequency distance n+1 The absolute value of the difference between the power values of is less than the first adjacent jitter threshold, and the first adjacent frequency f within the set frequency distance is less than the first adjacent frequency f n+2 The absolute value of the difference between the power values is less than the first adjacent jitter threshold, wherein the first adjacent jitter threshold Th_s11 and the first adjacent jitter threshold Th_s12 may be the same or different. The reference ear canal transfer function serves as a reference standard for the current ear canal transfer function, which may be obtained by integrating the ear canal transfer functions calculated when a large number of earphones are worn on the ears. The deviation between the current ear canal transfer function and the reference ear canal transfer function reflects the degree of difference between the two, which may be the sum of the absolute values of the difference between the power values of the two at each frequency, or the average value of the sum of the absolute values; it can be understood that when the deviation takes different specific forms, the corresponding first deviation threshold will also be different.
[0043] In some embodiments, the second preset condition includes: any frequency f of the current ear canal transfer function n The absolute value of the difference between the power value at the frequency and the power value within the set frequency distance Δf is less than the second jitter threshold, and the deviation between the current ear canal transfer function and the reference ear canal transfer function is less than the second deviation threshold; wherein the second jitter threshold is less than the first jitter threshold, and the second deviation threshold is less than the first deviation threshold. For any frequency f n , the frequency f within the set frequency distance Δf is: f n -Δf≤f≤f n +Δf, the power value at any frequency f within this range is equal to the power value at frequency f n The absolute value of the difference between the power values on the first and second frequencies is less than the second jitter threshold. n The power value on the frequency is the same as the second adjacent frequency f within the set frequency distance n+1 The absolute value of the difference between the power values of the second adjacent jitter threshold and the second adjacent frequency f within the set frequency distance is less than the second adjacent frequency f n+2The absolute value of the difference between the power values of the current ear canal transfer function and the reference ear canal transfer function is less than the second adjacent jitter threshold, wherein the second adjacent jitter threshold Th_s21 and the second adjacent jitter threshold Th_s22 can be the same or different. The deviation between the current ear canal transfer function and the reference ear canal transfer function reflects the degree of difference between the two. It can be the sum of the absolute values of the differences between the power values of the two at each frequency, or the average of the sums of the absolute values. It can be understood that when the deviation takes different specific forms, the corresponding second deviation threshold will also be different.
[0044] In some embodiments, when the number of historical ear canal transfer functions stored in the historical ear canal transfer parameter table reaches a set upper limit, the following steps are performed: the deviation between each historical ear canal transfer function in the historical ear canal transfer parameter table and the current ear canal transfer function is calculated respectively, and the current ear canal transfer function is replaced with the historical ear canal transfer function corresponding to the largest deviation in the historical ear canal transfer parameter table. The deviation between the current ear canal transfer function and the reference ear canal transfer function reflects the degree of difference between the two, and can be the sum of the absolute values of the difference between the power values of the two at each frequency, or the average value of the sum of the absolute values. In this way, on the one hand, the storage space for storing the historical ear canal transfer parameter table does not need to be too large, and on the other hand, in the above step S300, the time taken to select a certain historical ear canal transfer function will not be too long due to too many stored historical ear canal transfer parameter tables, thereby causing the active noise reduction process to be too long.
[0045] In addition, the present invention also provides a computer storage medium storing a computer program, wherein the computer program is executed by a processor as any of the methods for adaptive active noise reduction of headphones.
[0046] The present invention also provides a headset for executing any of the above-mentioned methods for adaptive active noise reduction of headsets, or a device including any of the above-mentioned devices for adaptive active noise reduction of headsets.
[0047] It will be understood by those skilled in the art that, under the premise of no conflict, the above-mentioned preferred embodiments can be freely combined and superimposed. Among them, the flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, which contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. The numbering of each step in this article is only for the convenience of description and reference, and is not used to limit the order of execution. The specific execution order is determined by the technology itself, and those skilled in the art can determine various allowable and reasonable orders based on the technology itself.
[0048] It should be noted that the use of step numbers (letters or numbers) to refer to certain specific method steps in the present invention is solely for the purpose of descriptive convenience and brevity, and is in no way intended to limit the order of these method steps. Those skilled in the art will appreciate that the order of the relevant method steps is determined by the technology itself and should not be unduly limited by the presence of step numbers. Those skilled in the art can determine various permissible and reasonable step orders based on the technology itself.
[0049] Those skilled in the art will appreciate that, provided there is no conflict, the above preferred solutions can be freely combined and superimposed.
[0050] It should be understood that the above-mentioned embodiments are merely illustrative and non-restrictive. Without departing from the basic principles of the present invention, various obvious or equivalent modifications or substitutions that can be made by those skilled in the art to the above-mentioned details will be included in the scope of the claims of the present invention.
Claims
1. A method for adaptive active noise reduction of an earphone, characterized in that, It includes the following steps: S100, when the earphone is worn on the ear, calculate the current ear canal transfer function of the ear canal system's response to sound and the corresponding current filtering coefficient, where the ear canal system includes the ambient microphone, error microphone, and speaker of the earphone; S200, determine whether the current ear canal transfer function meets the first preset condition. If not, execute step S300; if so, execute step S400; S300, select the historical filtering coefficient corresponding to a certain historical ear canal transfer function from the historical ear canal transfer parameter table as the filtering coefficient of the speaker to perform active noise reduction of the earphone; S400, select the current filtering coefficient as the filtering coefficient of the speaker to perform active noise reduction of the earphone, and determine whether the current ear canal transfer function meets the second preset condition. If so, store the current ear canal transfer function and the current filtering coefficient in the historical ear canal transfer parameter table; if not, do not store them in the historical ear canal transfer parameter table; where the second preset condition restricts the current ear canal transfer function more strictly than the first preset condition does.
2. The method according to claim 1, wherein The first preset condition includes: The absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value within a set frequency distance is less than the first jitter threshold, and the deviation between the current ear canal transfer function and the reference ear canal transfer function is less than the first deviation threshold.
3. The method according to claim 2, characterized in that, The second preset condition includes: The absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value within a set frequency distance is less than the second jitter threshold, and the deviation between the current ear canal transfer function and the reference ear canal transfer function is less than the second deviation threshold; where the second jitter threshold is less than the first jitter threshold, and the second deviation threshold is less than the first deviation threshold.
4. The method according to claim 1, wherein In step S400, when the number of historical ear canal transfer functions stored in the historical ear canal transfer parameter table reaches the set upper limit, then: Calculate the deviation between each historical ear canal transfer function in the historical ear canal transfer parameter table and the current ear canal transfer function respectively, and replace the historical ear canal transfer function corresponding to the largest deviation in the historical ear canal transfer parameter table with the current ear canal transfer function.
5. The method according to any one of claims 2-4, wherein The deviation between two ear canal transfer functions is the sum of the absolute values of the differences in power values of the two ear canal transfer functions at any frequency.
6. The method according to claim 2, wherein In step S300, calculate the deviation between each historical ear canal transfer function in the historical ear canal transfer parameter table and the current ear canal transfer function respectively, and use the historical ear canal transfer function corresponding to the smallest deviation as the certain historical ear canal transfer function.
7. The method according to claim 2, wherein That the power value at any frequency of the current ear canal transfer function minus the power value within a set frequency distance is less than the first jitter threshold specifically includes: The absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the first adjacent frequency within a set frequency distance is less than the first adjacent jitter threshold, and the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the first adjacent frequency within the set frequency distance is less than the first adjacent jitter threshold.
8. The method according to claim 3, wherein The situation that the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value within a set frequency distance is less than the second jitter threshold specifically includes: The absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the second adjacent frequency within a set frequency distance is less than the second adjacent jitter threshold, and the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the second adjacent frequency within the set frequency distance is less than the second adjacent jitter threshold.
9. An apparatus for adaptive active noise reduction of an earphone, characterized in that, Comprising: A calculation unit, configured to calculate the current ear canal transfer function of the ear canal system's response to sound and the corresponding current filter coefficient when the earphone is worn on the ear, wherein the ear canal system includes the ambient microphone, error microphone, and speaker of the earphone; A judgment unit, configured to judge whether the current ear canal transfer function meets a first preset condition. If not, trigger the first processing unit to work; if so, trigger the second processing unit to work; A first processing unit, configured to select the historical filter coefficient corresponding to a certain historical ear canal transfer function from the historical ear canal transfer parameter table as the filter coefficient of the speaker for active noise reduction of the earphone; A second processing unit, configured to select the current filter coefficient as the filter coefficient of the speaker for active noise reduction of the earphone, and judge whether the current ear canal transfer function meets a second preset condition. If so, store the current ear canal transfer function and the current filter coefficient into the historical ear canal transfer parameter table; if not, do not store them into the historical ear canal transfer parameter table; wherein, the limitation of the second preset condition on the current ear canal transfer function is more stringent than the limitation of the first preset condition on the current ear canal transfer function.
10. The device according to claim 9, characterized in that, The first preset condition includes: The absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value within a set frequency distance is less than the first jitter threshold, and the deviation between the current ear canal transfer function and the reference ear canal transfer function is less than the first deviation threshold.
11. The device according to claim 10, characterized in that, The second preset condition includes: The absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value within a set frequency distance is less than the second jitter threshold, and the deviation between the current ear canal transfer function and the reference ear canal transfer function is less than the second deviation threshold; Wherein, the second jitter threshold is less than the first jitter threshold, and the second deviation threshold is less than the first deviation threshold.
12. The device according to claim 9, characterized in that In the second processing unit, when the number of historical ear canal transfer functions stored in the historical ear canal transfer parameter table reaches the set upper limit, then: Calculate the deviation between each historical ear canal transfer function in the historical ear canal transfer parameter table and the current ear canal transfer function respectively, and replace the historical ear canal transfer function corresponding to the largest deviation in the historical ear canal transfer parameter table with the current ear canal transfer function.
13. The device according to claim 10, wherein: In the first processing unit, the deviation between each historical ear canal transfer function in the historical ear canal transfer parameter table and the current ear canal transfer function is calculated respectively, and the historical ear canal transfer function corresponding to the minimum deviation is used as the certain historical ear canal transfer function.
14. The device according to claim 10, wherein: The difference between the power value at any frequency of the current ear canal transfer function and the power value within a set frequency distance being less than a first jitter threshold specifically includes: The absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the first adjacent frequency within a set frequency distance is less than a first adjacent jitter threshold, and the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the first sub - adjacent frequency within a set frequency distance is less than a first sub - adjacent jitter threshold.
15. The device according to claim 11, wherein: The difference between the power value at any frequency of the current ear canal transfer function and the power value within a set frequency distance being less than a second jitter threshold specifically includes: The absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the second adjacent frequency within a set frequency distance is less than a second adjacent jitter threshold, and the absolute value of the difference between the power value at any frequency of the current ear canal transfer function and the power value of the second sub - adjacent frequency within a set frequency distance is less than a second sub - adjacent jitter threshold. The computer program, when executed by a processor, is for the method of headphone adaptive active noise reduction as described in any one of claims 1 - 8.
16. A computer storage medium storing a computer program, characterized in that, For implementing the method of headphone adaptive active noise reduction as described in any one of claims 1 - 8, or including the device for headphone adaptive active noise reduction as described in any one of claims 9 - 15.
17. A headset, characterized in that,
Citation Information
Patent Citations
Parameter adjustment method and device for active noise reduction earphone and wireless earphone
CN110972014A
Filter design method and device of active noise reduction earphone and test equipment
CN111800694A
Active noise reduction method, active noise reduction device and half-in-ear active noise reduction earphone
CN113409754A
Simulation design method, device and equipment of filter and storage medium
CN113657026A
Active noise reduction method and active noise reduction earphone
CN115396774A