Underground cable positioning method and system based on audio interference-removing self-learning neural network
By introducing a convolutional neural network with residual module and multi-head attention mechanism in underground cable fault location, combined with the characteristics of Mel's cepspectral coefficients, the problem of gradient vanishing and feature confusion is solved, and the recognition accuracy and positioning of faulted audio are improved. Accuracy.
Patent Information
- Application Number
- CN202411184535.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-11-12
AI Technical Summary
In the prior art, neural networks have gradient vanishing problems and feature confusion in underground cable fault location, especially in noisy environments, and it is difficult to accurately identify the faulty audio signal.
Using a convolutional neural network based on VGG-11 network structure, the residual module and multi-head attention mechanism are introduced, and the time domain audio is transformed into the spectral graph through short-time Fourier transform, and the local frequency domain features are combined with the Mel cepstrum system. Numerical feature splicing, and the final prediction is made using the softmax function.
It effectively avoids the problem of gradient vanishing, improves the recognition accuracy of faulty audio, and can more accurately locate and classify faulty audio bands in noisy environments, reducing the amount of training operations.
Smart Images

Figure CN118942483A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of underground cable positioning, and in particular to an underground cable positioning method and system based on an audio interference removal self-learning neural network. Background Art
[0002] With the rapid development of cities, underground cables play a vital role in modern society and are a core component of power, communication, network and other infrastructure systems. Although underground cables play an irreplaceable role in various fields, their management and maintenance also face a series of challenges. The damage, failure and positioning of underground cables have become key issues. Therefore, it is crucial to study and improve the underground cable positioning system to ensure the reliability and stability of power, communication and urban infrastructure.
[0003] In recent years, as the application scenarios of deep learning become more and more extensive, applying convolutional neural networks to the recognition of audio signals has become a cutting-edge research topic for scholars. In the fault diagnosis of underground cables, the traditional method is to observe the time domain waveform of the fault signal to determine the specific location of the fault point, while the fault audio signal collected in a noisy environment is usually difficult to distinguish. By utilizing the strong classification ability of the convolutional neural network with the introduction of the residual module, the time domain fault signal can be converted into a frequency domain spectrum diagram, and the fault audio segment in the underground cable audio can be located and classified through the self-learning ability of the neural network, thereby assisting the management and maintenance of underground cables.
[0004] Application number 202211166196.2 and publication number CN 115496101 A "A method and device for detecting underground roof risks based on convolutional neural network" provides a structural design of a convolutional neural network, but the input of the network is a vibration audio signal, and its network structure lacks modules to deal with parameter expansion and gradient vanishing, making it difficult to apply to spectral image recognition with large computational complexity.
[0005] The "Audio Recognition Method Based on One-Dimensional Attention Mechanism Convolutional Neural Network" with application number 202111611392.1 and publication number CN 114187923 A provides an introduction of a one-dimensional attention mechanism in a convolutional neural network, but the attention mechanism is used to improve the training process of the neural network, and the feature extraction capability of the audio signal is not improved.
[0006] Application number 201911288016.6 and publication number CN 111028859 A "A hybrid neural network vehicle model recognition method based on audio feature fusion" provides a vehicle model recognition technology based on audio feature fusion, which combines the features extracted by the neural network with the features extracted by other methods to improve the accuracy.
[0007] In summary, the neural network audio recognition method in the prior art has at least the following defects:
[0008] 1. The lack of cross-layer connections in the neural network makes it easy to have the problem of gradient vanishing when the training depth is high and the training sample dimension is large. The residual module can be introduced to connect the deep and shallow networks, and directly map the input of the shallow network to avoid the problem of gradient vanishing.
[0009] 2. The extraction of audio signals relies solely on convolutional neural networks. When the background noise of the audio signal is large or the homogeneity of the audio signal is high, feature confusion is likely to occur. The attention mechanism can be used to concatenate the Mel-frequency cepstral coefficient (MFCC) feature vector with the features extracted by the neural network to improve the resolution. Summary of the invention
[0010] The purpose of the present invention is to overcome the shortcomings of the prior art and provide an underground cable positioning method and system based on an audio interference removal self-learning neural network to overcome the above-mentioned defects in the prior art. The present invention comprises the following steps:
[0011] Step 100, preprocessing the original audio to obtain a time domain audio clip;
[0012] Step 200, converting the time domain audio into a three-dimensional spectrogram;
[0013] Step 300, inputting the spectrogram into a convolutional neural network to extract local frequency domain feature vectors;
[0014] Step 400, calculating MFCC and differential features for the time domain audio clip to obtain a mixed feature vector;
[0015] Step 500, using the attention mechanism to process multiple groups of mixed feature vectors in parallel;
[0016] Step 600, concatenate the local frequency domain feature vector and the MFCC mixed feature vector to obtain the final prediction result.
[0017] Furthermore, in step 100, the specific steps of preprocessing include pre-emphasis, framing and windowing.
[0018] Furthermore, the time domain audio segment described in step 100 is set to be 10s in length, when framing, the frame length is 20ms, the frame shift is 10ms, and when windowing is performed, the window is 128ms.
[0019] Furthermore, in step 200, the aspect of converting the time domain audio into a three-dimensional spectrogram is to use short-time Fourier transform for conversion.
[0020] Furthermore, the short-time Fourier transform in step 200 includes a continuous short-time Fourier transform and a discrete Fourier transform, and the three-dimensional spectrogram needs to be standardized and scaled according to different settings of the pre-processed frame shift and sampling points.
[0021] Furthermore, the convolutional neural network in step 300 is improved based on the VGG-11 network structure, using a 3×3 convolution kernel of the same size in the VGG network, with the number of convolution kernels reduced to 16, 32, 64, and 128, and a residual module is added between the convolution layer and the pooling layer of each convolution module to deal with the gradient vanishing phenomenon during training; the obtained local frequency feature vector is a two-dimensional feature matrix, one dimension of which is the fault type to be identified.
[0022] Furthermore, in step 400, the Mel filter used to calculate the MFCC is composed of a set of non-uniform triangular bandpass filters H m (k) composition, there is a logarithmic Mel energy for each frame of audio signal, and the number of filters in each group is M=20; after obtaining the MFCC static features, the first-order difference is calculated to obtain the final mixed feature vector.
[0023] Furthermore, the multi-head attention mechanism described in step 500 searches for significant faulty audio segments in the audio signal, and processes multiple faulty audio segments in parallel; the output matrix obtained by the multi-head attention mechanism is sent to a feedforward network with MLP as the backbone, and finally a mixed feature vector is obtained through a fully connected layer.
[0024] Furthermore, the specific method for obtaining the final prediction result in step 600 is to use a softmax function for normalized output.
[0025] The present invention also proposes an underground cable locating system, characterized in that: it is implemented based on an underground cable locating method based on an audio interference removal self-learning neural network as described in any one of claims 1 to 9, and includes an electronic device and a computer-readable storage medium;
[0026] The electronic device comprises a processor, a memory and a communication bus, wherein the memory stores a computer-readable program executable by the processor;
[0027] The communication bus realizes the connection and communication between the processor and the memory;
[0028] The processor is used to execute the computer readable program;
[0029] The computer-readable storage medium stores one or more programs that can be executed by one or more processors.
[0030] Compared with the prior art, the present invention has the following beneficial effects:
[0031] 1. The residual module is introduced to solve the difficulty of increasing training difficulty with the increase of network depth in traditional networks. The residual network skip connection method is used to avoid the gradient disappearance problem in the training process of deep neural networks;
[0032] 2. Using the multi-head attention mechanism to concatenate the audio feature vector extracted by the neural network with the MFCC mixed feature vector can more accurately obtain the specific time period of the fault audio and distinguish the fault type, thereby improving the recognition accuracy of the neural network for the fault audio;
[0033] 3. The VGG-11 network is improved to adapt to the task of underground cable fault audio recognition. The number of convolutional layers of the VGG network is reduced, and the original 64, 128, 256, and 512 convolution kernels are reduced to 16, 32, 64, and 128, which significantly reduces the amount of training operations and is more suitable for short-duration fault audio samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 The flowchart of the underground cable positioning method based on audio interference removal self-learning neural network;
[0035] Figure 2 Schematic diagram of the residual neural network structure. DETAILED DESCRIPTION
[0036] In order to better understand the technical solution of the present invention, the following is a detailed description through specific embodiments:
[0037] Figure 1 This is a flow chart of an underground cable location method based on an audio interference removal self-learning neural network. As shown in the figure, the technology of the present invention mainly includes the following steps:
[0038] Step 100, the original audio is pre-processed by pre-emphasis, framing and windowing to obtain a time domain audio segment;
[0039] Step 200, using short-time Fourier transform to convert the time-domain audio into a three-dimensional spectrogram;
[0040] Step 300: Input the spectrogram into a convolutional neural network to extract local frequency domain feature vectors.
[0041] Step 400, calculating MFCC and differential features for the time domain audio clip to obtain a mixed feature vector;
[0042] Step 500, using a multi-head attention mechanism to process multiple groups of mixed feature vectors in parallel.
[0043] Step 600, concatenate the local frequency domain feature vector and the MFCC mixed feature vector, and obtain the final prediction result through the softmax function.
[0044] In step 100, the original audio is a long audio signal collected near the underground cable, which needs to be sliced into 10-second time-domain audio segments through preprocessing. The preprocessing steps are divided into pre-emphasis, framing and windowing. The obtained time-domain audio segments have the characteristics of equal duration and limited amplitude.
[0045] In step 200, for the acquired 10-second time-domain audio clip, the spectrum in each frame can be regarded as unchanged, and its STFT expression in continuous time is:
[0046]
[0047] After STFT processing of the fault audio signal, the power spectrum of the signal is obtained, and the spectrogram is drawn. The three-dimensional spectrogram is standardized and scaled according to the different settings of the pre-processed frame shift and sampling points.
[0048] In step 300, the convolutional neural network is improved based on the VGG-11 network structure. The improvement is to add a residual module between the convolution layer and the pooling layer, and introduce an attention mechanism after the fully connected layer. The MFCC feature vector extracted during preprocessing is imported into the neural network through the attention mechanism. It consists of 7 convolutional layers, 3 fully connected layers, and 1 feature splicing layer.
[0049] In step 400, the MFCC is calculated using a Mel filter, which is composed of a set of non-uniform triangular bandpass filters H m (k), there is a logarithmic Mel energy for each frame of audio signal, and the number of filters in each group is M = 20. After obtaining the MFCC static features, the first-order difference is calculated to obtain the final mixed feature vector.
[0050] In step 500, a multi-head attention (MHA) mechanism is used to find significant faulty audio segments in the audio signal. The attention mechanism used can be expressed as:
[0051]
[0052] In step 600, the concatenated feature vector is N×(L 1 +L 2 ), N is the type of fault to be identified, L 1 is the feature vector dimension of the convolutional neural network output, L 2 The dimension of the feature vector output by the multi-head attention mechanism.
[0053] The underground cable positioning method based on the audio interference removal self-learning neural network of the present invention can be applied to various audio recognition occasions.
[0054] In a preferred embodiment of the present invention, an underground cable locating method based on an audio interference removal self-learning neural network of the present invention can be applied to identifying underground cable fault audio.
[0055] Preferably, the pre-emphasis in step 100 uses a high-pass filter, and its calculation formula is:
[0056] H(z)=1-az -1
[0057] Where z is the complex frequency variable, a is the pre-emphasis factor, which usually takes a value between 0.9 and 1.0, and is taken as 0.95 in this paper.
[0058] In the frame division and windowing operation in step 100, the frame length is 20ms and the frame shift is 10ms. For the detection of the underground cable fault audio signal, it is necessary to accurately detect the frequency of the fault audio. A window function with a lower sidelobe level can be selected to reduce spectrum leakage. Therefore, the window function selects the Hamming window, which can be expressed as:
[0059]
[0060] In step 200, a short-time Fourier transform is used to generate an STFT spectrogram. For a continuous-time signal x(t), the STFT expression in continuous time is
[0061]
[0062] Since computers can only process discrete signals, it is necessary to perform discrete Fourier transform on each frame of the STFT signal, and then use the relationship between amplitude change and time and frequency and the relationship between energy size and time and frequency to derive:
[0063] S(l,k)=X|l,k| 2
[0064] Where S is the power spectrum, X is a two-dimensional function of the frame shift l and the current number of spectral lines k. According to the two-dimensional function relationship in X, the corresponding STFT spectrogram can be drawn to reflect the changes in frequency and energy of the underground cable fault audio over time. The three-dimensional spectrogram is standardized and scaled according to the different settings of the pre-processed frame shift and sampling points. The scaling standard is:
[0065]
[0066] In step 300, a residual neural network is designed based on the improved VGG-11 network structure, and the spectrogram obtained in step 200 is used as the input of the neural network for training. The improvement is to add a residual module between the convolution layer and the pooling layer, and introduce an attention mechanism after the fully connected layer. The MFCC feature vector extracted during preprocessing is imported into the neural network through the attention mechanism, so that the final resolution result is more accurate. Its basic structure is as follows Figure 2 As shown in the schematic diagram of the residual neural network structure, it consists of 7 convolutional layers, 3 fully connected layers, and 1 feature concatenation layer. The activation function uses the Relu function, and its calculation expression is:
[0067]
[0068] Since the duration of audio data is short and the frequency range is narrow, the complexity of the network structure can be appropriately reduced to improve training efficiency. Therefore, the input matrix is first convolved twice with 16 convolution kernels, and then convolved with 32, 64, and 128 convolution kernels. Each convolution process is followed by a residual layer and a maximum pooling layer. In the residual module, the input data x is divided into two parts, one part is transformed through one or more neural layers to obtain F(x), and the other part is directly passed to the output H(x). The residual module F(x) can be expressed as:
[0069] F(x)=H(x)-x
[0070] After that, it passes through 3 fully connected layers and finally passes through a linear layer to obtain a size of N×L 1 A two-dimensional matrix feature set, where N is the fault type to be identified, L 1 It is the dimension of the feature vector output by the convolutional neural network.
[0071] Preferably, in step 400, the preprocessed audio signal is subjected to a fast Fourier transform (FFT) to obtain a corresponding power spectrum, and then the power spectrum is input into a Mel filter to calculate the Mel energy. The Mel filter is a set of non-uniform triangular bandpass filters H m (k), there is a logarithmic Mel energy for each frame of audio signal:
[0072]
[0073] Wherein, M is the number of filters in each group, and M=20 is taken.
[0074] After Mel filtering, the logarithmic Mel power is subjected to discrete cosine transform, and the specific solution expression is:
[0075]
[0076] Among them, E mfccIn the (n) function, n represents the current nth frame, and the value of m satisfies the number limit of each filter group. After creating the corresponding array label, the MFCC static features can be obtained.
[0077] Using MFCC static features, calculate its first-order difference
[0078]
[0079] Among them, v = 2, the first-order difference obtained takes the same dimension as the static feature, and the two-dimensional MFCC mixed feature vector V∈R is obtained by splicing S×F , S is the total number of frames of the audio signal, and F is selected as 20 as the extracted feature quantity.
[0080] In this preferred embodiment, in step 500, for the MFCC mixed feature vector obtained in step 400, a multi-head attention (MHA) mechanism is used to find a significant fault audio segment in the audio signal. The attention mechanism used can be expressed as:
[0081]
[0082] Among them, the Att(Q,K,V) function pairs the query and the feature key value as the mapping output, and X×(W Q ,W K ,W V )→(Q,K,V), which combines the input vector X with the weight matrix (W Q ,W K ,W V ) is mapped into multiple sets of matching pairs, which are then multiplied by the original feature set. Normalization is performed, and finally the weights are converted into a feature probability distribution matrix with a distribution from 0 to 1 through the softmax function. The output matrix obtained through the multi-head attention mechanism is sent to the feedforward network with MLP as the backbone, and its expression is:
[0083] F MLP (x) = [ReLU(xW 1 +b 1 )]·W 2 +b 2
[0084] Among them, W 1 , W 2 is the weight matrix, b 1 , b 2 The MLP is mainly composed of two linear layers and a ReLU activation function nested together, and finally a two-dimensional feature vector N×L is obtained through a fully connected layer. 2 , N is the fault type to be identified, L 2The dimension of the feature vector output by the multi-head attention mechanism.
[0085] In this preferred embodiment, the concatenated feature vector in step 600 is N×(L 1 +L 2 ), the two sets of feature sets are concatenated and fused to obtain richer feature information, and the final prediction result is obtained through the Softmax function.
[0086] Therefore, the present invention constructs an audio interference removal self-learning neural network to complete the fault location task of the underground cable based on the fault audio signal.
[0087] An underground cable locating system of the present invention is implemented based on the above-mentioned underground cable locating method based on audio interference removal self-learning neural network, and includes an electronic device and a computer-readable storage medium;
[0088] The electronic device comprises a processor, a memory and a communication bus, wherein the memory stores a computer-readable program executable by the processor;
[0089] The communication bus realizes the connection and communication between the processor and the memory;
[0090] The processor is used to execute the computer readable program;
[0091] The computer-readable storage medium stores one or more programs that can be executed by one or more processors.
[0092] Those skilled in the art should recognize that the above embodiments are only used to illustrate the present invention, and are not intended to limit the present invention. As long as they are within the spirit of the present invention, any changes or modifications to the above embodiments will fall within the scope of the claims of the present invention.
Claims
1. A method for locating underground cables based on audio interference removal self-learning neural network, It is characterized in that The steps include: Step 100, preprocessing the original audio to obtain a time domain audio clip; Step 200, converting the time domain audio into a three-dimensional spectrogram; Step 300, inputting the spectrogram into a convolutional neural network to extract local frequency domain feature vectors; Step 400, calculating MFCC and differential features for the time domain audio clip to obtain a mixed feature vector; Step 500, using the attention mechanism to process multiple groups of mixed feature vectors in parallel; Step 600, concatenate the local frequency domain feature vector and the MFCC mixed feature vector to obtain the final prediction result.
2. According to claim 1, a method for locating underground cables based on an audio interference removal self-learning neural network, It is characterized in that In step 100, the specific steps of preprocessing include pre-emphasis, framing and windowing.
3. According to claim 2, a method for locating underground cables based on an audio interference removal self-learning neural network, It is characterized in that The time domain audio segment described in step 100 is set to be 10s in length. When framing, the frame length is 20ms, the frame shift is 10ms, and when windowing, the window is 128ms.
4. According to claim 1, a method for locating underground cables based on an audio interference removal self-learning neural network, It is characterized in that In step 200, the aspect of converting the time domain audio into a three-dimensional spectrogram is to use short-time Fourier transform for conversion.
5. According to claim 4, a method for locating underground cables based on an audio interference removal self-learning neural network, It is characterized in that The short-time Fourier transform in step 200 includes a continuous short-time Fourier transform and a discrete Fourier transform. The three-dimensional spectrogram needs to be standardized and scaled according to different settings of the pre-processed frame shift and sampling points.
6. According to claim 1, a method for locating underground cables based on an audio interference removal self-learning neural network, It is characterized in that In step 300, the convolutional neural network is improved based on the VGG-11 network structure, using the same size 3×3 convolution kernel in the VGG network, and the number of convolution kernels is reduced to 16, 32, 64, and 128. A residual module is added between the convolution layer and the pooling layer of each convolution module to deal with the gradient disappearance phenomenon during training. The obtained local frequency feature vector is a two-dimensional feature matrix, one dimension of which is the fault type to be identified.
7. According to claim 1, a method for locating underground cables based on an audio interference removal self-learning neural network, It is characterized in that In step 400, the Mel filter used to calculate the MFCC is composed of a set of non-uniform triangular bandpass filters H m (k) composition, there is a logarithmic Mel energy for each frame of audio signal, and the number of filters in each group is M=20; after obtaining the MFCC static features, the first-order difference is calculated to obtain the final mixed feature vector.
8. According to claim 1, a method for locating underground cables based on an audio interference removal self-learning neural network, It is characterized in that The multi-head attention mechanism described in step 500 searches for significant faulty audio segments in the audio signal, and processes multiple faulty audio segments in parallel; the output matrix obtained by the multi-head attention mechanism is sent to a feedforward network with MLP as the backbone, and finally a mixed feature vector is obtained through a fully connected layer.
9. The underground cable positioning method based on audio interference removal self-learning neural network according to claim 1, It is characterized in that The specific method for obtaining the final prediction result in step 600 is to use the softmax function to perform normalized output.
10. An underground cable positioning system, Features: It is implemented based on a method for locating underground cables based on an audio interference removal self-learning neural network as described in any one of claims 1 to 9, and includes an electronic device and a computer-readable storage medium; The electronic device comprises a processor, a memory and a communication bus, wherein the memory stores a computer-readable program executable by the processor; The communication bus realizes the connection and communication between the processor and the memory; The processor is used to execute the computer readable program; The computer-readable storage medium stores one or more programs that can be executed by one or more processors.
