Multi-feature fusion echo cancellation method and system based on self-attention transform network

Through the multi-feature fusion method of the deep self-attention transformation network, the accuracy problem of the traditional echo cancellation algorithm in complex environments is solved, achieving a more efficient echo cancellation effect and stronger generalization, making up for the problems in the deep network Information loss.

CN113870874BActive Publication Date: 2024-09-13WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111113340.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-23
Publication Date
2024-09-13
Estimated Expiration
2041-09-23

AI Technical Summary

Technical Problem

Traditional acoustic echo cancellation algorithms are difficult to accurately estimate echo signals in complex environments with nonlinear echoes and noise, resulting in reduced communication quality. Deep neural networks will cause information loss and network degradation when the network depth increases.

Method used

A multi-feature fusion echo cancellation method based on deep self-attention transform network is used to calculate the time delay alignment of the near-end mixed signal and the far-end reference signal, extract potential features and calculate the attention weight matrix, generate fusion features, and segment them into blocks and inter-block features, repeat the deep dynamic self-attention transformation network operation, calculate the mask value and perform signal masking, and finally decode and reconstruct the signal with echo cancellation.

Benefits of technology

It greatly improves the echo cancellation effect in complex environments with background noise, double-ended calls and non-linear distortion, makes up for the information loss in the deep self-attention transformation network, and improves the generalization and training speed of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113870874B
    Figure CN113870874B
Patent Text Reader

Abstract

The present invention discloses a multi-feature fusion echo cancellation method and system based on a self-attention transformation network, using independent convolution encoders to extract potential features from near-end signals and far-end signals respectively; the encoded two-end signal is subjected to multi-head attention to calculate the attention weight matrix, which is spliced ​​with the potential features of the two-end signal, and a deep separable convolution network is used to fuse the spliced ​​signal; the fused signal generates intra-block features after a dimension conversion operation, passes through a deep dynamic self-attention transformation network, and then uses residual connections to add the attention weight matrix, converts to inter-block features, and passes through the deep dynamic self-attention transformation network again; repeats intra-block and inter-block operations to calculate mask values; decodes the masked coded signal to obtain the near-end signal after echo cancellation. The present invention can eliminate echoes in a variety of scenarios, and can greatly improve the effect of echo cancellation while maintaining the integrity of the near-end voice.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of audio technology and relates to an echo cancellation method and system, and in particular to a multi-feature fusion echo cancellation method and system based on a deep self-attention transformation network. Background Art

[0002] In a full-duplex voice communication system, when the local speaker plays the received far-end signal, the local microphone will simultaneously collect the far-end signal played by the speaker and the voice of the near-end speaker, forming a near-end mixed signal, and send this mixed signal to the far end, so that the far-end speaker can hear what he just said. This sound signal that has been transmitted, played, collected and transmitted back again is called an echo. The presence of echo will seriously reduce the communication quality. The goal of acoustic echo cancellation is to remove the echo signal formed by the far-end signal contained in the near-end mixed signal to the greatest extent possible, while retaining the voice information of the near-end speaker.

[0003] Traditional acoustic echo cancellation algorithms usually use the received far-end signal as a reference signal, use a finite impulse filter to adaptively estimate the echo signal, and then subtract it from the mixed signal collected by the microphone. However, traditional methods have difficulty accurately estimating echo signals in complex environments with nonlinear echoes and noise.

[0004] In recent years, methods based on deep neural networks have been applied in the field of echo cancellation. Compared with traditional echo cancellation algorithms, methods based on deep neural networks can better fit nonlinear echoes and eliminate background noise, and are more competitive in low signal-to-noise ratio conditions. Deep networks are very good at fitting nonlinear features, but as the depth of the network increases, it will lead to network degradation and some irreversible information loss, especially in some complex deep network structures. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a multi-feature fusion echo cancellation method and system based on a deep self-attention transformation network.

[0006] The technical solution adopted by the method of the present invention is: a multi-feature fusion echo cancellation method based on a self-attention transformation network, comprising the following steps:

[0007] Step 1: Calculate the delay between the near-end mixed signal and the far-end reference signal to align the two-end signals;

[0008] Step 2: Extract potential features from the near-end mixed signal and the far-end reference signal respectively, calculate the attention weight matrix of the potential features of the near-end mixed signal and the far-end reference signal, concatenate the mixed signal features, the attention weight matrix and the reference signal features, and then generate the fusion features;

[0009] Step 3: Divide the fused features extracted in step 2 into blocks of specified size, and divide the fused features into two path forms: intra-block features and inter-block features;

[0010] Step 4: Send the intra-block features in step 3 to the deep dynamic self-attention transformation network, and then use the residual connection to add the output of the network to the attention weight matrix calculated in step 2, convert it into inter-block features, and send it to the deep dynamic self-attention transformation network again; repeat the above intra-block and inter-block operation process to calculate the mask value;

[0011] Step 5: Mask the potential features of the near-end mixed signal using the mask value calculated in step 4 to obtain the signal features of the echo cancellation;

[0012] Step 6: Decode the signal features after masking in step 5 and reconstruct the signal to obtain the near-end signal after echo cancellation.

[0013] The technical solution adopted by the system of the present invention is: a multi-feature fusion echo cancellation system of a deep self-attention transformation network, comprising the following modules:

[0014] Module 1 is used to calculate the delay between the near-end mixed signal and the far-end reference signal to align the two-end signals;

[0015] Module 2 is used to extract potential features from the near-end mixed signal and the far-end reference signal respectively, and calculate the attention weight matrix of the potential features of the near-end mixed signal and the far-end reference signal, concatenate the mixed signal features, the attention weight matrix and the reference signal features, and then generate a fusion feature;

[0016] Module 3 is used to divide the fused features extracted in module 2 into blocks of specified sizes, and divide the fused features into two path forms: intra-block features and inter-block features;

[0017] Module 4 is used to send the intra-block features in module 3 to the deep dynamic self-attention transformation network, and then use the residual connection to add the output of the network to the attention weight matrix calculated in module 2, convert it into inter-block features, and send it to the deep dynamic self-attention transformation network again; repeat the above intra-block and inter-block operation process to calculate the mask value;

[0018] Module 5, used to mask the potential features of the near-end mixed signal using the mask value calculated in module 4 to obtain the signal features of the echo cancellation;

[0019] Module 6 is used to decode the signal features after masking in module 5 and reconstruct the signal to obtain the near-end signal after echo cancellation.

[0020] The present invention provides a multi-feature fusion echo cancellation method and system based on a deep self-attention transformer network, so that the potential features of the double-end signal can be more fully integrated in the echo cancellation network, and a deep self-attention transformer network (Transformer) is introduced to fit the signal. The present invention compensates for the information loss in the deep self-attention transformer network by adopting a multi-feature fusion residual network, and accelerates the training process of the network, greatly improving the effect and application scope of echo cancellation in complex environments such as background noise, double-end calls and nonlinear distortion, and making the echo cancellation network more generalizable in complex environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 : is a flow chart of a method according to an embodiment of the present invention;

[0022] Figure 2 : is a system structure diagram of an embodiment of the present invention;

[0023] Figure 3 : is a flow chart of fusing potential features of a reference signal and a mixed signal in an embodiment of the present invention;

[0024] Figure 4 : is a structural diagram of a deep dynamic self-attention transformation network in an embodiment of the present invention;

[0025] Figure 5 : is a structural diagram of a speech energy control component in an embodiment of the present invention; DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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 are within the scope of protection of the present invention.

[0027] This embodiment first calculates the time delay between the near-end mixed signal and the far-end reference signal for alignment, then independently extracts potential features from the aligned two-end signals, and uses a multi-head attention mechanism and a deep separable network for feature fusion. Using the path segmentation method of matrix dimension conversion, the fused features can be divided into intra-block features and inter-block features. The intra-block features are sent to the deep self-attention transformation network, and then the output of the network is converted into inter-block features after adding the attention weight matrix using the residual connection, and then sent to the deep self-attention transformation network again. Repeat the above intra-block and inter-block operation process 6 times to calculate the mask value. Finally, the near-end signal is masked, decoded and reconstructed using the mask to obtain the near-end signal after echo cancellation.

[0028] Please see Figure 1 The present invention provides a multi-feature fusion echo cancellation method based on a deep self-attention transformation network, comprising the following steps:

[0029] Step 1: Use a delay estimation method based on generalized cross-correlation function to calculate the delay between the near-end mixed signal and the far-end reference signal, and align the two-end signals;

[0030] In this technical field, near-end refers to the signal collected by the local microphone, mixed signal refers to the signal that records both the voice of the local speaker and the far-end signal played by the local speaker; reference signal refers to the far-end signal that serves as a reference for the network and participates in the training of the network, because the echo part of the signal collected by the local microphone is obtained by nonlinearly distorting the far-end signal.

[0031] In this embodiment, the delay estimation method is specifically a generalized cross-correlation-phase transform method (GCC-PHAT):

[0032] In this embodiment, the peak value of the cross-correlation function between the near-end mixed signal and the far-end reference signal is calculated to determine the delay value. The cross-correlation function is the sum of the sliding products of the two sequences, reflecting the matching degree of the two functions at different relative positions. Since there is a strong correlation between the far-end reference signal and the near-end mixed signal, the delay of the reference signal can be accurately calculated in an ideal case.

[0033] In this embodiment, the sampling frequency of the signals collected and processed by the microphone is 16KHZ.

[0034] Step 2: The near-end mixed signal and the far-end reference signal are respectively extracted with the corresponding encoders, and the attention weight matrix of the near-end mixed signal potential features and the far-end reference signal potential features is calculated using the multi-head attention mechanism. The mixed signal features, the attention weight matrix and the reference signal features are concatenated, and then a fusion feature is generated through a deep separable network.

[0035] In this embodiment, the specific implementation of step 2 includes the following sub-steps:

[0036] Step 2.1: The near-end mixed signal and the far-end reference signal are independently passed through the encoder to extract the corresponding latent features;

[0037] The encoder used in this embodiment is a one-dimensional convolution layer and a relu activation function, wherein the convolution kernel size is twice the step size, and the window length is determined according to the video memory size to achieve a balance between performance and video memory occupancy. In this embodiment, the value is 20; the potential features extracted by the encoder all need to be processed by group normalization (Group Normalization) and a bottleneck layer (BottleneckLayer) to process the data; the bottleneck layer is a 1×1 convolutional neural network. In addition, the number of convolution layers and activation functions can be increased according to the training effect of the network to better fit the high-dimensional nonlinear potential characteristics of the signal.

[0038] Step 2.2: The attention weight matrix is ​​calculated by using the multi-head attention mechanism to calculate the attention weight matrix of the proximal mixed signal potential features and the distal reference signal potential features in step 2.1;

[0039] Step 2.3: Concatenate the latent features calculated in step 2.1 with the attention weight matrix calculated in step 2.2 on the same dimension to obtain a concatenated matrix;

[0040] Step 2.4: Use a deep separable network to group the spliced ​​matrix in step 2.3, reducing the output channels of the spliced ​​matrix to 1 / 3 of the original, forming a deep fusion feature that fully combines the proximal mixed signal and the distal reference signal information.

[0041] Please see Figure 3 ,The depth separable convolutional network in this embodiment is composed of a depth ,convolutional layer and a point convolutional layer, which greatly reduces the ,required computation.

[0042] In this embodiment, a multi-head attention mechanism is used to calculate the attention weight matrix of the potential features of the two-end signal, and the matrix is ​​spliced ​​with the potential features of the two-end signal to form a multi-feature splicing matrix; the multi-feature splicing matrix is ​​grouped using a depth-separable convolution to reduce the output channel to 1 / 3 of the original. The formula can be expressed as:

[0043] Q i =Enc(Mix),K i =Enc(Mix),V i =Enc(far)

[0044]

[0045] M i =Pointwise(Depthwise(J i ))

[0046] Among them, mix and far represent the proximal mixed signal and the far-end reference signal respectively. The corresponding latent features are obtained through the Enc() convolution encoder. The latent features of the proximal mixed signal mix are used as the query Q and key K required for multi-head attention, and the latent features of the far-end reference signal far are used as the value V, where the subscript i represents the number of heads in the multi-head attention. The attention weight matrix is ​​calculated through the multi-head attention Attention(), which is specifically a scaled dot product model: that is, the transpose of Q multiplied by K is divided by the square root of the vector dimension d, and then the score is calculated through the softmax activation function, and then multiplied by V to obtain the final attention weight matrix.

[0047] Then, the potential features of the near-end and far-end signals and the attention weight matrix between them are concatenated to obtain the concatenated matrix J; finally, they are sent to the depthwise separable convolution composed of the deep convolution layer and the point convolution layer to calculate the fused feature M.

[0048] The above attention weight matrix will also be connected to the training of the inter-block feature matrix in step 4 by a residual network.

[0049] Step 3: Divide the fusion features extracted in step 2 into blocks of specified size, perform layer normalization on the segmented fusion features, and then use matrix dimension transformation to divide the fusion features into two path forms: intra-block features and inter-block features;

[0050] In this embodiment, the fused features are long sequence inputs, which are divided into smaller blocks so that the input length is close to the square root of the original sequence length to optimize the data space; the divided fused features are layer-normalized; the processed fused features are dimensionally transformed to generate intra-block features and inter-block features of the same data in different dimensions.

[0051] Step 4: Send the intra-block features in step 3 to the deep dynamic self-attention transformation network, and then use the residual connection to add the output of the network to the attention weight matrix calculated in step 2, convert it into inter-block features, and send it to the deep dynamic self-attention transformation network again; repeat the above intra-block and inter-block operation process 6 times, calculate the mask value, and make full use of the dual-end features for local modeling and global modeling;

[0052] Please see Figure 4 The deep dynamic self-attention transformation network of this embodiment is a sequential hierarchical structure of a dynamic mask attention network (DMAN), a self-attention network and a feedforward neural network; the feedforward neural network is composed of a long short-term memory network, an activation function and a linear connection layer.

[0053] This embodiment introduces a new dynamic mask attetion network (DMAN), which is combined with the original self-attention network (SAN) and feedforward network (FFN) of Transformer, and performs data flow in a hierarchical structure of DMAN→SAN→FFN.

[0054] The dynamic mask attention module formula of the improved network is as follows:

[0055] A M (Q,K,V)=S M (Q,K)V;

[0056]

[0057] Among them, Q, K, and V are the query, key, and value in the attention mechanism respectively; attention A M (Q, K, V) is the attention scoring function S M The product of (Q,K) and value V; d k is the vector dimension; M i,j is a number between 0 and 1, which can be dynamic or static. When it is an all-one matrix, MAN degenerates to SAN, and when it is a unit matrix, it degenerates to FFN. Intuitively, FFN only focuses on its own information and cannot perceive other adjacent information; while in SAN, each token has an equal connection to any other token.

[0058] In addition, DMAN has been theoretically proven to be able to improve the disadvantage of SAN that it introduces noise, so as to better model local information; therefore, adding DMAN to the echo cancellation network can make the noise other than the echo more stable to cope with the environment with low signal-to-noise ratio.

[0059] The deep dynamic self-attention transformation network of this embodiment also retains the self-attention network and the feedforward neural network to ensure the modeling effect of the entire network at different scales. The feedforward neural network consists of a long short-term memory network, an activation function, and a linear layer, where the long short-term memory network is used to capture the temporal information of the sequence.

[0060] Step 5: Mask the potential features of the near-end mixed signal using the mask value calculated in step 4 to obtain the signal features of the echo cancellation;

[0061] In this embodiment, the mask value will pass through a two-dimensional convolution block, which consists of a prelu activation function and a two-dimensional convolution layer to map the features to the hidden layer; then restore the feature sequence in the same way as the matrix splitting in step 3; finally, pass through an activation function component, whose components include a speech energy control component consisting of a convolution layer, tanh, sigmoid, and relu activation functions.

[0062] like Figure 5 As shown in the figure, the mask value first passes through two parallel links, namely a one-dimensional convolution layer + tanh function and a one-dimensional convolution layer + sigmoid function. The outputs of the two links are multiplied, and their dot product passes through the activation function relu again.

[0063] Since the value of the tanh function is (-1,1), the value of the sigmoid function is (0,1), and the value of the relu function is [0,∞); therefore, the mask value is ultimately limited to between 0 and 1. The formula of the speech energy control component is as follows:

[0064] c_mask=relu(tanh(1d_conv(mask)*sigmoid(1d_conv(mask))));

[0065] The activation function formulas and values ​​are:

[0066]

[0067]

[0068] y=relu(x)=max(0,x),y∈[0,∞);

[0069] The original mask value mask passes through a one-dimensional convolution layer 1d_conv(), and passes through the activation functions tanh() and sigmoid() respectively; the dot product of the two functions passes through the activation function relu() to obtain the c_mask after voice control.

[0070] Step 6: Decode the signal features after masking in step 5 and reconstruct the signal to obtain the near-end signal after echo cancellation.

[0071] In this embodiment, the decoding process is a linear connection layer, and the signal reconstruction is specifically to restore the high-dimensional matrix to a one-dimensional speech sequence, which is similar to the overlap-add process of frame synthesis; finally, the near-end speaker signal after echo cancellation is obtained.

[0072] Please see Figure 2 The present invention provides a multi-feature fusion echo cancellation system based on a deep self-attention transformation network, comprising the following modules:

[0073] Module 1 is used to calculate the delay between the near-end mixed signal and the far-end reference signal to align the two-end signals;

[0074] Module 2 is used to extract potential features from the near-end mixed signal and the far-end reference signal respectively, and calculate the attention weight matrix of the potential features of the near-end mixed signal and the far-end reference signal, concatenate the mixed signal features, the attention weight matrix and the reference signal features, and then generate a fusion feature;

[0075] Module 3 is used to divide the fused features extracted in module 2 into blocks of specified sizes, and divide the fused features into two path forms: intra-block features and inter-block features;

[0076] Module 4 is used to send the intra-block features in module 3 to the deep dynamic self-attention transformation network, and then use the residual connection to add the output of the network to the attention weight matrix calculated in module 2, convert it into inter-block features, and send it to the deep dynamic self-attention transformation network again; repeat the above intra-block and inter-block operation process to calculate the mask value;

[0077] Module 5, used to mask the potential features of the near-end mixed signal using the mask value calculated in module 4 to obtain the signal features of the echo cancellation;

[0078] Module 6 is used to decode the signal features after masking in module 5 and reconstruct the signal to obtain the near-end signal after echo cancellation.

[0079] This conclusion was preliminarily verified by the above method and training from the AEC-Challenge dataset. In the case of far-end signal noise, the SI-SNR of the AEC-Challenge baseline is 12.20dB, the best result of the network in DTLN-aec is 13.59dB; the network test result of the present invention is 15.28dB.

[0080] The present invention makes full use of the high-dimensional feature information of the remote reference signal in the network structure, solves the network degradation problem caused by the increase of depth in the deep self-attention transformation network, and compensates for some irreversible information loss; this structure also accelerates the training process of the entire network, and greatly improves the effect and application scope of echo cancellation in complex environments with background noise, two-end calls and nonlinear distortion.

[0081] It should be understood that parts not elaborated in detail in this specification belong to the prior art.

[0082] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.

Claims

1. A multi-feature fusion echo cancellation method based on self-attention transformation network, characterized in that: The following steps are involved: Step 1: Calculate the delay between the near-end mixed signal and the far-end reference signal to align the two-end signals; Step 2: Extract potential features from the near-end mixed signal and the far-end reference signal respectively, calculate the attention weight matrix of the potential features of the near-end mixed signal and the far-end reference signal, concatenate the mixed signal features, the attention weight matrix and the reference signal features, and then generate the fusion features; Step 3: Divide the fused features extracted in step 2 into blocks of specified size, and divide the fused features into two path forms: intra-block features and inter-block features; Step 4: Send the intra-block features in step 3 to the deep dynamic self-attention transformation network, and then use the residual connection to add the output of the network to the attention weight matrix calculated in step 2, convert it into inter-block features, and send it to the deep dynamic self-attention transformation network again; repeat the above intra-block and inter-block operation process to calculate the mask value; The deep dynamic self-attention transformation network is a sequential hierarchical structure of a dynamic mask attention network, a self-attention network and a feedforward neural network; the feedforward neural network is composed of a long short-term memory network, an activation function and a linear connection layer; Step 5: Mask the potential features of the near-end mixed signal using the mask value calculated in step 4 to obtain the signal features of the echo cancellation; Step 6: Decode the signal features after masking in step 5 and reconstruct the signal to obtain the near-end signal after echo cancellation.

2. The multi-feature fusion echo cancellation method based on self-attention transformation network according to claim 1 is characterized in that: In step 1, a time delay estimation method based on a generalized cross-correlation function is used to calculate the time delay between the near-end mixed signal and the far-end reference signal.

3. The multi-feature fusion echo cancellation method based on self-attention transformation network according to claim 1 is characterized in that: The specific implementation of step 2 includes the following sub-steps: Step 2.1: The near-end mixed signal and the far-end reference signal are independently passed through the encoder to extract the corresponding latent features; Step 2.2: The potential features of the near-end mixed signal and the potential features of the far-end reference signal described in step 2.1 are used to calculate the attention weight matrix through a multi-head attention mechanism; Step 2.3: Concatenate the latent features calculated in step 2.1 with the attention weight matrix calculated in step 2.2 on the same dimension to obtain a concatenated matrix; Step 2.4: Use a deep separable convolutional network to group the spliced ​​matrix in step 2.3, reducing the output channels of the spliced ​​matrix to 1 / 3 of the original, forming a deep fusion feature that fully combines the proximal mixed signal and the distal reference signal information.

4. The multi-feature fusion echo cancellation method based on self-attention transformation network according to claim 3 is characterized in that: The encoder described in step 2.1 is a convolutional layer and a relu activation function, where the number of convolutional layers and the activation function are determined according to the training effect; the convolution kernel size is twice the step size, and the window length is determined according to the video memory size to achieve a balance between performance and video memory occupancy; the potential features extracted by the encoder are processed by group normalization and the bottleneck layer; the bottleneck layer is a 1×1 convolutional neural network.

5. The multi-feature fusion echo cancellation method based on self-attention transformation network according to claim 3 is characterized in that: The depthwise separable convolutional network described in step 2.4 consists of a depthwise convolutional layer and a pointwise convolutional layer.

6. The multi-feature fusion echo cancellation method based on self-attention transformation network according to claim 1 is characterized in that: In step 3, after the segmented fusion features are layer-normalized, the fusion features are divided into two path forms: intra-block features and inter-block features by matrix dimension transformation.

7. The multi-feature fusion echo cancellation method based on self-attention transformation network according to claim 1 is characterized in that: In step 5, the mask value passes through a two-dimensional convolution block to map the feature to the hidden layer. The two-dimensional convolution block consists of a prelu activation function and a two-dimensional convolution layer. Then, the feature sequence is restored according to the segmentation method in step 3. The mask value passes through two parallel links, namely a one-dimensional convolution layer + tanh function and a one-dimensional convolution layer + sigmoid function. Finally, it passes through an activation function component, which is a speech energy control component composed of a convolution layer, tanh, sigmoid and relu activation function. The results of the two link outputs are multiplied, and the dot product passes through the activation function relu again. Since the value of the tanh function is (-1,1), the value of the sigmoid function is (0,1), and the value of the relu activation function is [0,∞); therefore, the mask value is ultimately limited to between 0 and 1.

8. The multi-feature fusion echo cancellation method based on self-attention transformation network according to any one of claims 1 to 7, characterized in that: In step 6, the decoding process is a linear connection layer, and the signal reconstruction is specifically to restore the high-dimensional matrix to a one-dimensional speech sequence, and finally obtain the near-end speaker signal after echo cancellation.

9. A multi-feature fusion echo cancellation system based on self-attention transformation network, characterized in that: Includes the following modules: Module 1 is used to calculate the delay between the near-end mixed signal and the far-end reference signal to align the two-end signals; Module 2 is used to extract potential features from the near-end mixed signal and the far-end reference signal respectively, and calculate the attention weight matrix of the potential features of the near-end mixed signal and the far-end reference signal, concatenate the mixed signal features, the attention weight matrix and the reference signal features, and then generate a fusion feature; Module 3 is used to divide the fused features extracted in module 2 into blocks of specified sizes, and divide the fused features into two path forms: intra-block features and inter-block features; Module 4 is used to send the intra-block features in module 3 to the deep dynamic self-attention transformation network, and then use the residual connection to add the output of the network to the attention weight matrix calculated in module 2, convert it into inter-block features, and send it to the deep dynamic self-attention transformation network again; repeat the above intra-block and inter-block operation process to calculate the mask value; The deep dynamic self-attention transformation network is a sequential hierarchical structure of a dynamic mask attention network, a self-attention network and a feedforward neural network; the feedforward neural network is composed of a long short-term memory network, an activation function and a linear connection layer; Module 5, used to mask the potential features of the near-end mixed signal using the mask value calculated in module 4 to obtain the signal features of the echo cancellation; Module 6 is used to decode the signal features after masking in module 5 and reconstruct the signal to obtain the near-end signal after echo cancellation.