A method, deployment method and device for enhancing voiceprint of electric equipment based on dual complementary neural network
Rapid voiceprint denoising processing is implemented on power equipment through a double complementary neural network structure, which solves the difficulty of detecting abnormal sounds in complex industrial noise environments and improves the accuracy and efficiency of detection.
Patent Information
- Application Number
- CN202410255627.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-06
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-03-06
AI Technical Summary
Existing technologies fail to effectively utilize machine learning and neural networks to denoise GIS voiceprints, making it difficult to detect abnormal sounds in complex industrial noise environments.
The power equipment voiceprint enhancement method based on dual complementary neural networks is used to capture and exchange noise information through the encoder, frequency dimension branch network module, time dimension branch network module, interaction module and decoder, and generate a denoised time-frequency relationship. Figure, enabling fast-running denoising processing.
It improves the performance of voiceprint denoising processing of power equipment, adapts to fast pre-processing work, forms a real-time processing device platform, provides reasonable data support, and enhances the accuracy of abnormal sound detection.
Smart Images

Figure CN118072763B
Abstract
Description
[Technical field]
[0001] The present invention relates to the technical field of electric power equipment, and in particular to a method, a deployment method and a device for enhancing the voiceprint of electric power equipment based on a dual complementary neural network. [Background technology]
[0002] Sound has long been an important way for humans to transmit information. The more common forms of sound are human voices, breaking sounds, gunshots, explosions, etc. With the development of audio signal acquisition technology, computer technology, signal processing technology, pattern recognition and other related technologies, audio signal monitoring has gradually become a hot issue. Compared with video signals, audio data has the advantages of no blind spots, low requirements for the surrounding environment, small signal data volume, and fast transmission speed. In industrial production, the detection of abnormal sound may indicate that a machine has an abnormality. The system can issue an alarm message in time to remind the security monitoring personnel to carry out corresponding emergency treatment.
[0003] However, in modern industrial production, the operating sound of GIS (gas insulated switchgear for distribution network) is often affected by industrial environmental noise. These noises are characterized by high power, variability and difficulty in estimation, which greatly reduces the amount of information in the sound signal and brings great difficulties to abnormal sound detection. For these complex environmental noises, audio denoising methods can be used to denoise them and enhance the characteristic of information. Commonly used audio denoising methods include the least mean square (LMS) algorithm, the normalized least mean square (NLMS) algorithm, the recursive least square (RLS) algorithm, and the variable step-size normalized least mean p-norm (VSS-NLIP) algorithm based on gradient weighted averaging.
[0004] NPU is the full name of Neural Process Unit in English. NPU simulates human neurons and synapses at the circuit level. Its architecture and instruction set are optimized for neural network calculations, so it performs well in processing neural network calculations and has high reasoning performance. The domestically produced self-controlled development board is equipped with a single-core RK3568-NPU, which includes a CNA module (Convolution Neural Network Accelerator), a DPU module (dada processing Unit), and a PPU module (Pooling Processing Unit), which represent convolutional neural network accelerators, data processing units, and polling operation units, respectively.
[0005] There is a simple assumption for the GIS voiceprint denoising of power equipment: assuming that the noise in the voiceprint is only additive noise, a pure voiceprint can be obtained by subtracting the noise spectrum from the noise spectrum, and the premise of doing so is that the spectrum of the noise signal is stable and unchanged in a short period of time. The audio processed by the denoising system will be closer to the sound of the machine itself, which is conducive to abnormal sound detection without misjudgment.
[0006] iSTFT, Inverse Short-Time Fourier Transform, inverse short-time Fourier transform.
[0007] LSA, Locally-grouped self-attention, local self-attention.
[0008] GSA, Global self-attention, global self-attention.
[0009] The so-called voiceprint refers to the spectrum graph drawn by special electroacoustic conversion instruments (spectrograph, speech recorder, etc.) to obtain the sound wave characteristics. It is a collection of various acoustic feature graphs.
[0010] In view of the technical problem that the prior art fails to reasonably deploy and apply neural networks through machine learning to achieve GIS denoising, the present invention makes technical improvements to the neural network, deployment method and device of the power equipment voiceprint enhancement network. [Summary of the invention]
[0011] The purpose of the present invention is to provide a neural network based on a simple network structure and fast operation to realize the denoising of the voiceprint of power equipment GIS.
[0012] To achieve the above-mentioned purpose, the technical solution adopted by the present invention is a method for enhancing the voiceprint of electric equipment based on a dual complementary neural network, comprising an encoder, a frequency dimension branch network module, a time dimension branch network module, an interaction module, a merging module and a decoder; the encoder is used to receive the electric equipment GIS voiceprint IQ complex spectrum image obtained by STFT transformation, and encode and compress the electric equipment GIS voiceprint IQ complex spectrum image, reduce the input image size, and output it to the frequency dimension branch network module and the time dimension branch network module; the frequency dimension branch network module is used to capture the denoised information to be aggregated of the electric equipment GIS voiceprint IQ complex spectrum image in the frequency dimension; the time dimension branch network module is used to capture the denoised information to be aggregated of the electric equipment GIS voiceprint IQ complex spectrum image in the time dimension; the interaction module is used to exchange supplementary denoised aggregation information between the frequency dimension branch network module and the time dimension branch network module; the merging module is used to merge the denoised aggregation information of the frequency dimension branch network module and the time dimension branch network module to output the denoised time-frequency relationship diagram; the decoder is used to decode and output the image and restore it to the original size of the electric equipment GIS voiceprint IQ complex spectrum image.
[0013] Preferably, the encoder is composed of three convolution modules, each of which comprises a two-dimensional convolution layer, a nonlinear activation layer and a normalization layer for downsampling features. i encoder =PReLU(BN(conv(Y))), where U i encoder Represents the output of each convolution module, i∈(1, 2, 3), PReLU indicates that the nonlinear activation layer applies a parameter-corrected linear activation function, BN indicates that the normalization layer is batch normalization, conv indicates the convolution operation of the two-dimensional convolution layer, and Y indicates the convolution module input.
[0014] Preferably, the decoder includes three sub-pixel convolution blocks, which are composed of a two-dimensional convolution module, a PReLU activation module, a BN normalization module, and a pixel replacement module. The input of each sub-pixel convolution block is first connected to the features of the encoder and then input into the two-dimensional convolution module to enlarge the feature map.
[0015] Preferably, the frequency dimension branch network module includes three global-local modules, which are used to aggregate the distinguishing information of global self-attention and local self-attention in the frequency dimension, extract the key area features of the image containing global and local information, so as to simultaneously model the spatial dependency relationship of the global and local extracted features, and embed them in the frequency dimension branch channel; the time dimension branch network module includes three global-local modules, which are used to aggregate the distinguishing information of global self-attention and local self-attention in the time dimension, extract the key area features of the image containing global and local information, so as to simultaneously model the temporal dependency relationship of the global and local captured features, and embed them in the time dimension branch channel; the global-local module is composed of a global self-attention module and a local self-attention module.
[0016] Preferably, the interaction module includes a single-dimensional two-dimensional convolution layer, a normalization layer, and an activation layer; For the time dimension branch, the features extracted by the global-local module of the frequency dimension branch are first input into the two-dimensional convolutional layer by the interaction module to achieve better information aggregation, and then added to the features extracted by the global-local module of the time dimension branch, and output to the next global-local module of the time dimension branch; For the time dimension branch, the features extracted by the global-local module of the frequency dimension branch are first input into the two-dimensional convolutional layer by the interaction module to achieve better information aggregation, and then added to the features extracted by the global-local module of the time dimension branch and output to the next global-local module of the time dimension branch.
[0017] Preferably, the merging module includes a two-dimensional convolution layer, a normalization layer, and an activation layer.
[0018] Another object of the present invention is to provide a method for training and deploying a neural network for realizing voiceprint denoising processing of power equipment GIS based on a simple network structure and fast operation.
[0019] To achieve the above-mentioned another object, the technical solution adopted by the present invention is a method for deploying a method for enhancing the voiceprint of electric equipment based on a dual complementary neural network, comprising the following steps:
[0020] S1. Construct a method as described above;
[0021] S2. A self-made data set is input into the electric power equipment voiceprint enhancement neural network for offline training to obtain a de-noised electric power equipment voiceprint enhancement neural network model;
[0022] S3. Deploy the electric power equipment voiceprint enhancement neural network model on the development board platform, input a single electric power equipment GIS voiceprint IQ complex spectrum that needs to be denoised into the electric power equipment voiceprint enhancement neural network model to obtain a denoising result.
[0023] Preferably, step S2:
[0024] Self-made data set: Use software to add noise to the collected power equipment GIS voiceprint signal and then export it, and divide it into training set and verification set according to proportion. The noise is the noise of the power equipment operating environment;
[0025] Offline training: using the function that maximizes the scale-invariant source-to-noise ratio The loss function is used to train the power equipment voiceprint enhancement neural network model, wherein: and x represent the estimated signal and the clean signal respectively, || 2 represents the L2 norm, is the dot product of two vectors; using the signal-distortion ratio and segment signal-to-noise ratio As an objective indicator for evaluating the performance of the power equipment voiceprint enhancement neural network model, and x(n) represent the estimated signal and the clean signal respectively, and x m (n) corresponds to the segments of the estimated signal and the clean signal, respectively, L is the length of the signal, N represents the length of the sample block, and M is the number of sample blocks constituting the signal.
[0026] Preferably, step S3: first convert the power equipment voiceprint enhancement neural network model file from pt format to onnx format, and then convert it to rknn format; configure the environment for the development board, use the power equipment voiceprint enhancement neural network model file in rknn format to infer the verification set, and verify the inference result.
[0027] Another object of the present invention is to provide a device for GIS denoising of electric power equipment based on a simple network structure and fast operation.
[0028] To achieve the above-mentioned further purpose, the technical solution adopted by the present invention is a dual-complementary power equipment voiceprint enhancement device, including a development board platform, the development board includes an I / O port, memory, CPU and NPU processors, and a storage device; and a method for executing the above-mentioned voiceprint enhancement method based on a dual-complementary neural network on power equipment.
[0029] The beneficial effects of the dual complementary power equipment voiceprint enhancement network neural network, deployment method and device of the present invention are as follows: the present invention proposes an integrated device to suppress noise on GIS heating signals. In order to improve performance, the present invention uses a codec network as the overall architecture and develops a deep neural network with a two-branch structure. The two branches capture and aggregate spectral information from the time and frequency dimensions, and model global and local dependencies at the same time, exchange complementary information between different branches, and finally generate a denoised time-frequency relationship diagram and convert it back to a voiceprint waveform through iSTFT. The different modules of DBSA-Net play their respective roles in improving the denoising performance and are empirically effective. The network of the present invention realizes complementary information interaction between the two branches. The interaction module and the merging module merge the features extracted from different dimensions, use a simpler network structure to achieve a fast running speed, and obtain better results. The method is adapted to the rapid preprocessing of collected data, deploys the network with a domestically produced independent and controllable development board, and forms a real-time processing device platform, which can provide reasonable data support for the subsequent work of operators.
Brief Description of the Drawings
[0030] Figure 1 The present invention is a model diagram of a method for enhancing the voiceprint of electric power equipment based on dual complementary neural networks.
[0031] Figure 2 The present invention is a schematic diagram of the structure of an encoder module and a decoder module of a voiceprint enhancement method for electric power equipment based on a dual complementary neural network.
[0032] Figure 3 The present invention is a schematic diagram of a sub-pixel block of a decoder module of a voiceprint enhancement method for electric power equipment based on a dual complementary neural network.
[0033] Figure 4 The present invention is a schematic diagram of pixel transformation of a decoder module of a voiceprint enhancement method for electric power equipment based on a dual complementary neural network.
[0034] Figure 5 It is a global-local module schematic diagram of a voiceprint enhancement method for power equipment based on dual complementary neural networks.
[0035] Figure 6 It is a schematic diagram of the interactive module of the power equipment voiceprint enhancement method based on dual complementary neural networks.
[0036] Figure 7 The present invention is a schematic diagram of a deployment method of a voiceprint enhancement method based on a dual complementary neural network on power equipment.
[0037] Figure 8 The present invention is a deployment case diagram of a voiceprint enhancement method based on dual complementary neural networks on power equipment. [Specific implementation method]
[0038] The features and exemplary embodiments of various aspects of the present invention will be described in detail below. In the detailed description below, many specific details are proposed to provide a comprehensive understanding of the present invention. But it is obvious to those skilled in the art that the present invention can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by illustrating examples of the present invention. The present invention is by no means limited to any specific configuration and algorithm proposed below, but covers any modification, replacement and improvement of elements, parts and algorithms without departing from the concept of the present invention. In the accompanying drawings and the following description, known structures and technologies are not shown to avoid unnecessary ambiguity to the present invention.
[0039] Example 1
[0040] This embodiment implements a method for enhancing the voiceprint of electric power equipment based on a dual complementary neural network.
[0041] This embodiment selects a dual complementary network model based on deep learning, which is based on a simple assumption: assuming that the noise in the voiceprint is only additive noise, a pure voiceprint can be obtained by subtracting the noise spectrum from the noise spectrum, and the premise of doing so is that the spectrum of the noise signal is stable and unchanged in a short time. The audio processed by the denoising system will be closer to the sound of the machine itself, which is conducive to abnormal sound detection without misjudgment, and how to reasonably deploy and apply the network is another major consideration.
[0042] The neural network in this embodiment uses a codec network as the overall architecture and develops a deep neural network with a two-branch structure. The two branches capture and aggregate spectral information from the time and frequency dimensions, model global and local dependencies, and exchange complementary information between different branches. Finally, a denoised time-frequency relationship diagram is generated and converted into a voiceprint waveform through iSTFT.
[0043] The neural network of this embodiment is composed of an encoder, a decoder, a dual-branch network module (including a global-local (GS-A) module), an interaction module and a merging module. The neural network encoder and decoder of this embodiment are used for extracting and parsing potential feature information. The global-local (GS-A) module of this embodiment aggregates the distinguishing information of global self-attention (GSA) and local self-attention (LSA) in the time dimension and frequency dimension branches. The neural network interaction module of this embodiment is used to exchange supplementary information between the time-dimension branch and the frequency-dimension branch. The neural network merging module of this embodiment merges the final dual-branch information to output the result.
[0044] The neural network of this embodiment realizes complementary information interaction between two branches (time dimension and frequency dimension branches). The interaction module and the merging module together fuse the features extracted from different dimensions, use a simpler network structure to achieve fast running speed, and obtain better denoising effect.
[0045] Figure 1 This is a model diagram of a power equipment voiceprint enhancement method based on a dual complementary neural network. Figure 1 As shown, the neural network of this embodiment is a deep neural network with two branch structures, which integrates the information complementation module and the attention mechanism to construct a dual-channel self-attention mechanism network (DBAN), which is composed of an encoder, a decoder, a frequency dimension branch network module, a time dimension branch network module, an interaction module and a merging module. Among them, the frequency dimension branch network module and the time dimension branch network module respectively include several global-local (GS-A) modules.
[0046] The encoder is used to receive the IQ complex spectrum image of the power equipment GIS voiceprint obtained by STFT transformation, and encode and compress the characteristic image (IQ complex spectrum image), reduce the input image size, and output it to the frequency dimension branch network module and the time dimension branch network module.
[0047] The frequency dimension branch network module and the time dimension branch network module are used to capture the information to be aggregated of the image in the time and frequency dimensions from the two branches respectively.
[0048] The global-local (GS-A) module is used to extract key area features of the image containing global and local information to simultaneously model global and local dependencies and embed them in a dual-branch channel.
[0049] The interaction module is used to exchange supplementary information between different branches.
[0050] The merging module is used to merge the final dual-branch information to output a result.
[0051] The decoder is used to decode and output the image and restore it to the original image size.
[0052] Figure 2 The schematic diagram of the encoder module and decoder module structure of the power equipment voiceprint enhancement method based on dual complementary neural network is shown in FIG. Figure 2 As shown, the encoder consists of three convolution modules, each of which contains a two-dimensional convolution layer for downsampling features, a nonlinear activation layer, and a normalization layer. A nonlinear activation function and a normalization operation are added after each two-dimensional convolution layer. In this embodiment, parameter rectified linear unit (PReLU) and batch normalization (BN) are applied as activation functions and normalization modules.
[0053] U i encoder =PReLU(BN(conv(Y))),
[0054] Among them U i encoder (i∈1, 2, 3 represents the i-th convolutional block), represents the output of each convolutional block. The kernel size and stride of all convolutional layers are set to (6, 4) and (2, 2), respectively. The number of channels is 16, 32, and 64.
[0055] Figure 3 The present invention is a schematic diagram of a sub-pixel block of a decoder module of a voiceprint enhancement method for electric power equipment based on a dual complementary neural network. Figure 4 This is a schematic diagram of pixel transformation of the decoder module of the power equipment voiceprint enhancement method based on dual complementary neural network. Figure 3 , Figure 4 As shown, in the decoder, this embodiment develops three sub-pixel blocks to replace the traditional deconvolution layer to complete the upsampling operation and reconstruct the final complex output. The input of each sub-pixel block is first connected to the feature of the encoder, and then input into the sub-pixel convolution layer to amplify the feature map, which (sub-pixel convolution layer) consists of a two-dimensional convolution module, a PReLU activation module, a BN normalization module, and a pixel transformation operation. Next, another two-dimensional convolution layer is applied to learn the spectral gain for reconstruction. All two-dimensional convolution layers in the decoder have the same kernel size (1, 1) and stride (1, 1), and each convolution layer is followed by a PReLU activation and a batch BN normalization. The number of channels is 32, 16, and 2, respectively.
[0056] Figure 5 This is a global-local module diagram of a power equipment voiceprint enhancement method based on a dual complementary neural network. Figure 5As shown, the GS-A module further described embeds three GS-A blocks in each branch; each block is mainly composed of a global self-attention module and a local self-attention module. The features of the encoder are fed into the GSA module, the LSA module, and the parallel aggregation module. By using a two-dimensional convolution-based method instead of an aggregation module to achieve better feature aggregation, the outputs generated by these three modules are interconnected and fed into another two-dimensional convolution layer, followed by PReLU activation (PReLU activation layer) and batch BN normalization (BN normalization layer) operations. The GS-A block is developed to aggregate global self-attention (GSA) and local self-attention (LSA) to perform feature extraction in the time dimension and frequency dimension branches. The GS-A block in the time dimension branch captures the temporal dependency of the feature, corresponding to the long duration characteristics and periodicity of the power equipment. On the frequency dimension branch, a self-attention module is used to extract the spatial dependency of the feature, corresponding to the frequency band distribution characteristics of the power equipment voiceprint. In addition, this embodiment integrates the advantages of GSA and LSA to model the correlation of long-distance transmission dependency and detail sub-bands.
[0057] Figure 6 This is a schematic diagram of the interactive module of the power equipment voiceprint enhancement method based on dual complementary neural networks. Figure 6 As shown, the interaction module further includes a single-dimensional two-dimensional convolutional layer, a normalization layer, and an activation layer. The interaction module is used to exchange complementary information between the time dimension branch and the frequency dimension branch. The feature map is first fused with the shared information of the interaction module and then passed from one GS-A block to the next. Taking the time branch as an example, the features of the frequency branch are first input into the two-dimensional convolutional layer to achieve better information aggregation, and then added to the features of the time branch.
[0058]
[0059] Finally, the generated output features are fed to the next GS-A block.
[0060] The merging module further comprises a two-dimensional convolutional layer, a normalization layer, and an activation layer. The merging module is further used to combine the outputs of the two branches before reconstructing the enhanced signal through the decoder. The features of the time dimension branch are concatenated with the features of the frequency dimension branch and then input into a two-dimensional convolutional block with a kernel size of (1, 1) and a stride size of (1, 1). Batch normalization and PReLU activation operations are also required.
[0061] Example 2
[0062] This embodiment implements a method for deploying a voiceprint enhancement method based on a dual complementary neural network on power equipment. This embodiment trains and deploys a dual complementary power equipment voiceprint enhancement neural network of embodiment 1.
[0063] The method of this embodiment is adapted to the rapid preprocessing of collected data, and the neural network of Embodiment 1 is deployed with a domestically produced independently controllable development board to form a device platform for real-time processing.
[0064] Figure 7 This is a schematic diagram of the deployment method of the voiceprint enhancement method based on dual complementary neural networks on power equipment. Figure 7 As shown, the method of this embodiment includes the following steps:
[0065] Step 1, constructing a deep neural network with two branch structures in Example 1, wherein the neural network is a dual-channel self-attention mechanism network (DBAN) that integrates an information complementation module and an attention mechanism;
[0066] Step 2: Prepare a self-made dataset and input the dataset into a dual-channel self-attention mechanism network (DBAN) for offline training to obtain a denoising training model;
[0067] Step 3: Deploy a denoising training model on a domestically produced self-controlled development board platform that needs to be preprocessed, input the single voiceprint IQ complex spectrum that needs to be denoised into the denoising network model, and obtain the denoising result;
[0068] The deployment method of this embodiment first converts the model file from pt format to onnx format, and then converts it to rknn format; configures the environment for the domestically produced independent and controllable development board, uses the model file in rknn format to infer the verification set, and verifies the inference results.
[0069] PyTorch is an open source Python machine learning library based on Torch for applications such as natural language processing. PyTorch can be seen as numpy with GPU support, but it can also be seen as a powerful deep neural network with automatic differentiation capabilities.
[0070] The full name of Adam optimizer is "Adaptive Moment Estimation optimizer". It is a gradient-based optimization algorithm that can adaptively adjust the learning rate and update the learning rate based on the historical gradient information and average value of each parameter. Adam optimizer is a commonly used optimization algorithm, mainly used for training deep neural network models.
[0071] Further, the self-made data set is input into the dual-channel self-attention mechanism network (DBAN) for offline training to obtain a denoising training model. The specific method is as follows: the self-made data set is divided into a training set and a validation set. The 832 collected power equipment voiceprint signals are denoised and exported using coff software, and then divided into a training set and a validation set at a ratio of 9:1. The noise mainly includes bird calls and footsteps in the environment of the unit's collection equipment. For the training setting, the dual-channel self-attention mechanism network structure parameters are first defined. The window length of STFT is 512 sampling points, the STFT moving frame length is 256 sampling points, the encoding and decoding module is 3 layers, and the GS-A modules of each branch network are 3. For the model input, the waveform signal is converted into a complex-valued spectral feature through STFT. Pytorch is used to train the model, and Adam is used as the optimizer. The model uses NVIDIAA10040GBGPU for 100 epochs, and the initial learning rate is 1e-4. If the evaluation of the validation set does not improve in 2 consecutive epochs, the learning rate will decay by 0.9, and the batch size is set to 8.
[0072] The offline training of this embodiment modifies the loss function to match the time information and frequency information from the two sub-networks. The loss function includes the correlation loss of the time spectrogram and the frequency spectrogram to update the network parameters. The loss function for training the neural network model of this embodiment is to maximize the scale-invariant source-to-noise ratio (SI-SNR) function, which is defined as:
[0073]
[0074] in and x represent the estimated signal and the clean signal respectively, || 2 represents the L2 norm, is the dot product of two vectors.
[0075] In the implementation process of this embodiment, the signal-to-distortion ratio (SDR) and the segmented signal-to-noise ratio (SSNR) are used as objective indicators for evaluating the performance of the model.
[0076] SDR is the energy ratio between the energy of the target audio contained in the denoised signal and the energy of the residual noise. Scale invariance is ensured by normalizing the signal to zero mean before calculation. SSNR considers the short-term SNR as a relevant quality criterion and allows the calculation of an overall quality measure by weighting the time-correlated noise relative to the underlying target energy. Higher values correspond to better performance. SDR and SSNR are defined as:
[0077]
[0078] in and x(n) denote the estimated signal and the clean signal, respectively. and x m (n) corresponds to the segments of the estimated signal and the clean signal, respectively, L is the length of the signal, N represents the length of the sample block, and M is the number of sample blocks that constitute the signal.
[0079] Further deploy the voiceprint denoising training model, specifically: configure the DBAN neural network model operating environment, use Netron to visualize the DBAN neural network model, check whether there are operators that are not supported by rknn, and ensure the feasibility of the subsequent conversion process. After the inspection is completed, call the torch.onnx.export interface to export the model file in pt format to onnx format (convert the trained model file in pt format to onnx format).
[0080] Then install the RKNN toolkit in the virtual machine, call the load_onnx interface to load the model file in onnx format, and then call the build interface to build the RKNN model. The do_quantization parameter in the interface determines whether to quantize the model, and the value is True or False. Finally, call the export_rknn interface to export the model file in rknn format (use the API named rknn.export to export the model file in rknn format). Use float16 quantization model when exporting for subsequent reasoning.
[0081] Furthermore, we configure the environment for the domestically produced self-controlled development board, use the model file in rknn format to infer the verification set, and verify the inference results. The specific method is as follows:
[0082] (1) First, install the Debian system for the domestically developed self-controllable development board, and then install the rknn-lite2 package, which is used to call various rknn interfaces in the future;
[0083] (2) Create an RKNN object to initialize the RKNNSDK environment;
[0084] (3) Call the config interface to set the model parameters. In the interface parameters: mean_values represents the mean of the input. The parameter format is a list, which contains one or more mean sublists. The multi-input model corresponds to multiple sublists, and the length of each sublist is consistent with the number of channels of the input; mean_values represents the mean of the input. The parameter format is a list, which contains one or more mean sublists. The multi-input model corresponds to multiple sublists, and the length of each sublist is consistent with the number of channels of the input; the parameter target_platform is used to specify the target chip platform on which the RKNN model is generated.
[0085] (4) Call the load_rknn interface to load the RKNN model. The loaded model can be connected to the NPU hardware for inference acceleration;
[0086] (5) Call the init_runtime interface to initialize the runtime environment, including but not limited to determining the device information for model operation, whether to enable debug mode for performance evaluation, and setting the NPU core for runtime;
[0087] (6) Call the inference interface to infer the input and obtain the inference result. The result type is ndarray-list;
[0088] (7) Call the release interface to release the RKNN object.
[0089] Example 3
[0090] This embodiment implements a dual complementary power equipment voiceprint enhancement device. The device of this embodiment is obtained by deploying the method for deploying a voiceprint enhancement method based on a dual complementary neural network on a power equipment in embodiment 2 on a development board.
[0091] Figure 8 This is a deployment case diagram of a voiceprint enhancement method based on a dual complementary neural network on power equipment. Figure 8 As shown, the device of this embodiment adapts the fast preprocessing of the collected data by the method of embodiment 2, deploys the neural network of embodiment 1 with a domestically produced independently controllable development board and forms a device platform for real-time processing, which mainly includes I / O ports, memory, CPU and NPU processors, and storage; time-frequency relationship images can be converted or imported, and output after real-time processing on the board.
[0092] The device of the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities can be a device or apparatus such as a computer. The device embodiment can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of any device with data processing capabilities in which it is located to read the corresponding computer program instructions in the non-volatile memory into the memory and run them. From the hardware level, the device of this embodiment can be a hardware structure diagram of any device with data processing capabilities, and the device with data processing capabilities in which it is located can usually include other hardware according to the actual functions of the device with data processing capabilities, which will not be described in detail.
[0093] The separation effect of the voiceprint denoising algorithm proposed by the device of this embodiment is illustrated by taking a GIS signal of 5 seconds collected at the measuring point under the condition that multiple power equipment is turned on. In addition to the equipment noise such as cooling fan and background noise contained in the main transformer sound signal, interference noises such as whistle sound, footsteps, and rain sound are also added to the signal.
[0094] By analyzing and comparing with multiple voiceprint denoising methods, in particular, by adding a single noise, two noises, three noises, and all types of noise to the clean reference voiceprint signal for denoising, the results are shown in the following table.
[0095]
[0096] Those skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0097] The above is only a preferred embodiment of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and supplements without departing from the principle of the present invention. These improvements and supplements should also be regarded as the scope of protection of the present invention.
Claims
1. A method for enhancing the voiceprint of electric power equipment based on dual complementary neural networks, characterized in that: It includes an encoder, a frequency dimension branch network module, a time dimension branch network module, an interaction module, a merging module and a decoder; the encoder is used to receive the power equipment GIS voiceprint IQ complex spectrum image obtained by STFT transformation, and encode and compress the power equipment GIS voiceprint IQ complex spectrum image, reduce the input image size, and output it to the frequency dimension branch network module and the time dimension branch network module; the frequency dimension branch network module is used to capture the denoised information to be aggregated of the power equipment GIS voiceprint IQ complex spectrum image in the frequency dimension; the time dimension branch network module is used to capture the denoised information to be aggregated of the power equipment GIS voiceprint IQ complex spectrum image in the time dimension; the interaction module is used to exchange supplementary denoised aggregation information between the frequency dimension branch network module and the time dimension branch network module; the merging module is used to merge the denoised aggregation information of the frequency dimension branch network module and the time dimension branch network module to output the denoised time-frequency relationship diagram; the decoder is used to decode and output the image and restore it to the original size of the power equipment GIS voiceprint IQ complex spectrum image.
2. According to claim 1, a method for enhancing the voiceprint of electric equipment based on a dual complementary neural network is characterized in that: The encoder consists of three convolutional modules, each of which contains a two-dimensional convolutional layer for downsampling features, a nonlinear activation layer, and a normalization layer. U i encoder =PReLU(BN(conv(Y))), where U i encoder Represents the output of each convolution module, i∈(1, 2, 3), PReLU represents the parameter-corrected linear activation function applied by the nonlinear activation layer, BN indicates that the normalization layer is batch normalization, conv indicates the convolution operation of the two-dimensional convolution layer, and Y indicates the convolution module input.
3. According to claim 2, a method for enhancing the voiceprint of electric equipment based on a dual complementary neural network is characterized in that: The decoder includes three sub-pixel convolution blocks, which are composed of a two-dimensional convolution module, a PReLU activation module, a BN normalization module, and a pixel replacement module. The input of each sub-pixel convolution block is first connected with the features of the encoder and then input into the two-dimensional convolution module to enlarge the feature map.
4. According to claim 3, a method for enhancing the voiceprint of electric equipment based on a dual complementary neural network is characterized in that: The frequency dimension branch network module includes three global-local modules, which are used to aggregate the distinguishing information of global self-attention and local self-attention in the frequency dimension, extract the key area features of the image containing global and local information, so as to simultaneously model the spatial dependency relationship of the global and local extracted features, and embed them in the frequency dimension branch channel; the time dimension branch network module includes three global-local modules, which are used to aggregate the distinguishing information of global self-attention and local self-attention in the time dimension, extract the key area features of the image containing global and local information, so as to simultaneously model the temporal dependency relationship of the global and local captured features, and embed them in the time dimension branch channel; the global-local module is composed of a global self-attention module and a local self-attention module.
5. According to claim 4, a method for enhancing the voiceprint of electric equipment based on a dual complementary neural network is characterized in that: The interaction module includes a single-dimensional two-dimensional convolution layer, a normalization layer, and an activation layer; For the time dimension branch, the features extracted by the global-local module of the frequency dimension branch are first input into the two-dimensional convolutional layer by the interaction module to achieve better information aggregation, and then added to the features extracted by the global-local module of the time dimension branch, and output to the next global-local module of the time dimension branch; For the frequency dimension branch, the features extracted by the global-local module of the time dimension branch are first input into the two-dimensional convolutional layer by the interaction module to achieve better information aggregation, and then added to the features extracted by the global-local module of the frequency dimension branch and output to the next global-local module of the frequency dimension branch.
6. The method for enhancing the voiceprint of electric equipment based on dual complementary neural network according to claim 5 is characterized by: The merging module includes a two-dimensional convolution layer, a normalization layer, and an activation layer.
7. A method for deploying a voiceprint enhancement method based on a dual complementary neural network on power equipment, characterized in that The following steps are involved: S1. Construct the method described in any one of claims 1 to 6; S2. A self-made data set is input into the electric power equipment voiceprint enhancement neural network for offline training to obtain a de-noised electric power equipment voiceprint enhancement neural network model; S3. Deploy the electric power equipment voiceprint enhancement neural network model on the development board platform, input a single electric power equipment GIS voiceprint IQ complex spectrum that needs to be denoised into the electric power equipment voiceprint enhancement neural network model to obtain a denoising result.
8. The deployment method according to claim 7, characterized in that Step S2: Self-made data set: Use software to add noise to the collected GIS voiceprint signals of power equipment and then export them, and divide them into training set and verification set in proportion. The noise is the noise of the power equipment operating environment; Offline training: using the function that maximizes the scale-invariant source-to-noise ratio The loss function is used to train the power equipment voiceprint enhancement neural network model, wherein: and x represent the estimated signal and the clean signal respectively, || 2 represents the L2 norm, is the dot product of two vectors; using the signal-distortion ratio and segment signal-to-noise ratio As an objective indicator for evaluating the performance of the power equipment voiceprint enhancement neural network model, and x(n) represent the estimated signal and the clean signal respectively, and x m (n) corresponds to the segments of the estimated signal and the clean signal, respectively, L is the length of the signal, N represents the length of the sample block, and M is the number of sample blocks constituting the signal.
9. The deployment method according to claim 8, characterized in that Step S3: first convert the power equipment voiceprint enhancement neural network model file from pt format to onnx format, and then convert it to rknn format; configure the environment for the development board, use the power equipment voiceprint enhancement neural network model file in rknn format to infer the verification set, and verify the inference result.
10. A power equipment voiceprint enhancement device based on dual complementary neural network, comprising a development board platform, wherein the development board comprises an I / O port, a memory, a CPU and an NPU processor, and a memory; characterized in that: A deployment method for executing a method for voiceprint enhancement of electric power equipment based on a dual complementary neural network as described in any one of claims 7 to 9.
