WO2017012350A1 - Filter state divergence judgement method and device - Google Patents

Filter state divergence judgement method and device Download PDF

Info

Publication number
WO2017012350A1
WO2017012350A1 PCT/CN2016/075804 CN2016075804W WO2017012350A1 WO 2017012350 A1 WO2017012350 A1 WO 2017012350A1 CN 2016075804 W CN2016075804 W CN 2016075804W WO 2017012350 A1 WO2017012350 A1 WO 2017012350A1
Authority
WO
WIPO (PCT)
Prior art keywords
filter coefficient
coefficient vector
main reflection
end signal
value
Prior art date
Application number
PCT/CN2016/075804
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 WO2017012350A1 publication Critical patent/WO2017012350A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03HIMPEDANCE NETWORKS, e.g. RESONANT CIRCUITS; RESONATORS
    • H03H21/00Adaptive networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/02Details
    • H04B3/20Reducing echo effects or singing; Opening or closing transmitting path; Conditioning for transmission in one direction or the other
    • H04B3/23Reducing echo effects or singing; Opening or closing transmitting path; Conditioning for transmission in one direction or the other using a replica of transmitted signal in the time domain, e.g. echo cancellers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/02Constructional features of telephone sets
    • H04M1/20Arrangements for preventing acoustic feed-back

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and apparatus for determining a state of a filter divergence.
  • the call quality is affected by the echo. If the echo cancellation is not performed during the call, especially under the hands-free condition, the normal call cannot be achieved.
  • the so-called echo refers to the situation that the voice signal from the near-end speaker is directly or indirectly collected by the microphone and transmitted back to the far end, that is, the party in the call hears its own voice from the phone used by itself.
  • echo is typically cancelled using adaptive filter techniques.
  • the adaptive filter uses the far-end signal to simulate the path generated by the echo and generates an estimated echo signal, which is then subtracted from the near-end signal and sent to the far end.
  • FIG. 1 is a schematic diagram of the working principle of the echo canceller in the background art of the present invention.
  • One straight line and two curves in the right solid line block diagram in FIG. 1 are used to simulate the sound of the far end from the speaker. And the process of propagation collected by the Mike. Among them, the curve indicates that the sound of the far end is received by the microphone through reflection.
  • the dotted line frame in Fig. 1 is a typical acoustic echo canceller. Assuming that user A and user B are talking, the near-end signal d(n) collected by the microphone can be understood as the voice of user A's own voice and user B's.
  • Echo if user A does not speak, only the echo of user B, and the far-end signal x(n) transmitted by the remote end to synchronize with the near-end signal can be understood as the voice of the user B who is talking with user A, Input two signals into the echo canceller, according to the original adaptive filter
  • the filter coefficient vector can be calculated, and the echo propagation path in the right solid line block diagram in FIG. 1 is simulated according to the filter coefficient vector, and the output signal e(n) processed by the echo canceller is calculated. Further, the output signal e(n) is transmitted back to the remote end, that is, the user B, and the entire echo cancellation process is completed to ensure the quality of the call between the users.
  • FIG. 2 is a schematic diagram of the working principle of the adaptive filter in the background art of the present invention, wherein the input signal of the adaptive filter is the near-end signal d(n) and is synchronized with the near-end signal.
  • the far-end signal x(n) is obtained by adaptive filter echo cancellation processing and the output signal is e(n), and the output signal is sent to the far end. Further, whether the filter state diverges or not determines the quality of the output signal e(n). If the filter state is diverged, it indicates that the output signal is distorted, and the echo canceller fails, which will seriously affect the communication quality.
  • the detection of the filter state is an important component of the echo cancellation system and even the communication system, and is an important criterion for judging the quality of the output signal and the quality of the communication.
  • ERLE Echo Return Loss Enhancement
  • E[d 2 (n)] represents the near-end signal energy collected by the microphone, the near-end signal includes echo and other signals;
  • E[e 2 (n)] represents the output signal energy of the echo canceller, and the output signal Includes other signals and residual echo as described previously.
  • the other signals mentioned here are the voice signals spoken by the user in the actual call, and the ambient noise at the near end. Therefore, the other signals are not affected by default during the processing.
  • the filter state When the filter state converges, ERLE is relatively stable. When the adaptive filter is disturbed and the filter state is diverged, ERLE will be significantly reduced. Specifically, the filter can be determined by setting the threshold. Whether the state of the device converges, when the ERLE is higher than the preset threshold, the filter state converges. When the ERLE is less than the preset threshold, the filter state is diverged.
  • the prior art is based on the energy of the signal to evaluate whether the filter state is divergent.
  • Calculating the ERLE needs to calculate the energy difference between the near-end signal and the output signal, but since the speech signal itself fluctuates greatly, the signal energy fluctuation caused by the signal is also relatively large.
  • the calculation of ERLE in order to smooth the volatility of the signal, additional operations are needed to smooth the signal, and in order to control the dynamic range of the ERLE, the calculation needs to be converted into a logarithmic domain. Therefore, the complexity of the whole calculation process is more complicated. high.
  • the environment of the near-end signal changes, such as noise changes, it will also affect the stability of ERLE, which may cause errors in the judgment of whether the filter state is divergent.
  • the embodiment of the invention provides a method and a device for determining the state of the filter to be diverged, which is used to solve the problem that the filter state judging method existing in the prior art has high computational complexity and may cause a judgment error.
  • an embodiment of the present invention provides a method for determining a state of a filter divergence, including:
  • each pair of sync frames including a near-end signal frame and a far-end signal synchronized with the near-end signal frame frame;
  • M is a preset value, and both N and M are positive integers, and N ⁇ M.
  • the performing the synchronous framing processing on the near-end signal and the far-end signal respectively to obtain the N-pair synchronization frame includes:
  • the near-end signals are sequenced according to the signal timing sequence to obtain N near-end signal frames;
  • the far-end signals synchronized with the near-end signals are sequentially processed according to the signal timing sequence to obtain N far-end signal frames synchronized with the near-end signal frame;
  • Any one of the obtained near-end signal frame and the far-end signal frame synchronized with the any one of the near-end signal frames constitutes a pair of synchronization frames, and a total of N pairs of synchronization frames are obtained.
  • the N pairs of synchronization frames are filtered by a filter to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames, include:
  • the calculating N times of the corresponding N pairs of synchronization frames according to the N filter coefficient vector mean values Filter coefficient status reference, including:
  • the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area
  • the element refers to all the elements contained in the preset sliding window in the filter coefficient distribution map.
  • the calculating N corresponding to N pairs of synchronization frames according to N filter coefficient vector averages Filter coefficient status reference including:
  • the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area
  • An element is an element included in the preset sliding window when a sum of squares of all elements included in a preset sliding window in the filter coefficient distribution map is a maximum value, and the pre-predetermined in the filter coefficient distribution map
  • the element on the left side of the sliding window is an element on the left side of the main reflection area
  • the element on the right side of the preset sliding window is an element on the right side of the main reflection area
  • the element in the current filter coefficient vector mean is determined according to the filter coefficient profile At least the main reflection zone element, the left element of the main reflection zone, and the right element of the main reflection zone, including:
  • the method further includes:
  • an embodiment of the present invention provides an apparatus for determining a state of a filter, including:
  • An acquisition module configured to collect a near-end signal and a far-end signal synchronized with the near-end signal
  • a framing module configured to perform synchronous framing processing on the near-end signal and the far-end signal collected by the collecting module, respectively, to obtain N pairs of synchronization frames, each pair of synchronization frames including a near-end signal frame and a a far-end signal frame synchronized with the near-end signal frame;
  • a filtering module configured to filter, by using a filter, the N pairs of synchronization frames obtained by the framing module to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames;
  • a determining module configured to calculate, according to the N filter coefficient vector average values obtained by the filtering module, N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames;
  • M is a preset value, and both N and M are positive integers, and N ⁇ M.
  • the framing module is specifically configured to:
  • the near-end signals collected by the collection module are sequentially processed according to the signal timing sequence to obtain N near-end signal frames;
  • the far-end signals that are collected by the acquiring module and synchronized with the near-end signal are subjected to frame processing in sequence according to signal timing, to obtain N synchronization with the near-end signal frame.
  • Remote signal frame
  • Any one of the obtained near-end signal frame and the far-end signal frame synchronized with the any one of the near-end signal frames constitutes a pair of synchronization frames, and a total of N pairs of synchronization frames are obtained.
  • the filtering module is specifically configured to:
  • the determining module is specifically configured to:
  • Entity of the current filter coefficient vector mean according to the filter coefficient profile
  • the determining module is further configured to:
  • the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area
  • An element is an element included in the preset sliding window when a sum of squares of all elements included in a preset sliding window in the filter coefficient distribution map is a maximum value, and the pre-predetermined in the filter coefficient distribution map
  • the element on the left side of the sliding window is an element on the left side of the main reflection area
  • the element on the right side of the preset sliding window is an element on the right side of the main reflection area
  • the determining module is further configured to:
  • the device further includes:
  • a resetting module configured to stop updating the filter coefficient vector after the determining, according to the determining module, that the filter state is diverged, and clear the current filter coefficient vector.
  • a method for judging the state of the filter is proposed, which is: collecting a near-end signal and a far-end signal synchronized with the near-end signal, and performing synchronous framing on the near-end signal and the far-end signal, respectively. Processing, obtaining N pairs of synchronization frames, filtering the N pairs of synchronization frames through a filter, and obtaining N filter coefficient vector mean values corresponding to the N pairs of synchronization frames.
  • N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames are respectively calculated, since the filter coefficient state reference quantity is insensitive to changes in signal energy, and is not affected by the near-end signal and The influence of the environment where the far-end signal is located, so the obtained result of the method is stable, and the calculation complexity of the filter coefficient state reference quantity is low, and no additional operation is needed to smooth the fluctuation of the signal.
  • at least M filter coefficient state reference quantities are greater than a preset threshold value among the N filter coefficient state reference quantities, it is determined that the filter state diverges.
  • the embodiment of the present invention uses the filter coefficient state reference quantity to determine whether the filter state is divergent, so as to achieve the purpose of controlling the echo canceler filter coefficient vector update and guaranteeing the call quality, and determining whether the filter state is diverged by the method of the present invention. It can effectively judge whether there is double talk during the call, so as to achieve the purpose of controlling the filter coefficient vector update and obtaining high quality output signal.
  • 1 is a schematic view showing the working principle of an echo canceller in the background art of the present invention
  • FIG. 2 is a schematic diagram showing the working principle of an adaptive filter in the background art of the present invention.
  • FIG. 3 is a flowchart showing an overview of determining a state of a filter divergence according to an embodiment of the present invention
  • 4A and 4B are diagrams showing a filter coefficient distribution diagram according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an apparatus for determining a state of a filter divergence according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of an apparatus for determining a state of a filter divergence according to an embodiment of the present invention.
  • the embodiment of the invention provides a method and a device for determining the state of the filter divergence, which are used to solve the problem that the filter state judging method existing in the prior art has high computational complexity and may cause a judgment error.
  • the method and the device are based on the same inventive concept. Since the principles of the method and the device for solving the problem are similar, the implementation of the device and the method can be referred to each other, and the repeated description is not repeated.
  • the call quality is affected by the echo. If the echo cancellation is not performed during the call, especially under the hands-free condition, the normal call cannot be achieved. In the prior art, it is usually used
  • the adaptive filter technique eliminates the echo, and the detection of the filter state is an important criterion for judging the echo cancellation effect. If the filter state is divergent, the echo cancellation effect is poor or even invalid, resulting in distortion of the output signal. If the filter state converges, the echo is mostly eliminated, and the call quality is good.
  • FIG. 3 is a flowchart of an overview of determining a state of divergence of a filter according to an embodiment of the present invention.
  • the specific process of determining a state of divergence of a filter in the present invention is as follows:
  • Step 300 Acquire a near-end signal and a far-end signal synchronized with the near-end signal.
  • the echo canceller combines the near-end signal collected by the microphone with the far-end signal synchronized with the near-end signal, which together serve as the acquired input signal.
  • the near-end signal includes echo and other signals, and other signals mentioned here are voice signals spoken by the user during actual conversation, and environmental noise at the near end.
  • the far-end signal is synchronized with the near-end signal, and the far-end signal is a voice signal from the near-end speaker.
  • synchronization refers to the fact that two signals maintain a certain relative relationship during the change process, and the phenomenon of consistency and unification occurs in time.
  • Step 310 Perform synchronous framing processing on the near-end signal and the far-end signal respectively to obtain N-pair synchronization frames, each pair of synchronization frames including a near-end signal frame and a far-end signal frame synchronized with the near-end signal frame.
  • the near-end signals are sequentially processed according to the signal timing sequence to obtain N near-end signal frames.
  • the far-end signals synchronized with the near-end signals are subjected to frame processing in sequence according to the signal timing, and N far-end signal frames synchronized with the near-end signal frames are obtained.
  • any one of the obtained near-end signal frames and the far-end signal frame synchronized with the any one of the near-end signal frames constitute a pair of synchronization frames, and a total of N pairs of synchronization frames are obtained.
  • the collected near-end signal is composed of 1000 sampling points
  • the preset frame length is 100 sampling points
  • the near-end signals are subjected to frame processing in sequence according to the signal timing, thereby obtaining 10 near-end signal frames
  • the collected far-end signal synchronized with the near-end signal is composed of 1000 sampling points.
  • the far-end signal synchronized with the near-end signal is subjected to frame processing according to the signal timing sequence. Get 10 far-end signal frames synchronized with the near-end signal frame.
  • any one of the obtained near-end signal frames and the far-end signal frame synchronized with the any one of the near-end signal frames constitute a pair of synchronization frames, and a total of 10 pairs of synchronization frames are obtained.
  • Step 320 Filtering the N pairs of synchronization frames by a filter to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames.
  • the filter coefficient vector mean value corresponding to the current pair of synchronization frames is obtained according to the filter coefficient vector update order T and the T-th filter coefficient vector corresponding to the current pair of synchronization frames to update the corresponding T update results.
  • an adaptive filter technique based on an affine projection algorithm is taken as an example, but is not limited to the adaptive filtering technique.
  • the following uses an affine projection algorithm to explain how to update the filter coefficient vector and how to obtain the filter coefficient vector update result.
  • the adaptive filtering technique of the affine projection algorithm it is set to collect one sample point at each time, and then construct a signal vector from multiple samples, assuming that at the nth time, according to the number of elements in the filter coefficient vector L, constructing the far-end signal input vector from the far-end signal x(n):
  • x(nl) [x(nl),...,x(nL-l+1)] T .
  • the far-end signal input matrix is constructed by the far-end signal input vector according to the preset affine projection order p:
  • X(n) [x(n),...,x(n-p+1)].
  • the resulting input matrix of the far-end signal can be expressed as:
  • the near-end signal input vector is constructed from the near-end signal d(n):
  • d(n) [d(n),...,d(n-p+1)] T .
  • a sample point is acquired at each moment, and the filter coefficient vector is updated once at each sampling point to obtain the filter coefficient vector updated at the n+1th time:
  • h(n+1) h(n)+ ⁇ X(n)[X T (n)X(n)] -1 e(n).
  • is the update step size of the filter, which is the preset value
  • [*] -1 represents the matrix inversion operation
  • [*] T represents the matrix transposition operation
  • filter coefficient vector updates are not performed for each sample point during signal processing. Instead, the acquired near-end signal and the far-end signal synchronized with the near-end signal are synchronously framed.
  • the filter coefficients of the i-th sync frame can be obtained by using, but not limited to, the following method.
  • Vector mean
  • the filter coefficient vector is updated every 4 sample points, the filter coefficient vector will be updated 40 times, and each filter coefficient vector h k (i) is obtained as the update result of the filter coefficient vector.
  • k denotes an index of the number of times the filter coefficient vector h(i) is updated.
  • Step 330 Calculate N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames according to the N filter coefficient vector mean values.
  • N filter coefficient state reference quantities corresponding to N pairs of sync frames can be obtained by the following two methods, but not limited to the following two methods.
  • the filter coefficient distribution map corresponding to the current filter coefficient vector mean value is determined according to a preset layout rule.
  • the elements in the current filter coefficient vector mean are at least divided into the main reflection area element, the left side element of the main reflection area, and the right side element of the main reflection area, as shown in FIG. 4A.
  • 4A is a diagram showing a distribution of filter coefficients in an embodiment of the present invention.
  • the number of elements in the filter coefficient vector is set by a specific adaptive filter algorithm, and the elements in the filter vector mean are sequentially extracted, and are sequentially arranged from left to right, and each two elements are in the horizontal direction.
  • the spacing of the projections is equal, the window length of the sliding window can be determined by the empirical value, and the number of elements contained in the sliding window is a fixed value, and the point A is the element with the largest absolute value in the filter coefficient vector, and the absolute value is the largest element.
  • the absolute value is represented by h, and the window height is at least twice the maximum absolute value of 2h.
  • the main reflection area element refers to an element included in the preset sliding window when the sum of the squares of all the elements included in the preset sliding window in the filter coefficient distribution map is the maximum value, and the preset sliding window in the filter coefficient distribution map
  • the element on the left is the element on the left side of the main reflection area
  • the element on the right side of the preset sliding window is the main reflection. The right side of the shot.
  • the sum of the squares of the elements on the right side of all the main reflection areas is calculated as the first energy value corresponding to the current filter coefficient vector mean.
  • the third preset algorithm is used to determine the filter coefficient state reference amount corresponding to the current filter coefficient vector mean.
  • the filter coefficient distribution map corresponding to the current filter coefficient vector mean value is determined according to a preset layout rule.
  • the elements in the current filter coefficient vector mean are at least divided into the main reflection area element, the left side element of the main reflection area, and the right side element of the main reflection area, as shown in FIG. 4A.
  • the main reflection area element refers to an element included in the preset sliding window when the sum of the squares of all the elements included in the preset sliding window in the filter coefficient distribution map is the maximum value, and the preset sliding window in the filter coefficient distribution map
  • the element on the left is the element on the left side of the main reflection area
  • the element on the right side of the preset sliding window is the element on the right side of the main reflection area.
  • the third preset algorithm is used to determine the filter coefficient state reference amount corresponding to the current filter coefficient vector mean.
  • the above two methods need to divide at least the elements in the current filter coefficient vector mean into the main reflection area element, the left side element of the main reflection area, and the main reflection area right according to the filter coefficient distribution map. Side element.
  • an element having the largest absolute value among the current filter coefficient vector mean values is determined. Construct a sliding window to determine the window height of the sliding window based on the absolute value of the element with the largest absolute value, with the preset value being the window length of the sliding window.
  • the filter coefficient distribution map corresponding to the filter coefficient vector mean value is determined, as shown in FIG. 4A, the elements in the filter coefficient vector.
  • the number is set by a specific adaptive filter algorithm, and the elements in the filter vector are sequentially taken out and arranged from left to right. The projection of each element in the horizontal direction is equal, and all the elements are connected. Get the filter coefficient distribution map.
  • the element is A point
  • the absolute value corresponding to point A is h
  • the window height is 2h.
  • the preset window is the window length of the sliding window, and the window length is smaller than the filter in the filter coefficient distribution map.
  • the length of the coefficient distribution can be arbitrarily set, but it is generally small, and can also be determined according to empirical values, such as one tenth of the length of the filter coefficient distribution, and the number of elements included in the sliding window is a fixed value.
  • FIG. 4A is a simplified description of the filter coefficient distribution diagram of the present invention.
  • the waveform drawn in FIG. 4A is relatively simple, and the number of elements included in the filter coefficient vector mean is small.
  • the filter coefficient distribution map As shown in Figure 4B.
  • Sliding the sliding window from the first element of the i-th filter coefficient vector mean to the last element on the filter coefficient profile, and determining that the sum of the squares of all the elements included in the sliding window is the maximum value, within the sliding window
  • the included element is the main reflection area element
  • the element on the left side of the sliding window is the left element of the main reflection area
  • the element on the right side of the sliding window is the right element of the main reflection area.
  • the elements contained in the sliding window are the main reflection area elements, and the elements on the left side of the sliding window are the left side elements of the main reflection area.
  • the absolute value of the main reflection area element is large, the main reflection area occupies most of the energy of the filter coefficient vector, the element on the left side of the sliding window is the left element of the main reflection area, and the absolute value of the element on the left side of the main reflection area is small.
  • the energy of the left side of the main reflection area is small, the element on the right side of the sliding window is the element on the right side of the main reflection area, the absolute value of the element on the right side of the main reflection area is larger than the absolute value of the element on the left side of the main reflection area, and the right side of the main reflection area Greater energy.
  • the sum of the squares of the elements on the right side of all the main reflection areas is calculated as the first energy value corresponding to the mean value of the i-th filter coefficient vector, as follows:
  • the first method is used to calculate the filter coefficient state reference amount corresponding to the i-th filter coefficient vector mean according to the first energy value and the smoothed value of the second energy value:
  • another method may be used to calculate a filter coefficient state reference quantity corresponding to the i-th filter coefficient vector mean value, specifically:
  • the second method is used to calculate the filter coefficient state reference amount corresponding to the i-th filter coefficient vector mean according to the first energy value and the smoothed value of the second energy value:
  • another method may be used to calculate a filter coefficient state reference quantity corresponding to the i-th filter coefficient vector mean value, specifically:
  • Step 340 Determine that the filter state diverges when at least M filter coefficient state reference quantities are greater than a preset threshold value among the N filter coefficient state reference quantities.
  • N and M are both positive integers, and N ⁇ M.
  • the update of the filter coefficient vector is stopped, and the current filter coefficient vector is cleared.
  • the method also includes comparing the filter coefficient state reference quantity and the preset threshold value in a certain time window to determine whether the filter state is divergent.
  • the ratio of the filter coefficient state reference quantity corresponding to the preset threshold value corresponding to 10 pairs of synchronization frames is taken. More results:
  • the ST(m) includes a comparison result between the filter coefficient state reference quantity corresponding to the 10 pairs of synchronization frames and the preset threshold value, and ST(i) represents the filter coefficient state reference quantity corresponding to the i-th synchronization frame and the preset. Comparison of threshold values.
  • a strategy Strategy(m) for determining the state of the filter divergence is set, that is, when there are 6 or more filter coefficient state reference quantities greater than a preset threshold value , to determine the filter state divergence, otherwise the filter state converges.
  • the filter state is determined to be diverged, and the filter coefficient vector update is determined according to the determination.
  • the embodiment of the invention provides a method for determining the state of the filter divergence, which is: collecting a near-end signal and a far-end signal synchronized with the near-end signal, and performing synchronous framing processing on the near-end signal and the far-end signal, respectively.
  • N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames are respectively calculated, since the filter coefficient state reference quantity is insensitive to changes in signal energy, and is not affected by the near-end signal and The influence of the environment where the far-end signal is located, so the obtained result of the method is stable, and the calculation complexity of the filter coefficient state reference quantity is low, and no additional operation is needed to smooth the fluctuation of the signal. Finally, when at least M filter coefficient state reference quantities are greater than a preset threshold value among the N filter coefficient state reference quantities, it is determined that the filter state diverges.
  • the embodiment of the present invention uses the filter coefficient state reference quantity to determine whether the filter state is divergent, so as to achieve the purpose of controlling the echo canceler filter coefficient vector update and guaranteeing the call quality, and determining whether the filter state is diverged by the method of the present invention. It can effectively judge whether there is double talk during the call, so as to achieve the purpose of controlling the filter coefficient vector update and obtaining high quality output signal.
  • FIG. 5 is a schematic structural diagram of an apparatus for determining a state of a filter to be diverged according to an embodiment of the present invention.
  • the acquiring module 501 is configured to collect a near-end signal and a far-end signal synchronized with the near-end signal;
  • the framing module 502 is configured to perform synchronous framing processing on the near-end signal and the far-end signal collected by the collecting module 501, respectively, to obtain an N-pair synchronization frame, where each pair of synchronization frames includes a near-end signal frame and a near-end signal.
  • the filtering module 503 is configured to filter the N pairs of synchronization frames obtained by the framing module 502 by using a filter to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames;
  • the determining module 504 is configured to calculate N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames according to the N filter coefficient vector average values obtained by the filtering module 503;
  • N and M are both positive integers, and N ⁇ M.
  • the framing module 502 is specifically configured to:
  • the near-end signals collected by the acquisition module 501 are subjected to frame processing in sequence according to the signal sequence to obtain N near-end signal frames;
  • the far-end signals collected by the acquisition module 501 and synchronized with the near-end signals are subjected to frame processing in sequence according to the signal sequence, and N far-end signal frames synchronized with the near-end signal frame are obtained;
  • Any one of the obtained near-end signal frame and the far-end signal frame synchronized with any one of the near-end signal frames constitutes a pair of synchronization frames, and a total of N pairs of synchronization frames are obtained.
  • the filtering module 503 is specifically configured to:
  • the filter coefficient vector mean values corresponding to the current pair of synchronization frames are obtained according to the filter coefficient vector update order T and the T-th filter coefficient vector corresponding to the current pair of synchronization frames.
  • the determining module 504 is specifically configured to:
  • the filter coefficient distribution map corresponding to the current filter coefficient vector mean value is determined according to a preset layout rule
  • the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area element refers to a filter coefficient
  • the main reflection area element refers to a filter coefficient
  • the element on the right side of the preset sliding window is the element on the right side of the main reflection area;
  • the determining module 504 is further configured to:
  • the filter coefficient distribution map corresponding to the current filter coefficient vector mean value is determined according to a preset layout rule
  • the elements in the current filter coefficient vector mean are at least divided into The main reflection area element, the left side element of the main reflection area, and the right side element of the main reflection area, wherein the main reflection area element refers to the sum of the squares of all the elements included in the preset sliding window in the filter coefficient distribution map.
  • the main reflection area element refers to the sum of the squares of all the elements included in the preset sliding window in the filter coefficient distribution map.
  • the determining module 504 is further configured to:
  • the device further includes:
  • the reset module 505 is configured to stop updating the filter coefficient vector after the determination module determines that the filter state is diverged, and clear the current filter coefficient vector.
  • each functional module in each embodiment of the present application may be used. Can be integrated in one processing module or individual modules There are two or more modules that can be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
  • FIG. 6 is a schematic structural diagram of a device for determining a state of a filter to be diverged according to an embodiment of the present invention, where the device includes a transceiver 601 and a processor. 602. Memory 603.
  • the transceiver 601, the processor 602, and the memory 603 are connected to each other.
  • the specific connecting medium between the above components is not limited in the embodiment of the present invention.
  • the memory 603, the processor 602, and the transceiver 601 are connected by a bus 604 in FIG. 6.
  • the bus is indicated by a thick line in FIG.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 6, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 601 is configured to collect a near-end signal and a far-end signal synchronized with the near-end signal.
  • the processor 602 is configured to perform synchronous framing processing on the near-end signal and the far-end signal collected by the transceiver 601 to obtain N pairs of synchronization frames, where each pair of synchronization frames includes a near-end signal frame and a near-end signal frame.
  • the memory 603 is used to store the program code executed by the processor 602, and may be a volatile memory, such as a random access memory (English: random-access memory, abbreviation: RAM);
  • the memory 603 may also be a non-volatile memory (English: non-volatile memory), such as read-only memory (English: read-only memory, abbreviation: ROM), flash memory (English: flash memory), hard disk (English: hard Disk drive, abbreviated as: HDD) or solid state drive (English: solid-state drive, SSD), or memory 603 can be used to carry or store desired program code in the form of an instruction or data structure and can be accessed by a computer. Any other medium, but not limited to this.
  • the memory 603 may be a combination of the above memories.
  • the processor 602 in the embodiment of the present invention may be a central processing unit (English: central processing unit, CPU for short).
  • the embodiment of the present invention uses the filter coefficient state reference quantity to determine whether the filter state is diverged, so as to achieve the purpose of controlling the echo canceler filter coefficient vector update and guaranteeing the call quality, because the filter coefficient state reference quantity pair
  • the change of signal energy is not sensitive and is not affected by the environment of the near-end signal and the far-end signal. Therefore, the obtained result of the method has good stability, and the calculation complexity of the filter coefficient state reference quantity is low, therefore, Whether the filter state is diverged by the method of the present invention can effectively determine whether there is double talk during the call, thereby achieving the purpose of controlling the filter coefficient vector update and obtaining a high quality output signal.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the present invention is directed to a method, apparatus (system), and computer program according to an embodiment of the present invention.
  • the flow chart and/or block diagram of the product is described. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Filters That Use Time-Delay Elements (AREA)

Abstract

A filter state divergence judgement method and device, which are used for solving the problems in the prior art that a filter state judgement method has a relatively high calculation complexity and has a possibility of misjudgement. The method comprises: acquiring a near-end signal and a far-end signal synchronized with the near-end signal (300), and respectively performing synchronous framing processing on the near-end signal and the far-end signal, so as to obtain N pairs of synchronous frames (310); filtering the N pairs of synchronous frames via a filter, so as to obtain a mean value of N filter coefficient vectors corresponding to the N pairs of synchronous frames (320); respectively calculating N filter coefficient state reference quantities corresponding to the N pairs of synchronous frames according to the mean value of the N filter coefficient vectors (330); and when at least M filter coefficient state reference quantities greater than a pre-set threshold value exist in the N filter coefficient state reference quantities, determining that the filter is in a divergent state (340). Therefore, whether a filter is in a divergent state can be effectively determined, and update of a filter coefficient vector can be controlled.

Description

一种判断滤波器状态发散的方法及装置Method and device for judging filter state divergence
本申请要求在2015年7月21日提交中国专利局、申请号为201510433689.1、发明名称为“一种判断滤波器状态发散的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201510433689.1, entitled "A Method and Apparatus for Determining Filter State Dispersion", filed on July 21, 2015, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本发明涉及通信领域,特别是涉及一种判断滤波器状态发散的方法及装置。The present invention relates to the field of communications, and in particular, to a method and apparatus for determining a state of a filter divergence.
背景技术Background technique
在通信系统中,通话质量会受到回声的影响,如果通话过程中,尤其是免提条件下不进行回声消除,则无法实现正常通话。所谓回声,是指近端扬声器发出的语音信号直接或间接地被麦克风采集并传回远端的情况,即通话中的一方又从自己使用的电话中听到了自己的声音。In the communication system, the call quality is affected by the echo. If the echo cancellation is not performed during the call, especially under the hands-free condition, the normal call cannot be achieved. The so-called echo refers to the situation that the voice signal from the near-end speaker is directly or indirectly collected by the microphone and transmitted back to the far end, that is, the party in the call hears its own voice from the phone used by itself.
现有技术中,通常使用自适应滤波器技术对回声进行消除。自适应滤波器利用远端信号去模拟回声产生的路径并生成估计的回声信号,然后从近端信号中减去估计的回声信号后再发送到远端。In the prior art, echo is typically cancelled using adaptive filter techniques. The adaptive filter uses the far-end signal to simulate the path generated by the echo and generates an estimated echo signal, which is then subtracted from the near-end signal and sent to the far end.
具体的,如图1所示,图1为本发明背景技术中回声消除器工作原理示意图,图1中右侧实线框图内的一条直线和两条曲线用来模拟远端的声音从扬声器发出并由麦克采集的传播过程。其中,曲线表示远端的声音经过反射被麦克接收。图1中的虚线框为典型的声学回声消除器,假设用户A和用户B正在通话,将麦克采集到的近端信号d(n),可以理解为用户A自己的说话的声音和用户B的回声,若用户A不说话则只有用户B的回声,和远端传送过来与该近端信号同步的的远端信号x(n),可以理解为与用户A进行通话的用户B说话的声音,将两个信号输入到回声消除器中,根据自适应滤波器原 理可以计算滤波器系数矢量、并根据滤波器系数矢量模拟图1中右侧实线框图内的回声传播路径、以及计算经过回声消除器处理后的输出信号e(n)。进一步地,将该输出信号e(n)传送回远端,即用户B,完成整个回声消除过程,保证用户之间的通话质量。Specifically, FIG. 1 is a schematic diagram of the working principle of the echo canceller in the background art of the present invention. One straight line and two curves in the right solid line block diagram in FIG. 1 are used to simulate the sound of the far end from the speaker. And the process of propagation collected by the Mike. Among them, the curve indicates that the sound of the far end is received by the microphone through reflection. The dotted line frame in Fig. 1 is a typical acoustic echo canceller. Assuming that user A and user B are talking, the near-end signal d(n) collected by the microphone can be understood as the voice of user A's own voice and user B's. Echo, if user A does not speak, only the echo of user B, and the far-end signal x(n) transmitted by the remote end to synchronize with the near-end signal can be understood as the voice of the user B who is talking with user A, Input two signals into the echo canceller, according to the original adaptive filter The filter coefficient vector can be calculated, and the echo propagation path in the right solid line block diagram in FIG. 1 is simulated according to the filter coefficient vector, and the output signal e(n) processed by the echo canceller is calculated. Further, the output signal e(n) is transmitted back to the remote end, that is, the user B, and the entire echo cancellation process is completed to ensure the quality of the call between the users.
由上可知,参阅图2所示,图2为本发明背景技术中自适应滤波器工作原理示意图,其中,自适应滤波器的输入信号为近端信号d(n)和与该近端信号同步的远端信号x(n),经过自适应滤波器回声消除处理后得到的输出信号为e(n),并将该输出信号发送到远端。进一步地,滤波器状态发散与否决定了输出信号e(n)的质量,如果滤波器状态发散,则表示输出信号失真,回声消除器失效,将会严重影响通信质量。As can be seen from the above, referring to FIG. 2, FIG. 2 is a schematic diagram of the working principle of the adaptive filter in the background art of the present invention, wherein the input signal of the adaptive filter is the near-end signal d(n) and is synchronized with the near-end signal. The far-end signal x(n) is obtained by adaptive filter echo cancellation processing and the output signal is e(n), and the output signal is sent to the far end. Further, whether the filter state diverges or not determines the quality of the output signal e(n). If the filter state is diverged, it indicates that the output signal is distorted, and the echo canceller fails, which will seriously affect the communication quality.
因此,通过检测滤波器状态是否发散可以判断输出信号是否失真,若滤波器状态发散,则回声消除器肯定会受到影响,甚至失效,导致输出信号失真,若滤波器状态收敛,则说明回声被大部分消除,通话质量较好。因此,针对滤波器状态的检测是回声消除系统乃至通信系统的一个重要组成部分,是判断输出信号质量以及通信质量的重要标准。Therefore, by detecting whether the filter state is divergent, it can be judged whether the output signal is distorted. If the filter state is diverged, the echo canceller will definitely be affected or even invalid, resulting in distortion of the output signal. If the filter state converges, the echo is large. Partially eliminated, the call quality is better. Therefore, the detection of the filter state is an important component of the echo cancellation system and even the communication system, and is an important criterion for judging the quality of the output signal and the quality of the communication.
现有技术中,常用的检测滤波器状态是否发散的方法为计算回声损耗增益(Echo Return Loss Enhancement,ERLE),即回声信号能量与残留回声信号能量的差值,该方法用于评估回声消除器对回声的抵消性能,具体公式如下:In the prior art, a commonly used method for detecting whether a filter state is divergent is to calculate an Echo Return Loss Enhancement (ERLE), that is, a difference between an echo signal energy and a residual echo signal energy, and the method is used for evaluating an echo canceller. For the cancellation performance of the echo, the specific formula is as follows:
ERLE(n)=10*log10E[d2(n)]/E[e2(n)]ERLE(n)=10*log 10 E[d 2 (n)]/E[e 2 (n)]
上述公式中,E[d2(n)]表示麦克采集到的近端信号能量,近端信号包括回声和其他信号;E[e2(n)]表示回声消除器的输出信号能量,输出信号包括前面所述的其他信号及残留回声。这里所说的其他信号,为实际通话中用户说话的语音信号,以及近端的环境噪声等,因此,在处理过程中默认所述其他信号不受影响。In the above formula, E[d 2 (n)] represents the near-end signal energy collected by the microphone, the near-end signal includes echo and other signals; E[e 2 (n)] represents the output signal energy of the echo canceller, and the output signal Includes other signals and residual echo as described previously. The other signals mentioned here are the voice signals spoken by the user in the actual call, and the ambient noise at the near end. Therefore, the other signals are not affected by default during the processing.
当滤波器状态收敛时,ERLE相对稳定,当自适应滤波器被干扰而使滤波器状态发散时,ERLE将明显降低,具体的,可以通过设定门限值来判断滤波 器状态是否收敛,当ERLE高于预设门限时说明滤波器状态收敛,当ERLE小于预设门限时说明滤波器状态发散。When the filter state converges, ERLE is relatively stable. When the adaptive filter is disturbed and the filter state is diverged, ERLE will be significantly reduced. Specifically, the filter can be determined by setting the threshold. Whether the state of the device converges, when the ERLE is higher than the preset threshold, the filter state converges. When the ERLE is less than the preset threshold, the filter state is diverged.
现有技术是基于信号的能量来评估滤波器状态是否发散,计算ERLE需要计算近端信号和输出信号的能量差值,但是由于语音信号本身波动较大,由此造成的信号能量波动也比较大,在计算ERLE时,为了平滑信号的波动性,需要额外运算对信号进行平滑处理,同时为了控制ERLE动态范围,还需要将运算转化为对数域的计算,因此,整个计算过程的复杂度较高。此外,如果近端信号所处环境发生变化,如噪声变化,对ERLE的稳定性也会产生影响,进而可能造成对滤波器状态是否发散的判断出现错误。The prior art is based on the energy of the signal to evaluate whether the filter state is divergent. Calculating the ERLE needs to calculate the energy difference between the near-end signal and the output signal, but since the speech signal itself fluctuates greatly, the signal energy fluctuation caused by the signal is also relatively large. In the calculation of ERLE, in order to smooth the volatility of the signal, additional operations are needed to smooth the signal, and in order to control the dynamic range of the ERLE, the calculation needs to be converted into a logarithmic domain. Therefore, the complexity of the whole calculation process is more complicated. high. In addition, if the environment of the near-end signal changes, such as noise changes, it will also affect the stability of ERLE, which may cause errors in the judgment of whether the filter state is divergent.
发明内容Summary of the invention
本发明实施例提供一种判断滤波器状态发散的方法及装置,用以解决现有技术中存在的滤波器状态判断方法计算复杂度较高、且可能出现判断错误的问题。The embodiment of the invention provides a method and a device for determining the state of the filter to be diverged, which is used to solve the problem that the filter state judging method existing in the prior art has high computational complexity and may cause a judgment error.
本发明实施例提供的具体技术方案如下:The specific technical solutions provided by the embodiments of the present invention are as follows:
第一方面,本发明实施例提供一种判断滤波器状态发散的方法,包括:In a first aspect, an embodiment of the present invention provides a method for determining a state of a filter divergence, including:
采集近端信号以及与所述近端信号同步的远端信号,并Collecting a near-end signal and a far-end signal synchronized with the near-end signal, and
分别针对所述近端信号和所述远端信号进行同步分帧处理,获得N对同步帧,每一对同步帧包括一个近端信号帧以及一个与所述近端信号帧同步的远端信号帧;Performing synchronous framing processing on the near-end signal and the far-end signal respectively to obtain N-pair sync frames, each pair of sync frames including a near-end signal frame and a far-end signal synchronized with the near-end signal frame frame;
将所述N对同步帧通过滤波器进行滤波处理,获得对应所述N对同步帧的N个滤波器系数矢量均值;And filtering the N pairs of synchronization frames by using a filter to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames;
根据所述N个滤波器系数矢量均值,分别计算对应所述N对同步帧的N个滤波器系数状态参考量;Calculating, according to the N filter coefficient vector mean values, N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames;
当所述N个滤波器系数状态参考量中存在至少M个滤波器系数状态参考量大于预设的门限值时,确定所述滤波器状态发散;Determining that the filter state is divergent when at least M filter coefficient state reference quantities are greater than a preset threshold value in the N filter coefficient state reference quantities;
其中,M为预设值,所述N和M均为正整数,且N≥M。 Where M is a preset value, and both N and M are positive integers, and N≥M.
结合第一方面,在第一方面的第一种可能的实现方式中,所述分别针对所述近端信号和所述远端信号进行同步分帧处理,获得N对同步帧,包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the performing the synchronous framing processing on the near-end signal and the far-end signal respectively to obtain the N-pair synchronization frame includes:
根据预设帧长,将所述近端信号按照信号时序先后顺序进行分帧处理,获得N个近端信号帧;According to the preset frame length, the near-end signals are sequenced according to the signal timing sequence to obtain N near-end signal frames;
同时,根据所述预设帧长,将与所述近端信号同步的远端信号按照信号时序先后顺序进行分帧处理,获得N个与所述近端信号帧同步的远端信号帧;At the same time, according to the preset frame length, the far-end signals synchronized with the near-end signals are sequentially processed according to the signal timing sequence to obtain N far-end signal frames synchronized with the near-end signal frame;
将获得的任意一个近端信号帧以及与所述任意一个近端信号帧同步的远端信号帧构成一对同步帧,共获得N对同步帧。Any one of the obtained near-end signal frame and the far-end signal frame synchronized with the any one of the near-end signal frames constitutes a pair of synchronization frames, and a total of N pairs of synchronization frames are obtained.
结合第一方面,在第一方面的第二种可能的实现方式中,所述将所述N对同步帧通过滤波器进行滤波处理,获得对应N对同步帧的N个滤波器系数矢量均值,包括:With reference to the first aspect, in a second possible implementation manner of the first aspect, the N pairs of synchronization frames are filtered by a filter to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames, include:
针对每一对同步帧,分别执行:For each pair of sync frames, execute separately:
根据预设帧长和第一预设算法确定当前一对同步帧对应的滤波器系数矢量更新次数T,以及T次滤波器系数矢量更新对应的T个更新结果,其中,T为正整数;Determining, according to the preset frame length and the first preset algorithm, a filter coefficient vector update number T corresponding to the current pair of synchronization frames, and T update results corresponding to the T-th filter coefficient vector update, where T is a positive integer;
根据所述当前一对同步帧对应的滤波器系数矢量更新次数T以及所述T次滤波器系数矢量更新对应的T个更新结果,获得对应所述当前一对同步帧的滤波器系数矢量均值。And obtaining, according to the filter coefficient vector update order T corresponding to the current pair of synchronization frames and the T update result of the T-th filter coefficient vector, obtaining a filter coefficient vector mean corresponding to the current pair of synchronization frames.
结合第一方面,或以上第一方面的任何一种可能的实现方式,在第三种可能的实现方式中,所述根据N个滤波器系数矢量均值,分别计算对应N对同步帧的N个滤波器系数状态参考量,包括:With reference to the first aspect, or any one of the possible implementation manners of the foregoing first aspect, in a third possible implementation manner, the calculating N times of the corresponding N pairs of synchronization frames according to the N filter coefficient vector mean values Filter coefficient status reference, including:
针对每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean, perform:
根据当前滤波器系数矢量均值,按照预设布图规则确定所述当前滤波器系数矢量均值对应的滤波器系数分布图,并Determining, according to a preset layout rule, a filter coefficient distribution map corresponding to the current filter coefficient vector mean according to a current filter coefficient vector mean value, and
根据所述滤波器系数分布图,将所述当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,其中,所述主反射区元素是指所述滤波器系数分布图中预设滑动窗内包含的所有元素 的平方和为最大值时所述预设滑动窗内包含的元素,且所述滤波器系数分布图中所述预设滑动窗左侧的元素为所述主反射区左侧元素,所述预设滑动窗右侧的元素为所述主反射区右侧元素;According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area The element refers to all the elements contained in the preset sliding window in the filter coefficient distribution map. The element included in the preset sliding window when the sum of the squares is the maximum value, and the element on the left side of the preset sliding window in the filter coefficient distribution map is the left element of the main reflection area, the pre- The element on the right side of the sliding window is an element on the right side of the main reflection area;
计算所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第一能量值;Calculating a sum of squares of elements on the right side of all the main reflection areas as a first energy value corresponding to the mean value of the current filter coefficient vector;
计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第二能量值,以及Calculating the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the mean value of the current filter coefficient vector, and
根据第二预设算法计算所述第二能量值的平滑值;Calculating a smoothed value of the second energy value according to a second preset algorithm;
根据所述第一能量值、以及所述第二能量值的平滑值,采用第三预设算法确定所述当前滤波器系数矢量均值对应的滤波器系数状态参考量。And determining, according to the first energy value and the smoothed value of the second energy value, a filter coefficient state reference quantity corresponding to the current filter coefficient vector mean value by using a third preset algorithm.
结合第一方面,或以上第一方面的任何一种可能的实现方式,在第四种可能的实现方式中,所述根据N个滤波器系数矢量均值,分别计算对应N对同步帧的N个滤波器系数状态参考量,包括:With reference to the first aspect, or any one of the possible implementation manners of the foregoing first aspect, in a fourth possible implementation, the calculating N corresponding to N pairs of synchronization frames according to N filter coefficient vector averages Filter coefficient status reference, including:
针对每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean, perform:
根据当前滤波器系数矢量均值,按照预设布图规则确定所述当前滤波器系数矢量均值对应的滤波器系数分布图,并Determining, according to a preset layout rule, a filter coefficient distribution map corresponding to the current filter coefficient vector mean according to a current filter coefficient vector mean value, and
根据所述滤波器系数分布图,将所述当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,其中,所述主反射区元素是指所述滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时所述预设滑动窗内包含的元素,且所述滤波器系数分布图中所述预设滑动窗左侧的元素为所述主反射区左侧元素,所述预设滑动窗右侧的元素为所述主反射区右侧元素;According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area An element is an element included in the preset sliding window when a sum of squares of all elements included in a preset sliding window in the filter coefficient distribution map is a maximum value, and the pre-predetermined in the filter coefficient distribution map The element on the left side of the sliding window is an element on the left side of the main reflection area, and the element on the right side of the preset sliding window is an element on the right side of the main reflection area;
计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第二能量值,以及Calculating the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the mean value of the current filter coefficient vector, and
根据所述第二预设算法计算所述第二能量值的平滑值;Calculating a smoothed value of the second energy value according to the second preset algorithm;
计算所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第三能量值; Calculating the sum of the squares of the elements on the left side of all the main reflection areas and the elements on the right side of all the main reflection areas as the third energy value corresponding to the mean value of the current filter coefficient vector;
根据所述第三能量值、以及所述第二能量值的平滑值,采用所述第三预设算法确定所述当前滤波器系数矢量均值对应的滤波器系数状态参考量。And determining, by the third preset algorithm, a filter coefficient state reference quantity corresponding to the current filter coefficient vector mean according to the third energy value and the smoothed value of the second energy value.
结合第一方面,或以上第一方面的任何一种可能的实现方式,在第五种可能的实现方式中,根据所述滤波器系数分布图,将所述当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,包括:With reference to the first aspect, or any one of the possible implementation manners of the foregoing first aspect, in a fifth possible implementation, the element in the current filter coefficient vector mean is determined according to the filter coefficient profile At least the main reflection zone element, the left element of the main reflection zone, and the right element of the main reflection zone, including:
根据所述滤波器系数分布图,确定所述当前滤波器系数矢量均值中绝对值最大的元素;Determining, according to the filter coefficient distribution map, an element having the largest absolute value among the current filter coefficient vector mean values;
构建一个滑动窗,根据所述绝对值最大的元素的绝对值确定所述滑动窗的窗高,以预设数值为所述滑动窗的窗长;Constructing a sliding window, determining a window height of the sliding window according to an absolute value of the element having the largest absolute value, and using a preset value as a window length of the sliding window;
将所述滑动窗在所述滤波器系数分布图上从所述当前滤波器系数矢量均值中的第一个元素滑动至最后一个元素,确定所述滑动窗内包含的所有元素的平方和为最大值时,所述滑动窗内包含的元素为所述主反射区元素,所述滑动窗左侧的元素为所述主反射区左侧元素,所述滑动窗右侧的元素为所述主反射区右侧元素。Sliding the sliding window from the first element of the current filter coefficient vector mean to the last element on the filter coefficient profile to determine that the sum of squares of all elements included in the sliding window is maximum When the value is, the element included in the sliding window is the main reflection area element, the element on the left side of the sliding window is an element on the left side of the main reflection area, and the element on the right side of the sliding window is the main reflection The right side of the area.
结合第一方面,或以上第一方面的任何一种可能的实现方式,在第六种可能的实现方式中,在确定所述滤波器状态发散之后,所述方法还包括:With reference to the first aspect, or any one of the foregoing possible implementation manners, in a sixth possible implementation, after determining that the filter state is diverged, the method further includes:
停止更新滤波器系数矢量,并将当前的滤波器系数矢量清零。Stop updating the filter coefficient vector and clear the current filter coefficient vector.
第二方面,本发明实施例提供一种判断滤波器状态发散的装置,包括:In a second aspect, an embodiment of the present invention provides an apparatus for determining a state of a filter, including:
采集模块,用于采集近端信号以及与所述近端信号同步的远端信号;An acquisition module, configured to collect a near-end signal and a far-end signal synchronized with the near-end signal;
分帧模块,用于分别针对所述采集模块采集的所述近端信号和所述远端信号进行同步分帧处理,获得N对同步帧,每一对同步帧包括一个近端信号帧以及一个与所述近端信号帧同步的远端信号帧;a framing module, configured to perform synchronous framing processing on the near-end signal and the far-end signal collected by the collecting module, respectively, to obtain N pairs of synchronization frames, each pair of synchronization frames including a near-end signal frame and a a far-end signal frame synchronized with the near-end signal frame;
滤波模块,用于将所述分帧模块获得的所述N对同步帧通过滤波器进行滤波处理,获得对应所述N对同步帧的N个滤波器系数矢量均值;a filtering module, configured to filter, by using a filter, the N pairs of synchronization frames obtained by the framing module to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames;
判断模块,用于根据所述滤波模块获得的所述N个滤波器系数矢量均值,分别计算对应所述N对同步帧的N个滤波器系数状态参考量; a determining module, configured to calculate, according to the N filter coefficient vector average values obtained by the filtering module, N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames;
以及当所述N个滤波器系数状态参考量中存在至少M个滤波器系数状态参考量大于预设的门限值时,确定所述滤波器状态发散;And determining, when the at least M filter coefficient state reference quantities are greater than a preset threshold value, in the N filter coefficient state reference quantities, determining the filter state divergence;
其中,M为预设值,所述N和M均为正整数,且N≥M。Where M is a preset value, and both N and M are positive integers, and N≥M.
结合第二方面,在第二方面的第一种可能的实现方式中,所述分帧模块具体用于:With reference to the second aspect, in a first possible implementation manner of the second aspect, the framing module is specifically configured to:
根据预设帧长,将所述采集模块采集的所述近端信号按照信号时序先后顺序进行分帧处理,获得N个近端信号帧;According to the preset frame length, the near-end signals collected by the collection module are sequentially processed according to the signal timing sequence to obtain N near-end signal frames;
同时,根据所述预设帧长,将所述采集模块采集的与所述近端信号同步的远端信号按照信号时序先后顺序进行分帧处理,获得N个与所述近端信号帧同步的远端信号帧;Simultaneously, according to the preset frame length, the far-end signals that are collected by the acquiring module and synchronized with the near-end signal are subjected to frame processing in sequence according to signal timing, to obtain N synchronization with the near-end signal frame. Remote signal frame;
将获得的任意一个近端信号帧以及与所述任意一个近端信号帧同步的远端信号帧构成一对同步帧,共获得N对同步帧。Any one of the obtained near-end signal frame and the far-end signal frame synchronized with the any one of the near-end signal frames constitutes a pair of synchronization frames, and a total of N pairs of synchronization frames are obtained.
结合第二方面,在第二方面的第二种可能的实现方式中,所述滤波模块具体用于:With reference to the second aspect, in a second possible implementation manner of the second aspect, the filtering module is specifically configured to:
针对所述分帧模块获得的每一对同步帧,分别执行:For each pair of synchronization frames obtained by the framing module, respectively:
根据预设帧长和第一预设算法确定当前一对同步帧对应的滤波器系数矢量更新次数T,以及T次滤波器系数矢量更新对应的T个更新结果,其中,T为正整数;Determining, according to the preset frame length and the first preset algorithm, a filter coefficient vector update number T corresponding to the current pair of synchronization frames, and T update results corresponding to the T-th filter coefficient vector update, where T is a positive integer;
根据所述当前一对同步帧对应的滤波器系数矢量更新次数T以及所述T次滤波器系数矢量更新对应的T个更新结果,获得对应所述当前一对同步帧的滤波器系数矢量均值。And obtaining, according to the filter coefficient vector update order T corresponding to the current pair of synchronization frames and the T update result of the T-th filter coefficient vector, obtaining a filter coefficient vector mean corresponding to the current pair of synchronization frames.
结合第二方面,或以上第二方面的任何一种可能的实现方式,在第三种可能的实现方式中,所述判断模块具体用于:With reference to the second aspect, or any one of the possible implementation manners of the foregoing second aspect, in a third possible implementation manner, the determining module is specifically configured to:
针对所述滤波模块获得的每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean obtained by the filtering module, respectively:
根据当前滤波器系数矢量均值,按照预设布图规则确定所述当前滤波器系数矢量均值对应的滤波器系数分布图,并Determining, according to a preset layout rule, a filter coefficient distribution map corresponding to the current filter coefficient vector mean according to a current filter coefficient vector mean value, and
根据所述滤波器系数分布图,将所述当前滤波器系数矢量均值中的元素 至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,其中,所述主反射区元素是指所述滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时所述预设滑动窗内包含的元素,且所述滤波器系数分布图中所述预设滑动窗左侧的元素为所述主反射区左侧元素,所述预设滑动窗右侧的元素为所述主反射区右侧元素;Entity of the current filter coefficient vector mean according to the filter coefficient profile At least the main reflection area element, the left side element of the main reflection area, and the right side element of the main reflection area, wherein the main reflection area element refers to all elements included in the preset sliding window in the filter coefficient distribution map. An element included in the preset sliding window when the sum of squares is a maximum value, and an element on the left side of the preset sliding window in the filter coefficient distribution map is an element on a left side of the main reflection area, the preset The element on the right side of the sliding window is the element on the right side of the main reflection area;
计算所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第一能量值;Calculating a sum of squares of elements on the right side of all the main reflection areas as a first energy value corresponding to the mean value of the current filter coefficient vector;
计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第二能量值,以及Calculating the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the mean value of the current filter coefficient vector, and
根据第二预设算法计算所述第二能量值的平滑值;Calculating a smoothed value of the second energy value according to a second preset algorithm;
根据所述第一能量值、以及所述第二能量值的平滑值,采用第三预设算法确定所述当前滤波器系数矢量均值对应的滤波器系数状态参考量。And determining, according to the first energy value and the smoothed value of the second energy value, a filter coefficient state reference quantity corresponding to the current filter coefficient vector mean value by using a third preset algorithm.
结合第二方面,或以上第二方面的任何一种可能的实现方式,在第四种可能的实现方式中,所述判断模块还用于:With reference to the second aspect, or any one of the possible implementation manners of the foregoing second aspect, in a fourth possible implementation, the determining module is further configured to:
针对所述滤波模块获得的每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean obtained by the filtering module, respectively:
根据当前滤波器系数矢量均值,按照预设布图规则确定所述当前滤波器系数矢量均值对应的滤波器系数分布图,并Determining, according to a preset layout rule, a filter coefficient distribution map corresponding to the current filter coefficient vector mean according to a current filter coefficient vector mean value, and
根据所述滤波器系数分布图,将所述当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,其中,所述主反射区元素是指所述滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时所述预设滑动窗内包含的元素,且所述滤波器系数分布图中所述预设滑动窗左侧的元素为所述主反射区左侧元素,所述预设滑动窗右侧的元素为所述主反射区右侧元素;According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area An element is an element included in the preset sliding window when a sum of squares of all elements included in a preset sliding window in the filter coefficient distribution map is a maximum value, and the pre-predetermined in the filter coefficient distribution map The element on the left side of the sliding window is an element on the left side of the main reflection area, and the element on the right side of the preset sliding window is an element on the right side of the main reflection area;
计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第二能量值,以及Calculating the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the mean value of the current filter coefficient vector, and
根据所述第二预设算法计算所述第二能量值的平滑值;Calculating a smoothed value of the second energy value according to the second preset algorithm;
计算所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所 述当前滤波器系数矢量均值对应的第三能量值;Calculate the sum of the squares of the elements on the left side of all the main reflection areas and the elements on the right side of all the main reflection areas. Determining a third energy value corresponding to a current filter coefficient vector mean;
根据所述第三能量值、以及所述第二能量值的平滑值,采用所述第三预设算法确定所述当前滤波器系数矢量均值对应的滤波器系数状态参考量。And determining, by the third preset algorithm, a filter coefficient state reference quantity corresponding to the current filter coefficient vector mean according to the third energy value and the smoothed value of the second energy value.
结合第二方面,或以上第二方面的任何一种可能的实现方式,在第五种可能的实现方式中,所述判断模块进一步用于:With reference to the second aspect, or any one of the possible implementation manners of the foregoing second aspect, in a fifth possible implementation, the determining module is further configured to:
根据所述滤波器系数分布图,确定所述当前滤波器系数矢量均值中绝对值最大的元素;Determining, according to the filter coefficient distribution map, an element having the largest absolute value among the current filter coefficient vector mean values;
构建一个滑动窗,根据所述绝对值最大的元素的绝对值确定所述滑动窗的窗高,以预设数值为所述滑动窗的窗长;Constructing a sliding window, determining a window height of the sliding window according to an absolute value of the element having the largest absolute value, and using a preset value as a window length of the sliding window;
将所述滑动窗在所述滤波器系数分布图上从所述当前滤波器系数矢量均值中的第一个元素滑动至最后一个元素,确定所述滑动窗内包含的所有元素的平方和为最大值时,所述滑动窗内包含的元素为所述主反射区元素,所述滑动窗左侧的元素为所述主反射区左侧元素,所述滑动窗右侧的元素为所述主反射区右侧元素。Sliding the sliding window from the first element of the current filter coefficient vector mean to the last element on the filter coefficient profile to determine that the sum of squares of all elements included in the sliding window is maximum When the value is, the element included in the sliding window is the main reflection area element, the element on the left side of the sliding window is an element on the left side of the main reflection area, and the element on the right side of the sliding window is the main reflection The right side of the area.
结合第二方面,或以上第二方面的任何一种可能的实现方式,在第六种可能的实现方式中,所述装置还包括:With reference to the second aspect, or any one of the possible implementation manners of the foregoing second aspect, in a sixth possible implementation, the device further includes:
重置模块,用于在根据所述判断模块确定所述滤波器状态发散之后,停止更新滤波器系数矢量,并将当前的滤波器系数矢量清零。And a resetting module, configured to stop updating the filter coefficient vector after the determining, according to the determining module, that the filter state is diverged, and clear the current filter coefficient vector.
本发明有益效果如下:The beneficial effects of the present invention are as follows:
本发明实施例中,提出一种判断滤波器状态发散的方法,该方法为:采集近端信号以及与近端信号同步的远端信号,并分别针对近端信号和远端信号进行同步分帧处理,获得N对同步帧,将N对同步帧通过滤波器进行滤波处理,获得对应N对同步帧的N个滤波器系数矢量均值。进一步地,根据N个滤波器系数矢量均值,分别计算对应N对同步帧的N个滤波器系数状态参考量,由于滤波器系数状态参考量对信号能量的变化不敏感,不受近端信号和远端信号所处环境的影响,因此该方法的得到的结果稳定性较好,同时滤波器系数状态参考量的计算复杂度较低,无需额外运算去平滑信号的波动性。最后, 当N个滤波器系数状态参考量中存在至少M个滤波器系数状态参考量大于预设的门限值时,确定滤波器状态发散。因此,本发明实施例利用滤波器系数状态参考量来判断滤波器状态是否发散,以达到控制回声消除器滤波器系数矢量更新、保证通话质量的目的,通过本发明的方法判断滤波器状态是否发散能够有效地判断通话过程中是否有双讲,从而达到控制滤波器系数矢量更新,获得高质量输出信号的目的。In the embodiment of the present invention, a method for judging the state of the filter is proposed, which is: collecting a near-end signal and a far-end signal synchronized with the near-end signal, and performing synchronous framing on the near-end signal and the far-end signal, respectively. Processing, obtaining N pairs of synchronization frames, filtering the N pairs of synchronization frames through a filter, and obtaining N filter coefficient vector mean values corresponding to the N pairs of synchronization frames. Further, according to the N filter coefficient vector mean values, N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames are respectively calculated, since the filter coefficient state reference quantity is insensitive to changes in signal energy, and is not affected by the near-end signal and The influence of the environment where the far-end signal is located, so the obtained result of the method is stable, and the calculation complexity of the filter coefficient state reference quantity is low, and no additional operation is needed to smooth the fluctuation of the signal. At last, When at least M filter coefficient state reference quantities are greater than a preset threshold value among the N filter coefficient state reference quantities, it is determined that the filter state diverges. Therefore, the embodiment of the present invention uses the filter coefficient state reference quantity to determine whether the filter state is divergent, so as to achieve the purpose of controlling the echo canceler filter coefficient vector update and guaranteeing the call quality, and determining whether the filter state is diverged by the method of the present invention. It can effectively judge whether there is double talk during the call, so as to achieve the purpose of controlling the filter coefficient vector update and obtaining high quality output signal.
附图说明DRAWINGS
图1为本发明背景技术中回声消除器工作原理示意图;1 is a schematic view showing the working principle of an echo canceller in the background art of the present invention;
图2为本发明背景技术中自适应滤波器工作原理示意图;2 is a schematic diagram showing the working principle of an adaptive filter in the background art of the present invention;
图3为本发明实施例中判断滤波器状态发散的概述流程图;3 is a flowchart showing an overview of determining a state of a filter divergence according to an embodiment of the present invention;
图4A和图4B为本发明实施例中滤波器系数分布图;4A and 4B are diagrams showing a filter coefficient distribution diagram according to an embodiment of the present invention;
图5为本发明实施例中判断滤波器状态发散的装置结构示意图;FIG. 5 is a schematic structural diagram of an apparatus for determining a state of a filter divergence according to an embodiment of the present invention; FIG.
图6为本发明实施例中判断滤波器状态发散的设备结构示意图。FIG. 6 is a schematic structural diagram of an apparatus for determining a state of a filter divergence according to an embodiment of the present invention.
具体实施方式detailed description
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。The present invention will be further described in detail with reference to the accompanying drawings, in which FIG. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明实施例提供了一种判断滤波器状态发散的方法及装置,用以解决现有技术中存在的滤波器状态判断方法计算复杂度较高、且可能出现判断错误的问题。其中,方法和装置是基于同一发明构思的,由于方法及装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。The embodiment of the invention provides a method and a device for determining the state of the filter divergence, which are used to solve the problem that the filter state judging method existing in the prior art has high computational complexity and may cause a judgment error. The method and the device are based on the same inventive concept. Since the principles of the method and the device for solving the problem are similar, the implementation of the device and the method can be referred to each other, and the repeated description is not repeated.
在通信系统中,通话质量会受到回声的影响,如果通话过程中,尤其是免提条件下不进行回声消除,则无法实现正常通话。现有技术中,通常使用 自适应滤波器技术对回声进行消除,而针对滤波器状态的检测是判断回声消除效果的重要标准。若滤波器状态发散,则回声消除效果较差,甚至失效,导致输出信号失真,若滤波器状态收敛,则说明回声被大部分消除,通话质量较好。In the communication system, the call quality is affected by the echo. If the echo cancellation is not performed during the call, especially under the hands-free condition, the normal call cannot be achieved. In the prior art, it is usually used The adaptive filter technique eliminates the echo, and the detection of the filter state is an important criterion for judging the echo cancellation effect. If the filter state is divergent, the echo cancellation effect is poor or even invalid, resulting in distortion of the output signal. If the filter state converges, the echo is mostly eliminated, and the call quality is good.
下面结合附图对本发明优选的实施方式进行详细说明。Preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
参阅图3所示,图3为本发明实施例中判断滤波器状态发散的概述流程图,本发明中判断滤波器状态发散的方法的具体过程为:Referring to FIG. 3, FIG. 3 is a flowchart of an overview of determining a state of divergence of a filter according to an embodiment of the present invention. The specific process of determining a state of divergence of a filter in the present invention is as follows:
步骤300:采集近端信号以及与近端信号同步的远端信号。Step 300: Acquire a near-end signal and a far-end signal synchronized with the near-end signal.
回声消除器将麦克采集到的近端信号,以及与近端信号同步的远端信号,两者共同作为采集到的输入信号。其中,近端信号包括回声和其他信号,这里所说的其他信号,为实际通话中用户说话的语音信号,以及近端的环境噪声等。远端信号与近端信号同步,远端信号为近端扬声器发出的语音信号。具体的,同步是指两个信号在变化过程中保持一定的相对关系,在时间上出现一致性与统一化的现象。The echo canceller combines the near-end signal collected by the microphone with the far-end signal synchronized with the near-end signal, which together serve as the acquired input signal. Among them, the near-end signal includes echo and other signals, and other signals mentioned here are voice signals spoken by the user during actual conversation, and environmental noise at the near end. The far-end signal is synchronized with the near-end signal, and the far-end signal is a voice signal from the near-end speaker. Specifically, synchronization refers to the fact that two signals maintain a certain relative relationship during the change process, and the phenomenon of consistency and unification occurs in time.
步骤310:分别针对近端信号和远端信号进行同步分帧处理,获得N对同步帧,每一对同步帧包括一个近端信号帧以及一个与近端信号帧同步的远端信号帧。Step 310: Perform synchronous framing processing on the near-end signal and the far-end signal respectively to obtain N-pair synchronization frames, each pair of synchronization frames including a near-end signal frame and a far-end signal frame synchronized with the near-end signal frame.
具体的,根据预设帧长,将近端信号按照信号时序先后顺序进行分帧处理,获得N个近端信号帧。同时,根据相同的预设帧长,将与近端信号同步的远端信号按照信号时序先后顺序进行分帧处理,获得N个与近端信号帧同步的远端信号帧。进一步地,将获得的任意一个近端信号帧以及与该任意一个近端信号帧同步的远端信号帧构成一对同步帧,共获得N对同步帧。Specifically, according to the preset frame length, the near-end signals are sequentially processed according to the signal timing sequence to obtain N near-end signal frames. At the same time, according to the same preset frame length, the far-end signals synchronized with the near-end signals are subjected to frame processing in sequence according to the signal timing, and N far-end signal frames synchronized with the near-end signal frames are obtained. Further, any one of the obtained near-end signal frames and the far-end signal frame synchronized with the any one of the near-end signal frames constitute a pair of synchronization frames, and a total of N pairs of synchronization frames are obtained.
例如,采集到的近端信号由1000个采样点构成,预设帧长为100个采样点,将近端信号按照信号时序先后顺序进行分帧处理,则获得10个近端信号帧,同时,采集到的与近端信号同步的远端信号由1000个采样点构成,根据相同的预设帧长100个采样点,将与近端信号同步的远端信号按照信号时序先后顺序进行分帧处理,获得10个与近端信号帧同步的远端信号帧。进一步 地,将获得的任意一个近端信号帧以及与该任意一个近端信号帧同步的远端信号帧构成一对同步帧,共获得10对同步帧。For example, the collected near-end signal is composed of 1000 sampling points, the preset frame length is 100 sampling points, and the near-end signals are subjected to frame processing in sequence according to the signal timing, thereby obtaining 10 near-end signal frames, and at the same time, The collected far-end signal synchronized with the near-end signal is composed of 1000 sampling points. According to the same preset frame length of 100 sampling points, the far-end signal synchronized with the near-end signal is subjected to frame processing according to the signal timing sequence. Get 10 far-end signal frames synchronized with the near-end signal frame. Further Alternatively, any one of the obtained near-end signal frames and the far-end signal frame synchronized with the any one of the near-end signal frames constitute a pair of synchronization frames, and a total of 10 pairs of synchronization frames are obtained.
步骤320:将N对同步帧通过滤波器进行滤波处理,获得对应N对同步帧的N个滤波器系数矢量均值。Step 320: Filtering the N pairs of synchronization frames by a filter to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames.
具体的,针对每一对同步帧,分别执行:Specifically, for each pair of synchronization frames, respectively:
根据预设帧长和第一预设算法确定当前一对同步帧对应的滤波器系数矢量更新次数T,以及T次滤波器系数矢量更新对应的T个更新结果,其中,T为正整数;Determining, according to the preset frame length and the first preset algorithm, a filter coefficient vector update number T corresponding to the current pair of synchronization frames, and T update results corresponding to the T-th filter coefficient vector update, where T is a positive integer;
进一步地,根据当前一对同步帧对应的滤波器系数矢量更新次数T以及T次滤波器系数矢量更新对应的T个更新结果,获得对应当前一对同步帧的滤波器系数矢量均值。Further, the filter coefficient vector mean value corresponding to the current pair of synchronization frames is obtained according to the filter coefficient vector update order T and the T-th filter coefficient vector corresponding to the current pair of synchronization frames to update the corresponding T update results.
此处以基于仿射投影算法的自适应滤波器技术为例,但不限于该项自适应滤波技术。Here, an adaptive filter technique based on an affine projection algorithm is taken as an example, but is not limited to the adaptive filtering technique.
下面采用仿射投影算法说明如何进行滤波器系数矢量更新,及如何获得滤波器系数矢量更新结果。The following uses an affine projection algorithm to explain how to update the filter coefficient vector and how to obtain the filter coefficient vector update result.
首先,根据仿射投影算法的自适应滤波技术,设每个时刻采集一个样点,再由多个样点构建信号矢量,假设在第n个时刻时,根据滤波器系数矢量中的元素个数L,由远端信号x(n)构建远端信号输入矢量:Firstly, according to the adaptive filtering technique of the affine projection algorithm, it is set to collect one sample point at each time, and then construct a signal vector from multiple samples, assuming that at the nth time, according to the number of elements in the filter coefficient vector L, constructing the far-end signal input vector from the far-end signal x(n):
x(n-l)=[x(n-l),…,x(n-L-l+1)]Tx(nl)=[x(nl),...,x(nL-l+1)] T .
进一步地,根据预设的仿射投影阶数p,由远端信号输入矢量构建远端信号输入矩阵:Further, the far-end signal input matrix is constructed by the far-end signal input vector according to the preset affine projection order p:
X(n)=[x(n),…,x(n-p+1)]。 X(n)=[x(n),...,x(n-p+1)].
得到的远端信号的输入矩阵可以表示为:The resulting input matrix of the far-end signal can be expressed as:
Figure PCTCN2016075804-appb-000001
Figure PCTCN2016075804-appb-000001
须知在大部分情况下,p远小于L。It should be noted that in most cases, p is much smaller than L.
然后,根据预设的仿射投影阶数p,由近端信号d(n)构建近端信号输入矢量:Then, according to the preset affine projection order p, the near-end signal input vector is constructed from the near-end signal d(n):
d(n)=[d(n),…,d(n-p+1)]Td(n)=[d(n),...,d(n-p+1)] T .
滤波器系数矢量为h(n)=[hn(0),…,hn(L-1)]TThe filter coefficient vector is h(n)=[h n (0),...,h n (L-1)] T ,
输出信号对应的输出矢量记作e(n)=[e(n),…,e(n-p+1)]TThe output vector corresponding to the output signal is denoted as e(n)=[e(n),...,e(n-p+1)] T ,
其中,e(n)=d(n)-XT(n)h(n)。Where e(n)=d(n)-X T (n)h(n).
每个时刻采集到一个样点,对滤波器系数矢量在每个采样点更新一次,得到第n+1时刻更新后的滤波器系数矢量:A sample point is acquired at each moment, and the filter coefficient vector is updated once at each sampling point to obtain the filter coefficient vector updated at the n+1th time:
h(n+1)=h(n)+μX(n)[XT(n)X(n)]-1e(n)。h(n+1)=h(n)+μX(n)[X T (n)X(n)] -1 e(n).
其中,μ为滤波器的更新步长,为预设数值,[*]-1表示矩阵求逆运算,[*]T表示矩阵转置运算。Where μ is the update step size of the filter, which is the preset value, [*] -1 represents the matrix inversion operation, and [*] T represents the matrix transposition operation.
一般地,在信号处理过程中,不会对每个采样点进行滤波器系数矢量更新。而是对采集到的近端信号以及与该近端信号同步的远端信号进行同步分帧处理。In general, filter coefficient vector updates are not performed for each sample point during signal processing. Instead, the acquired near-end signal and the far-end signal synchronized with the near-end signal are synchronously framed.
上述过程清楚说明了如何进行滤波器系数矢量更新,及如何获得滤波器系数矢量更新结果,进一步地,针对第i对同步帧,可以采用但不限于以下方法得到第i对同步帧的滤波器系数矢量均值:The above process clearly shows how to perform filter coefficient vector update and how to obtain the filter coefficient vector update result. Further, for the i-th sync frame, the filter coefficients of the i-th sync frame can be obtained by using, but not limited to, the following method. Vector mean:
以预设帧长为160个采样点为例,分别针对近端信号和远端信号进行同步分帧处理,获得N对同步帧,假设仿射投影算法的阶数p=4,因此,针对第i 对同步帧,滤波器系数矢量每4个采样点更新一次,滤波器系数矢量将会更新40次,每更新一次得到一个滤波器系数矢量hk(i)做为滤波器系数矢量的更新结果,其中,i为帧号,那么,对于第i对同步帧,滤波器系数矢量将会更新40次,得到40个不同的hk(i),即k=0,1,2,…,39,记滤波器系数矢量更新次数为K,得到第i对同步帧的滤波器系数矢量均值:Taking the preset frame length of 160 sample points as an example, synchronous frame processing is performed on the near-end signal and the far-end signal respectively, and N-pair sync frames are obtained, and the order of the affine projection algorithm is assumed to be p=4, therefore, i For the synchronization frame, the filter coefficient vector is updated every 4 sample points, the filter coefficient vector will be updated 40 times, and each filter coefficient vector h k (i) is obtained as the update result of the filter coefficient vector. Where i is the frame number, then, for the ith pair of sync frames, the filter coefficient vector will be updated 40 times, resulting in 40 different h k (i), ie k=0,1,2,...,39 , the filter coefficient vector update number is K, and the filter coefficient vector mean of the i-th sync frame is obtained:
Figure PCTCN2016075804-appb-000002
Figure PCTCN2016075804-appb-000002
其中k表示滤波器系数矢量h(i)更新次数的索引。Where k denotes an index of the number of times the filter coefficient vector h(i) is updated.
步骤330:根据N个滤波器系数矢量均值,分别计算对应N对同步帧的N个滤波器系数状态参考量。Step 330: Calculate N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames according to the N filter coefficient vector mean values.
这里可以通过以下两种方法但不限于以下两种方法获得对应N对同步帧的N个滤波器系数状态参考量。Here, N filter coefficient state reference quantities corresponding to N pairs of sync frames can be obtained by the following two methods, but not limited to the following two methods.
第一种方法:the first method:
针对每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean, perform:
首先,根据当前滤波器系数矢量均值,按照预设布图规则确定当前滤波器系数矢量均值对应的滤波器系数分布图。First, according to the current filter coefficient vector mean value, the filter coefficient distribution map corresponding to the current filter coefficient vector mean value is determined according to a preset layout rule.
根据滤波器系数分布图,将当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,参阅图4A所示。According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into the main reflection area element, the left side element of the main reflection area, and the right side element of the main reflection area, as shown in FIG. 4A.
图4A为本发明实施例中滤波器系数分布图。其中,滤波器系数矢量中的元素的个数通过具体的自适应滤波器算法设定,依次取出滤波器矢量均值中的元素,并从左到右依次排开,每两个元素在水平方向上的投影的间隔相等,滑动窗的窗长可以由经验值决定,且滑动窗内包含的元素个数为固定值,A点为滤波器系数矢量中绝对值最大的元素,将绝对值最大元素的绝对值用h表示,窗高至少为最大绝对值的两倍2h。4A is a diagram showing a distribution of filter coefficients in an embodiment of the present invention. Wherein, the number of elements in the filter coefficient vector is set by a specific adaptive filter algorithm, and the elements in the filter vector mean are sequentially extracted, and are sequentially arranged from left to right, and each two elements are in the horizontal direction. The spacing of the projections is equal, the window length of the sliding window can be determined by the empirical value, and the number of elements contained in the sliding window is a fixed value, and the point A is the element with the largest absolute value in the filter coefficient vector, and the absolute value is the largest element. The absolute value is represented by h, and the window height is at least twice the maximum absolute value of 2h.
其中,主反射区元素是指滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时预设滑动窗内包含的元素,且滤波器系数分布图中预设滑动窗左侧的元素为主反射区左侧元素,预设滑动窗右侧的元素为主反 射区右侧元素。The main reflection area element refers to an element included in the preset sliding window when the sum of the squares of all the elements included in the preset sliding window in the filter coefficient distribution map is the maximum value, and the preset sliding window in the filter coefficient distribution map The element on the left is the element on the left side of the main reflection area, and the element on the right side of the preset sliding window is the main reflection. The right side of the shot.
然后,计算所有主反射区右侧元素的平方和,作为当前滤波器系数矢量均值对应的第一能量值。Then, the sum of the squares of the elements on the right side of all the main reflection areas is calculated as the first energy value corresponding to the current filter coefficient vector mean.
计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为当前滤波器系数矢量均值对应的第二能量值,以及根据第二预设算法计算第二能量值的平滑值。Calculate the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the current filter coefficient vector mean, and calculate the second according to the second preset algorithm The smoothed value of the energy value.
最后,根据第一能量值、以及第二能量值的平滑值,采用第三预设算法确定当前滤波器系数矢量均值对应的滤波器系数状态参考量。Finally, according to the first energy value and the smoothed value of the second energy value, the third preset algorithm is used to determine the filter coefficient state reference amount corresponding to the current filter coefficient vector mean.
第二种方法:The second method:
针对每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean, perform:
首先,根据当前滤波器系数矢量均值,按照预设布图规则确定当前滤波器系数矢量均值对应的滤波器系数分布图。First, according to the current filter coefficient vector mean value, the filter coefficient distribution map corresponding to the current filter coefficient vector mean value is determined according to a preset layout rule.
根据滤波器系数分布图,将当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,参阅图4A所示。According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into the main reflection area element, the left side element of the main reflection area, and the right side element of the main reflection area, as shown in FIG. 4A.
其中,主反射区元素是指滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时预设滑动窗内包含的元素,且滤波器系数分布图中预设滑动窗左侧的元素为主反射区左侧元素,预设滑动窗右侧的元素为主反射区右侧元素。The main reflection area element refers to an element included in the preset sliding window when the sum of the squares of all the elements included in the preset sliding window in the filter coefficient distribution map is the maximum value, and the preset sliding window in the filter coefficient distribution map The element on the left is the element on the left side of the main reflection area, and the element on the right side of the preset sliding window is the element on the right side of the main reflection area.
然后,计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为当前滤波器系数矢量均值对应的第二能量值,以及根据第二预设算法计算第二能量值的平滑值。Then, calculating the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the current filter coefficient vector mean, and calculating according to the second preset algorithm The smoothed value of the second energy value.
计算所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为当前滤波器系数矢量均值对应的第三能量值。Calculate the sum of the squares of the elements on the left side of all the main reflection areas and the elements on the right side of all the main reflection areas as the third energy value corresponding to the current filter coefficient vector mean.
最后,根据第三能量值、以及第二能量值的平滑值,采用第三预设算法确定当前滤波器系数矢量均值对应的滤波器系数状态参考量。Finally, according to the third energy value and the smoothed value of the second energy value, the third preset algorithm is used to determine the filter coefficient state reference amount corresponding to the current filter coefficient vector mean.
其中,上述两种方法均需要根据滤波器系数分布图,将当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右 侧元素。Wherein, the above two methods need to divide at least the elements in the current filter coefficient vector mean into the main reflection area element, the left side element of the main reflection area, and the main reflection area right according to the filter coefficient distribution map. Side element.
具体的,根据滤波器系数分布图,确定当前滤波器系数矢量均值中绝对值最大的元素。构建一个滑动窗,根据绝对值最大的元素的绝对值确定滑动窗的窗高,以预设数值为滑动窗的窗长。Specifically, according to the filter coefficient distribution map, an element having the largest absolute value among the current filter coefficient vector mean values is determined. Construct a sliding window to determine the window height of the sliding window based on the absolute value of the element with the largest absolute value, with the preset value being the window length of the sliding window.
将滑动窗在滤波器系数分布图上从当前滤波器系数矢量均值中的第一个元素滑动至最后一个元素,确定滑动窗内包含的所有元素的平方和为最大值时,滑动窗内包含的元素为主反射区元素,滑动窗左侧的元素为主反射区左侧元素,滑动窗右侧的元素为主反射区右侧元素。Sliding the sliding window on the filter coefficient profile from the first element of the current filter coefficient vector mean to the last element, determining that the sum of the squares of all the elements contained in the sliding window is the maximum value, and the sliding window contains The element is the main reflection zone element, the element on the left side of the sliding window is the left element of the main reflection zone, and the element on the right side of the sliding window is the element on the right side of the main reflection zone.
下面以一个具体实施例说明上述滤波器系数状态参考量的获得过程。The process of obtaining the filter coefficient state reference amount described above will be described below in a specific embodiment.
以第i个滤波器系数矢量均值为例,首先,根据该滤波器系数矢量均值,确定该滤波器系数矢量均值对应的滤波器系数分布图,如图4A所示,滤波器系数矢量中的元素的个数通过具体的自适应滤波器算法设定,依次取出滤波器矢量中的元素,并从左到右依次排开,每两个元素在水平方向上的投影的间隔相等,将所有元素连接起来得到滤波器系数分布图。Taking the i-th filter coefficient vector mean value as an example, first, according to the filter coefficient vector mean value, the filter coefficient distribution map corresponding to the filter coefficient vector mean value is determined, as shown in FIG. 4A, the elements in the filter coefficient vector. The number is set by a specific adaptive filter algorithm, and the elements in the filter vector are sequentially taken out and arranged from left to right. The projection of each element in the horizontal direction is equal, and all the elements are connected. Get the filter coefficient distribution map.
根据该滤波器系数分布图,确定第i个滤波器系数矢量均值中绝对值最大的元素,根据绝对值最大的元素的绝对值确定滑动窗的窗高,例如,在图4A中,绝对值最大的元素为A点,A点对应的绝对值为h,以2h为窗高,以预设数值为滑动窗的窗长,构建一个滑动窗,其中,窗长要小于滤波器系数分布图中滤波器系数分布的长度,可以任意设定,但一般比较小,也可以根据经验值确定,比如滤波器系数分布长度的十分之一,且滑动窗内包含的元素个数为固定值。其中,图4A为清楚描述本发明对滤波器系数分布图进行简化,图4A中绘制的波形比较简单,滤波器系数矢量均值中包含的元素数目较少,实际应用过程中,滤波器系数分布图如图4B所示。Determining, according to the filter coefficient distribution map, an element having the largest absolute value among the i-th filter coefficient vector mean values, and determining a window height of the sliding window according to an absolute value of the element having the largest absolute value, for example, in FIG. 4A, the absolute value is the largest The element is A point, the absolute value corresponding to point A is h, and the window height is 2h. The preset window is the window length of the sliding window, and the window length is smaller than the filter in the filter coefficient distribution map. The length of the coefficient distribution can be arbitrarily set, but it is generally small, and can also be determined according to empirical values, such as one tenth of the length of the filter coefficient distribution, and the number of elements included in the sliding window is a fixed value. 4A is a simplified description of the filter coefficient distribution diagram of the present invention. The waveform drawn in FIG. 4A is relatively simple, and the number of elements included in the filter coefficient vector mean is small. In the actual application process, the filter coefficient distribution map As shown in Figure 4B.
将滑动窗在滤波器系数分布图上从第i个滤波器系数矢量均值中的第一个元素滑动至最后一个元素,确定滑动窗内包含的所有元素的平方和为最大值时,滑动窗内包含的元素为主反射区元素,滑动窗左侧的元素为主反射区左侧元素,滑动窗右侧的元素为主反射区右侧元素。 Sliding the sliding window from the first element of the i-th filter coefficient vector mean to the last element on the filter coefficient profile, and determining that the sum of the squares of all the elements included in the sliding window is the maximum value, within the sliding window The included element is the main reflection area element, the element on the left side of the sliding window is the left element of the main reflection area, and the element on the right side of the sliding window is the right element of the main reflection area.
如图4A所示,滑动窗内包含的元素为主反射区元素,滑动窗左侧的元素为主反射区左侧元素。主反射区元素的绝对值较大,主反射区占据了滤波器系数矢量的绝大部分能量,滑动窗左侧的元素为主反射区左侧元素,主反射区左侧元素的绝对值较小,主反射区左侧能量较小,滑动窗右侧的元素为主反射区右侧元素,主反射区右侧元素的绝对值大于主反射区左侧的元素的绝对值,主反射区右侧能量较大。As shown in FIG. 4A, the elements contained in the sliding window are the main reflection area elements, and the elements on the left side of the sliding window are the left side elements of the main reflection area. The absolute value of the main reflection area element is large, the main reflection area occupies most of the energy of the filter coefficient vector, the element on the left side of the sliding window is the left element of the main reflection area, and the absolute value of the element on the left side of the main reflection area is small. The energy of the left side of the main reflection area is small, the element on the right side of the sliding window is the element on the right side of the main reflection area, the absolute value of the element on the right side of the main reflection area is larger than the absolute value of the element on the left side of the main reflection area, and the right side of the main reflection area Greater energy.
进一步地,计算所有主反射区右侧元素的平方和,作为第i个滤波器系数矢量均值对应的第一能量值,如下:Further, the sum of the squares of the elements on the right side of all the main reflection areas is calculated as the first energy value corresponding to the mean value of the i-th filter coefficient vector, as follows:
Figure PCTCN2016075804-appb-000003
Figure PCTCN2016075804-appb-000003
计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为第i个滤波器系数矢量均值对应的第二能量值,以及根据以下公式(2)计算第二能量值的平滑值,第二能量值和第二能量值的平滑值分别如下:Calculate the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the i-th filter coefficient vector mean, and calculate according to the following formula (2) The smoothed value of the second energy value, the smoothed values of the second energy value and the second energy value are as follows:
Figure PCTCN2016075804-appb-000004
Figure PCTCN2016075804-appb-000004
Esmooth(i)=α·Esmooth(i-1)+(1-α)·Eall    (2)E smooth (i)=α·E smooth (i-1)+(1-α)·E all (2)
这里α为预设值,例如,α=0.04。Here, α is a preset value, for example, α=0.04.
计算所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为第i个滤波器系数矢量均值对应的第三能量值,如下:Calculate the sum of the squares of the elements on the left side of all the main reflection areas and the elements on the right side of all the main reflection areas as the third energy value corresponding to the mean of the i-th filter coefficient vector, as follows:
Figure PCTCN2016075804-appb-000005
Figure PCTCN2016075804-appb-000005
采用第一种方法根据第一能量值、以及第二能量值的平滑值,采用以下公式计算第i个滤波器系数矢量均值对应的滤波器系数状态参考量:The first method is used to calculate the filter coefficient state reference amount corresponding to the i-th filter coefficient vector mean according to the first energy value and the smoothed value of the second energy value:
Figure PCTCN2016075804-appb-000006
Figure PCTCN2016075804-appb-000006
此外,针对第一种方法,还可以采用另一公式计算第i个滤波器系数矢量均值对应的滤波器系数状态参考量,具体为:In addition, for the first method, another method may be used to calculate a filter coefficient state reference quantity corresponding to the i-th filter coefficient vector mean value, specifically:
Figure PCTCN2016075804-appb-000007
Figure PCTCN2016075804-appb-000007
采用第二种方法根据第一能量值、以及第二能量值的平滑值采用以下公式计算第i个滤波器系数矢量均值对应的滤波器系数状态参考量:The second method is used to calculate the filter coefficient state reference amount corresponding to the i-th filter coefficient vector mean according to the first energy value and the smoothed value of the second energy value:
Figure PCTCN2016075804-appb-000008
Figure PCTCN2016075804-appb-000008
此外,针对第二种方法,还可以采用另一公式计算第i个滤波器系数矢量均值对应的滤波器系数状态参考量,具体为:In addition, for the second method, another method may be used to calculate a filter coefficient state reference quantity corresponding to the i-th filter coefficient vector mean value, specifically:
Figure PCTCN2016075804-appb-000009
Figure PCTCN2016075804-appb-000009
步骤340:当N个滤波器系数状态参考量中存在至少M个滤波器系数状态参考量大于预设的门限值时,确定滤波器状态发散。Step 340: Determine that the filter state diverges when at least M filter coefficient state reference quantities are greater than a preset threshold value among the N filter coefficient state reference quantities.
其中,M为预设值,N和M均为正整数,且N≥M。Where M is a preset value, N and M are both positive integers, and N≥M.
例如,若N=M=1,设置门限值TR,TR=0.15,如果R(1)>TR,记ST(1)=1则确定滤波器状态发散;否则记ST(1)=0,确定滤波器状态收敛。For example, if N=M=1, the threshold value T R is set , T R =0.15. If R(1)>T R , ST(1)=1 is determined to determine the filter state divergence; otherwise, ST(1) =0, determine the filter state convergence.
若确定滤波器状态发散,则停止更新滤波器系数矢量,并将当前的滤波器系数矢量清零。If it is determined that the filter state is divergent, the update of the filter coefficient vector is stopped, and the current filter coefficient vector is cleared.
但是,有时只根据一对同步帧对应的滤波器系数状态参考量与预设门限值的比较结果就判断滤波器状态发散,可能造成重置滤波器系数矢量的风险较大,本发明实施例中也包括取一定时间窗内的滤波器系数状态参考量与预设门限值的比较结果来判断滤波器状态是否发散。However, it is sometimes determined that the filter state is diverged according to the comparison result between the filter coefficient state reference quantity corresponding to the pair of synchronization frames and the preset threshold value, which may cause a greater risk of resetting the filter coefficient vector, which is an embodiment of the present invention. The method also includes comparing the filter coefficient state reference quantity and the preset threshold value in a certain time window to determine whether the filter state is divergent.
又例如,取10对同步帧对应的滤波器系数状态参考量与预设门限值的比 较结果:For another example, the ratio of the filter coefficient state reference quantity corresponding to the preset threshold value corresponding to 10 pairs of synchronization frames is taken. More results:
ST(m)=[ST(m),ST(m-1),ST(m-2),…,ST(m-9)],ST(m)=[ST(m), ST(m-1), ST(m-2),...,ST(m-9)],
其中,ST(m)包括10对同步帧对应的滤波器系数状态参考量与预设门限值的比较结果,ST(i)代表第i对同步帧对应的滤波器系数状态参考量与预设门限值的比较结果。The ST(m) includes a comparison result between the filter coefficient state reference quantity corresponding to the 10 pairs of synchronization frames and the preset threshold value, and ST(i) represents the filter coefficient state reference quantity corresponding to the i-th synchronization frame and the preset. Comparison of threshold values.
通过统计ST(m)中值为1的元素的个数st1,设置确定滤波器状态发散的策略Strategy(m),即存在6个及以上滤波器系数状态参考量大于预设的门限值时,确定滤波器状态发散,否则滤波器状态收敛。By counting the number of elements st1 with a value of 1 in ST(m), a strategy Strategy(m) for determining the state of the filter divergence is set, that is, when there are 6 or more filter coefficient state reference quantities greater than a preset threshold value , to determine the filter state divergence, otherwise the filter state converges.
Figure PCTCN2016075804-appb-000010
Figure PCTCN2016075804-appb-000010
如果Strategy(m)=1,则存在6个及以上滤波器系数状态参考量大于预设的门限值,确定滤波器状态发散,停止滤波器系数矢量更新,反之,Strategy(m)=0,则存在5个及以下滤波器系数状态参考量大于预设的门限值,确定滤波器状态收敛,则正常更新滤波器系数矢量。If Strategy(m)=1, there are 6 or more filter coefficient state reference quantities greater than a preset threshold value, determining filter state divergence, stopping filter coefficient vector update, and vice versa, Strategy(m)=0, Then, if the filter coefficient state reference quantity of 5 or less is greater than the preset threshold value, and the filter state is determined to be converged, the filter coefficient vector is normally updated.
因此,在确定10个滤波器系数状态参考量中存在至少6个滤波器系数状态参考量均大于预设的门限时,确定滤波器状态发散,并据此判断停止滤波器系数矢量更新。Therefore, when it is determined that at least 6 filter coefficient state reference quantities are greater than a preset threshold in the 10 filter coefficient state reference quantities, the filter state is determined to be diverged, and the filter coefficient vector update is determined according to the determination.
本发明实施例提供了一种判断滤波器状态发散的方法,该方法为:采集近端信号以及与近端信号同步的远端信号,并分别针对近端信号和远端信号进行同步分帧处理,获得N对同步帧,将N对同步帧通过滤波器进行滤波处理,获得对应N对同步帧的N个滤波器系数矢量均值。进一步地,根据N个滤波器系数矢量均值,分别计算对应N对同步帧的N个滤波器系数状态参考量,由于滤波器系数状态参考量对信号能量的变化不敏感,不受近端信号和远端信号所处环境的影响,因此该方法的得到的结果稳定性较好,同时滤波器系数状态参考量的计算复杂度较低,无需额外运算去平滑信号的波动性。最后,当N个滤波器系数状态参考量中存在至少M个滤波器系数状态参考量大于预设的门限值时,确定滤波器状态发散。 The embodiment of the invention provides a method for determining the state of the filter divergence, which is: collecting a near-end signal and a far-end signal synchronized with the near-end signal, and performing synchronous framing processing on the near-end signal and the far-end signal, respectively. Obtaining N pairs of synchronization frames, filtering the N pairs of synchronization frames by a filter, and obtaining N filter coefficient vector mean values corresponding to the N pairs of synchronization frames. Further, according to the N filter coefficient vector mean values, N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames are respectively calculated, since the filter coefficient state reference quantity is insensitive to changes in signal energy, and is not affected by the near-end signal and The influence of the environment where the far-end signal is located, so the obtained result of the method is stable, and the calculation complexity of the filter coefficient state reference quantity is low, and no additional operation is needed to smooth the fluctuation of the signal. Finally, when at least M filter coefficient state reference quantities are greater than a preset threshold value among the N filter coefficient state reference quantities, it is determined that the filter state diverges.
因此,本发明实施例利用滤波器系数状态参考量来判断滤波器状态是否发散,以达到控制回声消除器滤波器系数矢量更新、保证通话质量的目的,通过本发明的方法判断滤波器状态是否发散能够有效地判断通话过程中是否有双讲,从而达到控制滤波器系数矢量更新,获得高质量输出信号的目的。Therefore, the embodiment of the present invention uses the filter coefficient state reference quantity to determine whether the filter state is divergent, so as to achieve the purpose of controlling the echo canceler filter coefficient vector update and guaranteeing the call quality, and determining whether the filter state is diverged by the method of the present invention. It can effectively judge whether there is double talk during the call, so as to achieve the purpose of controlling the filter coefficient vector update and obtaining high quality output signal.
参阅图5所示,图5为本发明实施例中判断滤波器状态发散的装置结构示意图,本发明实施例提供的判断滤波器状态发散的装置500,包括:Referring to FIG. 5, FIG. 5 is a schematic structural diagram of an apparatus for determining a state of a filter to be diverged according to an embodiment of the present invention.
采集模块501,用于采集近端信号以及与近端信号同步的远端信号;The acquiring module 501 is configured to collect a near-end signal and a far-end signal synchronized with the near-end signal;
分帧模块502,用于分别针对采集模块501采集的近端信号和远端信号进行同步分帧处理,获得N对同步帧,每一对同步帧包括一个近端信号帧以及一个与近端信号帧同步的远端信号帧;The framing module 502 is configured to perform synchronous framing processing on the near-end signal and the far-end signal collected by the collecting module 501, respectively, to obtain an N-pair synchronization frame, where each pair of synchronization frames includes a near-end signal frame and a near-end signal. Frame-synchronized far-end signal frame;
滤波模块503,用于将分帧模块502获得的N对同步帧通过滤波器进行滤波处理,获得对应N对同步帧的N个滤波器系数矢量均值;The filtering module 503 is configured to filter the N pairs of synchronization frames obtained by the framing module 502 by using a filter to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames;
判断模块504,用于根据滤波模块503获得的N个滤波器系数矢量均值,分别计算对应N对同步帧的N个滤波器系数状态参考量;The determining module 504 is configured to calculate N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames according to the N filter coefficient vector average values obtained by the filtering module 503;
以及当N个滤波器系数状态参考量中存在至少M个滤波器系数状态参考量大于预设的门限值时,确定滤波器状态发散;And determining that the filter state is divergent when at least M filter coefficient state reference quantities are greater than a preset threshold value among the N filter coefficient state reference quantities;
其中,M为预设值,N和M均为正整数,且N≥M。Where M is a preset value, N and M are both positive integers, and N≥M.
可选的,分帧模块502具体用于:Optionally, the framing module 502 is specifically configured to:
根据预设帧长,将采集模块501采集的近端信号按照信号时序先后顺序进行分帧处理,获得N个近端信号帧;According to the preset frame length, the near-end signals collected by the acquisition module 501 are subjected to frame processing in sequence according to the signal sequence to obtain N near-end signal frames;
同时,根据预设帧长,将采集模块501采集的与近端信号同步的远端信号按照信号时序先后顺序进行分帧处理,获得N个与近端信号帧同步的远端信号帧;At the same time, according to the preset frame length, the far-end signals collected by the acquisition module 501 and synchronized with the near-end signals are subjected to frame processing in sequence according to the signal sequence, and N far-end signal frames synchronized with the near-end signal frame are obtained;
将获得的任意一个近端信号帧以及与任意一个近端信号帧同步的远端信号帧构成一对同步帧,共获得N对同步帧。Any one of the obtained near-end signal frame and the far-end signal frame synchronized with any one of the near-end signal frames constitutes a pair of synchronization frames, and a total of N pairs of synchronization frames are obtained.
可选的,滤波模块503具体用于:Optionally, the filtering module 503 is specifically configured to:
针对分帧模块502获得的每一对同步帧,分别执行: For each pair of synchronization frames obtained by the framing module 502, respectively:
根据预设帧长和第一预设算法确定当前一对同步帧对应的滤波器系数矢量更新次数T,以及T次滤波器系数矢量更新对应的T个更新结果,其中,T为正整数;Determining, according to the preset frame length and the first preset algorithm, a filter coefficient vector update number T corresponding to the current pair of synchronization frames, and T update results corresponding to the T-th filter coefficient vector update, where T is a positive integer;
根据当前一对同步帧对应的滤波器系数矢量更新次数T以及T次滤波器系数矢量更新对应的T个更新结果,获得对应当前一对同步帧的滤波器系数矢量均值。The filter coefficient vector mean values corresponding to the current pair of synchronization frames are obtained according to the filter coefficient vector update order T and the T-th filter coefficient vector corresponding to the current pair of synchronization frames.
可选的,判断模块504具体用于:Optionally, the determining module 504 is specifically configured to:
针对滤波模块503获得的每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean obtained by the filtering module 503, respectively:
根据当前滤波器系数矢量均值,按照预设布图规则确定当前滤波器系数矢量均值对应的滤波器系数分布图,并According to the current filter coefficient vector mean value, the filter coefficient distribution map corresponding to the current filter coefficient vector mean value is determined according to a preset layout rule, and
根据滤波器系数分布图,将当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,其中,主反射区元素是指滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时预设滑动窗内包含的元素,且滤波器系数分布图中预设滑动窗左侧的元素为主反射区左侧元素,预设滑动窗右侧的元素为主反射区右侧元素;According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area element refers to a filter coefficient The element contained in the preset sliding window when the sum of the squares of all the elements contained in the preset sliding window is the maximum value in the distribution map, and the element on the left side of the preset sliding window in the filter coefficient distribution map is the left element of the main reflection area. The element on the right side of the preset sliding window is the element on the right side of the main reflection area;
计算所有主反射区右侧元素的平方和,作为当前滤波器系数矢量均值对应的第一能量值;Calculating the sum of the squares of the elements on the right side of all the main reflection areas as the first energy value corresponding to the current filter coefficient vector mean;
计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为当前滤波器系数矢量均值对应的第二能量值,以及Calculate the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the current filter coefficient vector mean, and
根据第二预设算法计算第二能量值的平滑值;Calculating a smoothed value of the second energy value according to the second preset algorithm;
根据第一能量值、以及第二能量值的平滑值,采用第三预设算法确定当前滤波器系数矢量均值对应的滤波器系数状态参考量。And determining, by the third preset algorithm, a filter coefficient state reference amount corresponding to the current filter coefficient vector mean according to the first energy value and the smoothed value of the second energy value.
可选的,判断模块504还用于:Optionally, the determining module 504 is further configured to:
针对滤波模块503获得的每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean obtained by the filtering module 503, respectively:
根据当前滤波器系数矢量均值,按照预设布图规则确定当前滤波器系数矢量均值对应的滤波器系数分布图,并According to the current filter coefficient vector mean value, the filter coefficient distribution map corresponding to the current filter coefficient vector mean value is determined according to a preset layout rule, and
根据滤波器系数分布图,将当前滤波器系数矢量均值中的元素至少分为 主反射区元素、主反射区左侧元素和主反射区右侧元素,其中,主反射区元素是指滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时预设滑动窗内包含的元素,且滤波器系数分布图中预设滑动窗左侧的元素为主反射区左侧元素,预设滑动窗右侧的元素为主反射区右侧元素;According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into The main reflection area element, the left side element of the main reflection area, and the right side element of the main reflection area, wherein the main reflection area element refers to the sum of the squares of all the elements included in the preset sliding window in the filter coefficient distribution map. Set the elements contained in the sliding window, and the element on the left side of the preset sliding window in the filter coefficient distribution map is the left element of the main reflection area, and the element on the right side of the preset sliding window is the right element of the main reflection area;
计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为当前滤波器系数矢量均值对应的第二能量值,以及Calculate the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the current filter coefficient vector mean, and
根据第二预设算法计算第二能量值的平滑值;Calculating a smoothed value of the second energy value according to the second preset algorithm;
计算所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为当前滤波器系数矢量均值对应的第三能量值;Calculating the sum of the squares of the elements on the left side of all the main reflection areas and the elements on the right side of all the main reflection areas as the third energy value corresponding to the mean value of the current filter coefficient vector;
根据第三能量值、以及第二能量值的平滑值,采用第三预设算法确定当前滤波器系数矢量均值对应的滤波器系数状态参考量。And determining, by the third preset algorithm, a filter coefficient state reference amount corresponding to the current filter coefficient vector mean according to the third energy value and the smoothed value of the second energy value.
可选的,判断模块504进一步用于:Optionally, the determining module 504 is further configured to:
根据滤波器系数分布图,确定当前滤波器系数矢量均值中绝对值最大的元素;Determining an element having the largest absolute value of the current filter coefficient vector mean according to the filter coefficient distribution map;
构建一个滑动窗,根据绝对值最大的元素的绝对值确定滑动窗的窗高,以预设数值为滑动窗的窗长;Constructing a sliding window, determining the window height of the sliding window according to the absolute value of the element with the largest absolute value, and the preset value is the window length of the sliding window;
将滑动窗在滤波器系数分布图上从当前滤波器系数矢量均值中的第一个元素滑动至最后一个元素,确定滑动窗内包含的所有元素的平方和为最大值时,滑动窗内包含的元素为主反射区元素,滑动窗左侧的元素为主反射区左侧元素,滑动窗右侧的元素为主反射区右侧元素。Sliding the sliding window on the filter coefficient profile from the first element of the current filter coefficient vector mean to the last element, determining that the sum of the squares of all the elements contained in the sliding window is the maximum value, and the sliding window contains The element is the main reflection zone element, the element on the left side of the sliding window is the left element of the main reflection zone, and the element on the right side of the sliding window is the element on the right side of the main reflection zone.
此处原理与方法部分相同,如图4A所示。Here, the principle is the same as the method part, as shown in Fig. 4A.
可选的,装置还包括:Optionally, the device further includes:
重置模块505,用于在根据判断模块确定滤波器状态发散之后,停止更新滤波器系数矢量,并将当前的滤波器系数矢量清零。The reset module 505 is configured to stop updating the filter coefficient vector after the determination module determines that the filter state is diverged, and clear the current filter coefficient vector.
需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物 理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。It should be noted that, in the embodiment of the present invention, the division of the module is schematic, and only one logical function is divided. In actual implementation, there may be another division manner. In addition, each functional module in each embodiment of the present application may be used. Can be integrated in one processing module or individual modules There are two or more modules that can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated modules, if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application, in essence or the contribution to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .
本发明实施例还提供了一种判断滤波器状态发散的设备,如图6所示,图6为本发明实施例中判断滤波器状态发散的设备结构示意图,该设备包括收发器601、处理器602、存储器603。收发器601、处理器602以及存储器603相互连接。本发明实施例中不限定上述部件之间的具体连接介质。本发明实施例在图6中以存储器603、处理器602以及收发器601之间通过总线604连接,总线在图6中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图6中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The embodiment of the present invention further provides a device for determining the state of the filter to be diverged. As shown in FIG. 6 , FIG. 6 is a schematic structural diagram of a device for determining a state of a filter to be diverged according to an embodiment of the present invention, where the device includes a transceiver 601 and a processor. 602. Memory 603. The transceiver 601, the processor 602, and the memory 603 are connected to each other. The specific connecting medium between the above components is not limited in the embodiment of the present invention. In the embodiment of the present invention, the memory 603, the processor 602, and the transceiver 601 are connected by a bus 604 in FIG. 6. The bus is indicated by a thick line in FIG. 6, and the connection manner between other components is only schematically illustrated. , not limited to. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 6, but it does not mean that there is only one bus or one type of bus.
本发明实施例中,收发器601,用于采集近端信号以及与近端信号同步的远端信号。In the embodiment of the present invention, the transceiver 601 is configured to collect a near-end signal and a far-end signal synchronized with the near-end signal.
处理器602,用于分别针对收发器601采集的近端信号和远端信号进行同步分帧处理,获得N对同步帧,每一对同步帧包括一个近端信号帧以及一个与近端信号帧同步的远端信号帧,并进一步将获得的N对同步帧通过滤波器进行滤波处理,获得对应N对同步帧的N个滤波器系数矢量均值,最后,根据获得的N个滤波器系数矢量均值,分别计算对应N对同步帧的N个滤波器系数状态 参考量,以及当N个滤波器系数状态参考量中存在至少M个滤波器系数状态参考量大于预设的门限值时,确定滤波器状态发散,其中,M为预设值,N和M均为正整数,且N≥M。The processor 602 is configured to perform synchronous framing processing on the near-end signal and the far-end signal collected by the transceiver 601 to obtain N pairs of synchronization frames, where each pair of synchronization frames includes a near-end signal frame and a near-end signal frame. Synchronizing the far-end signal frame, and further filtering the obtained N pairs of synchronization frames through a filter to obtain N filter coefficient vector mean values corresponding to N pairs of synchronization frames, and finally, according to the obtained N filter coefficient vector mean values , respectively calculating N filter coefficient states corresponding to N pairs of sync frames a reference quantity, and determining that the filter state diverges when at least M filter coefficient state reference quantities are greater than a preset threshold value among the N filter coefficient state reference quantities, wherein M is a preset value, N and M Both are positive integers and N ≥ M.
本发明实施例中存储器603,用于存储处理器602执行的程序代码,可以是易失性存储器(英文:volatile memory),例如随机存取存储器(英文:random-access memory,缩写:RAM);存储器603也可以是非易失性存储器(英文:non-volatile memory),例如只读存储器(英文:read-only memory,缩写:ROM),快闪存储器(英文:flash memory),硬盘(英文:hard disk drive,缩写:HDD)或固态硬盘(英文:solid-state drive,缩写:SSD)、或者存储器603是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器603可以是上述存储器的组合。In the embodiment of the present invention, the memory 603 is used to store the program code executed by the processor 602, and may be a volatile memory, such as a random access memory (English: random-access memory, abbreviation: RAM); The memory 603 may also be a non-volatile memory (English: non-volatile memory), such as read-only memory (English: read-only memory, abbreviation: ROM), flash memory (English: flash memory), hard disk (English: hard Disk drive, abbreviated as: HDD) or solid state drive (English: solid-state drive, SSD), or memory 603 can be used to carry or store desired program code in the form of an instruction or data structure and can be accessed by a computer. Any other medium, but not limited to this. The memory 603 may be a combination of the above memories.
本发明实施例中处理器602,可以是一个中央处理单元(英文:central processing unit,简称CPU)。The processor 602 in the embodiment of the present invention may be a central processing unit (English: central processing unit, CPU for short).
综上所述,本发明实施例利用滤波器系数状态参考量来判断滤波器状态是否发散,以达到控制回声消除器滤波器系数矢量更新、保证通话质量的目的,由于滤波器系数状态参考量对信号能量的变化不敏感,不受近端信号和远端信号所处环境的影响,因此该方法的得到的结果稳定性较好,同时滤波器系数状态参考量的计算复杂度较低,因此,通过本发明的方法判断滤波器状态是否发散能够有效地判断通话过程中是否有双讲,从而达到控制滤波器系数矢量更新,获得高质量输出信号的目的。In summary, the embodiment of the present invention uses the filter coefficient state reference quantity to determine whether the filter state is diverged, so as to achieve the purpose of controlling the echo canceler filter coefficient vector update and guaranteeing the call quality, because the filter coefficient state reference quantity pair The change of signal energy is not sensitive and is not affected by the environment of the near-end signal and the far-end signal. Therefore, the obtained result of the method has good stability, and the calculation complexity of the filter coefficient state reference quantity is low, therefore, Whether the filter state is diverged by the method of the present invention can effectively determine whether there is double talk during the call, thereby achieving the purpose of controlling the filter coefficient vector update and obtaining a high quality output signal.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产 品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention is directed to a method, apparatus (system), and computer program according to an embodiment of the present invention. The flow chart and/or block diagram of the product is described. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。While the preferred embodiment of the invention has been described, it will be understood that Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and the modifications and
显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。 It is apparent that those skilled in the art can make various modifications and variations to the embodiments of the invention without departing from the spirit and scope of the embodiments of the invention. Thus, it is intended that the present invention cover the modifications and modifications of the embodiments of the invention.

Claims (14)

  1. 一种判断滤波器状态发散的方法,其特征在于,包括:A method for determining a state of a filter divergence, comprising:
    采集近端信号以及与所述近端信号同步的远端信号,并Collecting a near-end signal and a far-end signal synchronized with the near-end signal, and
    分别针对所述近端信号和所述远端信号进行同步分帧处理,获得N对同步帧,每一对同步帧包括一个近端信号帧以及一个与所述近端信号帧同步的远端信号帧;Performing synchronous framing processing on the near-end signal and the far-end signal respectively to obtain N-pair sync frames, each pair of sync frames including a near-end signal frame and a far-end signal synchronized with the near-end signal frame frame;
    将所述N对同步帧通过滤波器进行滤波处理,获得对应所述N对同步帧的N个滤波器系数矢量均值;And filtering the N pairs of synchronization frames by using a filter to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames;
    根据所述N个滤波器系数矢量均值,分别计算对应所述N对同步帧的N个滤波器系数状态参考量;Calculating, according to the N filter coefficient vector mean values, N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames;
    当所述N个滤波器系数状态参考量中存在至少M个滤波器系数状态参考量大于预设的门限值时,确定所述滤波器状态发散;Determining that the filter state is divergent when at least M filter coefficient state reference quantities are greater than a preset threshold value in the N filter coefficient state reference quantities;
    其中,M为预设值,所述N和M均为正整数,且N≥M。Where M is a preset value, and both N and M are positive integers, and N≥M.
  2. 如权利要求1所述的方法,其特征在于,所述分别针对所述近端信号和所述远端信号进行同步分帧处理,获得N对同步帧,包括:The method according to claim 1, wherein said performing synchronous framing processing on said near-end signal and said far-end signal respectively to obtain N-pair synchronization frames comprises:
    根据预设帧长,将所述近端信号按照信号时序先后顺序进行分帧处理,获得N个近端信号帧;According to the preset frame length, the near-end signals are sequenced according to the signal timing sequence to obtain N near-end signal frames;
    同时,根据所述预设帧长,将与所述近端信号同步的远端信号按照信号时序先后顺序进行分帧处理,获得N个与所述近端信号帧同步的远端信号帧;At the same time, according to the preset frame length, the far-end signals synchronized with the near-end signals are sequentially processed according to the signal timing sequence to obtain N far-end signal frames synchronized with the near-end signal frame;
    将获得的任意一个近端信号帧以及与所述任意一个近端信号帧同步的远端信号帧构成一对同步帧,共获得N对同步帧。Any one of the obtained near-end signal frame and the far-end signal frame synchronized with the any one of the near-end signal frames constitutes a pair of synchronization frames, and a total of N pairs of synchronization frames are obtained.
  3. 如权利要求1所述的方法,其特征在于,所述将所述N对同步帧通过滤波器进行滤波处理,获得对应N对同步帧的N个滤波器系数矢量均值,包括:The method according to claim 1, wherein said filtering the N pairs of synchronization frames by a filter to obtain N filter coefficient vector mean values corresponding to N pairs of synchronization frames, comprising:
    针对每一对同步帧,分别执行:For each pair of sync frames, execute separately:
    根据预设帧长和第一预设算法确定当前一对同步帧对应的滤波器系数矢 量更新次数T,以及T次滤波器系数矢量更新对应的T个更新结果,其中,T为正整数;Determining a filter coefficient vector corresponding to the current pair of synchronization frames according to a preset frame length and a first preset algorithm The quantity update number T, and the T update results corresponding to the T-th filter coefficient vector update, where T is a positive integer;
    根据所述当前一对同步帧对应的滤波器系数矢量更新次数T以及所述T次滤波器系数矢量更新对应的T个更新结果,获得对应所述当前一对同步帧的滤波器系数矢量均值。And obtaining, according to the filter coefficient vector update order T corresponding to the current pair of synchronization frames and the T update result of the T-th filter coefficient vector, obtaining a filter coefficient vector mean corresponding to the current pair of synchronization frames.
  4. 如权利要求1或2所述的方法,其特征在于,所述根据N个滤波器系数矢量均值,分别计算对应N对同步帧的N个滤波器系数状态参考量,包括:The method according to claim 1 or 2, wherein the N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames are respectively calculated according to the N filter coefficient vector mean values, including:
    针对每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean, perform:
    根据当前滤波器系数矢量均值,按照预设布图规则确定所述当前滤波器系数矢量均值对应的滤波器系数分布图,并Determining, according to a preset layout rule, a filter coefficient distribution map corresponding to the current filter coefficient vector mean according to a current filter coefficient vector mean value, and
    根据所述滤波器系数分布图,将所述当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,其中,所述主反射区元素是指所述滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时所述预设滑动窗内包含的元素,且所述滤波器系数分布图中所述预设滑动窗左侧的元素为所述主反射区左侧元素,所述预设滑动窗右侧的元素为所述主反射区右侧元素;According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area An element is an element included in the preset sliding window when a sum of squares of all elements included in a preset sliding window in the filter coefficient distribution map is a maximum value, and the pre-predetermined in the filter coefficient distribution map The element on the left side of the sliding window is an element on the left side of the main reflection area, and the element on the right side of the preset sliding window is an element on the right side of the main reflection area;
    计算所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第一能量值;Calculating a sum of squares of elements on the right side of all the main reflection areas as a first energy value corresponding to the mean value of the current filter coefficient vector;
    计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第二能量值,以及Calculating the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the mean value of the current filter coefficient vector, and
    根据第二预设算法计算所述第二能量值的平滑值;Calculating a smoothed value of the second energy value according to a second preset algorithm;
    根据所述第一能量值、以及所述第二能量值的平滑值,采用第三预设算法确定所述当前滤波器系数矢量均值对应的滤波器系数状态参考量。And determining, according to the first energy value and the smoothed value of the second energy value, a filter coefficient state reference quantity corresponding to the current filter coefficient vector mean value by using a third preset algorithm.
  5. 如权利要求1或2所述的方法,其特征在于,所述根据N个滤波器系数矢量均值,分别计算对应N对同步帧的N个滤波器系数状态参考量,包括:The method according to claim 1 or 2, wherein the N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames are respectively calculated according to the N filter coefficient vector mean values, including:
    针对每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean, perform:
    根据当前滤波器系数矢量均值,按照预设布图规则确定所述当前滤波器 系数矢量均值对应的滤波器系数分布图,并Determining the current filter according to a preset layout rule according to a current filter coefficient vector mean a coefficient coefficient map corresponding to the coefficient vector mean, and
    根据所述滤波器系数分布图,将所述当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,其中,所述主反射区元素是指所述滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时所述预设滑动窗内包含的元素,且所述滤波器系数分布图中所述预设滑动窗左侧的元素为所述主反射区左侧元素,所述预设滑动窗右侧的元素为所述主反射区右侧元素;According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area An element is an element included in the preset sliding window when a sum of squares of all elements included in a preset sliding window in the filter coefficient distribution map is a maximum value, and the pre-predetermined in the filter coefficient distribution map The element on the left side of the sliding window is an element on the left side of the main reflection area, and the element on the right side of the preset sliding window is an element on the right side of the main reflection area;
    计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第二能量值,以及Calculating the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the mean value of the current filter coefficient vector, and
    根据所述第二预设算法计算所述第二能量值的平滑值;Calculating a smoothed value of the second energy value according to the second preset algorithm;
    计算所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第三能量值;Calculating the sum of the squares of the elements on the left side of all the main reflection areas and the elements on the right side of all the main reflection areas as the third energy value corresponding to the mean value of the current filter coefficient vector;
    根据所述第三能量值、以及所述第二能量值的平滑值,采用所述第三预设算法确定所述当前滤波器系数矢量均值对应的滤波器系数状态参考量。And determining, by the third preset algorithm, a filter coefficient state reference quantity corresponding to the current filter coefficient vector mean according to the third energy value and the smoothed value of the second energy value.
  6. 如权利要求4或5所述的方法,其特征在于,根据所述滤波器系数分布图,将所述当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,包括:The method according to claim 4 or 5, wherein the elements in the current filter coefficient vector mean are at least divided into a main reflection area element and a left reflection element of the main reflection area according to the filter coefficient distribution map. And the elements to the right of the main reflection area, including:
    根据所述滤波器系数分布图,确定所述当前滤波器系数矢量均值中绝对值最大的元素;Determining, according to the filter coefficient distribution map, an element having the largest absolute value among the current filter coefficient vector mean values;
    构建一个滑动窗,根据所述绝对值最大的元素的绝对值确定所述滑动窗的窗高,以预设数值为所述滑动窗的窗长;Constructing a sliding window, determining a window height of the sliding window according to an absolute value of the element having the largest absolute value, and using a preset value as a window length of the sliding window;
    将所述滑动窗在所述滤波器系数分布图上从所述当前滤波器系数矢量均值中的第一个元素滑动至最后一个元素,确定所述滑动窗内包含的所有元素的平方和为最大值时,所述滑动窗内包含的元素为所述主反射区元素,所述滑动窗左侧的元素为所述主反射区左侧元素,所述滑动窗右侧的元素为所述主反射区右侧元素。Sliding the sliding window from the first element of the current filter coefficient vector mean to the last element on the filter coefficient profile to determine that the sum of squares of all elements included in the sliding window is maximum When the value is, the element included in the sliding window is the main reflection area element, the element on the left side of the sliding window is an element on the left side of the main reflection area, and the element on the right side of the sliding window is the main reflection The right side of the area.
  7. 如权利要求3所述的方法,其特征在于,在确定所述滤波器状态发散 之后,所述方法还包括:The method of claim 3 wherein said determining said filter state is divergent Thereafter, the method further includes:
    停止更新滤波器系数矢量,并将当前的滤波器系数矢量清零。Stop updating the filter coefficient vector and clear the current filter coefficient vector.
  8. 一种判断滤波器状态发散的装置,其特征在于,包括:A device for determining a state of divergence of a filter, comprising:
    采集模块,用于采集近端信号以及与所述近端信号同步的远端信号;An acquisition module, configured to collect a near-end signal and a far-end signal synchronized with the near-end signal;
    分帧模块,用于分别针对所述采集模块采集的所述近端信号和所述远端信号进行同步分帧处理,获得N对同步帧,每一对同步帧包括一个近端信号帧以及一个与所述近端信号帧同步的远端信号帧;a framing module, configured to perform synchronous framing processing on the near-end signal and the far-end signal collected by the collecting module, respectively, to obtain N pairs of synchronization frames, each pair of synchronization frames including a near-end signal frame and a a far-end signal frame synchronized with the near-end signal frame;
    滤波模块,用于将所述分帧模块获得的所述N对同步帧通过滤波器进行滤波处理,获得对应所述N对同步帧的N个滤波器系数矢量均值;a filtering module, configured to filter, by using a filter, the N pairs of synchronization frames obtained by the framing module to obtain N filter coefficient vector mean values corresponding to the N pairs of synchronization frames;
    判断模块,用于根据所述滤波模块获得的所述N个滤波器系数矢量均值,分别计算对应所述N对同步帧的N个滤波器系数状态参考量;a determining module, configured to calculate, according to the N filter coefficient vector average values obtained by the filtering module, N filter coefficient state reference quantities corresponding to the N pairs of synchronization frames;
    以及当所述N个滤波器系数状态参考量中存在至少M个滤波器系数状态参考量大于预设的门限值时,确定所述滤波器状态发散;And determining, when the at least M filter coefficient state reference quantities are greater than a preset threshold value, in the N filter coefficient state reference quantities, determining the filter state divergence;
    其中,M为预设值,所述N和M均为正整数,且N≥M。Where M is a preset value, and both N and M are positive integers, and N≥M.
  9. 如权利要求8所述的装置,其特征在于,所述分帧模块具体用于:The apparatus according to claim 8, wherein the framing module is specifically configured to:
    根据预设帧长,将所述采集模块采集的所述近端信号按照信号时序先后顺序进行分帧处理,获得N个近端信号帧;According to the preset frame length, the near-end signals collected by the collection module are sequentially processed according to the signal timing sequence to obtain N near-end signal frames;
    同时,根据所述预设帧长,将所述采集模块采集的与所述近端信号同步的远端信号按照信号时序先后顺序进行分帧处理,获得N个与所述近端信号帧同步的远端信号帧;Simultaneously, according to the preset frame length, the far-end signals that are collected by the acquiring module and synchronized with the near-end signal are subjected to frame processing in sequence according to signal timing, to obtain N synchronization with the near-end signal frame. Remote signal frame;
    将获得的任意一个近端信号帧以及与所述任意一个近端信号帧同步的远端信号帧构成一对同步帧,共获得N对同步帧。Any one of the obtained near-end signal frame and the far-end signal frame synchronized with the any one of the near-end signal frames constitutes a pair of synchronization frames, and a total of N pairs of synchronization frames are obtained.
  10. 如权利要求8所述的装置,其特征在于,所述滤波模块具体用于:The device according to claim 8, wherein the filtering module is specifically configured to:
    针对所述分帧模块获得的每一对同步帧,分别执行:For each pair of synchronization frames obtained by the framing module, respectively:
    根据预设帧长和第一预设算法确定当前一对同步帧对应的滤波器系数矢量更新次数T,以及T次滤波器系数矢量更新对应的T个更新结果,其中,T为正整数; Determining, according to the preset frame length and the first preset algorithm, a filter coefficient vector update number T corresponding to the current pair of synchronization frames, and T update results corresponding to the T-th filter coefficient vector update, where T is a positive integer;
    根据所述当前一对同步帧对应的滤波器系数矢量更新次数T以及所述T次滤波器系数矢量更新对应的T个更新结果,获得对应所述当前一对同步帧的滤波器系数矢量均值。And obtaining, according to the filter coefficient vector update order T corresponding to the current pair of synchronization frames and the T update result of the T-th filter coefficient vector, obtaining a filter coefficient vector mean corresponding to the current pair of synchronization frames.
  11. 如权利要求8或9所述的装置,其特征在于,所述判断模块具体用于:The device according to claim 8 or 9, wherein the determining module is specifically configured to:
    针对所述滤波模块获得的每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean obtained by the filtering module, respectively:
    根据当前滤波器系数矢量均值,按照预设布图规则确定所述当前滤波器系数矢量均值对应的滤波器系数分布图,并Determining, according to a preset layout rule, a filter coefficient distribution map corresponding to the current filter coefficient vector mean according to a current filter coefficient vector mean value, and
    根据所述滤波器系数分布图,将所述当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,其中,所述主反射区元素是指所述滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时所述预设滑动窗内包含的元素,且所述滤波器系数分布图中所述预设滑动窗左侧的元素为所述主反射区左侧元素,所述预设滑动窗右侧的元素为所述主反射区右侧元素;According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein the main reflection area An element is an element included in the preset sliding window when a sum of squares of all elements included in a preset sliding window in the filter coefficient distribution map is a maximum value, and the pre-predetermined in the filter coefficient distribution map The element on the left side of the sliding window is an element on the left side of the main reflection area, and the element on the right side of the preset sliding window is an element on the right side of the main reflection area;
    计算所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第一能量值;Calculating a sum of squares of elements on the right side of all the main reflection areas as a first energy value corresponding to the mean value of the current filter coefficient vector;
    计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第二能量值,以及Calculating the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the mean value of the current filter coefficient vector, and
    根据第二预设算法计算所述第二能量值的平滑值;Calculating a smoothed value of the second energy value according to a second preset algorithm;
    根据所述第一能量值、以及所述第二能量值的平滑值,采用第三预设算法确定所述当前滤波器系数矢量均值对应的滤波器系数状态参考量。And determining, according to the first energy value and the smoothed value of the second energy value, a filter coefficient state reference quantity corresponding to the current filter coefficient vector mean value by using a third preset algorithm.
  12. 如权利要求8或9所述的装置,其特征在于,所述判断模块还用于:The device according to claim 8 or 9, wherein the determining module is further configured to:
    针对所述滤波模块获得的每一个滤波器系数矢量均值,分别执行:For each filter coefficient vector mean obtained by the filtering module, respectively:
    根据当前滤波器系数矢量均值,按照预设布图规则确定所述当前滤波器系数矢量均值对应的滤波器系数分布图,并Determining, according to a preset layout rule, a filter coefficient distribution map corresponding to the current filter coefficient vector mean according to a current filter coefficient vector mean value, and
    根据所述滤波器系数分布图,将所述当前滤波器系数矢量均值中的元素至少分为主反射区元素、主反射区左侧元素和主反射区右侧元素,其中,所 述主反射区元素是指所述滤波器系数分布图中预设滑动窗内包含的所有元素的平方和为最大值时所述预设滑动窗内包含的元素,且所述滤波器系数分布图中所述预设滑动窗左侧的元素为所述主反射区左侧元素,所述预设滑动窗右侧的元素为所述主反射区右侧元素;According to the filter coefficient distribution map, the elements in the current filter coefficient vector mean are at least divided into a main reflection area element, a left side element of the main reflection area, and a right side element of the main reflection area, wherein The main reflection area element refers to an element included in the preset sliding window when the sum of squares of all elements included in the preset sliding window in the filter coefficient distribution map is a maximum value, and the filter coefficient distribution map The element on the left side of the preset sliding window is an element on the left side of the main reflection area, and the element on the right side of the preset sliding window is an element on the right side of the main reflection area;
    计算所有主反射区元素、所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第二能量值,以及Calculating the sum of the squares of all the main reflection area elements, the elements on the left side of all the main reflection areas, and the elements on the right side of all the main reflection areas, as the second energy value corresponding to the mean value of the current filter coefficient vector, and
    根据所述第二预设算法计算所述第二能量值的平滑值;Calculating a smoothed value of the second energy value according to the second preset algorithm;
    计算所有主反射区左侧元素和所有主反射区右侧元素的平方和,作为所述当前滤波器系数矢量均值对应的第三能量值;Calculating the sum of the squares of the elements on the left side of all the main reflection areas and the elements on the right side of all the main reflection areas as the third energy value corresponding to the mean value of the current filter coefficient vector;
    根据所述第三能量值、以及所述第二能量值的平滑值,采用所述第三预设算法确定所述当前滤波器系数矢量均值对应的滤波器系数状态参考量。And determining, by the third preset algorithm, a filter coefficient state reference quantity corresponding to the current filter coefficient vector mean according to the third energy value and the smoothed value of the second energy value.
  13. 如权利要求11或12所述的装置,其特征在于,所述判断模块进一步用于:The device according to claim 11 or 12, wherein the determining module is further configured to:
    根据所述滤波器系数分布图,确定所述当前滤波器系数矢量均值中绝对值最大的元素;Determining, according to the filter coefficient distribution map, an element having the largest absolute value among the current filter coefficient vector mean values;
    构建一个滑动窗,根据所述绝对值最大的元素的绝对值确定所述滑动窗的窗高,以预设数值为所述滑动窗的窗长;Constructing a sliding window, determining a window height of the sliding window according to an absolute value of the element having the largest absolute value, and using a preset value as a window length of the sliding window;
    将所述滑动窗在所述滤波器系数分布图上从所述当前滤波器系数矢量均值中的第一个元素滑动至最后一个元素,确定所述滑动窗内包含的所有元素的平方和为最大值时,所述滑动窗内包含的元素为所述主反射区元素,所述滑动窗左侧的元素为所述主反射区左侧元素,所述滑动窗右侧的元素为所述主反射区右侧元素。Sliding the sliding window from the first element of the current filter coefficient vector mean to the last element on the filter coefficient profile to determine that the sum of squares of all elements included in the sliding window is maximum When the value is, the element included in the sliding window is the main reflection area element, the element on the left side of the sliding window is an element on the left side of the main reflection area, and the element on the right side of the sliding window is the main reflection The right side of the area.
  14. 如权利要求10所述的装置,其特征在于,所述装置还包括:The device of claim 10, wherein the device further comprises:
    重置模块,用于在根据所述判断模块确定所述滤波器状态发散之后,停止更新滤波器系数矢量,并将当前的滤波器系数矢量清零。 And a resetting module, configured to stop updating the filter coefficient vector after the determining, according to the determining module, that the filter state is diverged, and clear the current filter coefficient vector.
PCT/CN2016/075804 2015-07-21 2016-03-07 Filter state divergence judgement method and device WO2017012350A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510433689.1A CN105141287A (en) 2015-07-21 2015-07-21 Filter state divergence judgment method and device
CN201510433689.1 2015-07-21

Publications (1)

Publication Number Publication Date
WO2017012350A1 true WO2017012350A1 (en) 2017-01-26

Family

ID=54726524

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/075804 WO2017012350A1 (en) 2015-07-21 2016-03-07 Filter state divergence judgement method and device

Country Status (2)

Country Link
CN (1) CN105141287A (en)
WO (1) WO2017012350A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10596720B2 (en) 2015-09-24 2020-03-24 SWISS KRONO Tec AG Method for reducing the emission of volatile organic compounds made of wood materials, and wood materials

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105141287A (en) * 2015-07-21 2015-12-09 华为技术有限公司 Filter state divergence judgment method and device
CN110364174A (en) * 2019-07-18 2019-10-22 申瓯通信设备有限公司 A kind of echo cancelling system and echo removing method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1242651A (en) * 1998-03-30 2000-01-26 摩托罗拉公司 Echo canceller and method for device having decoder
JP2003324370A (en) * 2002-04-26 2003-11-14 Matsushita Electric Works Ltd Echo canceler
CN101026392A (en) * 2006-02-22 2007-08-29 阿尔卡特朗讯 Method of controlling an adaptation of a filter
CN101119135A (en) * 2007-07-04 2008-02-06 深圳市融合视讯科技有限公司 Step parameter regulation means and equipment for eliminating echo
CN102377453A (en) * 2010-08-06 2012-03-14 联芯科技有限公司 Method and device for controlling updating of self-adaptive filter and echo canceller
US8199927B1 (en) * 2007-10-31 2012-06-12 ClearOnce Communications, Inc. Conferencing system implementing echo cancellation and push-to-talk microphone detection using two-stage frequency filter
CN103259563A (en) * 2012-02-16 2013-08-21 联芯科技有限公司 Self-adapting filter divergence detection method and echo cancellation system
CN105141287A (en) * 2015-07-21 2015-12-09 华为技术有限公司 Filter state divergence judgment method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1242651A (en) * 1998-03-30 2000-01-26 摩托罗拉公司 Echo canceller and method for device having decoder
JP2003324370A (en) * 2002-04-26 2003-11-14 Matsushita Electric Works Ltd Echo canceler
CN101026392A (en) * 2006-02-22 2007-08-29 阿尔卡特朗讯 Method of controlling an adaptation of a filter
CN101119135A (en) * 2007-07-04 2008-02-06 深圳市融合视讯科技有限公司 Step parameter regulation means and equipment for eliminating echo
US8199927B1 (en) * 2007-10-31 2012-06-12 ClearOnce Communications, Inc. Conferencing system implementing echo cancellation and push-to-talk microphone detection using two-stage frequency filter
CN102377453A (en) * 2010-08-06 2012-03-14 联芯科技有限公司 Method and device for controlling updating of self-adaptive filter and echo canceller
CN103259563A (en) * 2012-02-16 2013-08-21 联芯科技有限公司 Self-adapting filter divergence detection method and echo cancellation system
CN105141287A (en) * 2015-07-21 2015-12-09 华为技术有限公司 Filter state divergence judgment method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10596720B2 (en) 2015-09-24 2020-03-24 SWISS KRONO Tec AG Method for reducing the emission of volatile organic compounds made of wood materials, and wood materials

Also Published As

Publication number Publication date
CN105141287A (en) 2015-12-09

Similar Documents

Publication Publication Date Title
Enzner et al. Acoustic echo control
US20170318161A1 (en) Echo cancellation data synchronization control method, terminal, and storage medium
US10250740B2 (en) Echo path change detector
WO2018188282A1 (en) Echo cancellation method and device, conference tablet computer, and computer storage medium
EP2785032B1 (en) Echo canceller and echo cancellation method
CN106486135B (en) Near-end speech detector, speech system and method for classifying speech
TWI692754B (en) Method and device for continuously updating coefficient vector of finite impulse response filter
WO2020181766A1 (en) Voice signal processing method and device, apparatus, and readable storage medium
US8644522B2 (en) Method and system for modeling external volume changes within an acoustic echo canceller
CN103391381A (en) Method and device for canceling echo
WO2010083641A1 (en) Method and apparatus for detecting double talk
US8199907B2 (en) Echo canceller and echo cancelling method and program
WO2020252629A1 (en) Residual acoustic echo detection method, residual acoustic echo detection device, voice processing chip, and electronic device
WO2017012350A1 (en) Filter state divergence judgement method and device
CN109559756B (en) Filter coefficient determining method, echo eliminating method, corresponding device and equipment
CN112489670A (en) Time delay estimation method and device, terminal equipment and computer readable storage medium
CN107786755B (en) Double-end call detection method and device
Pfeifenberger et al. Acoustic Echo Cancellation with Cross-Domain Learning.
CN110148421A (en) A kind of residual echo detection method, terminal and device
CN111355855B (en) Echo processing method, device, equipment and storage medium
CN111989934B (en) Echo cancellation device, echo cancellation method, signal processing chip, and electronic apparatus
Mahbub et al. A single-channel acoustic echo cancellation scheme using gradient-based adaptive filtering
WO2022194011A1 (en) Echo cancellation method and apparatus, device, and storage medium
CN111883155B (en) Echo cancellation method, device and storage medium
JP6272590B2 (en) Echo canceller device and communication device

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: 16827041

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: 16827041

Country of ref document: EP

Kind code of ref document: A1