WO2021175267A1 - Method for implementing active noise cancellation, apparatus, and electronic device - Google Patents

Method for implementing active noise cancellation, apparatus, and electronic device Download PDF

Info

Publication number
WO2021175267A1
WO2021175267A1 PCT/CN2021/078951 CN2021078951W WO2021175267A1 WO 2021175267 A1 WO2021175267 A1 WO 2021175267A1 CN 2021078951 W CN2021078951 W CN 2021078951W WO 2021175267 A1 WO2021175267 A1 WO 2021175267A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal
ear
noise signal
noise
masking effect
Prior art date
Application number
PCT/CN2021/078951
Other languages
French (fr)
Chinese (zh)
Inventor
施栋
苏杰
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021175267A1 publication Critical patent/WO2021175267A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1083Reduction of ambient noise
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K11/00Methods or devices for transmitting, conducting or directing sound in general; Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/16Methods or devices for protecting against, or for damping, noise or other acoustic waves in general
    • G10K11/175Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound
    • G10K11/178Methods or devices for protecting against, or for damping, noise or other acoustic waves in general using interference effects; Masking sound by electro-acoustically regenerating the original acoustic waves in anti-phase
    • G10K11/1785Methods, e.g. algorithms; Devices
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K2210/00Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
    • G10K2210/10Applications
    • G10K2210/108Communication systems, e.g. where useful sound is kept and noise is cancelled
    • G10K2210/1081Earphones, e.g. for telephones, ear protectors or headsets
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10KSOUND-PRODUCING DEVICES; METHODS OR DEVICES FOR PROTECTING AGAINST, OR FOR DAMPING, NOISE OR OTHER ACOUSTIC WAVES IN GENERAL; ACOUSTICS NOT OTHERWISE PROVIDED FOR
    • G10K2210/00Details of active noise control [ANC] covered by G10K11/178 but not provided for in any of its subgroups
    • G10K2210/30Means
    • G10K2210/301Computational
    • G10K2210/3026Feedback
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R2201/00Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
    • H04R2201/10Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups

Definitions

  • This application relates to the technical field of smart terminals, and in particular to a method, device and electronic equipment for realizing active noise cancellation.
  • ANC Active Noise Cancellation
  • the ANC scheme is to reduce noise at the human ear. Its principle is: all sounds are composed of a certain frequency spectrum. If a sound (active noise) can be found, its frequency spectrum is exactly the same as the external noise to be eliminated, but the phase is just right. On the contrary (a difference of 180°), the external noise can be completely cancelled out.
  • the active noise is output to the human ear. At the human ear, the active noise and the external noise are cancelled out, and the noise reduction of the earphone can be realized.
  • the noise reduction can be achieved by offsetting the active noise with external noise at the human ear.
  • the noise reduction effect after the implementation of the ANC scheme is not ideal.
  • This application provides a method, device and electronic equipment for realizing active noise cancellation.
  • This application also provides a computer-readable storage medium to provide an active noise cancellation solution and improve the noise reduction effect of the active noise cancellation solution.
  • an embodiment of the present application proposes a method for realizing active noise cancellation, including:
  • an active noise signal for realizing active noise cancellation is generated, wherein the active noise signal is used to control the frequency spectrum of the external noise signal reaching the human ear at the Under the masking effect of the frequency spectrum of the content signal.
  • an active noise signal for realizing active noise cancellation is generated according to the masking effect of the playback content signal on the external noise signal, wherein:
  • determining, according to the playback content signal, the masking effect of the playback content signal on the external noise signal includes:
  • generating an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal includes:
  • the active noise signal is generated according to the control strategy of the active noise cancellation.
  • the feedback input of the ear noise signal in the control strategy of active noise cancellation is determined according to the masking effect of the playback content signal on the ear noise signal, wherein, according to The masking effect of the play content signal on the ear noise signal on the first frequency band determines the strength of the feedback input of the ear noise signal on the first frequency band.
  • determining the masking effect of the playback content signal on the ear noise signal includes:
  • the masking effect of the playback content signal on the ear noise signal in each frequency band is determined.
  • generating an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal includes:
  • the in-ear noise signal is filtered to obtain the in-ear noise filtering result signal, wherein the smaller the frequency band weight is, the in-ear noise filtering result signal is The lower the signal strength of the corresponding frequency band;
  • the in-ear noise filtering result signal is used as the feedback input of the in-ear noise signal in the control strategy of active noise cancellation.
  • an embodiment of the present application also proposes a device for realizing active noise cancellation, including:
  • the first signal acquisition module which is used to acquire the playback content signal
  • a masking effect analysis module which is used to determine the masking effect of the playback content signal on the external noise signal
  • the active noise generation module is used to generate an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal, so that the frequency spectrum of the external noise signal reaching the human ear is controlled in the Under the masking effect of the frequency spectrum of the content signal.
  • an embodiment of the present application also proposes an electronic device.
  • the electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor At this time, the electronic device is triggered to execute the method steps described in the embodiments of the present application.
  • an embodiment of the present application also proposes a computer-readable storage medium.
  • the computer-readable storage medium stores a computer program, which when running on a computer, causes the computer to execute the method of the embodiment of the present application.
  • an active noise signal for realizing active noise cancellation is generated based on the masking effect generated by the playing content signal on the external noise signal, so that the frequency spectrum of the external noise signal reaching the human ear is controlled at the level of the playing content signal.
  • the method according to the embodiment of the present application can greatly improve the noise reduction effect.
  • Fig. 1 shows a flowchart of an embodiment of an active noise cancellation method according to the present application
  • Figure 2 shows a schematic diagram of an application scenario of an implementation of the ANC solution
  • Fig. 3 is a flowchart of an embodiment of an active noise cancellation method according to the present application.
  • Figure 4 shows a schematic diagram of an implementation of the ANC scheme
  • FIG. 5 shows a schematic diagram of an ANC solution according to an embodiment of the present application
  • Fig. 6 shows a flowchart of an embodiment of an active noise cancellation method according to the present application
  • Figure 7 shows a schematic diagram of the comparison of the implementation effects of two active noise cancellation schemes
  • Fig. 8 is a structural diagram of an embodiment of an active noise cancellation device according to the present application.
  • the embodiment of the present application proposes a method for realizing active noise cancellation.
  • the inventor first analyzes the principle essence of the ANC solution and the actual application scenario of the ANC solution.
  • the principle of the ANC scheme is: all sounds are composed of a certain frequency spectrum. If you can find a sound (active noise) whose frequency spectrum is exactly the same as the external noise to be eliminated, but the phase is exactly opposite (a difference of 180°), you can Completely cancel out the external noise.
  • the realization of noise reduction is essentially to reduce (minimize) the energy of external noise reaching the human ear, that is, the energy of the noise in the user's ear.
  • the external noise introduced into the user's ear does not mean that the user can perceive the external noise.
  • the active noise cancellation is still carried out according to the scheme of reducing (minimizing) the energy of the external noise reaching the human ear, which will result in the final external noise in the ear being cancelled by the active noise, and a part of it may still be heard by the user .
  • the masking effect generated by the playback content signal on the external noise signal is first determined, and then the active noise is determined based on the masking effect.
  • Fig. 1 shows a flowchart of an embodiment of an active noise cancellation method according to the present application.
  • the active noise cancellation method includes:
  • Step 110 Obtain a play content signal
  • Step 120 Determine, according to the playback content signal, the masking effect of the playback content signal on the external noise signal
  • Step 130 Generate an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal, where the active noise signal is used to control the frequency spectrum of the external noise signal reaching the human ear to the playback content signal Under the masking effect of the spectrum.
  • an active noise signal for realizing active noise cancellation is generated based on the masking effect generated by the playing content signal on the external noise signal, so that the frequency spectrum of the external noise signal reaching the human ear is controlled at the level of the playing content signal.
  • the method according to the embodiment of the present application can greatly improve the noise reduction effect.
  • each step of the embodiment shown in FIG. 1 may adopt a variety of different specific implementation manners.
  • the active noise is divided into multiple different frequency bands, and the active noise of the different frequency bands are respectively determined to form a complete active noise finally. Therefore, in an implementation of step 130, in the process of generating an active noise signal for realizing active noise cancellation according to the masking effect of the broadcast content signal on the external noise signal, according to the broadcast content signal in a certain frequency band
  • the masking effect on the external noise signal determines the strength of the active noise in this frequency band. For example, for the first frequency band (the first frequency band may be any frequency band), the strength of the active noise in the first frequency band is determined according to the masking effect of the playing content signal on the external noise signal in the first frequency band.
  • FIG. 2 shows a schematic diagram of an application scenario of an implementation of the ANC solution.
  • the microphone 201 is a microphone arranged on the non-ear part of the earphone
  • the microphone 202 is a microphone arranged on the ear part of the earphone.
  • the microphone 202 can collect environmental noise signals (in-ear noise signals) that can be heard by the ear; the microphone 201 can collect external noise signals (external noise signals).
  • one implementation of the ANC solution is to transmit the noise signal in the ear and the noise signal outside the ear to the control circuit, and perform real-time calculations to generate an active signal with the opposite phase and the same amplitude as the noise in the ear.
  • Noise signal 212; the active noise signal 212 is transmitted through the speaker on the earphone to cancel the noise.
  • the noise signal 211 passes through the earphone into the ear outside the ear, and cancels out with the active noise signal 212 in the ear.
  • the noise signal in the ear is the noise signal reaching the human ear. Therefore, for the application scenario shown in FIG. 2, in an implementation of step 120 shown in FIG. 1, determining the masking effect of the playback content signal on the external noise signal is to determine the effect of the playback content signal on the ear noise signal. The resulting masking effect.
  • Fig. 3 shows a flowchart of an embodiment of an active noise cancellation method according to the present application.
  • the process of determining the masking effect of the playing content signal on the external noise signal includes:
  • Step 310 Obtain a noise signal in the ear
  • Step 320 Determine the masking effect of the playing content signal on the ear noise signal.
  • a closed-loop feedback scheme is used to generate the active noise signal 212.
  • the calculation circuit uses the ear noise signal acquired by the microphone 202 as a feedback signal, performs closed-loop feedback calculation based on the feedback signal, and processes the signal acquired by the microphone 201 to generate noise waves with opposite phases to cancel each other in the ear.
  • Figure 4 shows a schematic diagram of an implementation of the ANC solution.
  • the data input node 401 refers to the microphone 201 arranged on the non-ear part of the headset shown in FIG. 2
  • the data input node 402 refers to the microphone 202 arranged on the ear part of the headset shown in FIG. 2.
  • the modules 403, 405, and 406 respectively use calculation functions P(z), S(z), and S(z) to perform calculation processing on their input to generate output.
  • the input of 401 is the external-ear noise signal x(n), where n represents the sampling point.
  • the module 403 is used to simulate the transmission environment in which external noise penetrates into the ear through the earphone.
  • P(z) represents the transfer function of the external noise penetrating the ear through the earphone. Therefore, the output d(n) of the module 411 is the ear noise signal.
  • the module 406 is used to simulate the transmission environment of the active noise signal in the ear.
  • S(z) is the transfer function from the earphone speaker to the microphone 402.
  • S(z) can be measured in advance or estimated in real time (for example, when the earphone is playing music downstream).
  • Module 404 is used to refer to an adaptive filter that generates an active noise signal.
  • the adaptive filter processes the external noise signal x(n) to generate an active noise signal, and H(z) represents the parameters of the adaptive filter.
  • the purpose of the calculation module is to estimate H(z) to make it as close to P(z) as possible. Then x(n) obtains y(n) through H(z) and S(z), which can cancel out the noise signal d(n) in the ear.
  • H(z) as the working parameter of the adaptive filter, it is possible to output an active noise signal that can actively cancel and reduce noise.
  • closed-loop feedback is used to adjust H(z).
  • the e(n) input by 402 is the residual noise signal (error signal) that y(n) and d(n) cancel out.
  • the module 407 is based on the Least Mean Square (LeastMeanSquare, LMS) algorithm, takes e(n) as the feedback input, and adjusts the H(z) parameter according to the e(n) and the output of the module 405.
  • LMS Least Mean Square
  • the in-ear noise signal obtained by the microphone 202 is not directly used as the feedback signal, but is based on the masking effect of the broadcast content signal on the in-ear noise signal on the in-ear noise signal. Perform processing to determine the feedback signal.
  • the process of generating an active noise signal for realizing active noise cancellation according to the masking effect generated by the playback content signal on the external noise signal includes:
  • Step 330 Determine the feedback input of the in-ear noise signal in the control strategy of active noise cancellation according to the masking effect of the playing content signal on the in-ear noise signal;
  • Step 340 Generate active noise according to the control strategy of active noise cancellation based on the feedback input of the noise signal in the ear.
  • FIG. 5 shows a schematic diagram of an ANC solution according to an embodiment of the present application.
  • the data input node 501 refers to the microphone 201 placed on the non-ear part of the headset shown in FIG. 2
  • the data input node 502 refers to the microphone 202 placed on the ear part of the headset shown in FIG. 2.
  • the modules 503, 505, and 506 respectively use calculation functions P(z), S(z), and S(z) to perform calculation processing on their input to generate an output.
  • the input of 501 is the external-ear noise signal x(n), where n represents the sampling point.
  • the module 503 is used to simulate the transmission environment in which external noise penetrates into the ear through the earphone.
  • P(z) represents the transfer function of the external noise infiltrating the ear through the earphone. Therefore, the output d(n) of the module 511 is the ear noise signal.
  • the module 506 is used to simulate the transmission environment of the active noise signal in the ear.
  • S(z) is the transfer function from the earphone speaker to the microphone 402. S(z) can be measured in advance or estimated in real time (for example, when the earphone is playing music downstream).
  • Module 504 is used to refer to an adaptive filter that generates an active noise signal.
  • the adaptive filter processes the external noise signal x(n) to generate an active noise signal, and H(z) represents the parameters of the adaptive filter.
  • the purpose of the calculation module is to estimate H(z) to make it as close to P(z) as possible. Then x(n) obtains y(n) through H(z) and S(z), which can cancel out the noise signal d(n) in the ear.
  • H(z) as the working parameter of the adaptive filter, it is possible to output an active noise signal that can actively cancel and reduce noise.
  • closed-loop feedback is used to adjust H(z).
  • the module 507 is based on the least mean square algorithm (LeastMeanSquare, LMS), and adjusts the H(z) parameter according to the feedback input and the output of the module 505.
  • e(n) is y(n) and d(n) to cancel the residual noise signal.
  • the module 507 when the module 507 performs closed-loop feedback adjustment H(z), it does not use e(n) as the feedback input, but uses the output q( n) is the feedback input.
  • the block 508 refers to a filter with W(z) as the filter parameter.
  • the masking effect analyzer 510 inputs the analysis result of the masking effect generated by the playback content signal on the ear noise signal to the module 508.
  • the module 508 adjusts e(n) based on the analysis result of the masking effect, and inputs the adjustment result as a feedback input to the module 508.
  • step 330 in the process of determining the feedback input of the in-ear noise signal in the control strategy of active noise cancellation according to the masking effect generated by the playback content signal on the in-ear noise signal, according to the playback content
  • the masking effect of the signal on the ear noise signal in a certain frequency band determines the strength of the feedback input of the ear noise signal in this frequency band.
  • the strength of the feedback input of the ear noise signal in the first frequency band is determined according to the masking effect of the broadcast content signal on the ear noise signal in the first frequency band .
  • the masking effect is analyzed by analyzing the frequency spectrum of the audio signal.
  • Fig. 6 shows a flowchart of an embodiment of an active noise cancellation method according to the present application.
  • the process of determining the masking effect of the playing content signal on the ear noise signal includes:
  • Step 610 Calculate the frequency spectrum of the ear noise signal according to the ear noise signal
  • Step 620 Calculate the frequency spectrum of the played content signal according to the played content signal
  • Step 630 Determine, according to the frequency spectrum of the noise signal in the ear and the frequency spectrum of the playback content signal, the masking effect of the playback content signal in each frequency band on the noise signal in the ear.
  • the masking effect of the playing content signal on each frequency band of the ear noise signal is represented by allocating corresponding weights to each frequency band of the ear noise signal. Specifically, for a certain frequency band, the stronger the shielding effect of the broadcast content signal on the ear noise signal, the smaller the frequency band weight corresponding to the frequency band of the ear noise signal.
  • the process of generating an active noise signal for realizing active noise cancellation according to the masking effect generated by the playback content signal on the external noise signal includes:
  • Step 640 Determine frequency band weights corresponding to different frequency bands of the ear noise signal according to the masking effect produced by the frequency spectrum of the playing content signal on the frequency spectrum of the ear noise signal, where the stronger the masking effect, the smaller the corresponding frequency band weight;
  • Step 650 Filter the in-ear noise signal according to the frequency band weights corresponding to different frequency bands of the in-ear noise signal to obtain the in-ear noise filtering result signal, where the smaller the frequency band weight, the signal strength of the corresponding frequency band in the in-ear noise filtering result signal Smaller
  • Step 660 Use the in-ear noise filtering result signal as a feedback input of the in-ear noise signal in the control strategy of active noise cancellation.
  • the masking effect analyzer 510 includes an in-ear noise spectrum estimation module 511, a playback content spectrum estimation module 512, and a frequency band weight allocation module 513.
  • the ear noise frequency spectrum estimation module 511 is used to implement step 610 to calculate the frequency spectrum of the ear noise signal.
  • the played content frequency spectrum estimation module 512 is used to implement step 520 to calculate the frequency spectrum of the played content signal.
  • the frequency band weight allocation module 513 is used to implement steps 630 and 640, and determine the weights corresponding to the respective frequency spectrums of the ear noise signals according to the frequency spectrum of the ear noise signal and the frequency spectrum of the playing content signal.
  • the module 508 is used to implement steps 650 and 660, adjust e(n) according to the weight corresponding to each spectrum of the noise signal in the ear, attenuate the frequency with lower weight in e(n), and output the adjusted error signal q(n ).
  • step 610 in an implementation manner of steps 610 to 660, as shown in FIG. 5, in the process of implementing step 610, in an ideal state, y(n) and d(n) are completely canceled, and the ear noise spectrum is estimated
  • the input of block 511 is y(n).
  • y(n) and d(n) are not completely offset, and e(n) exists. Therefore, the input of the ear noise spectrum estimation module 511 is y(n) and e(n).
  • N in ( ⁇ , n) is smoothed based on the following formula:
  • is a pre-defined constant. For example, in an application scenario, the value of ⁇ is 0.99.
  • the in-ear noise spectrum estimation module 511 is implemented, so as to obtain the calculation result of the in-ear noise spectrum according to y(n) and e(n).
  • the broadcast content spectrum estimation module 512 calculates the downlink broadcast content spectrum based on the following formula:
  • M d ( ⁇ , n) represents the energy spectrum of the instantaneous content; Represents the smoothed music energy spectrum; S( ⁇ ) is the transfer function from the earphone speaker to the microphone 202.
  • the play content frequency spectrum estimation module 512 is implemented, so as to obtain the calculation result of the play content frequency spectrum.
  • the input ear noise spectrum and the playback content spectrum of the frequency band weight allocation module 513 are: and Based on the above two values, it can be calculated which frequency bands can be reduced in weight (without cancellation) or which need to be cancelled by the ANC algorithm.
  • W( ⁇ ) is the weight of frequency ⁇
  • ⁇ and ⁇ are preset constants (in an application scenario, ⁇ and ⁇ can be set to 0.01 and 0.1, respectively).
  • represents the masking effect of downstream content energy on noise.
  • the noise energy is less than 0.01 times the energy of the content to be played, it can be considered that the noise is masked (the user cannot hear it), and the corresponding frequency band weight can be set to ⁇ (0.1) at this time;
  • the input of the module 508 is the weights W( ⁇ ) and e(n), and the module 508 filters e(n) to reduce the frequency with lower weight in the signal. Attenuation, the output is the adjusted error signal q(n).
  • the filter parameter W(z) of the module 508 can be obtained according to the following method:
  • W [W( ⁇ 0 )W( ⁇ 1 )...W( ⁇ N-1 )] T represents the value of the weight at different frequencies, and W is obtained by formula 4.
  • the relationship between the output and input of the filter parameter W(z) can be expressed as:
  • q(n) as the feedback input of the module 507 is filtered e(n).
  • the frequency component of q(n) has been adjusted: the frequency band masked by the music energy will be attenuated; the other frequency bands remain unchanged. Therefore, when q(n) is used as the feedback input of the module 507, it can be ensured that the algorithm will pay more attention to the frequency band with high offsetting weight; thus, the energy spectrum of the residual noise can be dynamically adjusted, so that the frequency part that is not masked by the music is smaller; and The purpose of increasing the frequency part masked by music.
  • Figure 7 shows a schematic diagram of the comparison of the implementation effects of two active noise cancellation schemes.
  • the ordinate is energy and the abscissa is frequency.
  • 701 represents the downstream content
  • 702 represents the noise floor
  • 703 represents the masking curve caused by the downstream content
  • 704 represents the final in-ear noise using the ANC system shown in Figure 4
  • 705 represents The final in-ear noise using the ANC system shown in Figure 5.
  • 703 in the figure shows that the downstream content brings a masking curve, that is, if the noise is smaller than this curve, the user will not be subjectively perceivable.
  • the final in-ear noise using the ANC system shown in FIG. 4 is as shown in 704, which is slightly higher than the masking curve in the low frequency part, which is subjectively perceivable by the user.
  • the ANC system shown in Figure 5 can be better balanced. As shown in 705, 705 is controlled below 703, the high-frequency noise is slightly increased (still under the masking curve) and the low-frequency is further reduced. Therefore, compared with the ANC system shown in FIG. 4, the ANC system shown in FIG. 5 can better minimize the noise subjectively perceived by the user.
  • FIG. 8 is a structural diagram of an embodiment of an active noise cancellation device according to the present application.
  • active noise cancellation 800 includes:
  • a signal acquisition module 810 which is used to acquire a playback content signal
  • a shielding effect analysis module 820 which is used to determine the shielding effect of the playback content signal on the external noise signal
  • the active noise generation module 830 is used to generate an active noise signal for realizing active noise cancellation according to the masking effect generated by the playback content signal on the external noise signal, so that the frequency spectrum of the external noise signal reaching the human ear is controlled in the playback content signal Under the masking effect of the spectrum.
  • the device provided by an embodiment of the present application shown in FIG. 8 can be used to implement the technical solutions of the method embodiments of the embodiments of the present application. For its implementation principles and technical effects, further reference may be made to related descriptions in the method embodiments.
  • the active noise generating module 830 is configured to determine the strength of the active noise in the first frequency band according to the masking effect of the playing content signal on the external noise signal in the first frequency band.
  • the shielding effect analysis module 820 includes:
  • the ear noise signal acquisition module is used to acquire the ear noise signal.
  • the data input node 502 corresponds to the ear noise signal acquisition module;
  • the masking effect analyzer is used to determine the masking effect of the playback content signal on the ear noise signal. Taking the application scenario of the embodiment shown in FIG. 5 as an example, the module 510 corresponds to the masking effect analyzer.
  • the active noise generating module 830 includes:
  • the feedback input calculation module is used to determine the control strategy of active noise cancellation according to the masking effect of the content signal on the ear noise signal.
  • the feedback input of the noise signal in the ear is taken as an example in the application scenario of the embodiment shown in FIG. 5 ,
  • the module 508 corresponds to the feedback input calculation module;
  • Active noise generator which is used to generate active noise according to the control strategy of active noise cancellation based on the feedback input of the noise signal in the ear.
  • modules 507 and 504 correspond to active noise generation Part of the functional module of the device.
  • the feedback input calculation module is used to determine the in-ear noise signal in the first frequency band according to the masking effect of the playback content signal on the in-ear noise signal in the first frequency band. The strength of the feedback input of the noise signal.
  • the masking effect analyzer includes:
  • An ear noise spectrum estimation module which is used to calculate the spectrum of the ear noise signal according to the ear noise signal, such as the module 511 in the application scenario of the embodiment shown in FIG. 5;
  • the play content frequency spectrum estimation module is used to calculate the frequency spectrum of the play content signal according to the play content signal, such as the module 512 in the application scenario of the embodiment shown in FIG. 5;
  • the frequency band weight allocation module for example, the module 513 in the application scenario of the embodiment shown in FIG. 5, the frequency band weight allocation module is used for:
  • the frequency spectrum of the noise signal in the ear and the frequency spectrum of the playback content signal determine the masking effect of the playback content signal on the ear noise signal in each frequency band;
  • the frequency band weight corresponding to different frequency bands of the ear noise signal is determined according to the masking effect of the frequency spectrum of the playing content signal on the frequency spectrum of the ear noise signal.
  • the feedback input calculation module is used to:
  • the filter the in-ear noise signal according to the frequency band weights corresponding to different frequency bands of the in-ear noise signal to obtain the in-ear noise filtering result signal.
  • the smaller the frequency band weight the smaller the signal strength of the corresponding frequency band in the in-ear noise filtering result signal;
  • the in-ear noise filtering result signal is used as the feedback input of the in-ear noise signal in the control strategy of active noise cancellation.
  • the improvement of a technology can be clearly distinguished between hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method and process). ).
  • hardware improvements for example, improvements to the circuit structure of diodes, transistors, switches, etc.
  • software improvements improvements to the method and process.
  • the improvement of many methods and processes of today can be regarded as a direct improvement of the hardware circuit structure.
  • Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by the hardware entity module.
  • a programmable logic device for example, a Field Programmable Gate Array (Field Programmable Gate Array, FPGA)
  • PLD Programmable Logic Device
  • FPGA Field Programmable Gate Array
  • HDL Hardware Description Language
  • ABEL Advanced Boolean Expression Language
  • AHDL Altera Hardware Description Language
  • HDCal JHDL
  • Lava Lava
  • Lola MyHDL
  • PALASM RHDL
  • VHDL Very-High-Speed Integrated Circuit Hardware Description Language
  • Verilog Verilog
  • the controller can be implemented in any suitable manner.
  • the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) executable by the (micro)processor. , Logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as part of the memory control logic.
  • controllers in addition to implementing the controller in a purely computer-readable program code manner, it is entirely possible to program the method steps to make the controller use logic gates, switches, application specific integrated circuits, programmable logic controllers, and embedded logic.
  • the same function can be realized in the form of a microcontroller or the like. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component.
  • each module/unit is only a division of logical functions.
  • the functions of each module/unit can be implemented in the same or multiple software and/or hardware.
  • the devices proposed in the embodiments of the present application may be fully or partially integrated into one physical entity during actual implementation, or may be physically separated.
  • these modules can all be implemented in the form of software called by processing elements; they can also be implemented in the form of hardware; part of the modules can be implemented in the form of software called by the processing elements, and some of the modules can be implemented in the form of hardware.
  • the detection module may be a separately established processing element, or it may be integrated in a certain chip of the electronic device.
  • the implementation of other modules is similar.
  • all or part of these modules can be integrated together or implemented independently.
  • each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more application specific integrated circuits (ASICs), or one or more digital signal processors ( Digital Singnal Processor, DSP, or, one or more Field Programmable Gate Array (FPGA), etc.
  • ASICs application specific integrated circuits
  • DSP Digital Singnal Processor
  • FPGA Field Programmable Gate Array
  • these modules can be integrated together and implemented in the form of a System-On-a-Chip (SOC).
  • SOC System-On-a-Chip
  • An embodiment of the present application also proposes an electronic device.
  • the electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions.
  • the computer program instructions are executed by the processor, the electronic device is triggered.
  • the device executes the method steps described in the embodiments of the present application.
  • the electronic device shown in an embodiment of the present application may be an auxiliary device of the earphone or a circuit device built in the earphone.
  • the device can be used to execute the functions/steps in the methods provided in the embodiments of the present application.
  • An embodiment of the present application also proposes a headset.
  • the headset includes a microphone, a speaker, an audio signal input interface, a memory for storing computer program instructions, and a processor for executing program instructions.
  • the processor executes, the electronic device is triggered to execute the method steps described in the embodiments of the present application.
  • the foregoing one or more computer programs are stored in the foregoing memory, and the foregoing one or more computer programs include instructions.
  • the foregoing instructions are executed by the foregoing device/headset, the foregoing device/headset
  • the headset executes the method steps described in the embodiments of the present application.
  • the processor of the electronic device/headphone may be an on-chip device SOC, and the processor may include a central processing unit (CPU), and may further include other types of processors .
  • the processor of the electronic device may be a PWM control chip.
  • the processor involved may include, for example, a CPU, a DSP, a microcontroller, or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units, NPU). ) And image signal processing (Image Signal Processing, ISP), the processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits used to control the execution of the program of the technical solution of this application Wait.
  • the processor may have a function of operating one or more software programs, and the software programs may be stored in a storage medium.
  • the memory of the electronic device/headphone may be a read-only memory (read-only memory, ROM), other types of static storage devices that can store static information and instructions, and random access memory ( Random access memory, RAM) or other types of dynamic storage devices that can store information and instructions, and can also be electrically erasable programmable read-only memory (EEPROM), compact disc read -only memory, CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used for Any computer-readable medium that carries or stores desired program codes in the form of instructions or data structures and can be accessed by a computer.
  • ROM read-only memory
  • RAM random access memory
  • EEPROM electrically erasable programmable read-only memory
  • CD-ROM compact disc read -only memory
  • optical disc storage including compact discs, laser discs, optical discs, digital universal discs, Blu-ray discs,
  • the processor and the memory may be combined into a processing device, and more commonly, components are independent of each other.
  • the processor is used to execute the program code stored in the memory to implement the method described in the embodiment of the present application.
  • the memory may also be integrated in the processor, or independent of the processor.
  • equipment, device, device, module, or unit illustrated in the embodiments of the present application may be specifically implemented by a computer chip or entity, or implemented by a product with a certain function.
  • the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program codes.
  • any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • an embodiment of the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, the computer executes the method provided in the embodiment of the present application.
  • An embodiment of the present application also provides a computer program product.
  • the computer program product includes a computer program that, when running on a computer, causes the computer to execute the method provided in the embodiment of the present application.
  • These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • At least one refers to one or more
  • multiple refers to two or more.
  • “And/or” describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean the situation where A exists alone, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural.
  • the character “/” generally indicates that the associated objects before and after are in an “or” relationship.
  • the following at least one item” and similar expressions refer to any combination of these items, including any combination of single items or plural items.
  • At least one of a, b, and c can mean: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single, or There can be more than one.
  • the terms “include”, “include” or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, product, or equipment including a series of elements includes not only those elements, but also Other elements that are not explicitly listed, or also include elements inherent to such processes, methods, commodities, or equipment. If there are no more restrictions, the element defined by the sentence “including a" does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element.
  • This application may be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
  • This application can also be practiced in distributed computing environments. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

Abstract

The embodiments of the present application provide a method for implementing active noise cancellation, an apparatus, and an electronic device. Said method comprises: acquiring a playback content signal; determining, according to the playback content signal, the masking effect generated by the playback content signal on an external noise signal; and according to the masking effect generated by the playback content signal on the external noise signal, generating an active noise signal for implementing active noise cancellation, wherein the active noise signal is used to control the frequency spectrum of the external noise signal arriving at a human ear to be below the masking effect of the frequency spectrum of the playback content signal. Compared with the prior art, the method according to the embodiments of the present application improves the noise reduction effect.

Description

一种实现主动噪声消除的方法、装置和电子设备Method, device and electronic equipment for realizing active noise elimination 技术领域Technical field
本申请涉及智能终端技术领域,特别涉及一种实现主动噪声消除的方法、装置和电子设备。This application relates to the technical field of smart terminals, and in particular to a method, device and electronic equipment for realizing active noise cancellation.
背景技术Background technique
在耳机的应用场景中,存在多种不同的耳机降噪技术方案,其中一种常见的耳机降噪技术方案是主动噪声消除(Active Noise Cancellation,ANC)方案。ANC方案是在人耳处降噪,它的原理是:所有的声音都由一定的频谱组成,如果可以找到一种声音(主动噪声),其频谱与所要消除的外部噪声完全一样,只是相位刚好相反(相差180°),就可以将外部噪声完全抵消掉。例如,在ANC方案的一种实现方式中,向人耳输出主动噪声,在人耳处,主动噪声与外部噪声相抵消,就可以实现耳机降噪。In the application scenario of earphones, there are many different earphone noise reduction technical solutions, and one of the common earphone noise reduction technical solutions is Active Noise Cancellation (ANC) solution. The ANC scheme is to reduce noise at the human ear. Its principle is: all sounds are composed of a certain frequency spectrum. If a sound (active noise) can be found, its frequency spectrum is exactly the same as the external noise to be eliminated, but the phase is just right. On the contrary (a difference of 180°), the external noise can be completely cancelled out. For example, in an implementation of the ANC solution, the active noise is output to the human ear. At the human ear, the active noise and the external noise are cancelled out, and the noise reduction of the earphone can be realized.
虽然在理论上,依照ANC方案的实现原理,主动噪声在人耳处与外部噪声相抵消就可以实现降噪。但是,在ANC方案的实际应用场景中,存在主动噪声在人耳处与外部噪声相抵消后仍有一部分外部噪声被人耳听到的情况,ANC方案执行后的降噪效果并不理想。Although in theory, according to the realization principle of the ANC scheme, the noise reduction can be achieved by offsetting the active noise with external noise at the human ear. However, in the actual application scenario of the ANC scheme, there is a situation where a part of the external noise is still heard by the human ear after the active noise is canceled by the external noise at the human ear, and the noise reduction effect after the implementation of the ANC scheme is not ideal.
发明内容Summary of the invention
本申请提供了一种实现主动噪声消除的方法、装置和电子设备,本申请还提供一种计算机可读存储介质,以提供一种主动噪声消除方案,提高主动噪声消除方案的降噪效果。This application provides a method, device and electronic equipment for realizing active noise cancellation. This application also provides a computer-readable storage medium to provide an active noise cancellation solution and improve the noise reduction effect of the active noise cancellation solution.
针现有技术中ANC方案执行后的降噪效果并不理想的问题,本申请实施例提出了下述技术方案:Aiming at the problem that the noise reduction effect after the implementation of the ANC scheme in the prior art is not ideal, the embodiments of the present application propose the following technical solutions:
第一方面,本申请实施例提出了一种实现主动噪声消除的方法,包括:In the first aspect, an embodiment of the present application proposes a method for realizing active noise cancellation, including:
获取播放内容信号;Obtain the playback content signal;
根据所述播放内容信号确定所述播放内容信号对外部噪声信号所产生的掩蔽效应;Determining, according to the playback content signal, the masking effect of the playback content signal on the external noise signal;
根据所述播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,其中,所述主动噪声信号用于将到达人耳的外部噪声信号的频谱控制在所述播放内容信号的频谱的掩蔽效应之下。According to the masking effect of the playback content signal on the external noise signal, an active noise signal for realizing active noise cancellation is generated, wherein the active noise signal is used to control the frequency spectrum of the external noise signal reaching the human ear at the Under the masking effect of the frequency spectrum of the content signal.
上述第一方面的一种实现方式中,根据所述播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,其中:In an implementation manner of the foregoing first aspect, an active noise signal for realizing active noise cancellation is generated according to the masking effect of the playback content signal on the external noise signal, wherein:
根据所述播放内容信号在第一频段上对所述外部噪声信号产生的掩蔽效应确定所述主动噪声在所述第一频段的强度。Determine the intensity of the active noise in the first frequency band according to the masking effect of the playback content signal on the external noise signal in the first frequency band.
上述第一方面的一种实现方式中,根据所述播放内容信号确定所述播放内容信号对外部噪声信号所产生的掩蔽效应,包括:In an implementation manner of the foregoing first aspect, determining, according to the playback content signal, the masking effect of the playback content signal on the external noise signal includes:
获取耳内噪声信号;Obtain the noise signal in the ear;
确定所述播放内容信号对所述耳内噪声信号所产生的掩蔽效应。Determine the masking effect of the playback content signal on the ear noise signal.
上述第一方面的一种实现方式中,根据所述播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,包括:In an implementation manner of the foregoing first aspect, generating an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal includes:
根据所述播放内容信号对所述耳内噪声信号所产生的掩蔽效应确定主动噪声消除的控制策略中所述耳内噪声信号的反馈输入;Determining the feedback input of the in-ear noise signal in the control strategy of active noise cancellation according to the masking effect of the playback content signal on the in-ear noise signal;
基于所述耳内噪声信号的反馈输入,根据所述主动噪声消除的控制策略生成所述主动噪声信号。Based on the feedback input of the ear noise signal, the active noise signal is generated according to the control strategy of the active noise cancellation.
上述第一方面的一种实现方式中,根据所述播放内容信号对所述耳内噪声信号所产生的掩蔽效应确定主动噪声消除的控制策略中所述耳内噪声信号的反馈输入,其中,根据所述播放内容信号在第一频段上对所述耳内噪声信号产生的掩蔽效应确定在所述第一频段上的所述耳内噪声信号的反馈输入的强度。In an implementation manner of the above-mentioned first aspect, the feedback input of the ear noise signal in the control strategy of active noise cancellation is determined according to the masking effect of the playback content signal on the ear noise signal, wherein, according to The masking effect of the play content signal on the ear noise signal on the first frequency band determines the strength of the feedback input of the ear noise signal on the first frequency band.
上述第一方面的一种实现方式中,确定所述播放内容信号对所述耳内噪声信号所产生的掩蔽效应,包括:In an implementation manner of the foregoing first aspect, determining the masking effect of the playback content signal on the ear noise signal includes:
根据所述耳内噪声信号计算所述耳内噪声信号的频谱;Calculating the frequency spectrum of the ear noise signal according to the ear noise signal;
根据所述播放内容信号计算所述播放内容信号的频谱;Calculating the frequency spectrum of the playback content signal according to the playback content signal;
根据所述耳内噪声信号的频谱以及所述播放内容信号的频谱确定各个频段上所述播放内容信号对所述耳内噪声信号所产生的掩蔽效应。According to the frequency spectrum of the ear noise signal and the frequency spectrum of the playback content signal, the masking effect of the playback content signal on the ear noise signal in each frequency band is determined.
上述第一方面的一种实现方式中,根据所述播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,包括:In an implementation manner of the foregoing first aspect, generating an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal includes:
根据所述播放内容信号的频谱对所述耳内噪声信号的频谱所产生的掩蔽效应确定所述耳内噪声信号不同频段对应的频段权重,其中,所述遮蔽效应越强,对应的频段权重越小;Determine the frequency band weights corresponding to different frequency bands of the ear noise signal according to the masking effect produced by the frequency spectrum of the playback content signal on the frequency spectrum of the ear noise signal. The stronger the masking effect, the higher the corresponding frequency band weight. small;
根据所述耳内噪声信号不同频段对应的频段权重,对所述耳内噪声信号进行滤波,获取耳内噪声滤波结果信号,其中,所述频段权重越小,所述耳内噪声滤波结果信号中对应频段的信号强度越小;According to the frequency band weights corresponding to different frequency bands of the in-ear noise signal, the in-ear noise signal is filtered to obtain the in-ear noise filtering result signal, wherein the smaller the frequency band weight is, the in-ear noise filtering result signal is The lower the signal strength of the corresponding frequency band;
将所述耳内噪声滤波结果信号作为所述主动噪声消除的控制策略中所述耳内噪声信号的反馈输入。The in-ear noise filtering result signal is used as the feedback input of the in-ear noise signal in the control strategy of active noise cancellation.
第二方面,本申请一实施例还提出了一种实现主动噪声消除的装置,包括:In the second aspect, an embodiment of the present application also proposes a device for realizing active noise cancellation, including:
第一信号获取模块,其用于获取播放内容信号;The first signal acquisition module, which is used to acquire the playback content signal;
屏蔽效应分析模块,其用于确定所述播放内容信号对外部噪声信号所产生的掩蔽效应;A masking effect analysis module, which is used to determine the masking effect of the playback content signal on the external noise signal;
主动噪声生成模块,其用于根据所述播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,使得到达人耳的外部噪声信号的频谱被控制在所述播放内容信号的频谱的掩蔽效应之下。The active noise generation module is used to generate an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal, so that the frequency spectrum of the external noise signal reaching the human ear is controlled in the Under the masking effect of the frequency spectrum of the content signal.
第三方面,本申请一实施例还提出了一种电子设备,电子设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发电子设备执行如本申请实施例所述的方法步骤。In the third aspect, an embodiment of the present application also proposes an electronic device. The electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor At this time, the electronic device is triggered to execute the method steps described in the embodiments of the present application.
第四方面,本申请一实施例还提出了一种计算机可读存储介质,计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例的方法。In a fourth aspect, an embodiment of the present application also proposes a computer-readable storage medium. The computer-readable storage medium stores a computer program, which when running on a computer, causes the computer to execute the method of the embodiment of the present application.
本申请实施例采用的上述至少一个技术方案能够达到以下有益效果:The foregoing at least one technical solution adopted in the embodiments of the present application can achieve the following beneficial effects:
根据本申请实施例的方法,基于播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,从而将到达人耳的外部噪声信号的频谱控制在播放内容信号的频谱的掩蔽效应之下,进而有效削减用户所听到的外部噪声;相较于现有技术,根据本申请实施例的方法可以大大提高降噪效果。According to the method of the embodiment of the present application, an active noise signal for realizing active noise cancellation is generated based on the masking effect generated by the playing content signal on the external noise signal, so that the frequency spectrum of the external noise signal reaching the human ear is controlled at the level of the playing content signal. Under the masking effect of the frequency spectrum, the external noise heard by the user can be effectively reduced; compared with the prior art, the method according to the embodiment of the present application can greatly improve the noise reduction effect.
附图说明Description of the drawings
图1所示为根据本申请主动噪声消除方法一实施例的流程图;Fig. 1 shows a flowchart of an embodiment of an active noise cancellation method according to the present application;
图2所示为ANC方案的一种实现方式的应用场景示意图;Figure 2 shows a schematic diagram of an application scenario of an implementation of the ANC solution;
图3所示为根据本申请主动噪声消除方法一实施例的流程图;Fig. 3 is a flowchart of an embodiment of an active noise cancellation method according to the present application;
图4所示为ANC方案的一种实现方式的原理图;Figure 4 shows a schematic diagram of an implementation of the ANC scheme;
图5所示为根据本申请一实施例的ANC方案原理图;FIG. 5 shows a schematic diagram of an ANC solution according to an embodiment of the present application;
图6所示为根据本申请主动噪声消除方法一实施例的流程图;Fig. 6 shows a flowchart of an embodiment of an active noise cancellation method according to the present application;
图7所示为两种主动噪声消除方案的执行效果对比示意图;Figure 7 shows a schematic diagram of the comparison of the implementation effects of two active noise cancellation schemes;
图8所示为根据本申请主动噪声消除装置一实施例的结构图。Fig. 8 is a structural diagram of an embodiment of an active noise cancellation device according to the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚,下面将结合本申请具体实施例及相应的附图对本申请技术方案进行清楚、完整地描述。显然,所描述的实施例仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described clearly and completely in conjunction with specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of this application.
本申请的实施方式部分使用的术语仅用于对本申请的具体实施例进行解释,而非旨在限定本申请。The terms used in the implementation mode part of this application are only used to explain specific embodiments of this application, and are not intended to limit this application.
针现有技术中ANC方案执行后的降噪效果并不理想的问题,本申请实施例提出了一种实现主动噪声消除的方法。为了提出本申请实施例的方法,发明人首先分析ANC方案的原理本质以及ANC方案的实际应用场景。In view of the problem that the noise reduction effect after the implementation of the ANC scheme in the prior art is not ideal, the embodiment of the present application proposes a method for realizing active noise cancellation. In order to propose the method of the embodiment of the present application, the inventor first analyzes the principle essence of the ANC solution and the actual application scenario of the ANC solution.
ANC方案的原理是:所有的声音都由一定的频谱组成,如果可以找到一种声音(主动噪声),其频谱与所要消除的外部噪声完全一样,只是相位刚好相反(相差180°),就可以将外部噪声完全抵消掉。基于上述原理的分析可知,在ANC方案中,降噪的实现在本质上是降低(最小化)到达人耳的外部噪声的能量,即用户耳内的噪声的能量。然而,在实际应用场景中,传入用户耳内的外部噪声并不等于用户可以感知到外部噪声。例如,在用户听音乐的场景中,即使外部噪声泄露进入耳内,只要耳机的音乐大于噪声能量超过一定的值,就会产生掩蔽作用,导致用户听不到外部的噪声。在这种时候,仍然按照降低(最小化)到达人耳的外部噪声的能量的方案进行主动噪声抵消,就会导致最终耳内的外部噪声被主动噪声抵消后有可能有一部分仍然被用户听到。The principle of the ANC scheme is: all sounds are composed of a certain frequency spectrum. If you can find a sound (active noise) whose frequency spectrum is exactly the same as the external noise to be eliminated, but the phase is exactly opposite (a difference of 180°), you can Completely cancel out the external noise. Analysis based on the foregoing principles shows that in the ANC solution, the realization of noise reduction is essentially to reduce (minimize) the energy of external noise reaching the human ear, that is, the energy of the noise in the user's ear. However, in actual application scenarios, the external noise introduced into the user's ear does not mean that the user can perceive the external noise. For example, in a scene where a user listens to music, even if external noise leaks into the ear, as long as the music of the earphone exceeds the noise energy by more than a certain value, a masking effect will occur, causing the user to not hear the external noise. At this time, the active noise cancellation is still carried out according to the scheme of reducing (minimizing) the energy of the external noise reaching the human ear, which will result in the final external noise in the ear being cancelled by the active noise, and a part of it may still be heard by the user .
因此,在本申请一实施例中,在实现主动噪声抵消方案时,在生成主动噪声时首先确定播放内容信号对外部噪声信号所产生的掩蔽效应,然后基于掩蔽效应确定主动噪声。Therefore, in an embodiment of the present application, when the active noise cancellation scheme is implemented, when generating active noise, the masking effect generated by the playback content signal on the external noise signal is first determined, and then the active noise is determined based on the masking effect.
以下结合附图,详细说明本申请各实施例提供的技术方案。The technical solutions provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
图1所示为根据本申请主动噪声消除方法一实施例的流程图。在本申请一实施例中,如图1所示,主动噪声消除方法包括:Fig. 1 shows a flowchart of an embodiment of an active noise cancellation method according to the present application. In an embodiment of the present application, as shown in FIG. 1, the active noise cancellation method includes:
步骤110,获取播放内容信号;Step 110: Obtain a play content signal;
步骤120,根据播放内容信号确定播放内容信号对外部噪声信号所产生的掩蔽效应;Step 120: Determine, according to the playback content signal, the masking effect of the playback content signal on the external noise signal;
步骤130,根据播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,其中,主动噪声信号用于将到达人耳的外部噪声信号的频谱控制在播放内容信号的频谱的掩蔽效应之下。Step 130: Generate an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal, where the active noise signal is used to control the frequency spectrum of the external noise signal reaching the human ear to the playback content signal Under the masking effect of the spectrum.
根据本申请实施例的方法,基于播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,从而将到达人耳的外部噪声信号的频谱控制在播放内容信号的频谱的掩蔽效应之下,进而有效削减用户所听到的外部噪声;相较于现有技术,根据本申请实施例的方法可以大大提高降噪效果。According to the method of the embodiment of the present application, an active noise signal for realizing active noise cancellation is generated based on the masking effect generated by the playing content signal on the external noise signal, so that the frequency spectrum of the external noise signal reaching the human ear is controlled at the level of the playing content signal. Under the masking effect of the frequency spectrum, the external noise heard by the user can be effectively reduced; compared with the prior art, the method according to the embodiment of the present application can greatly improve the noise reduction effect.
进一步的,在图1所示实施例的具体实际过程中,图1所示实施例的各个步骤可以采用多种不同的具体实现方式。Further, in the specific actual process of the embodiment shown in FIG. 1, each step of the embodiment shown in FIG. 1 may adopt a variety of different specific implementation manners.
在一具体的应用场景中,将主动噪声分为多个不同的频段,分别确定不同的频段的主动噪声从而最终整合构成完整的主动噪声。因此,在步骤130的一种实现方式中,在根据播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号的过程中,根据播放内容信号在某一频段上对外部噪声信号产生的掩蔽效应确定主动噪声在该频段的强度。例如,针对第一频段(第一频段可以是任意频段),根据播放内容信号在第一频段上对外部噪声信号产生的掩蔽效应确定主动噪声在所述第一频段的强度。In a specific application scenario, the active noise is divided into multiple different frequency bands, and the active noise of the different frequency bands are respectively determined to form a complete active noise finally. Therefore, in an implementation of step 130, in the process of generating an active noise signal for realizing active noise cancellation according to the masking effect of the broadcast content signal on the external noise signal, according to the broadcast content signal in a certain frequency band The masking effect on the external noise signal determines the strength of the active noise in this frequency band. For example, for the first frequency band (the first frequency band may be any frequency band), the strength of the active noise in the first frequency band is determined according to the masking effect of the playing content signal on the external noise signal in the first frequency band.
图2所示为ANC方案的一种实现方式的应用场景示意图。如图2所示,麦克风201为安置于耳机非入耳部分上的麦克风,麦克风202为安置于耳机入耳部分上的麦克风。麦克风202可以采集耳朵能听到的环境噪音信号(耳内噪声信号);麦克风201可以采集外部噪声信号(耳外噪声信号)。Figure 2 shows a schematic diagram of an application scenario of an implementation of the ANC solution. As shown in FIG. 2, the microphone 201 is a microphone arranged on the non-ear part of the earphone, and the microphone 202 is a microphone arranged on the ear part of the earphone. The microphone 202 can collect environmental noise signals (in-ear noise signals) that can be heard by the ear; the microphone 201 can collect external noise signals (external noise signals).
在图2所示的实际应用场景中,ANC方案的一种实现方式为:将耳内噪声信号、耳外噪声信号传至控制电路,进行实时运算生成与耳内噪声相位相反、振幅相同的主动噪声信号212;通过耳机上的喇叭发射主动噪声信号212来抵消噪声。噪声信号211耳外穿过耳机传入耳内,在耳内与主动噪声信号212相互抵消。In the actual application scenario shown in Figure 2, one implementation of the ANC solution is to transmit the noise signal in the ear and the noise signal outside the ear to the control circuit, and perform real-time calculations to generate an active signal with the opposite phase and the same amplitude as the noise in the ear. Noise signal 212; the active noise signal 212 is transmitted through the speaker on the earphone to cancel the noise. The noise signal 211 passes through the earphone into the ear outside the ear, and cancels out with the active noise signal 212 in the ear.
由于在图2所示的应用场景中,耳内噪声信号就是到达人耳的噪声信号。因此,针对图2所示的应用场景,在图1所示步骤120的一种实现方式中,确定播放内容信号对外部噪声信号所产生的掩蔽效应即是确定播放内容信号对耳内噪声信号所产生的掩蔽效应。In the application scenario shown in Figure 2, the noise signal in the ear is the noise signal reaching the human ear. Therefore, for the application scenario shown in FIG. 2, in an implementation of step 120 shown in FIG. 1, determining the masking effect of the playback content signal on the external noise signal is to determine the effect of the playback content signal on the ear noise signal. The resulting masking effect.
图3所示为根据本申请主动噪声消除方法一实施例的流程图。在步骤120的一种实现方式中,如图3所示,确定播放内容信号对外部噪声信号所产生的掩蔽效应的过程包括:Fig. 3 shows a flowchart of an embodiment of an active noise cancellation method according to the present application. In an implementation manner of step 120, as shown in FIG. 3, the process of determining the masking effect of the playing content signal on the external noise signal includes:
步骤310,获取耳内噪声信号;Step 310: Obtain a noise signal in the ear;
步骤320,确定播放内容信号对耳内噪声信号所产生的掩蔽效应。Step 320: Determine the masking effect of the playing content signal on the ear noise signal.
进一步的,在图2所示的一种应用场景中,在主动噪声消除的控制策略中,采用闭环反馈方案生成主动噪声信号212。具体的,计算电路将麦克风202获取的耳内噪声信号作为反馈信号,基于反馈信号进行闭环反馈计算,把麦克风201获取的信号经过处理产生相位相反的噪声声波在耳内相互抵消。Further, in an application scenario shown in FIG. 2, in the control strategy of active noise cancellation, a closed-loop feedback scheme is used to generate the active noise signal 212. Specifically, the calculation circuit uses the ear noise signal acquired by the microphone 202 as a feedback signal, performs closed-loop feedback calculation based on the feedback signal, and processes the signal acquired by the microphone 201 to generate noise waves with opposite phases to cancel each other in the ear.
以一具体的应用场景为例,图4所示为ANC方案的一种实现方式的原理图。如图4所示,数据输入节点401指代图2所示的安置于耳机非入耳部分上的麦克风201,数据输入节点402指代图2所示的安置于耳机入耳部分上的麦克风202。模块403、405、406分 别使用计算函数P(z)、S(z)、S(z)对其输入量进行计算处理以生成输出量。Taking a specific application scenario as an example, Figure 4 shows a schematic diagram of an implementation of the ANC solution. As shown in FIG. 4, the data input node 401 refers to the microphone 201 arranged on the non-ear part of the headset shown in FIG. 2, and the data input node 402 refers to the microphone 202 arranged on the ear part of the headset shown in FIG. 2. The modules 403, 405, and 406 respectively use calculation functions P(z), S(z), and S(z) to perform calculation processing on their input to generate output.
401的输入为耳外噪声信号x(n),其中n代表了采样点。The input of 401 is the external-ear noise signal x(n), where n represents the sampling point.
模块403用于模拟外部噪声经过耳机渗入到耳内的传递环境。P(z)代表了外部噪声经过耳机渗入到耳内的传递函数,因此,模块411的输出量d(n)就为耳内噪声信号。The module 403 is used to simulate the transmission environment in which external noise penetrates into the ear through the earphone. P(z) represents the transfer function of the external noise penetrating the ear through the earphone. Therefore, the output d(n) of the module 411 is the ear noise signal.
模块406用于模拟主动噪声信号在耳内的传递环境。S(z)是耳机扬声器至麦克风402的传递函数,S(z)可以事先测量得到,也可以实时估算(例如当耳机下行播放音乐的时候)。The module 406 is used to simulate the transmission environment of the active noise signal in the ear. S(z) is the transfer function from the earphone speaker to the microphone 402. S(z) can be measured in advance or estimated in real time (for example, when the earphone is playing music downstream).
模块404用于指代生成主动噪声信号的自适应滤波器。自适应滤波器对耳外噪声信号x(n)进行处理以生成主动噪声信号,H(z)代表了自适应滤波器侧参数。 Module 404 is used to refer to an adaptive filter that generates an active noise signal. The adaptive filter processes the external noise signal x(n) to generate an active noise signal, and H(z) represents the parameters of the adaptive filter.
在本ANC实现方案中,在生成主动噪声信号时,计算模块的目的就是估算H(z)使其尽可能接近P(z)。那么x(n)经过H(z)和S(z)得到y(n)就可以与耳内噪声信号d(n)相抵消。以H(z)作为自适应滤波器的工作参数,就可以输出可以实现主动抵消降噪的主动噪声信号。具体的,采用闭环反馈调节H(z)。402输入的e(n)是y(n)与d(n)抵消残留的噪声信号(误差信号)。模块407基于最小均方算法(LeastMeanSquare,LMS),以e(n)为反馈输入,根据e(n)以及模块405的输出量调整H(z)的参数。In this ANC implementation scheme, when generating active noise signals, the purpose of the calculation module is to estimate H(z) to make it as close to P(z) as possible. Then x(n) obtains y(n) through H(z) and S(z), which can cancel out the noise signal d(n) in the ear. With H(z) as the working parameter of the adaptive filter, it is possible to output an active noise signal that can actively cancel and reduce noise. Specifically, closed-loop feedback is used to adjust H(z). The e(n) input by 402 is the residual noise signal (error signal) that y(n) and d(n) cancel out. The module 407 is based on the Least Mean Square (LeastMeanSquare, LMS) algorithm, takes e(n) as the feedback input, and adjusts the H(z) parameter according to the e(n) and the output of the module 405.
针对图4所示的采用反馈计算的主动噪声消除的控制策略。在图1所示步骤120的一种实现方式中,不直接将麦克风202获取的耳内噪声信号作为反馈信号,而是基于播放内容信号对耳内噪声信号所产生的掩蔽效应对耳内噪声信号进行处理,从而确定反馈信号。For the control strategy of active noise cancellation using feedback calculation shown in Figure 4. In an implementation of step 120 shown in FIG. 1, the in-ear noise signal obtained by the microphone 202 is not directly used as the feedback signal, but is based on the masking effect of the broadcast content signal on the in-ear noise signal on the in-ear noise signal. Perform processing to determine the feedback signal.
具体的,在步骤120的一种实现方式中,如图3所示,根据播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号的过程包括:Specifically, in an implementation manner of step 120, as shown in FIG. 3, the process of generating an active noise signal for realizing active noise cancellation according to the masking effect generated by the playback content signal on the external noise signal includes:
步骤330,根据播放内容信号对耳内噪声信号所产生的掩蔽效应确定主动噪声消除的控制策略中耳内噪声信号的反馈输入;Step 330: Determine the feedback input of the in-ear noise signal in the control strategy of active noise cancellation according to the masking effect of the playing content signal on the in-ear noise signal;
步骤340,基于耳内噪声信号的反馈输入,根据主动噪声消除的控制策略生成主动噪声。Step 340: Generate active noise according to the control strategy of active noise cancellation based on the feedback input of the noise signal in the ear.
以一具体的应用场景为例,图5所示为根据本申请一实施例的ANC方案原理图。如图5所示,数据输入节点501指代图2所示的安置于耳机非入耳部分上的麦克风201,数据输入节点502指代图2所示的安置于耳机入耳部分上的麦克风202。模块503、505、506分别使用计算函数P(z)、S(z)、S(z)对其输入量进行计算处理以生成输出量。Taking a specific application scenario as an example, FIG. 5 shows a schematic diagram of an ANC solution according to an embodiment of the present application. As shown in FIG. 5, the data input node 501 refers to the microphone 201 placed on the non-ear part of the headset shown in FIG. 2, and the data input node 502 refers to the microphone 202 placed on the ear part of the headset shown in FIG. 2. The modules 503, 505, and 506 respectively use calculation functions P(z), S(z), and S(z) to perform calculation processing on their input to generate an output.
501的输入为耳外噪声信号x(n),其中n代表了采样点。The input of 501 is the external-ear noise signal x(n), where n represents the sampling point.
模块503用于模拟外部噪声经过耳机渗入到耳内的传递环境。P(z)代表了外部噪声经过耳机渗入到耳内的传递函数,因此,模块511的输出量d(n)就为耳内噪声信号。The module 503 is used to simulate the transmission environment in which external noise penetrates into the ear through the earphone. P(z) represents the transfer function of the external noise infiltrating the ear through the earphone. Therefore, the output d(n) of the module 511 is the ear noise signal.
模块506用于模拟主动噪声信号在耳内的传递环境。S(z)是耳机扬声器至麦克风402的传递函数,S(z)可以事先测量得到,也可以实时估算(例如当耳机下行播放音乐的时候)。The module 506 is used to simulate the transmission environment of the active noise signal in the ear. S(z) is the transfer function from the earphone speaker to the microphone 402. S(z) can be measured in advance or estimated in real time (for example, when the earphone is playing music downstream).
模块504用于指代生成主动噪声信号的自适应滤波器。自适应滤波器对耳外噪声信号x(n)进行处理以生成主动噪声信号,H(z)代表了自适应滤波器侧参数。 Module 504 is used to refer to an adaptive filter that generates an active noise signal. The adaptive filter processes the external noise signal x(n) to generate an active noise signal, and H(z) represents the parameters of the adaptive filter.
在本ANC实现方案中,在生成主动噪声信号时,计算模块的目的就是估算H(z)使其尽可能接近P(z)。那么x(n)经过H(z)和S(z)得到y(n)就可以与耳内噪声信号d(n)相抵消。以H(z)作为自适应滤波器的工作参数,就可以输出可以实现主动抵消降噪的主动噪声信号。具体的,采用闭环反馈调节H(z)。模块507基于最小均方算法(LeastMeanSquare,LMS),根据反馈输入以及模块505的输出量调整H(z)的参数。In this ANC implementation scheme, when generating active noise signals, the purpose of the calculation module is to estimate H(z) to make it as close to P(z) as possible. Then x(n) obtains y(n) through H(z) and S(z), which can cancel out the noise signal d(n) in the ear. With H(z) as the working parameter of the adaptive filter, it is possible to output an active noise signal that can actively cancel and reduce noise. Specifically, closed-loop feedback is used to adjust H(z). The module 507 is based on the least mean square algorithm (LeastMeanSquare, LMS), and adjusts the H(z) parameter according to the feedback input and the output of the module 505.
502输入的e(n)是y(n)与d(n)抵消残留的噪声信号。与图4所示实施例不同,图5所示实施例中,模块507在进行闭环反馈调节H(z)时,并不是以e(n)为反馈输入,而是以模块508的输出q(n)为反馈输入。502 input e(n) is y(n) and d(n) to cancel the residual noise signal. Different from the embodiment shown in FIG. 4, in the embodiment shown in FIG. 5, when the module 507 performs closed-loop feedback adjustment H(z), it does not use e(n) as the feedback input, but uses the output q( n) is the feedback input.
模块508指代以W(z)为滤波器参数的滤波器。掩蔽效应分析器510将播放内容信号对耳内噪声信号所产生的掩蔽效应的分析结果输入到模块508,模块508基于掩蔽效应的分析结果来调整e(n),将调整结果作为反馈输入输入到模块507。The block 508 refers to a filter with W(z) as the filter parameter. The masking effect analyzer 510 inputs the analysis result of the masking effect generated by the playback content signal on the ear noise signal to the module 508. The module 508 adjusts e(n) based on the analysis result of the masking effect, and inputs the adjustment result as a feedback input to the module 508. Module 507.
具体的,在步骤330的一种实现方式中,在根据播放内容信号对耳内噪声信号所产生的掩蔽效应确定主动噪声消除的控制策略中耳内噪声信号的反馈输入的过程中,根据播放内容信号在某一频段上对耳内噪声信号产生的掩蔽效应确定在该频段上的耳内噪声信号的反馈输入的强度。例如,针对第一频段(第一频段可以是任意频段),根据播放内容信号在第一频段上对耳内噪声信号产生的掩蔽效应确定在第一频段上的耳内噪声信号的反馈输入的强度。Specifically, in an implementation manner of step 330, in the process of determining the feedback input of the in-ear noise signal in the control strategy of active noise cancellation according to the masking effect generated by the playback content signal on the in-ear noise signal, according to the playback content The masking effect of the signal on the ear noise signal in a certain frequency band determines the strength of the feedback input of the ear noise signal in this frequency band. For example, for the first frequency band (the first frequency band can be any frequency band), the strength of the feedback input of the ear noise signal in the first frequency band is determined according to the masking effect of the broadcast content signal on the ear noise signal in the first frequency band .
进一步的,在步骤120的一种实现方式中,通过对音频信号的频谱进行分析来分析掩蔽效应。图6所示为根据本申请主动噪声消除方法一实施例的流程图。在步骤120的一种实现方式中,如图6所示,确定播放内容信号对耳内噪声信号所产生的掩蔽效应的过程,包括:Further, in an implementation manner of step 120, the masking effect is analyzed by analyzing the frequency spectrum of the audio signal. Fig. 6 shows a flowchart of an embodiment of an active noise cancellation method according to the present application. In an implementation manner of step 120, as shown in FIG. 6, the process of determining the masking effect of the playing content signal on the ear noise signal includes:
步骤610,根据耳内噪声信号计算耳内噪声信号的频谱;Step 610: Calculate the frequency spectrum of the ear noise signal according to the ear noise signal;
步骤620,根据播放内容信号计算播放内容信号的频谱;Step 620: Calculate the frequency spectrum of the played content signal according to the played content signal;
步骤630,根据耳内噪声信号的频谱以及播放内容信号的频谱确定各个频段上播放内容信号对耳内噪声信号所产生的掩蔽效应。Step 630: Determine, according to the frequency spectrum of the noise signal in the ear and the frequency spectrum of the playback content signal, the masking effect of the playback content signal in each frequency band on the noise signal in the ear.
进一步的,在步骤120的一种实现方式中,通过为耳内噪声信号的各个频段分配对应的权重来表示播放内容信号对该耳内噪声信号的各个频段的遮蔽效应。具体的,针对某一频段,播放内容信号对耳内噪声信号遮蔽效应越强,耳内噪声信号的该频段对应的频段权重越小。Further, in an implementation manner of step 120, the masking effect of the playing content signal on each frequency band of the ear noise signal is represented by allocating corresponding weights to each frequency band of the ear noise signal. Specifically, for a certain frequency band, the stronger the shielding effect of the broadcast content signal on the ear noise signal, the smaller the frequency band weight corresponding to the frequency band of the ear noise signal.
具体的,如图6所示,在步骤120的一种实现方式中,根据播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号的过程包括:Specifically, as shown in FIG. 6, in an implementation manner of step 120, the process of generating an active noise signal for realizing active noise cancellation according to the masking effect generated by the playback content signal on the external noise signal includes:
步骤640,根据播放内容信号的频谱对耳内噪声信号的频谱所产生的掩蔽效应确定耳内噪声信号不同频段对应的频段权重,其中,遮蔽效应越强,对应的频段权重越小;Step 640: Determine frequency band weights corresponding to different frequency bands of the ear noise signal according to the masking effect produced by the frequency spectrum of the playing content signal on the frequency spectrum of the ear noise signal, where the stronger the masking effect, the smaller the corresponding frequency band weight;
步骤650,根据耳内噪声信号不同频段对应的频段权重,对耳内噪声信号进行滤波,获取耳内噪声滤波结果信号,其中,频段权重越小,耳内噪声滤波结果信号中对应频段的信号强度越小;Step 650: Filter the in-ear noise signal according to the frequency band weights corresponding to different frequency bands of the in-ear noise signal to obtain the in-ear noise filtering result signal, where the smaller the frequency band weight, the signal strength of the corresponding frequency band in the in-ear noise filtering result signal Smaller
步骤660,将耳内噪声滤波结果信号作为主动噪声消除的控制策略中耳内噪声信号的反馈输入。Step 660: Use the in-ear noise filtering result signal as a feedback input of the in-ear noise signal in the control strategy of active noise cancellation.
以一具体的应用场景为例,如图5所示,掩蔽效应分析器510包含耳内噪声频谱估计模块511、播放内容频谱估计模块512以及频带权重分配模块513。耳内噪声频谱估计模块511用于实现步骤610,计算耳内噪声信号的频谱。播放内容频谱估计模块512用于实现步骤520,计算播放内容信号的频谱。频带权重分配模块513用于实现步骤630以及步骤640,根据耳内噪声信号的频谱以及播放内容信号的频谱,确定耳内噪声信号各个频谱对应的权重。模块508用于实现步骤650以及660,根据耳内噪声信号各个频谱对应的权 重对e(n)进行调整,把e(n)中权重较低的频率衰减,输出调整过的误差信号q(n)。Taking a specific application scenario as an example, as shown in FIG. 5, the masking effect analyzer 510 includes an in-ear noise spectrum estimation module 511, a playback content spectrum estimation module 512, and a frequency band weight allocation module 513. The ear noise frequency spectrum estimation module 511 is used to implement step 610 to calculate the frequency spectrum of the ear noise signal. The played content frequency spectrum estimation module 512 is used to implement step 520 to calculate the frequency spectrum of the played content signal. The frequency band weight allocation module 513 is used to implement steps 630 and 640, and determine the weights corresponding to the respective frequency spectrums of the ear noise signals according to the frequency spectrum of the ear noise signal and the frequency spectrum of the playing content signal. The module 508 is used to implement steps 650 and 660, adjust e(n) according to the weight corresponding to each spectrum of the noise signal in the ear, attenuate the frequency with lower weight in e(n), and output the adjusted error signal q(n ).
具体的,在步骤610~660的一种实现方式中,如图5所示,在实现步骤610的过程中,理想状态下,y(n)与d(n)完全抵消,耳内噪声频谱估计模块511的输入是y(n)。但是在实际操作下,y(n)与d(n)没有实现完全抵消,存在e(n)。因此,耳内噪声频谱估计模块511的输入为y(n)以及e(n)。Specifically, in an implementation manner of steps 610 to 660, as shown in FIG. 5, in the process of implementing step 610, in an ideal state, y(n) and d(n) are completely canceled, and the ear noise spectrum is estimated The input of block 511 is y(n). However, in actual operation, y(n) and d(n) are not completely offset, and e(n) exists. Therefore, the input of the ear noise spectrum estimation module 511 is y(n) and e(n).
以Y(w,n)和E(w,n)表示y(n)和e(n)的傅里叶变换,其中w代表了频率。那么耳内总噪声的瞬时能量N in(ω,n)可以表示为 Let Y(w,n) and E(w,n) represent the Fourier transform of y(n) and e(n), where w represents the frequency. Then the instantaneous energy N in (ω, n) of the total noise in the ear can be expressed as
N in(ω,n)=|Y(ω,n)| 2+|E(ω,n)| 2。    (式1) N in (ω,n)=|Y(ω,n)| 2 +|E(ω,n)| 2 . (Formula 1)
公式1中,|E(ω,n)| 2可以选择下行静音时计算,防止下行播放时内容的能量混入噪声能量估计。 In formula 1, |E(ω,n)| 2 can be calculated when the downlink is muted to prevent the energy of the content from being mixed into the noise energy estimation during downlink playback.
进一步的,为了得到更稳定的噪声估计,基于下式对N in(ω,n)进行平滑处理: Further, in order to obtain a more stable noise estimate, N in (ω, n) is smoothed based on the following formula:
Figure PCTCN2021078951-appb-000001
Figure PCTCN2021078951-appb-000001
公式2中,α为了事先定义的常数,例如,在一应用场景中,α取值为0.99。In formula 2, α is a pre-defined constant. For example, in an application scenario, the value of α is 0.99.
基于上述公式1以及公式2实现耳内噪声频谱估计模块511,从而根据y(n)以及e(n)计算获取耳内噪声频谱的计算结果。Based on the above formula 1 and formula 2, the in-ear noise spectrum estimation module 511 is implemented, so as to obtain the calculation result of the in-ear noise spectrum according to y(n) and e(n).
在实现步骤620的过程中,如图5所示,播放内容频谱估计模块512基于下式计算下行的播放内容频谱:In the process of implementing step 620, as shown in FIG. 5, the broadcast content spectrum estimation module 512 calculates the downlink broadcast content spectrum based on the following formula:
Figure PCTCN2021078951-appb-000002
Figure PCTCN2021078951-appb-000002
公式3中,M d(ω,n)代表了瞬时播放内容的能量谱;
Figure PCTCN2021078951-appb-000003
代表了平滑后的音乐能量谱;S(ω)是耳机扬声器到麦克风202的传输函数。
In formula 3, M d (ω, n) represents the energy spectrum of the instantaneous content;
Figure PCTCN2021078951-appb-000003
Represents the smoothed music energy spectrum; S(ω) is the transfer function from the earphone speaker to the microphone 202.
基于上述公式3实现播放内容频谱估计模块512,从而计算获取播放内容频谱的计算结果。Based on the above formula 3, the play content frequency spectrum estimation module 512 is implemented, so as to obtain the calculation result of the play content frequency spectrum.
在实现步骤630~640的过程中,如图5所示,频带权重分配模块513的输入耳内噪声频谱以及播放内容频谱:
Figure PCTCN2021078951-appb-000004
Figure PCTCN2021078951-appb-000005
根据上述两个值,可以计算得出哪些频带可以降低权重(不用抵消)或者哪些需要ANC算法抵消的。
In the process of implementing steps 630 to 640, as shown in FIG. 5, the input ear noise spectrum and the playback content spectrum of the frequency band weight allocation module 513 are:
Figure PCTCN2021078951-appb-000004
and
Figure PCTCN2021078951-appb-000005
Based on the above two values, it can be calculated which frequency bands can be reduced in weight (without cancellation) or which need to be cancelled by the ANC algorithm.
具体的权重计算如下:The specific weights are calculated as follows:
Figure PCTCN2021078951-appb-000006
Figure PCTCN2021078951-appb-000006
公式4中,W(ω)为频点ω的权重,β和γ是预先设置的常量(在一应用场景中,β和γ分别可设为0.01和0.1)。In formula 4, W(ω) is the weight of frequency ω, β and γ are preset constants (in an application scenario, β and γ can be set to 0.01 and 0.1, respectively).
β代表了下行播放内容能量对于噪声的掩蔽效应。例如,在一应用场景中,设定:β represents the masking effect of downstream content energy on noise. For example, in an application scenario, set:
如果噪声能量小于播放内容能量的0.01倍,则可认为噪声被掩蔽(用户听不到)了,此时可以把对应的频带权重设为γ(0.1);If the noise energy is less than 0.01 times the energy of the content to be played, it can be considered that the noise is masked (the user cannot hear it), and the corresponding frequency band weight can be set to γ(0.1) at this time;
反之则认为噪声未被掩蔽,需要用给予权重为1。Otherwise, it is considered that the noise is not masked, and a weight of 1 is required.
在实现步骤650~660的过程中,如图5所示,模块508的输入为权重W(ω)和e(n),模块508对e(n)进行滤波,把信号中权重较低的频率衰减,输出为调整过的误差信号q(n)。模块508的滤波器参数W(z)可以根据下面的方法求得:In the process of implementing steps 650 to 660, as shown in Figure 5, the input of the module 508 is the weights W(ω) and e(n), and the module 508 filters e(n) to reduce the frequency with lower weight in the signal. Attenuation, the output is the adjusted error signal q(n). The filter parameter W(z) of the module 508 can be obtained according to the following method:
w(n)=FFT -1(W)。    (式5) w(n)=FFT -1 (W). (Equation 5)
公式5中,FFT -1(x)表示对于向量x做反傅里叶变换;w(n),n=0,1,,...N-1为滤波器参数W(z)的冲击响应。W=[W(ω 0)W(ω 1)...W(ω N-1)] T表示权重在不同频率上的值,W由公式4求得。滤波器参数W(z)的输出和输入的关系可以表示为: In formula 5, FFT -1 (x) represents the inverse Fourier transform of the vector x; w(n), n=0, 1,...N-1 is the impulse response of the filter parameter W(z) . W=[W(ω 0 )W(ω 1 )...W(ω N-1 )] T represents the value of the weight at different frequencies, and W is obtained by formula 4. The relationship between the output and input of the filter parameter W(z) can be expressed as:
Figure PCTCN2021078951-appb-000007
Figure PCTCN2021078951-appb-000007
如图5所示,根据公式6,作为模块507反馈输入的q(n)是滤波后的e(n)。相较于e(n),q(n)的频率成分有所调整:被音乐能量所掩蔽的频带会衰减;其他的频带不变。因此,使用q(n)作为模块507的反馈输入时,可以保证算法会更重视抵消权重高的频带;从而达到动态调整残留噪声的能量谱,使得其不被音乐掩蔽的频率部分更小;而被音乐掩蔽的频率部分变大的目的。As shown in Fig. 5, according to formula 6, q(n) as the feedback input of the module 507 is filtered e(n). Compared with e(n), the frequency component of q(n) has been adjusted: the frequency band masked by the music energy will be attenuated; the other frequency bands remain unchanged. Therefore, when q(n) is used as the feedback input of the module 507, it can be ensured that the algorithm will pay more attention to the frequency band with high offsetting weight; thus, the energy spectrum of the residual noise can be dynamically adjusted, so that the frequency part that is not masked by the music is smaller; and The purpose of increasing the frequency part masked by music.
可以理解的是,上述实施例中的部分或全部步骤骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照上述实施例呈现的不同的顺序来执行,并且有可能并非要执行上述实施例中的全部操作。It can be understood that some or all of the steps or operations in the above-mentioned embodiments are merely examples, and the embodiments of the present application may also perform other operations or variations of various operations. In addition, each step may be executed in a different order presented in the foregoing embodiment, and it may not be necessary to perform all operations in the foregoing embodiment.
图7所示为两种主动噪声消除方案的执行效果对比示意图。在一应用场景中,如图7所示,纵坐标为能量,横坐标为频率。701代表下行播放内容,702代表噪声基底(Noise floor),703表示下行播放内容带来的掩蔽能量曲线(masking curve),704表示采用图4所示的ANC系统的最终的耳内噪声,705表示采用图5所示的ANC系统的最终的耳内噪声。Figure 7 shows a schematic diagram of the comparison of the implementation effects of two active noise cancellation schemes. In an application scenario, as shown in Figure 7, the ordinate is energy and the abscissa is frequency. 701 represents the downstream content, 702 represents the noise floor, 703 represents the masking curve caused by the downstream content, 704 represents the final in-ear noise using the ANC system shown in Figure 4, and 705 represents The final in-ear noise using the ANC system shown in Figure 5.
图中703表示了下行播放内容带来了掩蔽能量曲线(masking curve),即噪声如果小于这条曲线用户主观是无法感知的。采用图4所示的ANC系统的最终的耳内噪声如704所示,704在低频部分略高于掩蔽曲线导致用户主观可感知。然而图5所示的ANC系统,可以得到更好的平衡,如705所示,705被控制在703以下,高频噪声略有提升(任然在掩蔽曲线之下)而低频进一步降低。因此,相较于图4所示的ANC系统,采用图5所示的ANC系统可以更好地使用户主观上感知到的噪声最小化。703 in the figure shows that the downstream content brings a masking curve, that is, if the noise is smaller than this curve, the user will not be subjectively perceivable. The final in-ear noise using the ANC system shown in FIG. 4 is as shown in 704, which is slightly higher than the masking curve in the low frequency part, which is subjectively perceivable by the user. However, the ANC system shown in Figure 5 can be better balanced. As shown in 705, 705 is controlled below 703, the high-frequency noise is slightly increased (still under the masking curve) and the low-frequency is further reduced. Therefore, compared with the ANC system shown in FIG. 4, the ANC system shown in FIG. 5 can better minimize the noise subjectively perceived by the user.
进一步的,基于本申请一实施例中提出的主动噪声消除方法,本申请一实施例还提出了一种实现主动噪声消除的装置。图8所示为根据本申请主动噪声消除装置一实施例的结构图。在本申请一实施例中,如图8所示,在本申请一实施例中,主动噪声消除800包括:Further, based on the active noise cancellation method proposed in an embodiment of the present application, an embodiment of the present application also proposes a device for realizing active noise cancellation. Fig. 8 is a structural diagram of an embodiment of an active noise cancellation device according to the present application. In an embodiment of the present application, as shown in FIG. 8, in an embodiment of the present application, active noise cancellation 800 includes:
信号获取模块810,其用于获取播放内容信号;A signal acquisition module 810, which is used to acquire a playback content signal;
屏蔽效应分析模块820,其用于确定播放内容信号对外部噪声信号所产生的掩蔽效应;A shielding effect analysis module 820, which is used to determine the shielding effect of the playback content signal on the external noise signal;
主动噪声生成模块830,其用于根据播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,使得到达人耳的外部噪声信号的频谱被控制在播放内容信号的频谱的掩蔽效应之下。The active noise generation module 830 is used to generate an active noise signal for realizing active noise cancellation according to the masking effect generated by the playback content signal on the external noise signal, so that the frequency spectrum of the external noise signal reaching the human ear is controlled in the playback content signal Under the masking effect of the spectrum.
图8所示的本申请一实施例提供的装置可用于执行本申请实施例的方法实施例的技术方案,其实现原理和技术效果可以进一步参考方法实施例中的相关描述。The device provided by an embodiment of the present application shown in FIG. 8 can be used to implement the technical solutions of the method embodiments of the embodiments of the present application. For its implementation principles and technical effects, further reference may be made to related descriptions in the method embodiments.
具体的,在主动噪声生成模块830的一种实现方式中,主动噪声生成模块830用于根据播放内容信号在第一频段上对外部噪声信号产生的掩蔽效应确定主动噪声在第一频段的强度。Specifically, in an implementation of the active noise generating module 830, the active noise generating module 830 is configured to determine the strength of the active noise in the first frequency band according to the masking effect of the playing content signal on the external noise signal in the first frequency band.
具体的,在屏蔽效应分析模块820的一种实现方式中,屏蔽效应分析模块820包括:Specifically, in an implementation manner of the shielding effect analysis module 820, the shielding effect analysis module 820 includes:
耳内噪声信号获取模块,其用于获取耳内噪声信号,以图5所示实施例的应用场景为 例,数据输入节点502对应耳内噪声信号获取模块;The ear noise signal acquisition module is used to acquire the ear noise signal. Taking the application scenario of the embodiment shown in FIG. 5 as an example, the data input node 502 corresponds to the ear noise signal acquisition module;
掩蔽效应分析器,其用于确定播放内容信号对耳内噪声信号所产生的掩蔽效应,以图5所示实施例的应用场景为例,模块510对应掩蔽效应分析器。The masking effect analyzer is used to determine the masking effect of the playback content signal on the ear noise signal. Taking the application scenario of the embodiment shown in FIG. 5 as an example, the module 510 corresponds to the masking effect analyzer.
具体的,在主动噪声生成模块830的一种实现方式中,主动噪声生成模块830包括:Specifically, in an implementation manner of the active noise generating module 830, the active noise generating module 830 includes:
反馈输入计算模块,其用于根据播放内容信号对耳内噪声信号所产生的掩蔽效应确定主动噪声消除的控制策略中耳内噪声信号的反馈输入,以图5所示实施例的应用场景为例,模块508对应反馈输入计算模块;The feedback input calculation module is used to determine the control strategy of active noise cancellation according to the masking effect of the content signal on the ear noise signal. The feedback input of the noise signal in the ear is taken as an example in the application scenario of the embodiment shown in FIG. 5 , The module 508 corresponds to the feedback input calculation module;
主动噪声生成器,其用于基于耳内噪声信号的反馈输入,根据主动噪声消除的控制策略生成主动噪声,以图5所示实施例的应用场景为例,模块507以及模块504对应主动噪声生成器的一部分功能模块。Active noise generator, which is used to generate active noise according to the control strategy of active noise cancellation based on the feedback input of the noise signal in the ear. Taking the application scenario of the embodiment shown in FIG. 5 as an example, modules 507 and 504 correspond to active noise generation Part of the functional module of the device.
具体的,在反馈输入计算模块的一种实现方式中,其中,反馈输入计算模块用于根据播放内容信号在第一频段上对耳内噪声信号产生的掩蔽效应确定在第一频段上的耳内噪声信号的反馈输入的强度。Specifically, in an implementation of the feedback input calculation module, the feedback input calculation module is used to determine the in-ear noise signal in the first frequency band according to the masking effect of the playback content signal on the in-ear noise signal in the first frequency band. The strength of the feedback input of the noise signal.
具体的,在掩蔽效应分析器的一种实现方式中,掩蔽效应分析器包括:Specifically, in an implementation of the masking effect analyzer, the masking effect analyzer includes:
耳内噪声频谱估计模块,其用于根据耳内噪声信号计算所述耳内噪声信号的频谱,例如图5所示实施例的应用场景中的模块511;An ear noise spectrum estimation module, which is used to calculate the spectrum of the ear noise signal according to the ear noise signal, such as the module 511 in the application scenario of the embodiment shown in FIG. 5;
播放内容频谱估计模块,其用于根据播放内容信号计算播放内容信号的频谱,例如图5所示实施例的应用场景中的模块512;The play content frequency spectrum estimation module is used to calculate the frequency spectrum of the play content signal according to the play content signal, such as the module 512 in the application scenario of the embodiment shown in FIG. 5;
频带权重分配模块,例如图5所示实施例的应用场景中的模块513,频带权重分配模块用于:The frequency band weight allocation module, for example, the module 513 in the application scenario of the embodiment shown in FIG. 5, the frequency band weight allocation module is used for:
根据耳内噪声信号的频谱以及播放内容信号的频谱确定各个频段上播放内容信号对耳内噪声信号所产生的掩蔽效应;According to the frequency spectrum of the noise signal in the ear and the frequency spectrum of the playback content signal, determine the masking effect of the playback content signal on the ear noise signal in each frequency band;
根据播放内容信号的频谱对耳内噪声信号的频谱所产生的掩蔽效应确定耳内噪声信号不同频段对应的频段权重,其中,遮蔽效应越强,对应的频段权重越小。The frequency band weight corresponding to different frequency bands of the ear noise signal is determined according to the masking effect of the frequency spectrum of the playing content signal on the frequency spectrum of the ear noise signal. The stronger the masking effect, the smaller the corresponding frequency band weight.
在反馈输入计算模块的一种实现方式中,反馈输入计算模块用于:In an implementation of the feedback input calculation module, the feedback input calculation module is used to:
根据耳内噪声信号不同频段对应的频段权重,对耳内噪声信号进行滤波,获取耳内噪声滤波结果信号,其中,频段权重越小,耳内噪声滤波结果信号中对应频段的信号强度越小;Filter the in-ear noise signal according to the frequency band weights corresponding to different frequency bands of the in-ear noise signal to obtain the in-ear noise filtering result signal. Among them, the smaller the frequency band weight, the smaller the signal strength of the corresponding frequency band in the in-ear noise filtering result signal;
将耳内噪声滤波结果信号作为主动噪声消除的控制策略中耳内噪声信号的反馈输入。The in-ear noise filtering result signal is used as the feedback input of the in-ear noise signal in the control strategy of active noise cancellation.
进一步的,在20世纪90年代,对于一个技术的改进可以很明显地区分是硬件上的改进(例如,对二极管、晶体管、开关等电路结构的改进)还是软件上的改进(对于方法流程的改进)。然而,随着技术的发展,当今的很多方法流程的改进已经可以视为硬件电路结构的直接改进。设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。例如,可编程逻辑器件(Programmable Logic Device,PLD)(例如现场可编程门阵列(Field Programmable Gate Array,FPGA))就是这样一种集成电路,其逻辑功能由访问方对器件编程来确定。由设计人员自行编程来把一个数字装置“集成”在一片PLD上,而不需要请芯片制造厂商来设计和制作专用的集成电路芯片。而且,如今,取代手工地制作集成电路芯片,这种编程也多半改用“逻辑编译器(logic compiler)”软件来实现,它与程序开发 撰写时所用的软件编译器相类似,而要编译之前的原始代码也得用特定的编程语言来撰写,此称之为硬件描述语言(Hardware Description Language,HDL),而HDL也并非仅有一种,而是有许多种,如ABEL(Advanced Boolean Expression Language)、AHDL(Altera Hardware Description Language)、Confluence、CUPL(Cornell University Programming Language)、HDCal、JHDL(Java Hardware Description Language)、Lava、Lola、MyHDL、PALASM、RHDL(Ruby Hardware Description Language)等,目前最普遍使用的是VHDL(Very-High-Speed Integrated Circuit Hardware Description Language)与Verilog。本领域技术人员也应该清楚,只需要将方法流程用上述几种硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。Furthermore, in the 1990s, the improvement of a technology can be clearly distinguished between hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method and process). ). However, with the development of technology, the improvement of many methods and processes of today can be regarded as a direct improvement of the hardware circuit structure. Designers almost always get the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that the improvement of a method flow cannot be realized by the hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (for example, a Field Programmable Gate Array (Field Programmable Gate Array, FPGA)) is such an integrated circuit whose logic function is determined by the accessing party's programming of the device. It is programmed by the designer to "integrate" a digital device on a PLD without requiring the chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly realized with "logic compiler" software, which is similar to the software compiler used in program development and writing, but before compilation The original code must also be written in a specific programming language, which is called Hardware Description Language (HDL), and there is not only one type of HDL, but many types, such as ABEL (Advanced Boolean Expression Language) , AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description), etc., currently most commonly used It is VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should also be clear to those skilled in the art that just a little bit of logic programming of the method flow in the above-mentioned hardware description languages and programming into an integrated circuit can easily obtain the hardware circuit that implements the logic method flow.
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑控制器和嵌入微控制器的形式,控制器的例子包括但不限于以下微控制器:ARC 625D、Atmel AT91SAM、Microchip PIC18F26K20以及Silicone Labs C8051F320,存储器控制器还可以被实现为存储器的控制逻辑的一部分。本领域技术人员也知道,除了以纯计算机可读程序代码方式实现控制器以外,完全可以通过将方法步骤进行逻辑编程来使得控制器以逻辑门、开关、专用集成电路、可编程逻辑控制器和嵌入微控制器等的形式来实现相同功能。因此这种控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) executable by the (micro)processor. , Logic gates, switches, application specific integrated circuits (ASICs), programmable logic controllers and embedded microcontrollers. Examples of controllers include but are not limited to the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicon Labs C8051F320, the memory controller can also be implemented as part of the memory control logic. Those skilled in the art also know that, in addition to implementing the controller in a purely computer-readable program code manner, it is entirely possible to program the method steps to make the controller use logic gates, switches, application specific integrated circuits, programmable logic controllers, and embedded logic. The same function can be realized in the form of a microcontroller or the like. Therefore, such a controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component.
在本申请实施例的描述中,为了描述的方便,描述装置时以功能分为各种模块/单元分别描述,各个模块/单元的划分仅仅是一种逻辑功能的划分,在实施本申请实施例时可以把各模块/单元的功能在同一个或多个软件和/或硬件中实现。In the description of the embodiments of this application, for the convenience of description, when describing the device, the functions are divided into various modules/units. The division of each module/unit is only a division of logical functions. At this time, the functions of each module/unit can be implemented in the same or multiple software and/or hardware.
具体的,本申请实施例所提出的装置在实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块以软件通过处理元件调用的形式实现,部分模块通过硬件的形式实现。例如,检测模块可以为单独设立的处理元件,也可以集成在电子设备的某一个芯片中实现。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。Specifically, the devices proposed in the embodiments of the present application may be fully or partially integrated into one physical entity during actual implementation, or may be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be implemented in the form of hardware; part of the modules can be implemented in the form of software called by the processing elements, and some of the modules can be implemented in the form of hardware. For example, the detection module may be a separately established processing element, or it may be integrated in a certain chip of the electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together or implemented independently. In the implementation process, each step of the above method or each of the above modules can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit,ASIC),或,一个或多个数字信号处理器(Digital Singnal Processor,DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,FPGA)等。再如,这些模块可以集成在一起,以片上装置(System-On-a-Chip,SOC)的形式实现。For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more application specific integrated circuits (ASICs), or one or more digital signal processors ( Digital Singnal Processor, DSP, or, one or more Field Programmable Gate Array (FPGA), etc. For another example, these modules can be integrated together and implemented in the form of a System-On-a-Chip (SOC).
本申请一实施例还提出了一种电子设备,电子设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发电子设备执行如本申请实施例所述的方法步骤。An embodiment of the present application also proposes an electronic device. The electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions. When the computer program instructions are executed by the processor, the electronic device is triggered. The device executes the method steps described in the embodiments of the present application.
进一步的,本申请一实施例所示的电子设备可以是耳机的辅助设备也可以是内置于耳 机的电路设备。该设备可以用于执行本申请实施例提供的方法中的功能/步骤。Further, the electronic device shown in an embodiment of the present application may be an auxiliary device of the earphone or a circuit device built in the earphone. The device can be used to execute the functions/steps in the methods provided in the embodiments of the present application.
本申请一实施例还提出了一种耳机,耳机包括麦克风、喇叭、音频信号输入接口、用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发电子设备执行如本申请实施例所述的方法步骤。An embodiment of the present application also proposes a headset. The headset includes a microphone, a speaker, an audio signal input interface, a memory for storing computer program instructions, and a processor for executing program instructions. When the processor executes, the electronic device is triggered to execute the method steps described in the embodiments of the present application.
具体的,在本申请一实施例中,上述一个或多个计算机程序被存储在上述存储器中,上述一个或多个计算机程序包括指令,当上述指令被上述设备/耳机执行时,使得上述设备/耳机执行本申请实施例所述的方法步骤。Specifically, in an embodiment of the present application, the foregoing one or more computer programs are stored in the foregoing memory, and the foregoing one or more computer programs include instructions. When the foregoing instructions are executed by the foregoing device/headset, the foregoing device/headset The headset executes the method steps described in the embodiments of the present application.
具体的,在本申请一实施例中,电子设备/耳机的处理器可以是片上装置SOC,该处理器中可以包括中央处理器(Central Processing Unit,CPU),还可以进一步包括其他类型的处理器。具体的,在本申请一实施例中,电子设备的处理器可以是PWM控制芯片。Specifically, in an embodiment of the present application, the processor of the electronic device/headphone may be an on-chip device SOC, and the processor may include a central processing unit (CPU), and may further include other types of processors . Specifically, in an embodiment of the present application, the processor of the electronic device may be a PWM control chip.
具体的,在本申请一实施例中,涉及的处理器可以例如包括CPU、DSP、微控制器或数字信号处理器,还可包括GPU、嵌入式神经网络处理器(Neural-network Process Units,NPU)和图像信号处理器(Image Signal Processing,ISP),该处理器还可包括必要的硬件加速器或逻辑处理硬件电路,如ASIC,或一个或多个用于控制本申请技术方案程序执行的集成电路等。此外,处理器可以具有操作一个或多个软件程序的功能,软件程序可以存储在存储介质中。Specifically, in an embodiment of the present application, the processor involved may include, for example, a CPU, a DSP, a microcontroller, or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units, NPU). ) And image signal processing (Image Signal Processing, ISP), the processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits used to control the execution of the program of the technical solution of this application Wait. In addition, the processor may have a function of operating one or more software programs, and the software programs may be stored in a storage medium.
具体的,在本申请一实施例中,电子设备/耳机的存储器可以是只读存储器(read-only memory,ROM)、可存储静态信息和指令的其它类型的静态存储设备、随机存取存储器(random access memory,RAM)或可存储信息和指令的其它类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其它磁存储设备,或者还可以是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何计算机可读介质。Specifically, in an embodiment of the present application, the memory of the electronic device/headphone may be a read-only memory (read-only memory, ROM), other types of static storage devices that can store static information and instructions, and random access memory ( Random access memory, RAM) or other types of dynamic storage devices that can store information and instructions, and can also be electrically erasable programmable read-only memory (EEPROM), compact disc read -only memory, CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used for Any computer-readable medium that carries or stores desired program codes in the form of instructions or data structures and can be accessed by a computer.
具体的,在本申请一实施例中,处理器可以和存储器可以合成一个处理装置,更常见的是彼此独立的部件,处理器用于执行存储器中存储的程序代码来实现本申请实施例所述方法。具体实现时,该存储器也可以集成在处理器中,或者,独立于处理器。Specifically, in an embodiment of the present application, the processor and the memory may be combined into a processing device, and more commonly, components are independent of each other. The processor is used to execute the program code stored in the memory to implement the method described in the embodiment of the present application. . During specific implementation, the memory may also be integrated in the processor, or independent of the processor.
进一步的,本申请实施例阐明的设备、装置、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。Further, the equipment, device, device, module, or unit illustrated in the embodiments of the present application may be specifically implemented by a computer chip or entity, or implemented by a product with a certain function.
本领域内的技术人员应明白,本申请实施例可提供为方法、装置、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, the present invention may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program codes.
在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。In the several embodiments provided in this application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solution of the present application essentially or the part that contributes to the existing technology or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
具体的,本申请一实施例中还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例提供的方法。Specifically, an embodiment of the present application also provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it runs on a computer, the computer executes the method provided in the embodiment of the present application.
本申请一实施例还提供一种计算机程序产品,该计算机程序产品包括计算机程序,当其在计算机上运行时,使得计算机执行本申请实施例提供的方法。An embodiment of the present application also provides a computer program product. The computer program product includes a computer program that, when running on a computer, causes the computer to execute the method provided in the embodiment of the present application.
本申请中的实施例描述是参照根据本申请实施例的方法、设备(装置)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The description of the embodiments in the present application is described with reference to the flowcharts and/or block diagrams of the methods, equipment (devices), and computer program products according to the embodiments of the present application. It should be understood that each process and/or block in the flowchart and/or block diagram, and the combination of processes and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing equipment to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing equipment are generated It is a device that realizes the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device. The device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment. The instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
还需要说明的是,本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。It should also be noted that in the embodiments of the present application, "at least one" refers to one or more, and "multiple" refers to two or more. "And/or" describes the association relationship of the associated objects, indicating that there can be three types of relationships, for example, A and/or B, which can mean the situation where A exists alone, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural. The character "/" generally indicates that the associated objects before and after are in an "or" relationship. "The following at least one item" and similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c can mean: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single, or There can be more than one.
本申请实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、商品或者设备中还存在另外的相同要素。In the embodiments of the present application, the terms "include", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, product, or equipment including a series of elements includes not only those elements, but also Other elements that are not explicitly listed, or also include elements inherent to such processes, methods, commodities, or equipment. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, commodity, or equipment that includes the element.
本申请可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本申请,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。This application may be described in the general context of computer-executable instructions executed by a computer, such as a program module. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments. In these distributed computing environments, tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实 施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in this application are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
本领域普通技术人员可以意识到,本申请实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may realize that the units and algorithm steps described in the embodiments of the present application can be implemented by a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的装置、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the device, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
以上所述,仅为本申请的具体实施方式,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。本申请的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of this application. Any person skilled in the art can easily conceive of changes or substitutions within the technical scope disclosed in this application, and they should all be covered by the protection scope of this application. The protection scope of this application shall be subject to the protection scope of the claims.

Claims (10)

  1. 一种实现主动噪声消除的方法,其特征在于,包括:A method for realizing active noise cancellation, which is characterized in that it includes:
    获取播放内容信号;Obtain the playback content signal;
    根据所述播放内容信号确定所述播放内容信号对外部噪声信号所产生的掩蔽效应;Determining, according to the playback content signal, the masking effect of the playback content signal on the external noise signal;
    根据所述播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,其中,所述主动噪声信号用于将到达人耳的外部噪声信号的频谱控制在所述播放内容信号的频谱的掩蔽效应之下。According to the masking effect of the playback content signal on the external noise signal, an active noise signal for realizing active noise cancellation is generated, wherein the active noise signal is used to control the frequency spectrum of the external noise signal reaching the human ear at the Under the masking effect of the frequency spectrum of the content signal.
  2. 根据权利要求1所述的方法,其特征在于,根据所述播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,其中:The method according to claim 1, wherein the active noise signal for realizing active noise cancellation is generated according to the masking effect of the playback content signal on the external noise signal, wherein:
    根据所述播放内容信号在第一频段上对所述外部噪声信号产生的掩蔽效应确定所述主动噪声在所述第一频段的强度。Determine the intensity of the active noise in the first frequency band according to the masking effect of the playback content signal on the external noise signal in the first frequency band.
  3. 根据权利要求1或2所述的方法,其特征在于,根据所述播放内容信号确定所述播放内容信号对外部噪声信号所产生的掩蔽效应,包括:The method according to claim 1 or 2, wherein determining, according to the playback content signal, the masking effect of the playback content signal on the external noise signal, comprising:
    获取耳内噪声信号;Obtain the noise signal in the ear;
    确定所述播放内容信号对所述耳内噪声信号所产生的掩蔽效应。Determine the masking effect of the playback content signal on the ear noise signal.
  4. 根据权利要求3所述的方法,其特征在于,根据所述播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,包括:The method according to claim 3, wherein generating an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal includes:
    根据所述播放内容信号对所述耳内噪声信号所产生的掩蔽效应确定主动噪声消除的控制策略中所述耳内噪声信号的反馈输入;Determining the feedback input of the in-ear noise signal in the control strategy of active noise cancellation according to the masking effect of the playback content signal on the in-ear noise signal;
    基于所述耳内噪声信号的反馈输入,根据所述主动噪声消除的控制策略生成所述主动噪声信号。Based on the feedback input of the ear noise signal, the active noise signal is generated according to the control strategy of the active noise cancellation.
  5. 根据权利要求4所述的方法,其特征在于,根据所述播放内容信号对所述耳内噪声信号所产生的掩蔽效应确定主动噪声消除的控制策略中所述耳内噪声信号的反馈输入,其中,根据所述播放内容信号在第一频段上对所述耳内噪声信号产生的掩蔽效应确定在所述第一频段上的所述耳内噪声信号的反馈输入的强度。The method according to claim 4, wherein the feedback input of the ear noise signal in the control strategy of active noise cancellation is determined according to the masking effect of the playback content signal on the ear noise signal, wherein And determining the strength of the feedback input of the ear noise signal on the first frequency band according to the masking effect of the play content signal on the ear noise signal on the first frequency band.
  6. 根据权利要求3~5中任一项所述的方法,其特征在于,确定所述播放内容信号对所述耳内噪声信号所产生的掩蔽效应,包括:The method according to any one of claims 3 to 5, wherein determining the masking effect of the playback content signal on the ear noise signal includes:
    根据所述耳内噪声信号计算所述耳内噪声信号的频谱;Calculating the frequency spectrum of the ear noise signal according to the ear noise signal;
    根据所述播放内容信号计算所述播放内容信号的频谱;Calculating the frequency spectrum of the playback content signal according to the playback content signal;
    根据所述耳内噪声信号的频谱以及所述播放内容信号的频谱确定各个频段上所述播放内容信号对所述耳内噪声信号所产生的掩蔽效应。According to the frequency spectrum of the ear noise signal and the frequency spectrum of the playback content signal, the masking effect of the playback content signal on the ear noise signal in each frequency band is determined.
  7. 根据权利要求6所述的方法,其特征在于,根据所述播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,包括:The method according to claim 6, wherein generating an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal includes:
    根据所述播放内容信号的频谱对所述耳内噪声信号的频谱所产生的掩蔽效应确定所述耳内噪声信号不同频段对应的频段权重,其中,所述遮蔽效应越强,对应的频段权重越小;Determine the frequency band weights corresponding to different frequency bands of the ear noise signal according to the masking effect produced by the frequency spectrum of the playback content signal on the frequency spectrum of the ear noise signal. The stronger the masking effect, the higher the corresponding frequency band weight. small;
    根据所述耳内噪声信号不同频段对应的频段权重,对所述耳内噪声信号进行滤波,获取耳内噪声滤波结果信号,其中,所述频段权重越小,所述耳内噪声滤波结果信号中对应频段的信号强度越小;According to the frequency band weights corresponding to different frequency bands of the in-ear noise signal, the in-ear noise signal is filtered to obtain the in-ear noise filtering result signal, wherein the smaller the frequency band weight is, the in-ear noise filtering result signal is The lower the signal strength of the corresponding frequency band;
    将所述耳内噪声滤波结果信号作为所述主动噪声消除的控制策略中所述耳内噪声信号的反馈输入。The in-ear noise filtering result signal is used as the feedback input of the in-ear noise signal in the control strategy of active noise cancellation.
  8. 一种实现主动噪声消除的装置,其特征在于,包括:A device for realizing active noise cancellation, characterized in that it comprises:
    第一信号获取模块,其用于获取播放内容信号;The first signal acquisition module, which is used to acquire the playback content signal;
    屏蔽效应分析模块,其用于确定所述播放内容信号对外部噪声信号所产生的掩蔽效应;A masking effect analysis module, which is used to determine the masking effect of the playback content signal on the external noise signal;
    主动噪声生成模块,其用于根据所述播放内容信号对外部噪声信号所产生的掩蔽效应生成用于实现主动噪声抵消的主动噪声信号,使得到达人耳的外部噪声信号的频谱被控制在所述播放内容信号的频谱的掩蔽效应之下。The active noise generation module is used to generate an active noise signal for realizing active noise cancellation according to the masking effect of the playback content signal on the external noise signal, so that the frequency spectrum of the external noise signal reaching the human ear is controlled in the Under the masking effect of the frequency spectrum of the content signal.
  9. 一种电子设备,其特征在于,所述电子设备包括用于存储计算机程序指令的存储器和用于执行程序指令的处理器,其中,当该计算机程序指令被该处理器执行时,触发所述电子设备执行如权利要求1~7中任一项所述的方法步骤。An electronic device, characterized in that the electronic device includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered The device executes the method steps according to any one of claims 1-7.
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如权利要求1-7中任一项所述的方法。A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when it runs on a computer, the computer can execute the method according to any one of claims 1-7 .
PCT/CN2021/078951 2020-03-03 2021-03-03 Method for implementing active noise cancellation, apparatus, and electronic device WO2021175267A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010140916.2A CN113365176B (en) 2020-03-03 2020-03-03 Method and device for realizing active noise elimination and electronic equipment
CN202010140916.2 2020-03-03

Publications (1)

Publication Number Publication Date
WO2021175267A1 true WO2021175267A1 (en) 2021-09-10

Family

ID=77523243

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/078951 WO2021175267A1 (en) 2020-03-03 2021-03-03 Method for implementing active noise cancellation, apparatus, and electronic device

Country Status (2)

Country Link
CN (1) CN113365176B (en)
WO (1) WO2021175267A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130259253A1 (en) * 2012-03-29 2013-10-03 Rogerio Guedes Alves Controllers for active noise control systems
CN104616662A (en) * 2015-01-27 2015-05-13 中国科学院理化技术研究所 Active noise reduction method and device
CN106796782A (en) * 2014-10-16 2017-05-31 索尼公司 Information processor, information processing method and computer program
CN108900943A (en) * 2018-07-24 2018-11-27 四川长虹电器股份有限公司 A kind of scene adaptive active denoising method and earphone
CN109074800A (en) * 2016-03-30 2018-12-21 伯斯有限公司 The adaptive modeling of secondary path in active noise control system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999062052A2 (en) * 1998-05-27 1999-12-02 Microsoft Corporation System and method for entropy encoding quantized transform coefficients of a signal
EP1770685A1 (en) * 2005-10-03 2007-04-04 Maysound ApS A system for providing a reduction of audiable noise perception for a human user
EP1947642B1 (en) * 2007-01-16 2018-06-13 Apple Inc. Active noise control system
ATE550754T1 (en) * 2009-07-30 2012-04-15 Nxp Bv METHOD AND DEVICE FOR ACTIVE NOISE REDUCTION USING PERCEPTUAL MASKING
JP6078358B2 (en) * 2013-01-29 2017-02-08 パイオニア株式会社 Noise reduction device, broadcast reception device, and noise reduction method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130259253A1 (en) * 2012-03-29 2013-10-03 Rogerio Guedes Alves Controllers for active noise control systems
CN106796782A (en) * 2014-10-16 2017-05-31 索尼公司 Information processor, information processing method and computer program
CN104616662A (en) * 2015-01-27 2015-05-13 中国科学院理化技术研究所 Active noise reduction method and device
CN109074800A (en) * 2016-03-30 2018-12-21 伯斯有限公司 The adaptive modeling of secondary path in active noise control system
CN108900943A (en) * 2018-07-24 2018-11-27 四川长虹电器股份有限公司 A kind of scene adaptive active denoising method and earphone

Also Published As

Publication number Publication date
CN113365176B (en) 2023-04-28
CN113365176A (en) 2021-09-07

Similar Documents

Publication Publication Date Title
CN111988690A (en) Earphone wearing state detection method and device and earphone
JP6572894B2 (en) Information processing apparatus, information processing method, and program
RU2545384C2 (en) Active suppression of audio noise
JP5341983B2 (en) Method and apparatus for maintaining speech aurality in multi-channel audio with minimal impact on surround experience
JP5542122B2 (en) Dynamic sound providing system
JP2017123636A (en) Processing of audio signal
JP2012514233A (en) System and method for reconstruction of decomposed audio signals
CN111971975B (en) Active noise reduction method, system, electronic equipment and chip
CN109348322A (en) A kind of radix saposhnikoviae method for de-noising, feed-forward noise reduction system, earphone and storage medium
WO2020248164A1 (en) Active noise reduction method, device and chip, and active control system and storage medium
US11114109B2 (en) Mitigating noise in audio signals
CN112087701A (en) Speaker emulation of microphone for wind detection
CN114787911A (en) Noise elimination system and signal processing method of ear-wearing type playing device
TWI381370B (en) Active noise reduction system
US11094310B2 (en) Signal processor, noise canceling system, signal processing method, and program
WO2009081184A1 (en) Noise cancellation system and method with adjustment of high pass filter cut-off frequency
CN106851459A (en) In-Ear Headphones
WO2016059878A1 (en) Signal processing device, signal processing method, and computer program
WO2021175267A1 (en) Method for implementing active noise cancellation, apparatus, and electronic device
CN111508510A (en) Audio processing method and device, storage medium and electronic equipment
JP3322479B2 (en) Audio equipment
CN114023352B (en) Voice enhancement method and device based on energy spectrum depth modulation
US20200186923A1 (en) Methods, systems and apparatus for improved feedback control
WO2024037374A1 (en) Signal output method for low-frequency suppression and amplitude limiter
CN115250396A (en) Active noise reduction method and device for earphone and active noise reduction earphone

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21764690

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21764690

Country of ref document: EP

Kind code of ref document: A1