Echo cancellation method and device, readable storage medium and computer program product

By using the out-of-synchronous length to predict the echo signal and selecting candidate signals with small signal values ​​in echo cancellation, the problem of large residual echo volume after echo cancellation is solved, and the echo cancellation effect is improved.

CN119517063APending Publication Date: 2025-02-25GOERTEK INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411666551.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The prior art has a strong sense of residual echo after echo cancellation, and the echo cancellation effect is not ideal.

Method used

By obtaining the original signal to be echo cancelled, predicting the echo signal based on the out-of-synchronization length, echo cancellation is performed separately, and a candidate signal with a small signal value is selected as the target signal after echo cancellation.

Benefits of technology

The amount of residual echo after echo cancellation is reduced, and the echo cancellation effect is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119517063A_ABST
    Figure CN119517063A_ABST
Patent Text Reader

Abstract

The invention discloses an echo cancellation method and device, a readable storage medium and a computer program product, and relates to the technical field of signal processing, and the method comprises the steps: obtaining an original signal to be subjected to echo cancellation; the first echo signal is predicted based on the first step length, the second echo signal is predicted based on the second step length, and the first step length is different from the second step length; performing echo cancellation on the original signal by using the first echo signal to obtain a first candidate signal, and performing echo cancellation on the original signal by using the second echo signal to obtain a second candidate signal; and selecting a candidate signal with a small signal value in the first candidate signal and the second candidate signal as a target signal after echo cancellation. According to the invention, the amount feeling of residual echoes after echo cancellation is reduced, and the echo cancellation effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of signal processing technology, and in particular to an echo cancellation method, device, readable storage medium and computer program product. Background Art

[0002] When a local terminal is talking to a remote terminal, an acoustic echo is usually generated. That is, the sound played by the speaker is picked up by the microphone and sent back to the remote terminal, so that the user of the remote terminal hears his or her own echo signal.

[0003] Echo cancellation is usually performed based on a Kalman filter. The basic idea of ​​this echo cancellation method is to estimate the characteristic parameters of the echo path with a fixed single step length to predict a simulated echo signal, and then subtract the echo signal from the received original signal to achieve echo cancellation. However, this echo cancellation method has the problem that the residual echo after echo cancellation is strong and the echo cancellation effect is poor.

[0004] Therefore, how to reduce the volume of residual echo after echo cancellation to improve the echo cancellation effect is a technical problem that needs to be solved urgently in the field of this technology. Summary of the invention

[0005] The main purpose of the present application is to provide an echo cancellation method, device, readable storage medium and computer program product, aiming to solve the technical problem of how to reduce the volume of residual echo after echo cancellation to improve the echo cancellation effect.

[0006] To achieve the above object, the present application provides an echo cancellation method, which comprises the following steps:

[0007] Obtaining the original signal to be echo-cancelled;

[0008] Predicting a first echo signal based on a first step length, and predicting a second echo signal based on a second step length, wherein the first step length is different from the second step length;

[0009] Using the first echo signal to perform echo cancellation on the original signal to obtain a first candidate signal, and using the second echo signal to perform echo cancellation on the original signal to obtain a second candidate signal;

[0010] The candidate signal with a smaller signal value between the first candidate signal and the second candidate signal is selected as the target signal after echo cancellation.

[0011] In one embodiment, the step of predicting the first echo signal based on the first step length includes:

[0012] Obtaining a first historical system state of a previous time step, wherein the first historical system state is a system state updated based on the first step length in the previous time step, and the first historical system state is a vector;

[0013] A convolution between the first historical system state and a preset far-end signal is calculated to obtain a first echo signal.

[0014] In one embodiment, the step of predicting the second echo signal based on the second step length includes:

[0015] Obtaining a second historical system state of a previous time step, wherein the second historical system state is a system state updated based on a second step length in the previous time step, and the second historical system state is a vector;

[0016] The convolution between the second historical system state and the preset far-end signal is calculated to obtain a second echo signal.

[0017] In one embodiment, after the step of selecting the candidate signal with a smaller signal value between the first candidate signal and the second candidate signal as the target signal after echo cancellation, the method further includes:

[0018] Based on the target signal and the first step, the system state is updated to obtain a first current system state;

[0019] Update the system state based on the target signal and the second step length to obtain a second current system state;

[0020] The first current system state is used as the first historical system state at the next time step, and the second current system state is used as the second historical system state at the next time step.

[0021] In one embodiment, the step of obtaining a first current system state by updating the system state based on the target signal and the first step comprises:

[0022] Get the gain of the current time step prediction;

[0023] Calculating the product of the first step length, the gain and the target signal to obtain a first measurement error;

[0024] The system state is updated based on the first measurement error to obtain a first current system state, wherein the first current system state is positively correlated with the first measurement error.

[0025] In one embodiment, the step of updating the system state based on the target signal and the second step length to obtain a second current system state includes:

[0026] Get the gain of the current time step prediction;

[0027] Calculating the product of the second step length, the gain and the target signal to obtain a second measurement error;

[0028] The system state is updated based on the second measurement error to obtain a second current system state, wherein the second current system state is positively correlated with the second measurement error.

[0029] In one embodiment, the first step length is greater than zero and less than or equal to one, and / or the second step length is greater than zero and less than or equal to one.

[0030] In addition, to achieve the above-mentioned purpose, the present application also provides an echo cancellation device, which includes a microphone array and a processor, and the microphone array is electrically connected to the processor; the processor is used to execute the steps of the echo cancellation method as described above.

[0031] In addition, to achieve the above-mentioned purpose, the present application also provides a readable storage medium, which is a computer-readable storage medium, and a program for implementing the echo cancellation method is stored on the computer-readable storage medium. The program for implementing the echo cancellation method is executed by a processor to implement the steps of the echo cancellation method as described above.

[0032] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned echo cancellation method when executed by a processor.

[0033] One or more technical solutions proposed in this application have at least the following technical effects:

[0034] Acquire an original signal to be echo-cancelled; predict a first echo signal based on a first step length, and predict a second echo signal based on a second step length, wherein the first step length is different from the second step length; perform echo cancellation on the original signal using the first echo signal to obtain a first candidate signal, and perform echo cancellation on the original signal using the second echo signal to obtain a second candidate signal; and select the candidate signal with a smaller signal value between the first candidate signal and the second candidate signal as the target signal after echo cancellation. In this way, the embodiment of the present application predicts the echo signal with different first step sizes and second step sizes, that is, predicts the echo signal with double step sizes. It is easy to understand that the first step size is different from the second step size, so there will be a relative size relationship, that is, the echo signal is predicted with double step sizes, one large and one small. The step size is set small, the error is small (less residual echo), but the convergence is slow (the echo cancellation error is slower and stabilized within a smaller error range), and the step size is set large, the convergence is fast (the echo cancellation error is faster and stabilized within a smaller error range), but the error is large (more residual echo). Based on this, the two step sizes, one large and one small, are mutually restrained and constrained to take into account the convergence speed and error, that is, the efficiency and effect of echo cancellation, and the candidate signal with a small signal value is selected as the target signal after echo cancellation, that is, the signal with a small signal value is selected as the echo cancellation result to reduce the signal amplitude of the residual echo, thereby reducing the volume of the residual echo after echo cancellation and improving the echo cancellation effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0036] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0037] Figure 1 This is a flow chart of the first embodiment of the echo cancellation method of the present application;

[0038] Figure 2 This is a time domain waveform experimental simulation diagram of the original signal involved in an embodiment of the echo cancellation method of the present application;

[0039] Figure 3 for Figure 2 Corresponding spectrum experiment simulation diagram;

[0040] Figure 4 A schematic diagram of a time domain waveform experiment simulation of a far-end signal involved in an embodiment of an echo cancellation method;

[0041] Figure 5 for Figure 4 Corresponding spectrum experiment simulation diagram;

[0042] Figure 6 To use the existing echo cancellation method Figure 2 Schematic diagram of experimental simulation of the time domain waveform results after echo cancellation of the original signal;

[0043] Figure 7 for Figure 6 Corresponding spectrum experiment simulation diagram;

[0044] Figure 8 For adopting the echo cancellation method provided by the present application Figure 2 Schematic diagram of experimental simulation of the time domain waveform results after echo cancellation of the original signal;

[0045] Fig. 9 for Figure 8 Corresponding spectrum experiment simulation diagram;

[0046] Fig.10 This is a schematic diagram of the structure of the echo cancellation device of the present application;

[0047] Fig.11 Schematic diagram of the device structure of the hardware operating environment involved in the echo cancellation device in the embodiment of the present application.

[0048] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.

[0050] Acoustic echo refers to the sound broadcast by the speaker being picked up by the microphone through multiple paths while the receiver hears it. Acoustic Echo Cancellation (AEC) is mainly used to reduce or eliminate echoes in audio communications. It has very important and wide applications in hands-free calls, conference systems, handheld devices, and wearable devices.

[0051] Echo cancellation is mainly used to reduce or eliminate echoes in audio communications. Today, the most common method to solve the echo problem is to use an adaptive filtering algorithm to adjust the weight vector of the filter, estimate an approximate echo path to approximate the real echo path, and obtain an estimated echo signal. This signal is then removed from the mixed signal of pure speech and echo to achieve echo cancellation. The selection of the filter plays a critical role in the performance of echo cancellation. The filters widely used in echo cancellation mainly include LMS (Least Mean Squares) filters, NLMS (Normalized Least Mean Squares) filters, Kalman filters, and the like.

[0052] Usually when there is double talk or noise interference at the near end, the filter will diverge quickly. If the step size is set small, the error will be small, but the convergence will be slow. If the step size is set large, the convergence will be fast, but the error will be large.

[0053] The goal of the Kalman filter is to minimize the covariance of the state error, which can better balance fast tracking and double-talk interference. It is better than adaptive filters based on LMS or NLMS, but there is still a problem that the residual echo after echo cancellation is strong and the echo cancellation effect is not ideal.

[0054] Based on this, the main solution of the present application is: obtain the original signal to be echo eliminated; predict the first echo signal based on the first step length, and predict the second echo signal based on the second step length, wherein the first step length is different from the second step length; perform echo elimination on the original signal with the first echo signal to obtain a first candidate signal, and perform echo elimination on the original signal with the second echo signal to obtain a second candidate signal; select the candidate signal with the smaller signal value between the first candidate signal and the second candidate signal as the target signal after echo elimination.

[0055] The present application predicts the echo signal by using different first step sizes and second step sizes respectively, that is, predicting the echo signal with a double step size. It is easy to understand that if the first step size is different from the second step size, there will be a relative size relationship, that is, the echo signal is predicted with a double step size of one large and one small, and the step size is set small, the error is small (less residual echo), but the convergence is slow (the echo cancellation error is slower and stabilized within a smaller error range), the step size is set large, the convergence is fast (the echo cancellation error is faster and stabilized within a smaller error range), but the error is large (more residual echo). Based on this, the two step sizes, one large and one small, are mutually restrained and constrained to take into account the convergence speed and error, that is, the efficiency and effect of echo cancellation, and the candidate signal with a small signal value is selected as the target signal after echo cancellation, that is, the signal with a small signal value is selected as the echo cancellation result to reduce the signal amplitude of the residual echo, thereby reducing the volume of the residual echo after echo cancellation and improving the echo cancellation effect.

[0056] It should be noted that the executor of each embodiment of the echo cancellation method of the present application may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an echo cancellation device capable of realizing the above functions, such as headphones, virtual reality helmets, augmented reality helmets, etc. The embodiments of the echo cancellation method of the present application do not impose specific restrictions on this.

[0057] Based on this, the present application proposes a first embodiment of the echo cancellation method, please refer to Figure 1 , the echo cancellation method comprises steps S10 to S40:

[0058] Step S10, obtaining the original signal to be echo-cancelled;

[0059] The original signal may specifically be a signal to be echo-cancelled that is picked up by a sound pickup device (such as a microphone).

[0060] Step S20, predicting the first echo signal based on the first step length, and predicting the second echo signal based on the second step length, wherein the first step length is different from the second step length;

[0061] The basic idea of ​​echo cancellation is to simulate the echo path to generate an estimated echo signal based on the simulated echo path, that is, a predicted echo signal, and then subtract the estimated echo signal from the signal to be echo cancelled, thereby completing the echo cancellation.

[0062] Filters such as LMS, NLMS and Kalman usually simulate the echo path through certain coefficients. For example, LMS filters and NLMS filters usually simulate the echo path based on weight coefficients, while Kalman filters simulate the echo path based on coefficients such as state transfer matrix, control input matrix, and observation matrix. The step size determines the update amplitude of the filter coefficient, which can affect the simulated echo path and further affect the predicted echo signal. Based on this, the present embodiment can specifically predict the echo signal by using a filter. In a preferred embodiment, the Kalman filter is used to predict the echo signal, that is, the Kalman filter is used to predict the first echo signal based on the first step size and the second echo signal based on the second step size.

[0063] Furthermore, the echo cancellation can be performed by a filter, that is, the filter is used as the execution subject of each embodiment of the echo cancellation method of the present application. Exemplarily, the Kalman filter is used as the execution subject to illustrate and describe each embodiment of the present application. It is easy to understand that the Kalman filter is not a physical device in essence, but a mathematical algorithm. Therefore, the actual execution subject is the device that implements the Kalman filter algorithm.

[0064] Furthermore, the size of the step size will affect the filter's convergence speed, stability, steady-state error, sensitivity to noise, and other performance.

[0065] Among them, for the convergence speed, a larger step size can speed up the convergence speed of the filter and make the filter approach the optimal solution faster; a smaller step size will cause the filter to converge more slowly, but it can usually improve the stability of the convergence.

[0066] In terms of stability, a filter with a larger step size may diverge, that is, the filter coefficients are updated too much, resulting in unstable performance and may even fail to converge to the desired solution; a smaller step size can increase the stability of the system and reduce the risk of filter divergence, but it may cause the filter to be slow to respond to rapid changes in the input signal.

[0067] For steady-state error, a large step size may lead to a larger steady-state error because the coefficient update may be over- or under-updated; a small step size can reduce the steady-state error, but it may take longer to reach steady-state.

[0068] Regarding sensitivity to noise, a large step size may make the filter more sensitive to noise in the input signal because the noise will be amplified to a greater extent and affect the update of the coefficients; a small step size can reduce the impact of noise on the filter performance.

[0069] Based on this, this embodiment predicts the echo signal based on at least two different step sizes, so that the different step sizes can be restrained and constrained each other, so that the filter can take into account various performances, thereby making the filter have better comprehensive performance.

[0070] It should be noted that relevant personnel can set two or more different step sizes to predict the echo signal according to actual needs. Exemplarily, the embodiments of the present application are described and explained based on two different first step sizes and second step sizes to predict the echo signal, and for the convenience of subsequent description and explanation, the first step size is λ1 and the second step size is λ2.

[0071] Further, the first step length is greater than zero and less than or equal to one, and / or the second step length is greater than zero and less than or equal to one. In a preferred embodiment, the first step length is greater than zero and less than or equal to one and the second step length is greater than zero and less than or equal to one, that is, λ1∈(0,1] and λ2∈(0,1].

[0072] Step S30, performing echo cancellation on the original signal using the first echo signal to obtain a first candidate signal, and performing echo cancellation on the original signal using the second echo signal to obtain a second candidate signal;

[0073] It should be noted that the first candidate signal is obtained by performing echo cancellation on the original signal using the first echo signal, and specifically, the first candidate signal can be obtained by subtracting the first echo signal from the original signal. Similarly, the second candidate signal is obtained by performing echo cancellation on the original signal using the second echo signal, and specifically, the second candidate signal can be obtained by subtracting the second echo signal from the original signal.

[0074] Step S40: Select the candidate signal with a smaller signal value between the first candidate signal and the second candidate signal as the target signal after echo cancellation.

[0075] It should be noted that the candidate signal (including the first candidate signal and the second candidate signal) is usually a signal with a certain duration. Based on this, the signal value of the candidate signal can be specifically the signal amplitude (amplitude) or RMS (Root Mean Square) value of the candidate signal. Let the first candidate signal be e1 and the second candidate signal be e2, then the signal value of the first candidate signal can be expressed as |e1|, and the signal value of the second candidate signal can be expressed as |e2|.

[0076] Furthermore, the target signal e obtained at the current time step n can be expressed as: The target signal is the echo cancellation result.

[0077] The time step is a unit of the Kalman filter's progress in the time series. Each time step represents an update cycle of the system state. The Kalman filter gradually improves the estimation of the system state by iterating at each time step, thereby gradually improving the echo cancellation effect.

[0078] Furthermore, after the target signal is obtained, the target signal may be output or stored.

[0079] This embodiment acquires an original signal to be echo-cancelled; predicts a first echo signal based on a first step length, and predicts a second echo signal based on a second step length, wherein the first step length is different from the second step length; performs echo cancellation on the original signal using the first echo signal to obtain a first candidate signal, and performs echo cancellation on the original signal using the second echo signal to obtain a second candidate signal; and selects a candidate signal having a smaller signal value between the first candidate signal and the second candidate signal as a target signal after echo cancellation. In this way, the present embodiment predicts the echo signal with different first step sizes and second step sizes, that is, predicts the echo signal with double step sizes. It is easy to understand that the first step size is different from the second step size, and there will be a relative size relationship, that is, the echo signal is predicted with double step sizes, one large and one small. The step size is set small, the error is small (less residual echo), but the convergence is slow (the echo cancellation error is slow and stabilized within a smaller error range), and the step size is set large, the convergence is fast (the echo cancellation error is fast and stabilized within a smaller error range), but the error is large (more residual echo). Based on this, the two step sizes, one large and one small, are mutually restrained and constrained to take into account the convergence speed and error, that is, the efficiency and effect of echo cancellation, and the candidate signal with a small signal value is selected as the target signal after echo cancellation, that is, the signal with a small signal value is selected as the echo cancellation result to reduce the signal amplitude of the residual echo, thereby reducing the volume of the residual echo after echo cancellation and improving the echo cancellation effect.

[0080] For example, Figure 2 and Figure 3 is an exemplary original signal to be echo-cancelled, wherein: Figure 2 is the time domain waveform. Figure 3 is the spectrum diagram, Figure 4 and Figure 5 To pick up the original signal and transmit it to the remote signal on the local terminal, Figure 4 is the time domain waveform. Figure 5 is the spectrum diagram, Figure 6 and Figure 7 In order to adopt the existing echo cancellation method, specifically, to adopt the existing Kalman filter to Figure 2 and Figure 3 The signal obtained after echo cancellation of the original signal in, where Figure 6 is the time domain waveform. Figure 7 is the spectrum diagram, Figure 8 and Fig. 9 To adopt the echo cancellation method provided by this application Figure 2 and Figure 3 The signal obtained after echo cancellation of the original signal in, where Figure 8 is the time domain waveform. Fig. 9 For the spectrum diagram, Figure 6 , Figure 7 and Figure 8 , Fig. 9 It can be seen from the comparison that the amplitude of the residual echo of the echo cancellation method provided by the present application is reduced. By reducing the amplitude of the residual echo, the amount of the residual echo after echo cancellation can be effectively reduced. In addition, the present application also obtained through experimental comparison that, in the case of single far-end speech (i.e., when only the far-end signal exists, at this time, only the echo signal exists in the original signal), the existing echo cancellation method is used, specifically, the Kalman filter is used to perform echo cancellation on the original signal, and the average RMS amplitude of the obtained signal is -38.17 decibels, while the echo cancellation method provided by the present application is used to perform echo cancellation on the original signal, and the average RMS amplitude of the obtained signal is -40.34 decibels; in the case of double-talk (i.e., when both the near-end signal and the far-end signal exist, at this time, the original signal In the example of FIG. 1 , there are both echo signals and valid speech signals in the original signal. When the existing echo cancellation method, specifically, a Kalman filter, is used to perform echo cancellation on the original signal, the average RMS amplitude of the obtained signal is -31.6 dB. When the echo cancellation method provided by the present application is used to perform echo cancellation on the original signal, the average RMS amplitude of the obtained signal is -33.16 dB. It can be seen that the echo cancellation method provided by the present application reduces the signal amplitude of the residual echo by about 1.5 to 2 dB after optimization, regardless of whether the far-end is single-talking or double-talking.

[0081] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the first embodiment can be referred to the above introduction and will not be described in detail later. On this basis, the step of predicting the first echo signal based on the first step length includes:

[0082] Step A10, obtaining a first historical system state of a previous time step, wherein the first historical system state is a system state updated based on the first step length in the previous time step, and the first historical system state is a vector;

[0083] The previous time step refers to the time step before the current time step. For example, if the current time step is n, the previous time step is n-1.

[0084] The first historical system state of the previous time step is specifically the system state after the Kalman filter is updated based on the first step length. It can be understood that when echo is eliminated, the estimated system state is essentially the echo path, and the echo path is essentially represented by a vector. For example, in the Kalman filter, the system state estimated by the Kalman filter is usually the impulse response of the echo path or its parameterized representation. In a specific embodiment, the system state at the kth time step can be expressed as: h(k) = [t0(k)t1(k)......tN(k)g(k)φ(k)η(k)δ(k)], where tn(k) is the estimated value of the nth impulse response coefficient at the kth time step, g(k) is the estimated value of the amplitude gain of the echo at the kth time step, φ(k) is the estimated value of the phase of the echo at the kth time step, η(k) is the estimated value of the noise level at the kth time step, and δ(k) is the estimated value of the parameter of the nonlinear distortion at the kth time step.

[0085] Step A20: Calculate the convolution between the first historical system state and a preset far-end signal to obtain a first echo signal.

[0086] It should be noted that when canceling echo, the Kalman filter usually has two inputs, one is the original signal to be eliminated, and the other is the far-end signal, which refers to the audio signal transmitted from the far end or the other communication end. In a two-way communication system such as a telephone call or video conference, the far-end signal is the sound transmitted from the far-end speaker to the local listener through the communication link. This signal is played by the speaker at the local listener end, but it is also captured by the local microphone and mixed with the local speaker's voice, thus generating an echo.

[0087] The preset far-end signal may specifically be the far-end signal acquired at the current time step. For example, in a two-way communication scenario such as a telephone call or a video conference, the far-end signal may specifically be a signal transmitted to the speaker of the terminal on this side and to be played through the speaker of the terminal on this side. In the Kalman filter, the relationship between the far-end signal and the system state can be regarded as a linear filtering process. Specifically, the far-end signal passes through a linear system (such as an echo path) to generate the echo part of the near-end signal.

[0088] In the current time step, after the Kalman filter obtains the preset remote signal and the first historical system state, it calculates the convolution between the first historical system state and the preset remote signal. Specifically, the convolution can be a linear convolution or a circular convolution. The first historical system state obtained at the current time step n is The preset remote signal is x(n), then the convolution between the first historical system state and the preset remote signal can be expressed as That is, the first echo signal can be expressed as Furthermore, the first echo signal can be expressed as Where y represents the original signal.

[0089] In a possible implementation, the step of predicting the second echo signal based on the second step length includes:

[0090] Step B10, obtaining a second historical system state of a previous time step, wherein the second historical system state is a system state updated based on a second step length in the previous time step, and the second historical system state is a vector;

[0091] Step B20: Calculate the convolution between the second historical system state and the preset far-end signal to obtain a second echo signal.

[0092] Similar to the above method of obtaining the first echo signal, the second echo signal is obtained by convolution calculation. The second historical system state obtained at the current time step n is recorded as The second echo signal can be expressed as Furthermore, the second echo signal can be expressed as

[0093] It should be noted that if the length of the first echo signal is inconsistent with that of the original signal, the first echo signal can be subtracted from the original signal by truncation or overlapping subtraction. Similarly, if the length of the second echo signal is inconsistent with that of the original signal, the second echo signal can be subtracted from the original signal by truncation or overlapping subtraction. For example, assuming that the length of the preset remote signal and the original signal is N, the length of the first historical system state and the second historical system state is M, and the first echo signal and the second echo signal obtained after the convolution calculation are vectors of length N+M-1, the N+M-1-dimensional echo signal can be truncated to N dimensions, and only the part with the same length as the original signal is retained, and then subtracted from the original signal. Alternatively, the predicted echo signal can be divided into multiple N-dimensional blocks, and each block is overlapped and subtracted from the original signal. This method can retain more information to improve the accuracy of echo cancellation.

[0094] In this embodiment, the echo signal is obtained by convolution prediction between the system state estimated by the Kalman filter and the preset far-end signal, which can more accurately simulate the process of the far-end signal passing through the acoustic echo path (Acoustic Echo Path, AEP). This is because the acoustic echo path is essentially a linear time-invariant system (Linear Time-Invariant, LTI), and convolution is an ideal tool to describe the response of this system, thereby improving the accuracy of the predicted echo signal, and the convolution operation can easily adapt to different echo path characteristics, including the length, delay and attenuation characteristics of the path. This means that the algorithm can be used in a variety of different environments and devices, thereby improving the robustness of echo cancellation.

[0095] Based on the first embodiment and / or the second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the first and second embodiments can be referred to the above description and will not be described in detail later. On this basis, after the step of selecting the candidate signal with a smaller signal value between the first candidate signal and the second candidate signal as the target signal after echo cancellation, the method further includes:

[0096] Step C10, updating the system state based on the target signal and the first step to obtain a first current system state;

[0097] Step C20, updating the system state based on the target signal and the second step length to obtain a second current system state;

[0098] The first current system state is used as the first historical system state at the next time step, and the second current system state is used as the second historical system state at the next time step.

[0099] The Kalman filter updates the system state based on the first step length and the second step length respectively to complete the update of the system state at the current time step. It can be understood that the system state at the current time step is also the historical system state at the next time step.

[0100] In a possible implementation manner, the step of obtaining a first current system state by updating the system state based on the target signal and the first step includes:

[0101] Step D10, obtaining the gain predicted at the current time step;

[0102] This gain is the gain predicted by the Kalman filter in the current time step. Specifically, the gain can be expressed as Among them, P(n) - =P(n-1)+Q, P(n)=(IK(n)x(n) T )P(n) -, R(n)=|e(n) 2 +ε, ε is the preset bias factor, usually a very small value, Q represents the process noise covariance, R represents the observation noise covariance, n represents the current time step, K represents the gain, and e represents the target signal.

[0103] Step D20, calculating the product of the first step length, the gain and the target signal to obtain a first measurement error;

[0104] Step D30: updating the system state based on the first measurement error to obtain a first current system state, wherein the first current system state is positively correlated with the first measurement error.

[0105] Specifically, the first current system state can be expressed by the formula: in, Indicates the first historical system state, Indicates the first current system state.

[0106] In a possible implementation manner, the step of updating the system state based on the target signal and the second step length to obtain a second current system state includes:

[0107] Step E10, obtaining the gain predicted at the current time step;

[0108] Step E20, calculating the product of the second step length, the gain and the target signal to obtain a second measurement error;

[0109] Step E30: updating the system state based on the second measurement error to obtain a second current system state, wherein the second current system state is positively correlated with the second measurement error.

[0110] The calculation method of the first current system state is the same as that of the second current system state, which will not be repeated here. Specifically, it can be expressed by the formula: in Indicates the second historical system status, = indicates the second current system state.

[0111] In addition, the present application also provides an echo cancellation device, referring to Fig.10 As shown, the echo cancellation device comprises:

[0112] An acquisition module 10 is used to acquire an original signal to be echo-cancelled;

[0113] A prediction module 20, configured to predict a first echo signal based on a first step length, and predict a second echo signal based on a second step length, wherein the first step length is different from the second step length;

[0114] an elimination module 30, configured to perform echo elimination on the original signal using the first echo signal to obtain a first candidate signal, and perform echo elimination on the original signal using the second echo signal to obtain a second candidate signal;

[0115] The selection module 40 is configured to select a candidate signal with a smaller signal value between the first candidate signal and the second candidate signal as a target signal after echo cancellation.

[0116] In one embodiment, the prediction module 20 is further configured to:

[0117] Obtaining a first historical system state of a previous time step, wherein the first historical system state is a system state updated based on the first step length in the previous time step, and the first historical system state is a vector;

[0118] The convolution between the first historical system state and a preset far-end signal is calculated to obtain a first echo signal.

[0119] In one embodiment, the prediction module 20 is further configured to:

[0120] Obtaining a second historical system state of a previous time step, wherein the second historical system state is a system state updated based on a second step length in the previous time step, and the second historical system state is a vector;

[0121] The convolution between the second historical system state and the preset far-end signal is calculated to obtain a second echo signal.

[0122] In one embodiment, the echo cancellation device further includes an updating module, wherein the updating module is configured to:

[0123] Based on the target signal and the first step of updating the system state, a first current system state is obtained;

[0124] Update the system state based on the target signal and the second step length to obtain a second current system state;

[0125] The first current system state is used as the first historical system state at the next time step, and the second current system state is used as the second historical system state at the next time step.

[0126] In one embodiment, the update module is further used to:

[0127] Get the gain of the current time step prediction;

[0128] Calculating the product of the first step length, the gain and the target signal to obtain a first measurement error;

[0129] The system state is updated based on the first measurement error to obtain a first current system state, wherein the first current system state is positively correlated with the first measurement error.

[0130] In one embodiment, the update module is further used to:

[0131] Get the gain of the current time step prediction;

[0132] Calculating the product of the second step length, the gain and the target signal to obtain a second measurement error;

[0133] The system state is updated based on the second measurement error to obtain a second current system state, wherein the second current system state is positively correlated with the second measurement error.

[0134] In one embodiment, the first step length is greater than zero and less than or equal to one, and / or the second step length is greater than zero and less than or equal to one.

[0135] In addition, an embodiment of the present application also proposes an echo cancellation device, which includes a memory, a processor, and an echo cancellation program stored in the memory and executable on the processor. When the echo cancellation program is executed by the processor, the steps of the cognitive impairment auxiliary detection method as described above are implemented.

[0136] Reference below Fig.11 , which shows a schematic diagram of the structure of an echo cancellation device suitable for implementing an embodiment of the present application. The echo cancellation device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, headphones, AR (Augmented Reality) helmets, VR (Virtual Reality) helmets, mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.11 The echo cancellation device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0137] like Fig.11As shown, the echo cancellation device may include a processing system 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage system 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the echo cancellation device are also stored. The processing system 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input system 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output system 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage system 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication system 1009. The communication system 1009 can allow the echo cancellation device to communicate with other devices wirelessly or by wire to exchange data. Although the echo cancellation device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0138] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0139] The echo cancellation device provided in the embodiment of the present application adopts the echo cancellation method in the above embodiment, which can solve the technical problem of how to reduce the amount of residual echo after echo cancellation to improve the echo cancellation effect. Compared with the prior art, the beneficial effects of the echo cancellation device provided in the present application are the same as the beneficial effects of the echo cancellation method provided in the above embodiment, and other technical features in the echo cancellation device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0140] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0141] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0142] In addition, to achieve the above objectives, an embodiment of the present application further provides a readable storage medium having computer-readable program instructions (ie, computer program) stored thereon, and the computer-readable program instructions are used to execute the echo cancellation method in the above embodiment.

[0143] The computer-readable storage medium provided in the embodiment of the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM: Random Access Memory), a read-only memory (ROM: Read Only Memory), an erasable programmable read-only memory (EPROM: Erasable Programmable Read Only Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.

[0144] The computer-readable storage medium may be included in the echo cancellation device; or may exist independently without being assembled into the echo cancellation device.

[0145] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the echo cancellation device, the echo cancellation device: obtains the original signal to be echo-cancelled; predicts the first echo signal based on the first step length, and predicts the second echo signal based on the second step length, wherein the first step length is different from the second step length; performs echo cancellation on the original signal with the first echo signal to obtain a first candidate signal, and performs echo cancellation on the original signal with the second echo signal to obtain a second candidate signal; and selects the candidate signal with the smaller signal value between the first candidate signal and the second candidate signal as the target signal after echo cancellation.

[0146] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0147] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0148] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0149] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned echo cancellation method, and can solve the technical problem of how to reduce the volume of residual echo after echo cancellation to improve the echo cancellation effect. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the echo cancellation method provided by the above-mentioned embodiment, and will not be repeated here.

[0150] In addition, an embodiment of the present application further provides a computer program product, including an echo cancellation program, which implements the steps of the echo cancellation method described above when executed by a processor.

[0151] The specific implementation of the computer program product of the present application is basically the same as the above-mentioned embodiments of the echo cancellation method, and will not be repeated here.

[0152] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0153] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0154] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software sensor, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, including a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0155] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. An echo cancellation method, characterized in that: The echo cancellation method comprises the following steps: Obtaining the original signal to be echo-cancelled; Predicting a first echo signal based on a first step length, and predicting a second echo signal based on a second step length, wherein the first step length is different from the second step length; Using the first echo signal to perform echo cancellation on the original signal to obtain a first candidate signal, and using the second echo signal to perform echo cancellation on the original signal to obtain a second candidate signal; The candidate signal with a smaller signal value between the first candidate signal and the second candidate signal is selected as the target signal after echo cancellation.

2. The echo cancellation method according to claim 1, characterized in that: The step of predicting the first echo signal based on the first step length comprises: Obtaining a first historical system state of a previous time step, wherein the first historical system state is a system state updated based on the first step length in the previous time step, and the first historical system state is a vector; The convolution between the first historical system state and a preset far-end signal is calculated to obtain a first echo signal.

3. The echo cancellation method according to claim 1, characterized in that: The step of predicting the second echo signal based on the second step length comprises: Obtaining a second historical system state of a previous time step, wherein the second historical system state is a system state updated based on a second step length in the previous time step, and the second historical system state is a vector; The convolution between the second historical system state and the preset far-end signal is calculated to obtain a second echo signal.

4. The echo cancellation method according to claim 1, wherein: After the step of selecting the candidate signal with a smaller signal value between the first candidate signal and the second candidate signal as the target signal after echo cancellation, the method further includes: Based on the target signal and the first step of updating the system state, a first current system state is obtained; Update the system state based on the target signal and the second step length to obtain a second current system state; The first current system state is used as the first historical system state at the next time step, and the second current system state is used as the second historical system state at the next time step.

5. The echo cancellation method according to claim 4, characterized in that: The step of obtaining a first current system state based on the target signal and the first step of updating the system state comprises: Get the gain of the current time step prediction; Calculating the product of the first step length, the gain and the target signal to obtain a first measurement error; The system state is updated based on the first measurement error to obtain a first current system state, wherein the first current system state is positively correlated with the first measurement error.

6. The echo cancellation method according to claim 4, characterized in that: The step of updating the system state based on the target signal and the second step length to obtain a second current system state comprises: Get the gain of the current time step prediction; Calculating the product of the second step length, the gain and the target signal to obtain a second measurement error; The system state is updated based on the second measurement error to obtain a second current system state, wherein the second current system state is positively correlated with the second measurement error.

7. The echo cancellation method according to any one of claims 1 to 6, characterized in that: The first step length is greater than zero and less than or equal to one and / or the second step length is greater than zero and less than or equal to one.

8. An echo cancellation device, characterized in that: The echo cancellation device comprises: a memory, a processor, and an echo cancellation program stored in the memory and executable on the processor, wherein the echo cancellation program implements the steps of the echo cancellation method according to any one of claims 1 to 7 when executed by the processor.

9. A readable storage medium, characterized in that: The readable storage medium is a computer-readable storage medium, on which is stored a program for implementing the echo cancellation method. The program for implementing the echo cancellation method is executed by a processor to implement the steps of the echo cancellation method as claimed in any one of claims 1 to 7.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the echo cancellation method according to any one of claims 1 to 7 are implemented.