Active noise reduction method, device and equipment based on adaptive noise reduction gain adjustment

By sorting and determining the median of noise power within a preset time period, the noise reduction gain is determined, which solves the problem of false triggering of active noise reduction methods under sudden noise changes and achieves stable and timely noise reduction gain.

CN115866468BActive Publication Date: 2025-11-28ZHUHAI JIELI TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210744461.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2025-11-28
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

Existing active noise cancellation methods are prone to mis-triggered or haphazardly triggered noise cancellation gain levels when faced with sudden noise changes, which affects the user experience.

Method used

By acquiring the original audio signal within a preset duration, the noise power set of the ambient noise is determined and sorted to obtain the median noise power. The noise reduction gain is then determined based on the median and gradually adjusted to the corresponding noise cancellation waveform to cancel the ambient noise.

Benefits of technology

It effectively avoids sudden changes in noise reduction gain caused by transient noise, ensuring the stability and reliability of noise reduction gain, and improving computational efficiency and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115866468B_ABST
    Figure CN115866468B_ABST
Patent Text Reader

Abstract

The application discloses an active noise reduction method and device based on adaptive noise reduction gain adjustment, equipment and equipment pairs, wherein the noise reduction method comprises steps S100, S200, S400, S500 and S600, the original audio signal collected by the collection element within a preset time length is acquired first, then the noise power set of the environmental noise is determined, the multiple noise powers are sorted according to the numerical value size, the median of the noise power is obtained, the noise reduction gain of the noise power range corresponding to the median of the noise power is extracted, then the noise reduction gain is used to make the secondary path generate the noise cancellation waveform corresponding to the noise reduction gain to offset the environmental noise. The application discloses an active noise reduction method based on adaptive noise reduction gain adjustment, which can effectively avoid the problem of sudden change of noise reduction gain caused by transient noise, thereby preventing the problem of accidental or random triggering of noise reduction gain caused by transient noise, and ensuring the stability of noise reduction gain and the reliability of adjusting noise reduction gain.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of noise reduction, in particular to an active noise reduction method, device and equipment based on adaptive noise reduction gain adjustment. BACKGROUND

[0002] Noise not only affects people's normal life, but also is harmful to hearing. With the increasing noise pollution, the technology of suppressing noise has attracted more and more researchers' attention. In order to reduce the influence of noise on people, various noise reduction methods have appeared. Common noise reduction methods include active noise reduction and passive noise reduction. Among them, active noise reduction (ANC) is based on the principle of waveform interference, which generates a waveform with the same amplitude and opposite phase as the noise to cancel out the noise, so as to achieve the purpose of noise reduction. In this noise reduction method, the environment noise is not perceived by the human ear because it is canceled out by the reverse signal.

[0003] The noise reduction gain adjustment mode of active noise reduction mainly includes three types: fixed noise reduction gain, manually adjusted noise reduction gain and adaptively adjusted noise reduction gain.

[0004] The fixed noise reduction gain means that the noise reduction gain cannot be adjusted, and the noise reduction effect is fixed and unchanged. It is easy to press the eardrum of the user, and the power consumption is high.

[0005] The manually adjusted noise reduction gain means that the noise reduction gain can be adjusted by manually switching different noise reduction gears by the user. It solves the problem of pressing the eardrum of the user and the problem of power consumption, but it needs to be manually adjusted by the user, which is complicated to operate and has poor user experience. Especially in a noisy environment, it is more inconvenient to use.

[0006] The adaptively adjusted noise reduction gain usually automatically switches the noise reduction gear according to the average number of noise power to adjust the noise reduction gain. It realizes the adaptive adjustment of noise reduction gain, so that the noise reduction effect can be adaptively adjusted when facing different noise environments.

[0007] For the adaptively adjusted noise reduction gain type, there is a problem that the noise reduction gain does not match the actual environment noise. Especially when the user's environment has a noise mutation, there is a problem of electric noise, that is, the noise reduction is too deep, which leads to the user hearing the noise of the noise reduction device, and the user experience is poor.

[0008] Therefore, how to provide a new active noise reduction method to ensure the reliability of noise reduction gain adjustment has become a technical problem to be solved. SUMMARY

[0009] Based on the above status, the main purpose of the present application is to provide an active noise reduction method, device and equipment based on adaptive noise reduction gain adjustment, so as to avoid the problem of sudden noise leading to noise reduction gain position mis-triggering or disorder triggering.

[0010] To achieve the above-mentioned purpose, the technical scheme adopted by the present application is as follows:

[0011] In a first aspect, the embodiment discloses an active noise reduction method based on adaptive noise reduction gain adjustment, comprising:

[0012] Step S100, obtaining the original audio signal collected by the collection element within a preset time length;

[0013] Step S200, determining the environmental noise within the preset time length from the original audio signal, and obtaining the noise power set of the environmental noise, wherein the noise power set is a plurality of noise powers of the environmental noise within the preset time length;

[0014] Step S400, sorting each noise power in the noise power set according to the numerical value size in order to obtain the noise power median of the noise power set;

[0015] Step S500, extracting the noise reduction gain corresponding to the noise power range of the noise power median, wherein the noise power range is one of a plurality of preset ranges, and each preset range corresponds to one noise reduction gain, wherein different noise reduction gains are respectively applicable to different noise environments;

[0016] Step S600, according to the noise reduction gain, causing the secondary path to generate a noise cancellation waveform corresponding to the noise reduction gain, so as to cancel the environmental noise.

[0017] Optionally, the original audio signal within the preset time length in step S100 contains a plurality of audio signals; step S100 includes sequentially obtaining a plurality of audio signals; in step S200, the noise power of the environmental noise in each frame of audio signal is determined respectively;

[0018] Step S400 includes: when the noise power of the jth frame of audio signal is determined, the noise power of the jth frame is sorted with the noise power of the 1st to the j-1th frame, until j=P, wherein 2≤j≤P, and P is the number of frames of the original audio signal within the preset time length.

[0019] Optionally, in step S400, when the noise power set includes an even number of noise powers, the noise power median is one of the middle two numerical values of the sorted noise power set.

[0020] Optionally, before step S400, it further includes:

[0021] Step S300, determining whether the current environment scene is a single environment scene according to the correspondence between the plurality of noise powers and the plurality of preset environment scenes, if the current environment scene is a single environment scene, entering step S400, wherein each preset environment scene corresponds to a noise power range, and the single environment scene is an environment scene corresponding to a noise power range in the plurality of preset ranges.

[0022] Optionally, the step S300 includes:

[0023] If a part of the plurality of noise powers belongs to the noise power range of the preset first environment scene, and a part of the plurality of noise powers belongs to the noise power range of the preset other environment scene, determining an overlap quantity ratio of the plurality of noise powers belonging to the noise power range of the first environment scene and belonging to the noise power range of the other environment scene, and if the overlap quantity ratio is less than a preset threshold, determining that the current environment scene is a single environment scene, wherein the other environment scene is a preset environment scene different from the first environment scene.

[0024] Optionally, the step S300 includes:

[0025] If the number of noise powers belonging to the noise power range of a preset environment scene is greater than a preset number, the current environment scene is a single environment scene.

[0026] Optionally, the step S500 further includes:

[0027] Step S510, when the noise reduction gain corresponding to the median of the plurality of noise powers is not equal to the current noise reduction gain, adjusting the current noise reduction gain to the noise reduction gain corresponding to the median of the plurality of noise powers according to a preset gradient, so as to gradually transition the noise reduction gain.

[0028] Optionally, in the step S300, when the overlap quantity ratio is greater than the preset threshold, and a part of the plurality of noise powers belongs to the noise power range of the preset first environment scene, and a part of the plurality of noise powers belongs to the noise power range of the preset second environment scene, it is determined that the current environment scene is the first environment scene and the second environment scene, and the following steps are performed:

[0029] Step S800, respectively determining a first number of the plurality of noise powers belonging only to the first environment scene and a second number of the plurality of noise powers belonging only to the second environment scene, and obtaining a quantity ratio of the first number and the second number;

[0030] Step S900, weighting the first preset gain and the second preset gain according to the quantity ratio to obtain a noise reduction gain, wherein each environment scene corresponds to a preset gear of the noise reduction gain, the first preset gain is the noise reduction gain of the preset gear corresponding to the first environment scene, the second preset gain is the noise reduction gain of the preset gear corresponding to the second environment scene, and step S600 is executed.

[0031] Optionally, in the i th execution cycle, i is greater than 1, and before step S800, the method further comprises:

[0032] Step S710, weighting the first quantity and the second quantity buffered in the i-1 th execution cycle to obtain a weighted first quantity and a weighted second quantity, wherein the weighting coefficient is greater than 0 and less than or equal to 1.

[0033] Step S720, determining a new first quantity belonging to the first environment scene and a new second quantity belonging to the second environment scene from the plurality of noise powers in the i th execution cycle, respectively.

[0034] In the i th execution cycle, step S800 comprises:

[0035] Step S720, summing the weighted first quantity and the new first quantity to obtain the first quantity in the i th execution cycle, and summing the weighted second quantity and the new second quantity to obtain the second quantity in the i th execution cycle, wherein the ratio of the first quantity to the second quantity in the i th execution cycle is the quantity ratio in the i th execution cycle.

[0036] Optionally, in the i th execution cycle, step S800 further comprises:

[0037] Step S710, determining whether a third environment scene exists according to the set of noise powers obtained in the i th execution cycle, wherein the third environment scene is different from the first environment scene and the second environment scene.

[0038] When it is determined in the i th execution cycle that the third environment scene exists, the first quantity and the second quantity buffered in the i-1 th execution cycle are both cleared.

[0039] In a second aspect, the embodiment discloses an active noise reduction device, the device comprising:

[0040] An audio signal acquisition module (100) is configured to acquire an original audio signal collected by a collection element within a preset time length.

[0041] A set of noise powers obtaining module (200) is configured to determine an environmental noise within the preset time length from the original audio signal and obtain a set of noise powers of the environmental noise, wherein the set of noise powers is a plurality of noise powers of the environmental noise within the preset time length.

[0042] The sorting module (400) is configured to sort each noise power in the noise power set according to the numerical value size to obtain a noise power median of the noise power set.

[0043] The noise reduction gain determination module (500) is configured to extract a noise reduction gain corresponding to a noise power range of the noise power median, wherein the noise power range is one of a plurality of preset ranges, and each preset range corresponds to one noise reduction gain, and different noise reduction gains are respectively applicable to different noise environments.

[0044] The offsetting module (600) is configured to generate a noise offset waveform corresponding to the noise reduction gain to offset the environmental noise in the original audio signal.

[0045] Optionally, the original audio signal obtained by the audio signal acquisition module within the preset time length comprises a plurality of audio signals, and the plurality of audio signals are sequentially obtained, and the noise power set obtaining module respectively determines the noise power of the environmental noise in each audio signal.

[0046] The sorting module is further configured to sort the noise power of the jth audio signal with the noise powers of the first to the (j-1)th audio signals until j=P, when the noise power of the jth audio signal is determined, wherein 2≤j≤P, and P is the number of frames of the original audio signal within the preset time length.

[0047] Optionally, when the noise power set comprises an even number of noise powers, the sorting module takes one of the middle two values of the sorted noise power set as the noise power median.

[0048] Optionally, the device further comprises:

[0049] The scene determination module (300) is configured to determine whether the current environment scene is a single environment scene according to a correspondence between the plurality of noise powers and a plurality of preset environment scenes, and if the current environment scene is a single environment scene, the sorting module sorts, wherein each preset environment scene corresponds to a noise power range, and the single environment scene is only one environment scene.

[0050] Optionally, if a part of the plurality of noise powers belongs to the noise power range of a preset first environment scene, and a part of the plurality of noise powers belongs to the noise power range of a preset other environment scene, the scene determination module determines an overlap proportion of the number of noise powers that simultaneously belong to the noise power range of the first environment scene and the noise power range of the other environment scene, and if the overlap proportion is less than a preset threshold, the scene determination module determines that the current environment scene is a single environment scene, wherein the other environment scene is a preset environment scene different from the first environment scene.

[0051] Optionally, the scene determining module determines that the current is in a single environment scene if the number of noise power ranges belonging to the preset environment scene is greater than the preset number.

[0052] Optionally, the noise reduction gain determining module is further configured to adjust the current noise reduction gain to the weighted noise reduction gain by a preset gradient when the weighted noise reduction gain is not equal to the current noise reduction gain, so that the noise reduction gain is gradually transitioned.

[0053] Optionally, the scene determining module is further configured to determine that the current is in a first environment scene and a second environment scene when the overlap number ratio is greater than the preset threshold and a part of the plurality of noise powers belongs to a noise power range of the first environment scene and a part of the plurality of noise powers belongs to a noise power range of the second environment scene, and the device further comprises:

[0054] The number ratio obtaining module (800) is configured to respectively determine a first number of the plurality of noise powers belonging to only the first environment scene and a second number of the plurality of noise powers belonging to only the second environment scene, and obtain a number ratio of the first number and the second number.

[0055] The gain calculating module (900) is configured to weight the first preset gain and the second preset gain according to the number ratio to obtain the noise reduction gain, wherein each environment scene corresponds to a preset gear of the noise reduction gain, the first preset gain is a preset gear of the noise reduction gain corresponding to the first environment scene, and the second preset gain is a preset gear of the noise reduction gain corresponding to the second environment scene.

[0056] Optionally, in the i-th execution cycle, i is greater than 1, the number ratio obtaining module is further configured to weight the first number and the second number cached in the (i-1)-th execution cycle to obtain a weighted first number and a weighted second number, a weighting coefficient is greater than 0 and less than or equal to 1, a new first number of the plurality of noise powers belonging to the first environment scene in the i-th execution cycle is determined, and a new second number of the plurality of noise powers belonging to the second environment scene in the i-th execution cycle is determined.

[0057] The sum of the weighted first number and the new first number is the first number of the i-th execution cycle, the sum of the weighted second number and the new second number is the second number of the i-th execution cycle, and the ratio of the first number and the second number of the i-th execution cycle is the number ratio of the i-th execution cycle.

[0058] Optionally, in the i-th execution cycle, the number ratio obtaining module is further configured to determine whether there is a third environment scene according to the set of noise powers obtained in the i-th execution cycle, wherein the third environment scene is different from the first environment scene and the second environment scene.

[0059] When it is determined that the third environment scene exists in the i-th execution cycle, the first quantity and the second quantity cached in the i-1-th execution cycle are both cleared.

[0060] In a third aspect, the embodiment discloses an audio playback device, and the active noise reduction method of the first aspect is applied to the audio playback device.

[0061] Optionally, the audio playback device is an earphone.

[0062] In a fourth aspect, the embodiment discloses an audio playback device pair, characterized in comprising a pair of first and second audio devices, wherein the first and second audio devices are both the audio playback device of the third aspect, and the first and second audio devices can communicate with each other.

[0063] After the first and second audio devices receive the noise reduction gains of each other, the two noise reduction gains are compared to obtain a larger noise reduction gain, and the first and second audio devices generate the noise cancellation waveform corresponding to the larger noise reduction gain according to the larger noise reduction gain.

[0064] In a fifth aspect, the embodiment discloses a computer readable storage medium, and a computer program is stored in the computer readable storage medium, and the computer program is executed to implement the method of the first aspect.

[0065] In a sixth aspect, the embodiment discloses a chip for active noise reduction, comprising a processor and a memory, and the memory stores a computer program, and the processor can execute the computer program to implement the method of the first aspect.

[0066]

Advantages

[0067] Compared with the prior art, the active noise reduction method, device and equipment based on adaptive noise reduction gain adjustment have the following advantages:

[0068] The embodiment discloses an active noise reduction method. After an original audio signal collected by a collection element in a preset time length is acquired, the environmental noise in the preset time length is determined and a corresponding noise power set is obtained, the noise powers in the current noise power set are sorted in order of numerical value, a noise power median of the noise power set is obtained, a corresponding noise reduction gain is extracted according to the noise power median, and a corresponding noise cancellation waveform is generated by a secondary path according to the noise reduction gain to cancel the environmental noise. Although the noise power corresponding to the transient noise has a large value, it does not affect the numerical value of the median in the noise power set. Therefore, sorting the multiple noise powers in order of numerical value and determining the noise reduction gain according to the noise power median can effectively avoid the problem of sudden change of the noise reduction gain caused by the transient noise, thereby preventing the problem of accidental or random triggering of the noise reduction gain caused by the transient noise, and ensuring the stability of the noise reduction gain and the reliability of the adjustment of the noise reduction gain.

[0069] In addition, in step S400, the noise power of each frame of audio signal is sorted as soon as it is determined, that is, the noise power is sorted synchronously in the process of determining the noise power, instead of waiting for all the noise powers in the preset time length to be confirmed before sorting. It can be seen that the noise power of each frame of audio signal is sorted as soon as it is determined, which can effectively improve the overall calculation efficiency, reduce the delay caused by calculation, and ensure the timeliness and reliability of the noise reduction method

[0070] In addition, when the noise power set includes an even number of noise powers, the noise power median is one of the middle two values of the sorted noise power set, instead of taking the average of the middle two values. In addition to effectively avoiding the problem of sudden change of the noise reduction gain caused by the transient noise, it can further reduce the calculation amount of the noise power median, thereby further ensuring the timeliness of the noise reduction method.

[0071] In addition, when the noise reduction gain corresponding to the noise power median is not equal to the current noise reduction gain, the current noise reduction gain is adjusted to the noise reduction gain corresponding to the noise power median by a preset gradient instead of directly jumping, so that the switching of the noise reduction gain is more smooth and moderate, thereby being more suitable for the comfort requirements of the human ear.

[0072] In addition, the current whether it is a single environment scene is determined according to the corresponding relationship between the noise power and the preset environment scene, if the current is in a double environment scene (the first environment scene and the second environment scene), the final noise reduction gain is obtained by weighted calculation according to the quantity ratio of the first quantity and the second quantity to the corresponding first preset gain and the second preset gain. Therefore, when the noise power falls in the noise power range corresponding to two different scenes, the uncertain scene can be adapted, the precision of adjusting the noise reduction gain is effectively improved, the problem of excessive noise reduction or insufficient noise reduction is minimized, so that the noise reduction effect can better match various noise scenes, the noise reduction effect is more suitable for the human ear while avoiding the error mutation of the noise reduction gain caused by the sudden noise, and the use comfort is improved.

[0073] Other benefits of the present application will be described in the specific embodiments by introducing specific technical features and technical solutions, and those skilled in the art should understand the benefits brought by the technical features and technical solutions through the introduction. BRIEF DESCRIPTION OF DRAWINGS

[0074] The present embodiment will be described below with reference to the accompanying drawings. In the drawings:

[0075] Figure 1 A flow chart of an active noise reduction method based on adaptive noise reduction gain adjustment disclosed in the present embodiment;

[0076] Figure 2 A schematic diagram of the corresponding relationship between the power range and the preset environment scene disclosed in the present embodiment;

[0077] Figure 3 A schematic diagram of the corresponding relationship between the noise power point distribution curve and the noise reduction gain position disclosed in the present embodiment;

[0078] Figure 4 A schematic diagram of the structure of the active noise reduction device disclosed in the present embodiment;

[0079] Figure 5 A schematic diagram of an audio playing device module based on adaptive noise reduction gain adjustment disclosed in the present embodiment. DETAILED DESCRIPTION

[0080] The present application will be described below based on the embodiments, but the present application is not limited to only these embodiments. In the following detailed description of the present application, some specific details are described in detail, in order to avoid confusion of the essence of the present application, the well-known methods, processes, flows, elements are not described in detail.

[0081] In addition, those skilled in the art should understand that the drawings provided herein are for illustrative purposes only, and the drawings are not necessarily drawn to scale.

[0082] Unless the context clearly requires otherwise, throughout the description and the claims, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is to say, in the sense of "including, but not limited to".

[0083] In the description of the present application, it should be understood that the terms "first", "second" and the like are used only for descriptive purposes and are not to be construed as indicating or implying relative importance. In addition, in the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specified.

[0084] In the field of active noise reduction, the scene and the corresponding noise reduction gain value are determined by the noise power. In order to avoid the problem of false triggering or random triggering of noise reduction gain level caused by sudden noise, the embodiment discloses an active noise reduction method based on adaptive noise reduction gain adjustment.

[0085] Please refer to Figure 1 , a flow chart of an active noise reduction method based on adaptive noise reduction gain adjustment is disclosed in the embodiment, the method comprises steps S100, S200, 400, S500 and S600, wherein:

[0086] Step S100, acquiring the original audio signal collected by the collection element within a preset time length. In the embodiment, the collection element can be a microphone or other element that can collect audio signals. In the specific implementation process, the collection element can be the collection element of the noise reduction device (with audio playing function) itself; or the collection element of another device, which transmits the original audio signal to the noise reduction device after collecting the original audio signal through the collection element. The noise reduction device and another device can be connected by wire or wirelessly, such as Bluetooth. As an example, the noise reduction device is a Bluetooth headset, Bluetooth speaker, etc., which collects the original audio signal through its own microphone or the microphone of another device (such as a mobile phone) and then transmits it to the noise reduction device. It should be noted that the original audio signal is the audio signal collected locally by the noise reduction device in the current environment, rather than the audio signal collected in other environments (for example, the noise reduction device is in a horizontal environment, while the audio signal is collected in a living room environment).

[0087] In specific embodiments, multiple frames of audio signals collected by the collection element within a preset time length are acquired in sequence, for example, in the order of time domain.

[0088] In specific embodiments, the preset time length is preferably 5-20s, and each noise power set includes 20-40 noise powers. Limiting the preset time length to 5-20s and the number of noise powers in each noise power set to 20-40 can avoid the problem that the noise power set cannot reliably reflect the actual environmental noise due to too short preset time or too few noise powers, and can also avoid the problem of delay caused by too large calculation amount due to too long preset time or too many noise powers. That is, the limitation of the preset time length and the number of noise powers in each noise power set enables the noise reduction method in the present embodiment to effectively balance the reliability of data and calculation efficiency.

[0089] Step S200, determine the environmental noise in the preset time length from the original audio signal, and obtain a noise power set of the environmental noise. In the present embodiment, the noise power set is a plurality of noise powers of the environmental noise in the preset time length, and the noise power is a parameter capable of representing the noise size, and its calculation method can be an existing calculation method. Each frame of audio signal can correspond to one noise power or a plurality of noise powers.

[0090] In specific embodiments, the noise power of the environmental noise in each frame of original audio signal is determined respectively, and the determination method can be to determine the noise power in each frame of audio signal frame by frame, or to determine the noise power in a plurality of frames of audio signal simultaneously.

[0091] Step S300, determine whether the current environment scene where the current device is located is a single environment scene according to the correspondence between the plurality of noise powers and the preset environment scenes. If the current device is in a single environment scene, proceed to step S400, wherein each preset environment scene corresponds to a noise power range one by one, and the environment scene has only one kind, which is a single environment scene. If the current device is in a double environment scene, proceed to noise reduction in the double environment scene. The noise reduction method in the double environment scene is described in detail below. For example, the preset environment scene can be a living room, a bedroom, a conference room or an outdoor scene.

[0092] Step S400, sort each noise power in the noise power set in order of numerical value to obtain the median of the noise powers in the noise power set.

[0093] Step S500, extract the noise reduction gain corresponding to the noise power range of the median noise power, wherein the noise power range is one of a plurality of preset ranges, and each preset range corresponds to one noise reduction gain one by one, wherein different noise reduction gains are respectively applicable to different noise environments. See the description below for details. Figure 2For the power range corresponding to the preset environment scene disclosed in the embodiment, exemplary, scene 1, scene 2 and scene 3 are three preset environment scenes, the noise power range corresponding to scene 3 is B2-C2, and the noise reduction gain corresponding to the noise power range is R3, so when the noise power median is any value between B2-C2, the noise reduction gain is R3.

[0094] In step S600, the secondary path is prompted to generate a noise cancellation waveform corresponding to the noise reduction gain according to the noise reduction gain, so as to cancel the environmental noise. Specifically, the secondary path can be a loudspeaker or other components that can generate a noise cancellation waveform. In addition, a total noise reduction gain is obtained by weighting calculation, and the corresponding noise cancellation waveform is also a total output, which can avoid errors caused by multiple superpositions, thereby further improving the noise reduction accuracy.

[0095] It can be seen that if the noise reduction gain is determined by the average value of the noise power, sudden noise such as closing the door or occasionally speaking loudly will cause the average value of the noise power to suddenly increase, thereby causing the noise reduction gain to suddenly change, which causes the noise reduction gain to be triggered or triggered randomly, so that the noise reduction gain does not match the actual environmental noise, especially when the user is in an environment with sudden noise, there will be a problem of electrical noise, that is, it is easy to reduce too deeply to cause the user to hear the noise of the noise reduction device. In the active noise reduction method disclosed in the embodiment, after obtaining a plurality of noise powers of the environmental noise in the preset time period, the noise powers in the current noise power set are sorted in size order to obtain the noise power median of the current noise power set, the noise reduction gain is determined according to the noise power median, and the noise reduction signal is sent according to the noise reduction gain. Although the noise power corresponding to the transient noise has a large value, it does not affect the value of the median of the noise power set, so by sorting a plurality of noise powers by size and determining the noise reduction gain according to the noise power median, the problem of sudden change of the noise reduction gain caused by transient noise can be effectively avoided, thereby preventing the problem of false triggering or random triggering of the noise reduction gain caused by transient noise, and ensuring the stability of the noise reduction gain and the reliability of adjusting the noise reduction gain.

[0096] Specifically referring to Figure 3 For the noise power point distribution curve and the corresponding relationship between the noise reduction gain disclosed in the embodiment. Exemplary, in the current environment scene, the plurality of noise power points g1-g7 in the noise power set are distributed as Figure 3noise power point g3 is the noise power point corresponding to the abrupt noise. Due to the appearance of the noise power point g3, if the level of the noise reduction gain is determined by the average value of the plurality of noise power, the K+1 level of the noise reduction gain should be taken, however, actually the K level of the noise reduction gain is more suitable for the noise reduction effect of the current environment scene, it can be seen that the method of determining the noise reduction gain by the average value of the plurality of noise power will cause the noise reduction gain level to be triggered or triggered randomly, and the problem of over-deep noise reduction and causing the electric noise.

[0097] In the active noise reduction method disclosed in the embodiment, the noise reduction gain is determined according to the median of the noise power, that is, the noise power points g1-g7 are sorted according to the numerical value, and the noise reduction gain is determined according to the value located in the middle position, that is, the noise reduction gain level is determined according to the noise power point g5, at this time, the noise reduction gain level obtained is the K level, which is more in line with the actual noise reduction demand, thereby effectively solving the problem of electric noise and noise reduction gain level mismatch, and making the noise reduction effect of the noise reduction device more in line with the current noise reduction demand and the comfort demand of the human ear.

[0098] In an embodiment, the step S300 of determining whether the current is in a single environment scene includes:

[0099] If a part of the plurality of noise power belongs to the noise power range of the preset first environment scene, and a part belongs to the noise power range of the preset other environment scene, the overlap quantity proportion of the noise power belonging to the noise power range of the first environment scene and belonging to the noise power range of the other environment scene in the plurality of noise power is determined, wherein the other environment scene is one or more preset environment scenes different from the first environment scene. For the convenience of understanding, the other environment scene is taken as an example in the embodiment.

[0100] When the overlap quantity proportion is less than the preset threshold, it is determined that the current is in a single environment scene, and then the step S400 is continued, that is, the noise reduction of the single environment scene is continued.

[0101] When the overlap quantity proportion is greater than the preset threshold, it is determined that the current is in a double environment scene, that is, the current scene is the first environment scene and the other environment scene, and then the noise reduction of the double environment scene is performed, which will be described below.

[0102] For example, see Figure 2, if the current environmental noise is the noise power set 1, the number of noise power belonging to both the scene 2 and the scene 3 in the noise power set 1 accounts for a small proportion, which is less than a preset threshold, it is determined that the current is in the scene 2 or the scene 3 (single environmental scene). If the current environmental noise is the noise power set 2, the number of noise power belonging to both the scene 1 and the scene 2 in the noise power set 2 accounts for a large proportion, which is greater than the preset threshold, it is determined that the current is in the scene 1 and the scene 2 (double environmental scene). The preset threshold can be obtained by the person skilled in the art according to experience.

[0103] In another embodiment, the step S300 of determining whether the current is in a single environmental scene includes:

[0104] If the number of noise power belonging to a preset environmental scene in the plurality of noise power ranges is greater than a preset number, or the number of noise power belonging to a preset environmental scene accounts for a proportion greater than a preset proportion, the current is in a single environmental scene. For example, please continue to refer to Figure 2 , if the current environmental noise is the noise power set 1, the number of noise power belonging to the scene 3 in the plurality of noise power ranges is greater than a preset number, or the number of noise power belonging to the scene 1 accounts for a proportion greater than a preset proportion, it is determined that the current is in the scene 1 (single environmental scene). The preset number and the preset proportion can be obtained by the person skilled in the art according to experience.

[0105] It should be understood that the environmental noise is usually continuous and dynamically changing. Since the determination process of the noise reduction gain and the emission process of the noise reduction signal both need to consume a certain time length, if the calculation amount is too large or the calculation efficiency is too low, it will lead to the noise reduction signal being emitted too late, and the noise reduction effect is not good.

[0106] In order to improve the calculation efficiency of the noise reduction gain, in the preferred embodiment, the determination process of the noise power in the step S200 and the sorting process of the noise power in the step S400 can be performed synchronously.

[0107] In a specific embodiment, the step S400 includes: when the noise power of the jth frame of audio signal is determined, the noise power of the jth frame is sorted with the noise power of the 1st to the (j-1)th frame, until j=P, wherein P is the frame number of the original audio signal in a preset time length. When each 1 frame of audio signal corresponds to one noise power, 2≤j≤P; when each 1 frame of audio signal corresponds to multiple noise powers, 1≤j≤P. For the convenience of description, the embodiment is described by taking that each 1 frame of audio signal corresponds to one noise power as an example, which does not mean that the embodiment is limited to this case.

[0108] For example, the four original audio signals obtained in the preset time period are A, B, C and D (i.e., P = 4), and one noise power of the environmental noise can be obtained from each of the original audio signals, which are a, b, c and d respectively.

[0109] When the second audio signal is determined, the noise power corresponding to the second audio signal is compared with the noise power corresponding to the first audio signal, and the values are sorted according to the size;

[0110] When the third audio signal is determined, the noise power corresponding to the third audio signal is compared with the noise powers corresponding to the first and second audio signals, and the values are sorted according to the size;

[0111] When the fourth audio signal is determined, the noise power corresponding to the fourth audio signal is compared with the noise powers corresponding to the first, second and third audio signals, and the values are sorted according to the size, and the sorting step of the current execution period is completed, and the step S500 is continued.

[0112] It can be seen that after the noise power of each audio signal is determined in step S200, the noise power can be sorted in step S400, that is, the noise power is sorted synchronously in the process of determining the noise power, instead of waiting for all the noise powers in the preset time period to be determined before sorting. Therefore, the noise power can be sorted after each audio signal is determined, which can effectively improve the overall calculation efficiency, reduce the delay caused by calculation, and ensure the timeliness and reliability of the noise reduction method.

[0113] Optionally, in step S400, the sorting method of the noise power can be bubble sort, heap sort, quick sort or merge sort, etc. Specifically, in the embodiment, the noise powers in the noise power set are sorted in size order by bubble sort.

[0114] Since the noise power of the environmental noise is usually disordered, the noise power is sorted by bubble sort, which can effectively improve the sorting efficiency of multiple noise powers, thereby speeding up the determination of the median of the noise power, and further improving the timeliness and effectiveness of the noise reduction method provided in the embodiment.

[0115] In step S400, the number of noise powers in the noise power set can be odd or even.

[0116] In one embodiment, when the noise power set includes an odd number of noise powers, the median of the noise power is the middle value, that is, the number in the middle position after the noise powers in the noise power set are arranged in size order.

[0117] In another embodiment, when the set of noise powers includes an even number of noise powers, the median of the noise powers is one of the two values in the middle of the set of noise powers arranged in order of magnitude or is the average of the two values in the middle. In a preferred embodiment of the application, when the set of noise powers includes an even number of noise powers, the median of the noise powers is one of the two values in the middle of the set of noise powers arranged in order, rather than the average of the two values in the middle, which can further reduce the amount of calculation of the median of the noise powers while effectively avoiding the problem of sudden change of the noise reduction gain caused by transient noise, thereby further ensuring the timeliness of the noise reduction method and improving the accuracy and reliability of the noise reduction method disclosed in the embodiment.

[0118] In summary, the embodiment discloses an active noise reduction method. After obtaining the original audio signal collected by the collection element within a preset time length, the ambient noise within the preset time length is determined and the corresponding set of noise powers is obtained. The noise powers in the current set of noise powers are sorted in order of magnitude, and the median of the noise powers in the set of noise powers is obtained. The corresponding noise reduction gain is extracted according to the median of the noise powers, and the corresponding noise cancellation waveform is generated by the secondary path according to the noise reduction gain to cancel the ambient noise. Although the noise power corresponding to the transient noise has a large value, it does not affect the value of the median in the set of noise powers. Therefore, sorting the multiple noise powers in order of magnitude and determining the noise reduction gain according to the median of the noise powers can effectively avoid the problem of sudden change of the noise reduction gain caused by transient noise, thereby preventing the problem of accidental or random triggering of the noise reduction gain caused by transient noise, and ensuring the stability of the noise reduction gain and the reliability of adjusting the noise reduction gain.

[0119] It should be understood that when the median of the noise powers in a stable noise environment is near the boundary of the adjacent two noise power ranges, even if the overall noise is relatively stable, the median of the noise powers may still jump repeatedly between the adjacent two noise power ranges, and the noise reduction gain will also change accordingly, which leads to inappropriate change of the noise reduction gain.

[0120] In specific embodiments, specifically, in step S300, when the overlap number ratio is greater than the preset threshold, and a part of the multiple noise powers belongs to the noise power range of the preset first environment scene and another part belongs to the noise power range of the preset second environment scene, it is determined that the current is in the first environment scene and the second environment scene, and the following steps are performed:

[0121] Step S800, respectively determine the first number of the multiple noise powers only belonging to the first environment scene and the second number of the multiple noise powers only belonging to the second environment scene, and obtain the number ratio of the first number and the second number;

[0122] Step S900, weighting the first preset gain and the second preset gain according to a quantity ratio to obtain a noise reduction gain, wherein each environment scene corresponds to a preset range of noise reduction gains, the first preset gain is a noise reduction gain of a preset range corresponding to the first environment scene, and the second preset gain is a noise reduction gain of a preset range corresponding to the second environment scene, and step S600 is executed.

[0123] It can be seen that after obtaining the set of noise powers of the environmental noise, the first environment scene and the second environment scene where the current environment is located are determined according to the plurality of noise powers, and then the current possible environment scene is determined according to the correspondence between the plurality of noise powers and the preset environment scenes, wherein each preset environment scene corresponds to a preset range of noise power ranges, if a part of the plurality of noise powers belongs to the noise power range of the preset first environment scene and a part of the plurality of noise powers belongs to the noise power range of the preset second environment scene, the first quantity of the plurality of noise powers belonging only to the first environment scene and the second quantity of the plurality of noise powers belonging only to the second environment scene are determined respectively, and then the noise reduction gain is obtained by weighting the first preset gain and the second preset gain according to the quantity ratio of the first quantity and the second quantity, and the noise reduction gain is used to make the secondary path generate a noise cancellation waveform corresponding to the noise reduction gain to cancel the environmental noise in the original audio signal. Thus, when the noise power falls within the noise power ranges corresponding to two different scenes, the uncertain scene can be adapted, the precision of adjusting the noise reduction gain is effectively improved, the problem of excessive noise reduction or insufficient noise reduction is minimized, and thus the noise reduction effect can better match various noise scenes, the noise reduction effect is more suitable for human ears, and the use comfort is improved.

[0124] Especially, when in a quiet environment, for example, the system presets the minimum range of the noise reduction gain, the precision of adjusting the noise reduction gain is required to be higher. Because the noise is more obvious in a relatively quiet environment, if there is insufficient noise reduction, the user will be affected by the environmental noise, and if there is excessive noise reduction, the user will be affected by the electrical noise. Therefore, in the active noise reduction method disclosed in the embodiment, the noise reduction method of a single environment scene and the noise reduction method of double environment scenes can be used in combination.

[0125] For example, the preset environment scene corresponding to the minimum gear of the preset noise reduction gain is the quietest environment scene, the noise power range corresponding to the minimum gear of the noise reduction gain is further divided into a minimum noise power range and a sub-minimum power range, the sub-environment scene corresponding to the minimum noise power range is the preset noise minimum environment scene, and the sub-environment scene corresponding to the sub-minimum noise power range is the preset noise sub-minimum environment scene. At this time, the noise minimum environment scene and the noise sub-minimum environment scene can be the first environment scene and the second environment scene in the double environment scene, and the current quietest environment scene is then reduced in noise by the noise reduction mode of the double environment scene. That is, in a noisy environment scene, noise reduction is performed by the median of the noise power, thereby improving the timeliness of noise reduction in a noisy environment scene. In a quiet environment, the noise reduction gain is more finely adjusted by the double environment scene, thereby solving the problem of easy generation of electrical noise in a quiet environment.

[0126] In specific embodiments, in the i th execution cycle, i is greater than 1, and before step S800, the following steps are further included:

[0127] In step S710, the first quantity and the second quantity buffered in the i-1 th execution cycle are respectively weighted to obtain a weighted first quantity and a weighted second quantity, and the weighting coefficient is greater than 0 and less than or equal to 1.

[0128] In step S720, a new first quantity belonging to the first environment scene and a new second quantity belonging to the second environment scene are respectively determined from the plurality of noise powers in the i th execution cycle.

[0129] In the i th execution cycle, before step S800, the following steps are further included:

[0130] In step S710, whether a third environment scene exists is determined according to the set of noise powers obtained in the i th execution cycle, wherein the third environment scene is different from the first environment scene and the second environment scene. When the third environment scene is determined to exist in the i th execution cycle, the first quantity and the second quantity buffered in the i-1 th execution cycle are both cleared.

[0131] In step S720, the weighted first quantity and the new first quantity are summed to obtain the first quantity of the i th execution cycle, the weighted second quantity and the new second quantity are summed to obtain the second quantity of the i th execution cycle, and the ratio of the first quantity to the second quantity of the i th execution cycle is the quantity ratio of the i th execution cycle.

[0132] The specific calculation method is as follows: in the i th execution cycle (i>1), in step S720, the quantity ratio k(i) of the i th execution cycle is obtained by using the following formula:

[0133] k(i) = N1(i) : N2(i), wherein N1(i) is the first number of the i-th execution cycle; N2(i) is the second number of the i-th execution cycle;

[0134] N1(i) = a1*N1(i-1) + N1'(i), wherein N1(i-1) is the first number of the i-1-th execution cycle, N1'(i) is the new first number of the i-th execution cycle, and a1 is a weighting coefficient for weighting N1(i-1);

[0135] N2(i) = a2*N2(i-1) + N2'(i), wherein N2(i-1) is the second number of the i-1-th execution cycle, N2'(i) is the new second number of the i-th execution cycle, and a2 is a weighting coefficient for weighting N2(i-1).

[0136] It can be seen that, in most cases, the environmental noise changes little in a period of time, and it can be considered that the environmental scene has not changed, so the number ratio of the previous execution cycle can be referred to to a certain extent through the above algorithm, that is, the noise reduction gain of the previous execution cycle is inherited to a certain extent, thereby ensuring the stability and reliability of the noise reduction gain. It should be noted that the unchanged environmental scene does not mean that the noise power is unchanged, as long as the sum of the first total number belonging to the first environmental scene and the second total number belonging to the second environmental scene is greater than a preset value or a preset proportion.

[0137] It should be understood that, in the calculation process of referring to the number ratio of the inheritance history, the smaller the weighting coefficient, the less the influence of the environmental noise of the inheritance history, that is, the smaller the weight of the historical environmental noise in the current execution cycle. When the weighting coefficient is set to 1, the historical environmental noise is completely inherited in the current execution cycle, and when the weighting coefficient is set to less than 1, the historical environmental noise is partially inherited in the current execution cycle.

[0138] In specific embodiments, the specific determination method of the weighting coefficient is as follows, before step S720, further comprising:

[0139] Step S701, counting the total number of the first number, the second number in the i-1-th execution cycle, and the number of the plurality of noise powers in the i-th execution cycle;

[0140] When the total number does not exceed the preset cache threshold, the weighting coefficient in step S720 is equal to 1;

[0141] When the total number exceeds the cache threshold, the weighting coefficient in step S720 is less than 1, and the specific value of the weighting coefficient can be obtained by a person skilled in the art according to experience.

[0142] For example, the preset cache threshold is 128, and the number of noise powers in the preset time length is 35.

[0143] When i=2, the total number of the first number, the second number cached in the first execution period, and the number of noise powers in the second execution period is 70, which does not exceed the cache threshold 128, so in step S720 in the second execution period, the weighting coefficient is equal to 1;

[0144] When i=3, the total number of the first number, the second number cached in the second execution period, and the number of noise powers in the third execution period is 105, which does not exceed the cache threshold 128, so in step S720 in the third execution period, the weighting coefficient is equal to 1;

[0145] When i=4, the total number of the first number, the second number cached in the third execution period, and the number of noise powers in the fourth execution period is 140, which exceeds the cache threshold 128, so in step S720 in the fourth execution period, the weighting coefficient is less than 1.

[0146] It can be seen that by setting the cache threshold, the amount of calculation can be reduced to some extent, so that the active noise reduction method can simultaneously consider the timeliness, reliability, and comfort of the human ear.

[0147] In specific embodiments, in order to make the switching of the noise reduction gain more comfortable and moderate, after step S500, the method further comprises:

[0148] Step S510, when the noise reduction gain corresponding to the median of the noise powers is not equal to the current noise reduction gain, adjusting the current noise reduction gain to the noise reduction gain corresponding to the median of the noise powers by a preset gradient, so as to gradually transition the noise reduction gain.

[0149] Adjusting the current noise reduction gain to the noise reduction gain corresponding to the median of the noise powers by a preset gradient instead of directly jumping, makes the switching of the noise reduction gain more smooth and moderate, so as to better adapt to the comfort requirements of the human ear.

[0150] Preferably, when adjusting the current noise reduction gain to the calculated noise reduction gain by a preset gradient, the adjustment amount of each gradient adjustment is consistent, so that the switching of the noise reduction gain is more smooth and comfortable.

[0151] More preferably, when adjusting the current noise reduction gain to the calculated noise reduction gain by a preset gradient, the number of gradient adjustments is 5-15, and the adjustment time length of adjusting the current noise reduction gain to the next noise reduction gain is 100-500 ms. This time limit and the limit of the number of gradient adjustments can effectively ensure that the comfort of the switching of the noise reduction gain is optimal, and also can ensure the timeliness of the switching of the noise reduction gain.

[0152] The embodiment also discloses an active noise reduction device, please refer to Figure 4 , the active noise reduction device structure diagram disclosed by the embodiment, the active noise reduction device includes audio signal acquisition module 100, noise power set obtaining module 200, scene determination module 300, ordering module 400, noise reduction gain determination module 500 and offset module 600, wherein:

[0153] Audio signal acquisition module 100, for obtaining the original audio signal collected by the collection element in the preset time length.In specific embodiments, the original audio signal obtained by the audio signal acquisition module 100 in the preset time length contains multiple frames of audio signals, and the audio signal acquisition module 100 obtains multiple frames of audio signals in order.

[0154] Noise power set obtaining module 200, for determining the environmental noise in the preset time length from the original audio signal, and obtaining the noise power set of the environmental noise, wherein the noise power set is multiple noise powers of the environmental noise in the preset time length.In specific embodiments, the noise power set obtaining module 200 determines the noise power of the environmental noise in each frame of audio signal respectively.

[0155] Scene determination module 300, for determining whether the current possible environment scene is a single environment scene according to the correspondence between multiple noise powers and preset environment scenes, if the current is in a single environment scene, then the ordering module 400 is ordered, wherein each preset environment scene and each noise power range are one-to-one corresponding, and the environment scene is only one single environment scene.

[0156] Ordering module 400, for ordering each noise power in the noise power set according to the numerical value size, to obtain the noise power median of the noise power set.

[0157] Noise reduction gain determination module 500, for extracting the noise reduction gain corresponding to the noise power range of the noise power median, wherein the noise power range is one of multiple preset ranges, each preset range corresponds to one noise reduction gain, wherein different noise reduction gains are respectively applicable to different noise environments.

[0158] Offset module 600, for generating noise offset waveform corresponding to the noise reduction gain to offset the environmental noise in the original audio signal.

[0159] In an embodiment, if a part of the plurality of noise powers belongs to a noise power range of a preset first environment scenario and a part of the plurality of noise powers belongs to a noise power range of a preset other environment scenario, the scenario determination module 300 determines an overlap quantity ratio of a part of the plurality of noise powers that belongs to both the noise power range of the first environment scenario and the noise power range of the other environment scenario, and when the overlap quantity ratio is less than a preset threshold, the scenario determination module 300 determines that the current environment is a single environment scenario, wherein the other environment scenario is one or more preset environment scenarios that are different from the first environment scenario.

[0160] In another embodiment, if a quantity of noise powers belonging to a noise power range of a preset environment scenario in the plurality of noise powers is greater than a preset quantity, the scenario determination module 300 determines that the current environment is a single environment scenario.

[0161] In an embodiment, the sorting module 400 is further configured to sort the noise power of the jth frame with the noise powers of the 1st to (j-1)th frames until j=P, when determining the noise power of the jth frame of the original audio signal, wherein 2≤j≤P, and P is a frame number of the original audio signal in a preset time length. Specifically, refer to the description of the above embodiment, which will not be repeated here.

[0162] In an embodiment, when the set of noise powers includes an even number of noise powers, the sorting module 400 takes one of the middle two values of the sorted set of noise powers as the noise power median.

[0163] In another embodiment, when the set of noise powers includes an odd number of noise powers, the sorting module 400 takes the value at the middle position of the sorted set of noise powers as the noise power median.

[0164] In an embodiment, the scenario determination module 300 is further configured to, when the overlap quantity ratio is greater than the preset threshold and a part of the plurality of noise powers belongs to a noise power range of a preset first environment scenario and a part of the plurality of noise powers belongs to a noise power range of a preset second environment scenario, determine that the current environment is the first environment scenario and the second environment scenario, and the apparatus further comprises:

[0165] The quantity ratio obtaining module 800 is configured to respectively determine a first quantity of the plurality of noise powers that only belongs to the first environment scenario and a second quantity of the plurality of noise powers that only belongs to the second environment scenario, and obtain a quantity ratio of the first quantity and the second quantity;

[0166] The gain calculation module 900 is configured to obtain a noise reduction gain by weighting a first preset gain and a second preset gain according to a quantity ratio, wherein each environment scene corresponds to a preset gear of the noise reduction gain, the first preset gain is the noise reduction gain of a preset gear corresponding to a first environment scene, and the second preset gain is the noise reduction gain of a preset gear corresponding to a second environment scene.

[0167] In specific embodiments, in the i th execution cycle, i is greater than 1, the quantity ratio obtaining module 800 is further configured to obtain a weighted first quantity and a weighted second quantity by weighting the first quantity and the second quantity buffered in the i-1 th execution cycle, respectively, wherein the weighting coefficient is greater than 0 and less than or equal to 1, and to determine a new first quantity belonging to the first environment scene and a new second quantity belonging to the second environment scene in the i th execution cycle from a plurality of noise powers in the i th execution cycle, respectively.

[0168] The quantity ratio obtaining module 800 obtains the first quantity in the i th execution cycle by summing the weighted first quantity and the new first quantity, and obtains the second quantity in the i th execution cycle by summing the weighted second quantity and the new second quantity, and the quantity ratio in the i th execution cycle is the ratio of the first quantity and the second quantity in the i th execution cycle.

[0169] In specific embodiments, in the i th execution cycle, the quantity ratio obtaining module 800 is further configured to determine whether a third environment scene exists according to a set of noise powers obtained in the i th execution cycle, wherein the third environment scene is different from the first environment scene and the second environment scene.

[0170] When the third environment scene is determined to exist in the i th execution cycle, the first quantity and the second quantity buffered in the i-1 th execution cycle are both cleared.

[0171] In specific embodiments, the noise reduction gain determination module 500 is further configured to adjust the current noise reduction gain to the weighted noise reduction gain according to a preset gradient when the weighted noise reduction gain is not equal to the current noise reduction gain, so as to gradually transition the noise reduction gain. For details, please refer to the description of the above embodiments, which will not be repeated here.

[0172] The embodiment also discloses an audio playing device based on active noise reduction, and the active noise reduction method disclosed in the above embodiments is applied to the audio playing device.

[0173] In specific embodiments, the audio playing device is an earphone.

[0174] For details, please refer to the description of the above embodiments, which will not be repeated here. Figure 5Fig. 1 is a schematic diagram of an audio playback device pair based on adaptive noise reduction gain adjustment according to an embodiment of the present disclosure. The audio playback device pair 20 includes a first audio playback device 21 and a second audio playback device 22. The first audio playback device 21 and the second audio playback device 22 are both the audio playback device according to the embodiments of the present disclosure. Thus, the first audio playback device 21 and the second audio playback device 22 can independently obtain the parameters of the ambient noise, thereby further improving the reliability and accuracy of the audio playback device pair 20 in obtaining the parameters of the ambient noise.

[0175] In specific embodiments, the first audio playback device 21 and the second audio playback device 22 can communicate with each other. The communication manner is not limited, for example, the communication manner can be wired communication, wireless communication such as Bluetooth, WiFi, or infrared communication.

[0176] After the first audio playback device 21 and / or the second audio playback device 22 receives the noise reduction gain of the other device, the two noise reduction gains are compared to obtain the larger one. The first audio playback device 21 and the second audio playback device 22 generate the noise cancellation waveform corresponding to the larger noise reduction gain.

[0177] In a normal use process, the positions and directions of the first audio playback device 21 and the second audio playback device 22 often have certain differences, which may result in different noise power sets obtained by the first audio playback device 21 and the second audio playback device 22 in the same environment. The first audio playback device 21 and the second audio playback device 22 emit noise reduction signals according to the larger one of the noise reduction gains obtained by the two devices, which can ensure the consistency of the noise reduction gains of the two audio playback devices, thereby improving the use comfort, and further improve the noise reduction effect of the audio playback device pair 20. Especially when the audio playback device pair 20 is a headphone pair, this design can better adapt to the comfort requirements of the human ear.

[0178] The embodiment of the present disclosure further discloses a computer readable storage medium having a computer program stored thereon. The computer program can be executed to implement the active noise reduction method according to the embodiments of the present disclosure.

[0179] The embodiment of the present disclosure further discloses a chip for active noise reduction, including a processor and a memory. The memory stores a computer program, and the processor can execute the computer program to implement the active noise reduction method according to the embodiments of the present disclosure.

[0180] It should be noted that the computer-readable storage medium in the embodiments of the present disclosure is not limited to the above-mentioned embodiments, for example, it can also be an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or instrument, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device or instrument.

[0181] Those skilled in the art can understand that the above-mentioned preferred embodiments can be freely combined and superimposed without conflict. Among them, the flowcharts and block diagrams in the drawings illustrate the possible implementation architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, program segment, or part of code containing one or more executable instructions for implementing the specified logic function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order than that noted in the drawings, for example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the function involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions. The numbering of the steps herein is only for the convenience of description and reference, and does not limit the sequence, and the specific execution sequence is determined by the technology itself, and those skilled in the art can determine various allowed and reasonable sequences according to the technology itself.

[0182] It should be noted that the step numbering (letter or number) is used in the present application to refer to certain specific method steps, only for the purpose of convenience and brevity, and by no means to limit the order of the method steps by letters or numbers. Those skilled in the art can understand that the order of the related method steps should be determined by the technology itself, and should not be improperly limited by the step numbering, and those skilled in the art can determine various allowed and reasonable step sequences according to the technology itself.

[0183] It is understood by those skilled in the art that the above-mentioned preferred embodiments can be freely combined, superimposed, without conflict.

[0184] It should be understood that the above-described embodiments are merely exemplary, but not restrictive, and various obvious or equivalent modifications or replacements to the above-described details can be made by those skilled in the art without departing from the essential principles of the present application, and all of them shall be included in the scope of the claims of the present application.

Claims

1. An active noise reduction method based on adaptive noise reduction gain adjustment, characterized by, The method comprises the following steps: Step S100, obtaining an original audio signal collected by a collection element within a preset time length; Step S200, determining an ambient noise within the preset time length from the original audio signal, and obtaining a noise power set of the ambient noise, wherein the noise power set is a plurality of noise powers of the ambient noise within the preset time length; Step S400, sorting each noise power in the noise power set in order of numerical value to obtain a noise power median of the noise power set; Step S500, extracting a noise reduction gain corresponding to a noise power range of the noise power median, wherein the noise power range is one of a plurality of preset ranges, and each preset range corresponds to one noise reduction gain, wherein different noise reduction gains are respectively applicable to different noise environments; Step S600, according to the noise reduction gain, causing a secondary path to generate a noise cancellation waveform corresponding to the noise reduction gain to cancel the ambient noise; Before the step S400, the method further comprises the following steps: Step S300, determining whether a current environment scene is a single environment scene according to a correspondence between the plurality of noise powers and preset environment scenes, and if the current environment scene is a single environment scene, proceeding to the step S400, wherein each preset environment scene corresponds to a noise power range, and the single environment scene is an environment scene corresponding to a noise power range in which the plurality of noise powers belong. The step S300 of determining whether the current environment scene is a single environment scene comprises: If a part of the plurality of noise powers belong to a noise power range of a preset first environment scene and a part of the plurality of noise powers belong to a noise power range of a preset other environment scene, determining an overlap proportion of a number of noise powers that simultaneously belong to the noise power range of the first environment scene and the noise power range of the other environment scene, and if the overlap proportion is less than a preset threshold, determining that the current environment scene is a single environment scene, wherein the other environment scene is a preset environment scene different from the first environment scene.

2. The active noise reduction method of claim 1, wherein, The original audio signal within the preset time length in the step S100 comprises a plurality of audio signals; and the step S100 comprises sequentially obtaining the plurality of audio signals. In the step S200, the noise power of the ambient noise in each audio signal is determined respectively. The step S400 comprises: when the noise power of the jth audio signal is determined, sorting the noise power of the jth audio signal and the noise powers of the first to (j-1)th audio signals, until j=P, wherein 2≤j≤P, and P is the number of frames of the original audio signal within the preset time length.

3. The active noise reduction method of claim 1, wherein, In the step S400, when the noise power set comprises an even number of noise powers, the noise power median is one of the middle two numerical values of the sorted noise power set.

4. The active noise reduction method of claim 1, wherein, The step S300 of determining whether the current environment scene is a single environment scene comprises: If the number of noise powers belonging to a noise power range of a preset environment scene in the plurality of noise powers is greater than a preset number, the current environment scene is a single environment scene.

5. The active noise reduction method according to any one of claims 1 to 4, wherein After the step S500, further comprising: Step S510, when the noise reduction gain corresponding to the median of the noise power is not equal to the current noise reduction gain, adjusting the current noise reduction gain to the noise reduction gain corresponding to the median of the noise power by a preset gradient, so that the noise reduction gain gradually transitions.

6. The active noise reduction method of claim 1, wherein, In the step S300, when the overlap number ratio is greater than the preset threshold, and a part of the plurality of noise powers belongs to a noise power range of a preset first environment scene, and another part belongs to a noise power range of a preset second environment scene, it is determined that the current is in the first environment scene and the second environment scene, and the following steps are executed: Step S800, respectively determining a first number belonging only to the first environment scene and a second number belonging only to the second environment scene in the plurality of noise powers, and obtaining a number ratio of the first number and the second number; Step S900, weighting the first preset gain and the second preset gain according to the number ratio to obtain the noise reduction gain, wherein each environment scene corresponds to a preset gear noise reduction gain, the first preset gain is the noise reduction gain corresponding to the preset gear of the first environment scene, and the second preset gain is the noise reduction gain corresponding to the preset gear of the second environment scene, and the step S600 is executed.

7. The active noise reduction method of claim 6, wherein, In the i-th execution cycle, i is greater than 1, and before the step S800, further comprising: Step S710, weighting the first number and the second number cached in the i-1th execution cycle respectively to obtain weighted first number and second number, and the weighting coefficient is greater than 0 and less than or equal to 1; Step S720, respectively determining a new first number belonging to the first environment scene and a new second number belonging to the second environment scene in the plurality of noise powers in the i-th execution cycle; In the i-th execution cycle, the step S800 comprises: Step S720, summing the weighted first number and the new first number to obtain the first number in the i-th execution cycle, and summing the weighted second number and the new second number to obtain the second number in the i-th execution cycle, and the ratio of the first number and the second number in the i-th execution cycle is taken as the number ratio in the i-th execution cycle.

8. The active noise reduction method of claim 7, wherein, In the i-th execution cycle, the step S800 further comprises: Step S710, determining whether there is a third environment scene according to the noise power set obtained in the i-th execution cycle, wherein the third environment scene is different from the first environment scene and the second environment scene; When it is determined in the i-th execution cycle that there is a third environment scene, the first number and the second number cached in the i-1th execution cycle are both cleared.

9. An active noise reduction device, characterized by, The device comprises: An audio signal acquisition module (100) for acquiring an original audio signal collected by a collection element within a preset time length; The noise power set obtaining module (200) is configured to determine ambient noise in the preset time length from the original audio signal, and obtain a noise power set of the ambient noise, wherein the noise power set is a plurality of noise powers of the ambient noise in the preset time length; The sorting module (400) is configured to sort each noise power in the noise power set according to the numerical value size in sequence, and obtain a noise power median of the noise power set; The noise reduction gain determining module (500) is configured to extract a noise reduction gain corresponding to a noise power range of the noise power median, wherein the noise power range is one of a plurality of preset ranges, and each preset range corresponds to one noise reduction gain, wherein different noise reduction gains are respectively applicable to different noise environments; The cancellation module (600) is configured to generate a noise cancellation waveform corresponding to the noise reduction gain to cancel the ambient noise in the original audio signal; The scene determining module (300) is configured to determine whether a current environment scene where the user is located is a single environment scene according to a corresponding relationship between the plurality of noise powers and preset environment scenes, and if the current environment scene is a single environment scene, the sorting module sorts the noise powers, wherein each preset environment scene corresponds to a noise power range, and the current environment scene is a single environment scene only when there is only one kind of environment scene. If a part of the plurality of noise powers belong to a noise power range of a preset first environment scene, and a part of the plurality of noise powers belong to a noise power range of a preset other environment scene, the scene determining module determines an overlap quantity ratio of the plurality of noise powers that simultaneously belong to the noise power range of the first environment scene and the noise power range of the other environment scene, and if the overlap quantity ratio is less than a preset threshold, the scene determining module determines that the current environment scene is a single environment scene, wherein the other environment scene is a preset environment scene different from the first environment scene.

10. The active noise reduction device of claim 9, wherein, The original audio signal obtained by the audio signal obtaining module in the preset time length includes a plurality of audio signals, and the plurality of audio signals are sequentially obtained. The sorting module is further configured to sort the noise power of the jth frame with the noise powers of the first to (j-1)th frames until j=P when determining the noise power of the jth audio signal, wherein 2≤j≤P, and P is the number of frames of the original audio signal in the preset time length.

11. The active noise reduction device of claim 9, wherein, When the noise power set includes an even number of noise powers, the sorting module takes one of the middle two values of the sorted noise power set as the noise power median.

12. The active noise reduction device of claim 9, wherein, If the number of noise powers belonging to a preset environment scene in the plurality of noise powers is greater than a preset number, the scene determining module determines that the current environment scene is a single environment scene.

13. An active noise reduction device according to any one of claims 9-12, characterized in that The noise reduction gain determination module is further configured to, when the weighted noise reduction gain is not equal to the current noise reduction gain, adjust the current noise reduction gain to the weighted noise reduction gain by a preset gradient, so that the noise reduction gain gradually transitions.

14. The active noise reduction device of claim 9, wherein, The scene determination module is further configured to, when the overlap quantity ratio is greater than the preset threshold, and a part of the plurality of noise powers belongs to a noise power range of a preset first environment scene and another part belongs to a noise power range of a preset second environment scene, determine that the current environment scene is the first environment scene and the second environment scene. The quantity ratio obtaining module (800) is configured to respectively determine a first quantity of the plurality of noise powers that only belong to the first environment scene and a second quantity of the plurality of noise powers that only belong to the second environment scene, and obtain a quantity ratio of the first quantity and the second quantity. The gain calculation module (900) is configured to weight a first preset gain and a second preset gain according to the quantity ratio to obtain a noise reduction gain, wherein each environment scene corresponds to a preset gear of the noise reduction gain, the first preset gain is a noise reduction gain of a preset gear corresponding to the first environment scene, and the second preset gain is a noise reduction gain of a preset gear corresponding to the second environment scene.

15. The active noise reduction device of claim 14, wherein, In the i-th execution cycle, i is greater than 1, the quantity ratio obtaining module is further configured to weight the first quantity and the second quantity cached in the (i-1)-th execution cycle to obtain a weighted first quantity and a weighted second quantity, a weighting coefficient is greater than 0 and less than or equal to 1, respectively determine a new first quantity of the plurality of noise powers that belong to the first environment scene in the i-th execution cycle and a new second quantity of the plurality of noise powers that belong to the second environment scene in the i-th execution cycle. The sum of the weighted first quantity and the new first quantity is the first quantity in the i-th execution cycle, and the sum of the weighted second quantity and the new second quantity is the second quantity in the i-th execution cycle. The ratio of the first quantity to the second quantity in the i-th execution cycle is the quantity ratio in the i-th execution cycle.

16. The active noise reduction device of claim 14, wherein, In the i-th execution cycle, the quantity ratio obtaining module is further configured to determine whether a third environment scene exists according to the noise power set obtained in the i-th execution cycle, wherein the third environment scene is different from the first environment scene and the second environment scene. When the third environment scene is determined to exist in the i-th execution cycle, the first quantity and the second quantity cached in the (i-1)-th execution cycle are both cleared.

17. An audio playback device, comprising: The active noise reduction device includes any one of claims 9-16.

18. The audio playback device of claim 17, wherein, The audio playback device is an earphone.

19. An audio playback device pair, wherein The device includes a pair of first and second audio devices, wherein the first and second audio devices are both the audio playback device of claim 17 or 18, and the first and second audio devices can communicate with each other. The audio playback device is an earphone. The first audio device and / or the second audio device receive the noise reduction gains of the other party, compare the two noise reduction gains and obtain the larger noise reduction gain, and the first audio device and the second audio device both generate a noise cancellation waveform corresponding to the larger noise reduction gain.

20. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed, is capable of implementing the method of any one of claims 1-8.

21. A chip for active noise reduction, comprising a processor and a memory, characterized in that, The memory stores the computer program, and the processor is capable of executing the computer program to implement the method of any one of claims 1-8.

Citation Information

Patent Citations

  • Scene self-adaptive active noise reduction earphone and scene self-adaptive active noise reduction design method

    CN107750027A

  • Method for removing impulsive noise in speech signals

    CN110136739A