Determination method of disconnecting switch attitude and electronic equipment
By using the attention mechanism layer of the improved Cswish activation function in the voiceprint monitoring model, the problem of low speed and accuracy of isolating switch attitude monitoring in the prior art is solved, and more efficient recognition and faster model training convergence is achieved .
Patent Information
- Application Number
- CN202411462553.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-18
AI Technical Summary
In the prior art, the voiceprint recognition model is difficult to ensure the fast speed and high accuracy of the isolation switch attitude monitoring.
A voiceprint monitoring model is adopted, which includes a first SC attention mechanism layer and a fully connected layer, the first SC attention mechanism layer includes a global average pooling layer and an improved Cswish activation function, by introducing exponentially growing The nonlinear part avoids the problem of gradient vanishing, improves the model's learning ability of deep features, and accelerates gradient propagation in backpropagation.
The identification accuracy and operation speed of the isolating switch soundprint monitoring model are improved, ensuring the accuracy and efficiency of the monitoring results.
Smart Images

Figure CN119296572A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of deep learning technology, and in particular to a method and electronic device for determining the posture of an isolating switch. Background Art
[0002] An isolating switch is a circuit that disconnects no-load current, creating an obvious disconnection point between the equipment under maintenance and the power supply, thereby ensuring the personal safety of maintenance personnel. The isolating switch does not have a special arc extinguishing device, so it cannot cut off the load current and short-circuit current. Therefore, the isolating switch can only be operated when the circuit breaker is disconnected.
[0003] Voiceprint recognition technology is a technology that uses voice characteristics for identity authentication or voice analysis. It is mainly based on unique attributes in sound signals, such as frequency range, rhythm, and sound fluctuation patterns. These characteristics can be used to distinguish different speakers or voice sources and are widely used in security authentication, smart assistants, forensics and other fields.
[0004] Voiceprint recognition technology has also been extended to the status monitoring of specific industries and equipment, such as fault diagnosis and operation status monitoring of industrial equipment. By collecting the sounds made by the equipment when it is running, the sound data can be analyzed to monitor the working status of the equipment or predict the occurrence of failures.
[0005] During the operation of the power grid, the disconnector needs to be opened and closed in order to proceed to the next operation. Therefore, it is necessary to judge the posture of the disconnector. This process requires manual work at the power grid operation area to determine whether the current posture of the disconnector is in a closed posture, which has the disadvantages of low efficiency and low reliability. By analyzing the sound emitted by the disconnector when it is closed or open, and using deep learning technology to establish a voiceprint recognition model, it is possible to automatically identify its operating status. The application of this technology can greatly improve the operation and maintenance efficiency and safety of the power system, especially in remote control operation and automated monitoring systems. Through the precise analysis of the voiceprint of the disconnector, the reliance on manual visual inspection can be reduced, and the accuracy and efficiency of recognition can be improved.
[0006] In the existing technology, the voiceprint recognition model runs slowly. Some methods use complex network training, which results in a high running time cost. Although some methods run faster, the final accuracy is not high. In practical applications, the accuracy requirement is very high. Summary of the invention
[0007] The main purpose of the present application is to provide a method and electronic device for determining the posture of an isolating switch, so as to at least solve the problem in the prior art that it is difficult to simultaneously ensure a fast monitoring speed and a high monitoring accuracy when the voiceprint recognition model performs posture monitoring on the isolating switch.
[0008] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a method for determining the posture of an isolating switch is provided, comprising: obtaining a sound emitted by the isolating switch at the current moment to obtain voice data, and converting the voice data into a corresponding mel spectrum graph to obtain a voice mel spectrum graph; inputting the voice mel spectrum graph into a voiceprint monitoring model, so that the voiceprint monitoring model analyzes the voice mel spectrum graph to obtain a monitoring result, wherein the monitoring result is a result of characterizing whether the posture of the isolating switch at the current moment is a closed posture or an open posture, wherein the voiceprint monitoring model comprises a first SC (Spatial and Channel) attention mechanism layer and a fully connected layer, the first SC attention mechanism layer comprises a global average pooling layer and a first Cswish layer, the output end of the global average pooling layer is connected to the input end of the first Cswish activation layer, the global average pooling layer is used to extract the spatial features and channel features of the voice mel spectrum graph, the activation function of the first Cswish activation layer is a function obtained by improving the Swish function using exponential growth, the output end of the first Cswish activation layer is connected to the input end of the fully connected layer, and the fully connected layer is used to output the monitoring result.
[0009] Optionally, the voiceprint monitoring model also includes a first convolutional layer and a first MobileNetV2 layer, the output end of the first convolutional layer is connected to the input end of the first MobileNetV2 layer, the output end of the first MobileNetV2 layer is connected to the input end of the first SC attention mechanism layer, the first SC attention mechanism layer also includes a second convolutional layer, a first batch of normalization layers, a ReLU layer and a third convolutional layer connected in sequence, the input end of the second convolutional layer is connected to the output end of the global average pooling layer, the output end of the third convolutional layer is connected to the input end of the first Cswish activation layer, the first SC attention mechanism layer also includes a product layer, the input end of the product layer is respectively connected to the output end of the first Cswish activation layer and the output end of the first convolutional layer The output end of the product layer is connected to the input end of the fully connected layer, and the speech Mel-spectrogram is input into the voiceprint monitoring model so that the voiceprint monitoring model analyzes the speech Mel-spectrogram to obtain a monitoring result, including: inputting the speech Mel-spectrogram into the first convolutional layer so that the first convolutional layer extracts local features of the speech Mel-spectrogram to obtain a first feature map; inputting the first feature map into the first MobileNetV2 layer so that the first MobileNetV2 layer extracts features from the first feature map through depthwise separable convolution to obtain a second feature map; inputting the second feature map into the global average pooling layer so that the global average pooling layer performs global average pooling on the second feature map to obtain a matrix z, wherein, Q2 represents the second feature map, C represents the number of channels in the second feature map, F represents the number of frequency components in the second feature map, T represents the number of time components in the second feature map, c represents the sequence number of the channel, t represents the sequence number of the time component, and f represents the sequence number of the frequency component; the matrix z is input into the interaction layer so that the interaction layer processes the matrix z to obtain a target matrix, wherein the interaction layer includes the second convolutional layer, the first batch of normalization layers, the ReLU layer and the third convolutional layer connected in sequence; the target matrix is input into the first Cswish activation layer so that the first Cswish activation layer performs nonlinear activation on the target matrix to obtain an attention weight, wherein the activation function of the first Cswish activation layer is f(x)=m(max(a(e x-1), x))+nx·sigmoid(x), α is a hyperparameter, m is a preset first adaptive parameter, n is a preset second adaptive parameter, x is the input of the first Cswish activation layer, and f(x) is the output of the first Cswish activation layer; the attention weight and the second feature map are input into the product layer, so that the product layer multiplies the attention weight and the second feature map element by element to obtain a third feature map; the third feature map is input into the fully connected layer to obtain the monitoring result.
[0010] Optionally, the voiceprint monitoring model also includes a second MobileNetV2 layer, a second SC attention mechanism layer, a first linear layer and a CFB (Convolutional Feature Block) combination layer connected in sequence, the CFB combination layer includes a plurality of CFB modules connected in sequence, the input end of the second MobileNetV2 layer is connected to the output end of the first SC attention mechanism layer, the voiceprint monitoring model also includes a splicing layer, the input end of the splicing layer is respectively connected to the output end of each of the CFB modules, the output end of the splicing layer is connected to the input end of the fully connected layer, the second SC attention mechanism layer has the same internal structure as the first SC attention mechanism layer, the third feature map is input into the fully connected layer, and the monitoring result is obtained, including: inputting the third feature map into the second MobileNetV2 layer so that the second MobileNe The tV2 layer extracts features from the third feature map through depthwise separable convolution to obtain a fourth feature map; the fourth feature map is input into the second SC attention mechanism layer to obtain a fifth feature map; the fifth feature map is input into the first linear layer to obtain a sixth feature map; the sixth feature map is input into the CFB combination layer, and the feature maps output by each CFB module in the CFB combination layer are obtained, and each feature map is input into the concatenation layer, so that the concatenation layer performs a concatenation operation on multiple feature maps to obtain a seventh feature map, wherein the CFB combination layer is used to extract global features and local features of the sixth feature map; the seventh feature map is input into the fully connected layer to obtain the monitoring result.
[0011] Optionally, a plurality of the CFB modules are arranged in sequence, the sixth feature map is input into the CFB combination layer, and the feature map output by each of the CFB modules in the CFB combination layer is obtained, including: a first input step, inputting the sixth feature map into the first CFB module, so that the first CFB module extracts the global features and local features of the sixth feature map to obtain the first feature map; a second input step, inputting the current feature map into the current CFB module, so that the current CFB module extracts the global features and local features of the current feature map to obtain a target feature map, wherein the current CFB module is any one of the remaining CFB modules in the CFB combination layer except the first CFB module, and the current feature map is the feature map output by the CFB module connected to the input end of the current CFB module; repeating the second input step until the feature map output by the last CFB module is obtained.
[0012] Optionally, the internal structure of all the CFB modules is the same, and the CFB module includes a first LFFB (Lightweight FeedForward Block) module, a CVAAttention (Convolutional Vision Attention) module, a ConvB (ConvolutionalBlock) module, a second LFFB module and a first-layer normalization module connected in sequence, and the sixth feature map is input into the first CFB module so that the first CFB module extracts the global features and local features of the sixth feature map to obtain the first feature map, including: inputting the sixth feature map into the first LFFB module so that the first LFFB module extracts features from the sixth feature map through lightweight convolution to obtain a first sub-feature map; adding the sixth feature map to half of the first sub-feature map to obtain a second sub-feature map; inputting the second sub-feature map into the CVAAttention module so that the CVAAttention module extracts the global features and local features of the second sub-feature map. features and local features to obtain a third sub-feature map; add the third sub-feature map and the second sub-feature map to obtain a fourth sub-feature map; input the fourth sub-feature map into the ConvB module, so that the ConvB module extracts deep features of the fourth sub-feature map to obtain a fifth sub-feature map; add the fifth sub-feature map to the fourth sub-feature map to obtain a sixth sub-feature map; input the sixth sub-feature map into the second LFFB module, so that the second LFFB module extracts features from the sixth sub-feature map through lightweight convolution to obtain a seventh sub-feature map; add the sixth sub-feature map to half of the seventh sub-feature map to obtain an eighth sub-feature map; input the eighth sub-feature map into the first layer normalization module, so that the first layer normalization module performs layer normalization on the eighth sub-feature map to obtain the first feature map.
[0013] Optionally, the first LFFB module has the same internal structure as the second LFFB module, the first LFFB module includes a first combination layer, a second combination layer and a third combination layer connected in sequence, the first combination layer includes a first Conv1D layer, a first GELU (Gaussian Error Linear Unit, Gaussian error linear unit) layer and a second batch normalization layer, the second combination layer includes a first DWConv1D layer, a second GELU layer and a third batch normalization layer connected in sequence, the third combination layer includes a second Conv1D layer, a third GELU layer and a fourth batch normalization layer connected in sequence, the sixth feature map is input into the first LFFB module, so that the first LFFB module extracts features from the sixth feature map through lightweight convolution to obtain a first sub-feature map, including: inputting the sixth feature map into the first combination layer, so that the first combination layer performs one-dimensional convolution processing, activation processing and batch normalization processing on the sixth feature map to obtain a first output feature map; inputting the first output feature map into the second combination layer, so that the second combination layer performs one-dimensional lightweight convolution processing, activation processing and batch normalization processing on the first output feature map to obtain a second output feature map; inputting the second output feature map into the third combination layer, so that the third combination layer performs one-dimensional convolution processing, activation processing and batch normalization processing on the second output feature map to obtain the first sub-feature map.
[0014] Optionally, the CVAAttention module includes a fourth convolutional layer, a fifth convolutional layer, a sixth convolutional layer, a seventh convolutional layer, a first Softmax layer and a second Softmax layer, and the second sub-feature map is input into the CVAAttention module so that the CVAAttention module extracts the global features and local features of the second sub-feature map to obtain a third sub-feature map, including: inputting the second sub-feature map into the fourth convolutional layer to obtain a third output feature map, and reducing the dimension of the third output feature map to obtain a fourth output feature map; inputting the second sub-feature map into the fifth convolutional layer to obtain a fifth output feature map, and inputting the fifth output feature map into the first In the Softmax layer, the first Softmax layer transposes the fifth output feature map to obtain the sixth output feature map; the second sub-feature map is input into the sixth convolutional layer to obtain the seventh output feature map, and the seventh output feature map is input into the second Softmax layer, so that the second Softmax layer transposes the seventh output feature map to obtain the eighth output feature map; the fourth output feature map and the sixth output feature map are matrix multiplied to obtain the ninth output feature map, and the ninth output feature map and the eighth output feature map are matrix multiplied to obtain the tenth output feature map; the tenth output feature map is input into the seventh convolutional layer to obtain the third sub-feature map.
[0015] Optionally, the ConvB module includes a second layer normalization module, a first PWConv module, a gated linear unit, a second DWConv1D layer, a fifth batch normalization layer, a second Cswish activation layer, a second PWConv module and a Dropout layer connected in sequence, the activation function of the second Cswish activation layer is the same as the activation function of the first Cswish activation layer, and the fourth sub-feature map is input into the ConvB module so that the ConvB module extracts the deep features of the fourth sub-feature map to obtain the fifth sub-feature map, including: inputting the fourth sub-feature map into the second layer normalization module so that the second layer normalization module performs layer normalization on the fourth sub-feature map to obtain a first intermediate feature map; inputting the first intermediate feature map into the first PWConv module so that the first PWConv module performs element-by-element convolution on the first intermediate feature map to obtain a second intermediate feature map; inputting the second intermediate feature map into the gated linear unit element, and obtain a third intermediate feature map; input the third intermediate feature map into the second DWConv1D layer, so that the second DWConv1D layer performs one-dimensional lightweight convolution processing on the third intermediate feature map to obtain a fourth intermediate feature map; input the fourth intermediate feature map into the fifth batch normalization layer, so that the fifth batch normalization layer performs batch normalization processing on the fourth intermediate feature map to obtain a fifth intermediate feature map; input the fifth intermediate feature map into the second Cswish activation layer, so that the second Cswish activation layer performs activation processing on the fourth intermediate feature map to obtain a sixth intermediate feature map; input the sixth intermediate feature map into the second PWConv module, so that the second PWConv module performs element-by-element convolution on the sixth intermediate feature map to obtain a seventh intermediate feature map; input the seventh intermediate feature map into the Dropout layer, so that the Dropout layer performs regularization processing on the seventh intermediate feature map to obtain the fifth sub-feature map.
[0016] Optionally, the voiceprint monitoring model also includes a third-layer normalization module, an AttentiveStatistic Pooling layer, a sixth batch normalization layer and a second linear layer connected in sequence, the output end of the second linear layer is connected to the input end of the fully connected layer, the input end of the third-layer normalization module is connected to the output end of the splicing layer, and the seventh feature map is input into the fully connected layer to obtain the monitoring result, including: inputting the seventh feature map into the third-layer normalization module so that the third-layer normalization module performs layer normalization on the seventh feature map to obtain an eighth feature map; inputting the eighth feature map into the AttentiveStatistic Pooling layer so that the Attentive Statistic The Pooling layer captures the statistical features and dynamic changes of the eighth feature map through statistical pooling and an attention mechanism to obtain a ninth feature map; the ninth feature map is input into the sixth batch normalization layer so that the sixth batch normalization layer performs batch normalization on the ninth feature map to obtain a tenth feature map; the tenth feature map is input into the second linear layer to obtain an embedded code; the embedded code is input into the fully connected layer to obtain the monitoring result.
[0017] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for determining the posture of any one of the isolating switches.
[0018] By applying the technical solution of the present application, the sound emitted by the isolating switch at the current moment is first obtained to obtain voice data, and the voice data is converted into a corresponding mel-spectrogram to obtain a voice mel-spectrogram. Finally, the voice mel-spectrogram is input into the voiceprint monitoring model, so that the voiceprint monitoring model analyzes the voice mel-spectrogram to obtain a monitoring result representing that the posture of the isolating switch at the current moment is a closed posture or an open posture. The voiceprint monitoring model includes a first SC attention mechanism layer and a fully connected layer. The first SC attention mechanism layer includes a global average pooling layer and a first Cswish layer. The global average pooling layer is used to extract the spatial features and channel features of the voice mel-spectrogram. The activation function of the first Cswish activation layer is a function that improves the Swish function using exponential growth. Compared with the problem in the prior art that it is difficult to ensure both fast monitoring speed and high monitoring accuracy when the voiceprint recognition model performs posture monitoring on the isolating switch, in the voiceprint monitoring model of the present application, the activation function of the first Cswish activation layer helps to avoid the gradient vanishing problem by introducing an exponentially growing nonlinear part, so that the model can better learn deep features during the training process, thereby improving the recognition accuracy of the isolating switch voiceprint monitoring model. In addition, since the activation function of the first Cswish activation layer can maintain a large negative gradient value, the propagation of the gradient can be accelerated during the back propagation process, so that the model training converges faster, thereby improving the running speed of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 A hardware structure block diagram of a mobile terminal for executing a method for determining an isolating switch posture provided in an embodiment of the present application is shown;
[0021] Figure 2 A schematic flow chart of a method for determining the posture of an isolating switch provided in accordance with an embodiment of the present application is shown;
[0022] Figure 3 A schematic diagram of the structure of a specific voiceprint monitoring model provided according to an embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram of the structure of a first SC attention mechanism layer provided according to an embodiment of the present application is shown;
[0024] Figure 5 A schematic structural diagram of a CFB module provided according to an embodiment of the present application is shown;
[0025] Figure 6 A schematic structural diagram of a first LFFB module provided according to an embodiment of the present application is shown;
[0026] Figure 7 A schematic diagram of the structure of a CVA Attention module provided according to an embodiment of the present application is shown;
[0027] Figure 8 A schematic structural diagram of a ConvB module provided according to an embodiment of the present application is shown.
[0028] The above drawings include the following reference numerals:
[0029] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION
[0030] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0031] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0033] As introduced in the background technology, when the voiceprint recognition model in the prior art monitors the posture of the isolating switch, it is difficult to ensure both a fast monitoring speed and a high monitoring accuracy. To solve the above problem, the embodiments of the present application provide a method and electronic device for determining the posture of the isolating switch.
[0034] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0035] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for determining the posture of an isolating switch according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0036] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining the posture of the isolating switch in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific network example may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0037] In this embodiment, a method for determining the posture of an isolating switch running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0038] Figure 2 is a flow chart of a method for determining the posture of an isolating switch according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0039] Step S201, obtaining the sound emitted by the isolating switch at the current moment to obtain voice data, and converting the voice data into a corresponding mel-spectrogram to obtain a voice mel-spectrogram;
[0040] Step S202, input the above-mentioned speech Mel-spectrogram into the voiceprint monitoring model, so that the above-mentioned voiceprint monitoring model analyzes the above-mentioned speech Mel-spectrogram to obtain a monitoring result, and the above-mentioned monitoring result is a result of characterizing that the posture of the above-mentioned isolating switch at the current moment is a closed posture or an open posture, wherein the above-mentioned voiceprint monitoring model includes a first SC attention mechanism layer and a fully connected layer, the above-mentioned first SC attention mechanism layer includes a global average pooling layer and a first Cswish layer, the output end of the above-mentioned global average pooling layer is connected to the input end of the above-mentioned first Cswish activation layer, the above-mentioned global average pooling layer is used to extract the spatial features and channel features of the above-mentioned speech Mel-spectrogram, the activation function of the above-mentioned first Cswish activation layer is a function that improves the Swish function using exponential growth, the output end of the above-mentioned first Cswish activation layer is connected to the input end of the above-mentioned fully connected layer, and the above-mentioned fully connected layer is used to output the above-mentioned monitoring result.
[0041] Through the above embodiment, the sound emitted by the isolating switch at the current moment is first obtained to obtain voice data, and the voice data is converted into a corresponding Mel-spectrogram to obtain a voice Mel-spectrogram. Finally, the voice Mel-spectrogram is input into the voiceprint monitoring model, so that the voiceprint monitoring model analyzes the voice Mel-spectrogram to obtain a monitoring result characterizing that the posture of the isolating switch at the current moment is a closed posture or a disconnected posture. The voiceprint monitoring model includes a first SC attention mechanism layer and a fully connected layer, the first SC attention mechanism layer includes a global average pooling layer and a first Cswish layer, the global average pooling layer is used to extract the spatial features and channel features of the voice Mel-spectrogram, and the activation function of the first Cswish activation layer is a function that improves the Swish function using exponential growth. Compared with the problem in the prior art that it is difficult to ensure both fast monitoring speed and high monitoring accuracy when the voiceprint recognition model performs posture monitoring on the isolating switch, in the voiceprint monitoring model of the present application, the activation function of the first Cswish activation layer helps to avoid the gradient vanishing problem by introducing an exponentially growing nonlinear part, so that the model can better learn deep features during the training process, thereby improving the recognition accuracy of the isolating switch voiceprint monitoring model. In addition, since the activation function of the first Cswish activation layer can maintain a large negative gradient value, the propagation of the gradient can be accelerated during the back propagation process, so that the model training converges faster, thereby improving the running speed of the model.
[0042] Specifically, the sound emitted by the disconnector at the current moment is obtained to obtain voice data, and the above voice data is converted into a corresponding Mel-spectrogram to obtain a voice Mel-spectrogram. The specific steps may be: use a microphone in the substation to record and collect the sound of the disconnector (i.e., voice clips), each voice clip is 10 seconds (when the voice clip is less than 10 seconds, the voice clip is repeatedly spliced until the voice length reaches 10 seconds), to obtain initial voice data, and then add noise to 20% of the initial voice data, add echo to 30% of the initial voice data, and add noise and echo to 5% of the initial voice data (i.e., the initial voice data containing noise and echo, the initial voice data containing noise, the initial voice data containing echo, and the original initial voice data account for 1:4:6:9) to obtain voice data, and then perform a series of processing such as pre-emphasis, framing, windowing, fast Fourier transform, Mel filter filtering, etc. on the voice data to obtain a voice Mel-spectrogram.
[0043] Specifically, converting speech data into a Mel-spectrogram is a common operation in the field of audio processing. The speech Mel-spectrogram is processed by Fast Fourier Transform (FFT) on the sound generated when the isolation switch is operated and mapped to the Mel scale to capture the basic texture and characteristics of the sound.
[0044] In one alternative, Figure 3 and Figure 4 As shown, the voiceprint monitoring model also includes a first convolutional layer and a first MobileNetV2 layer. The output end of the first convolutional layer is connected to the input end of the first MobileNetV2 layer. The output end of the first MobileNetV2 layer is connected to the input end of the first SC attention mechanism layer. The first SC attention mechanism layer also includes a second convolutional layer, a first batch of normalization layers, a ReLU layer and a third convolutional layer connected in sequence. The input end of the second convolutional layer is connected to the output end of the global average pooling layer, and the output end of the third convolutional layer is connected to the input end of the first Cswish activation layer. The first SC attention mechanism layer also includes a product layer. The input end of the product layer is respectively connected to the output end of the first Cswish activation layer and the output end of the first convolutional layer. The output end of the product layer is connected to the input end of the fully connected layer, and the speech Mel spectrum graph is input into the voiceprint monitoring model so that the voiceprint monitoring model analyzes the speech Mel spectrum graph to obtain a monitoring result, including: inputting the speech Mel spectrum graph into the first convolutional layer so that the first convolutional layer extracts local features of the speech Mel spectrum graph to obtain a first feature graph Q1; inputting the first feature graph Q1 into the first MobileNetV2 layer so that the first MobileNetV2 layer extracts features from the first feature graph through depthwise separable convolution to obtain a second feature graph Q2; inputting the second feature graph Q2 into the global average pooling layer so that the global average pooling layer performs global average pooling on the second feature graph to obtain a matrix z, wherein, Q2 represents the second feature map, C represents the number of channels in the second feature map, F represents the number of frequency components in the second feature map, T represents the number of time components in the second feature map, c represents the sequence number of the channel, t represents the sequence number of the time component, and f represents the sequence number of the frequency component; the matrix z is input into the interaction layer so that the interaction layer processes the matrix z to obtain the target matrix, wherein the interaction layer includes the second convolutional layer, the first batch of normalization layers, the ReLU layer and the third convolutional layer connected in sequence; the target matrix is input into the first Cswish activation layer so that the first Cswish activation layer performs nonlinear activation on the target matrix to obtain the attention weight, wherein the activation function of the first Cswish activation layer is f(x)=m(max(α(e x-1), x))+nx·sigmoid(x), α is a hyperparameter, m is a preset first adaptive parameter, n is a preset second adaptive parameter, x is the input of the first Cswish activation layer, and f(x) is the output of the first Cswish activation layer; the attention weight and the second feature map are input into the product layer, so that the product layer multiplies the attention weight and the second feature map element by element to obtain a third feature map Q3; the third feature map Q3 is input into the fully connected layer to obtain the monitoring result.
[0045] In the above embodiment, through the combination of the first convolutional layer and the first MobileNetV2 layer, the model can effectively extract the local features and deep features of the speech Mel-spectrogram; the global average pooling layer can capture the global information of the second feature map; the interaction layer can further process and refine the global information; the first Cswish activation layer helps the model focus on the most important part of the input data; the product layer multiplies the attention weights by the second feature map element by element. This operation actually combines the attention mechanism with the original feature map, thereby enhancing the model's ability to distinguish features; the fully connected layer receives the third feature map as input and outputs the final monitoring results. This step usually involves classification or regression tasks, which are used to determine the posture of the disconnector, thereby further ensuring a high accuracy rate.
[0046] Specifically, the first convolutional layer, the second convolutional layer, and the third convolutional layer are all common convolutional layers in the field of deep learning, the first MobileNetV2 layer is a common MobileNetV2 in the field of deep learning, the first batch normalization layer is a common batch normalization operation in the field of deep learning, the ReLU layer is a common ReLU in the field of deep learning, and the fully connected layer is a common fully connected layer in the field of deep learning. Specifically, MobileNetV2 is a popular lightweight deep learning model. MobileNetV2 uses deep separable convolution as its core building block. Through its innovative architecture design, MobileNetV2 significantly reduces the computational burden while maintaining model performance.
[0047] Specifically, by processing the speech Mel-spectrogram through the first convolution layer, the local features of the sound can be effectively extracted; by processing the first feature map through the first MobileNetV2 layer, the computing resources and parameter efficiency are optimized through deep separable convolution, which helps to extract important isolation switch sound features while keeping the voiceprint monitoring model lightweight; by processing the second feature map through the first SC attention mechanism layer, the model's ability to recognize key features is enhanced by focusing on global information, thereby obtaining a more representative third feature map.
[0048] Specifically, the global average pooling layer is used to perform global average pooling on the second feature map of the input, and each channel and frequency are retained in the pooling process. The interaction layer is used to capture cross-channel interactions. Specifically, the formula for the attention weight is: ω=σ(Conv2(ReLU(BN(Conv1(z))))), where σ(·) is the Cswish function (i.e., the activation function of the first Cswish activation layer), BN represents batch normalization, and ω∈R C×F Represents the attention weights calculated at different frequencies and channel positions; the second and third convolutional layers calculate the attention weights by aggregating the frequencies of adjacent channels and the matrix z, and superimpose two Conv layers to enhance learning ability. In the embodiment of the present application, the attention weight ω is the output f(x) of the first Cswish activation layer. Specifically, the hyperparameter α is a positive number, m+n=1, and the size of m and n can be adjusted according to the training effect of the voiceprint monitoring model. Specifically, the activation function of the first Cswish activation layer introduces an exponentially growing nonlinear part, which helps to avoid the gradient vanishing problem and maintain a large negative gradient value.
[0049] According to some exemplary embodiments of the present application, Figure 3As shown, the voiceprint monitoring model also includes a second MobileNetV2 layer, a second SC attention mechanism layer, a first linear layer and a CFB combination layer connected in sequence, the CFB combination layer includes a plurality of CFB modules connected in sequence, the input end of the second MobileNetV2 layer is connected to the output end of the first SC attention mechanism layer, the voiceprint monitoring model also includes a splicing layer, the input end of the splicing layer is respectively connected to the output end of each of the CFB modules, the output end of the splicing layer is connected to the input end of the fully connected layer, the second SC attention mechanism layer has the same internal structure as the first SC attention mechanism layer, the third feature map Q3 is input into the fully connected layer, and the monitoring result is obtained, including: inputting the third feature map Q3 into the second MobileNetV2 layer, with The second MobileNetV2 layer performs feature extraction on the third feature map Q3 through depthwise separable convolution to obtain a fourth feature map Q4; the fourth feature map Q4 is input into the second SC attention mechanism layer to obtain a fifth feature map Q5; the fifth feature map Q5 is input into the first linear layer to obtain a sixth feature map Q6; the sixth feature map Q6 is input into the CFB combination layer, and the feature maps output by each of the CFB modules in the CFB combination layer are obtained, and each of the feature maps is input into the concatenation layer, so that the concatenation layer performs a concatenation operation on a plurality of the feature maps to obtain a seventh feature map Q7, wherein the CFB combination layer is used to extract global features and local features of the sixth feature map; the seventh feature map Q7 is input into the fully connected layer to obtain the monitoring result.
[0050] In the above embodiment, through the depth-separable convolution of the second MobileNetV2 layer, the model can extract deeper features from the third feature map to form a fourth feature map, which further enhances the model's ability to capture the sound features of the isolating switch and helps to further improve the accuracy of the monitoring results; the use of the second SC attention mechanism layer enables the model to pay more attention to the features in the fourth feature map that are more important for judging the posture of the isolating switch. In this way, the model can ignore some irrelevant information and further improve the accuracy of monitoring; through multiple CFB modules in the CFB combination layer, the model can extract global features and local features at the same time, which helps the model understand the input sound data from different angles and enhances the generalization ability of the model; the splicing layer splices the feature maps output by multiple CFB modules in the CFB combination layer to form the seventh feature map. This splicing operation helps to integrate the features extracted by different CFB modules, making the final monitoring results more comprehensive, thereby further ensuring high monitoring accuracy.
[0051] Specifically, the second MobileNetV2 layer is a MobileNetV2 commonly used in the deep learning field, the first linear layer is a linear layer commonly used in the deep learning field, and the concatenation operation is a Concat operation commonly used in the deep learning field.
[0052] Specifically, the features are further optimized and purified through the depthwise separable convolution of the second MobileNetV2 layer.
[0053] Specifically, Figure 3 As shown, the CFB combination layer includes L stacked CFB modules. In the embodiment of the present application, L is 4.
[0054] In some other optional schemes, multiple CFB modules are arranged in sequence, the sixth feature map is input into the CFB combination layer, and the feature map output by each CFB module in the CFB combination layer is obtained, including: a first input step, inputting the sixth feature map into the first CFB module, so that the first CFB module extracts the global features and local features of the sixth feature map to obtain the first feature map; a second input step, inputting the current feature map into the current CFB module, so that the current CFB module extracts the global features and local features of the current feature map to obtain the target feature map, wherein the current CFB module is any one of the remaining CFB modules in the CFB combination layer except the first CFB module, and the current feature map is the feature map output by the CFB module connected to the input end of the current CFB module; repeating the second input step until the feature map output by the last CFB module is obtained.
[0055] In the above embodiment, first, the sixth feature map is input into the first CFB module, which is responsible for extracting global and local features and generating the first feature map. This step lays the foundation for subsequent processing; in the second input step, the current feature map (i.e., the output of the previous CFB module) is input into the current CFB module, and this process is repeated in each remaining CFB module in the CFB combination layer. This iterative process allows each CFB module to further optimize and refine the feature extraction based on the previous module, thereby obtaining a higher quality target feature map; by repeating the second input step until the last CFB module in the CFB combination layer is processed, this method ensures that the feature map can be fully processed when passing through each module, and the feature map finally output includes the cumulative effect of all intermediate processing steps from the initial feature map to the final feature map, that is, through this hierarchical and iterative feature extraction process, the monitoring accuracy of the voiceprint monitoring model for the isolation switch posture can be further improved. This is because each CFB module can capture and strengthen features at different levels, thereby making the final monitoring result more reliable.
[0056] Specifically, the sixth feature map is input into the stacked CFB module, and after passing through the first CFB module, the first feature map is output, and then the first feature map is input into the next CFB module, and so on, and the feature map is updated every time it passes through a CFB module. The feature maps output by each CFB module are concat-operated to improve its ability to extract deep features of different layers. Connecting feature maps of different layers can improve the performance of the voiceprint monitoring model.
[0057] In some alternative solutions, all of the above CFB modules have the same internal structure, such as Figure 5 As shown, the CFB module includes a first LFFB module, a CVAAttention module, a ConvB module, a second LFFB module and a first-layer normalization module connected in sequence, and the sixth feature map Q6 is input into the first CFB module, so that the first CFB module extracts the global features and local features of the sixth feature map to obtain the first feature map, including: inputting the sixth feature map Q6 into the first LFFB module, so that the first LFFB module extracts features from the sixth feature map Q6 through lightweight convolution to obtain the first sub-feature map Q 61 ; Combine the sixth feature map Q6 with half of the first sub-feature map Q 61 Add together to get the second sub-feature map Q 62 ; The second sub-feature map Q 62 Input into the CVAAttention module so that the CVAAttention module extracts the second sub-feature map Q62 The global features and local features of the third sub-feature map Q 63 ; The third sub-feature map Q 63 And the second sub-feature graph Q 62 Add together to get the fourth sub-feature map Q 64 ; The fourth sub-feature map Q 64 Input into the above ConvB module, so that the above ConvB module extracts the above fourth sub-feature map Q 64 The fifth sub-feature map Q is obtained by 65 ; The fifth sub-feature map Q 65 Compared with the fourth sub-feature graph Q 64 Add together to get the sixth sub-feature map Q 66 ; The sixth sub-feature map Q 66 Input to the second LFFB module, so that the second LFFB module performs lightweight convolution on the sixth sub-feature map Q 66 Perform feature extraction to obtain the seventh sub-feature map Q 67 ; The sixth sub-feature map Q 66 With half of the seventh sub-characteristic graph Q 67 Add together to get the eighth sub-feature map Q 68 ; The eighth sub-feature map Q 68 Input to the first layer normalization module, so that the first layer normalization module can normalize the eighth sub-feature map Q 68 Perform layer normalization to obtain the first feature map Q 69 .
[0058] In the above embodiment, the CFB module combines the advantages of the Transformer and CNN (Convolutional Neural Network) models, captures content-based global features, and extracts local features through multiple convolutional pooling operations, further ensuring that the monitoring results are more accurate, and the lightweight convolution of the first LFFB module and the CVAAttention module further ensure a faster monitoring speed.
[0059] Specifically, the first layer normalization module is a common layer normalization operation in the field of deep learning.
[0060] In some exemplary embodiments, the first LFFB module and the second LFFB module have the same internal structure, such as Figure 6As shown, the first LFFB module includes a first combination layer, a second combination layer and a third combination layer connected in sequence, the first combination layer includes a first Conv1D layer, a first GELU layer and a second batch of normalization layers connected in sequence, the second combination layer includes a first DWConv1D layer, a second GELU layer and a third batch of normalization layers connected in sequence, the third combination layer includes a second Conv1D layer, a third GELU layer and a fourth batch of normalization layers connected in sequence, the sixth feature map Q6 is input into the first LFFB module, so that the first LFFB module extracts features from the sixth feature map Q6 through lightweight convolution to obtain a first sub-feature map The method comprises: inputting the sixth feature map Q6 into the first combination layer, so that the first combination layer performs one-dimensional convolution processing, activation processing and batch normalization processing on the sixth feature map Q6 to obtain a first output feature map; inputting the first output feature map into the second combination layer, so that the second combination layer performs one-dimensional lightweight convolution processing, activation processing and batch normalization processing on the first output feature map to obtain a second output feature map; inputting the second output feature map into the third combination layer, so that the third combination layer performs one-dimensional convolution processing, activation processing and batch normalization processing on the second output feature map to obtain the first sub-feature map Q 61 .
[0061] In the above embodiment, efficient feature extraction of the sixth feature map is achieved through the lightweight convolution design of the first LFFB module and the second LFFB module. This design reduces the amount of calculation, further improves the processing speed, and enables the model to respond more quickly.
[0062] Specifically, the first Conv1D layer and the second Conv1D layer are one-dimensional convolutional layers commonly used in the field of deep learning; the first GELU layer, the second GELU layer and the third GELU layer are Gaussian error linear units (i.e., Gaussian error linear unit activation function) commonly used in the field of deep learning; the second batch normalization layer, the third batch normalization layer and the fourth batch normalization layer are batch normalization operations commonly used in the field of deep learning; the first DWConv1D layer is a one-dimensional deep convolutional layer commonly used in the field of deep learning.
[0063] Specifically, the sixth feature map is first input into the first Conv1D layer for convolution processing on the width, then processed by the first GELU layer and the second batch normalization layer (i.e., first processed with the GELU activation function, then processed by batch normalization), then processed by the first DWConv1D layer for lightweight convolution, then processed by the second GELU layer and the third batch normalization layer, then processed by the second Conv1D layer for convolution processing on the width, then processed by the third GELU layer and the fourth batch normalization layer, to obtain the first sub-feature map. The first LFFB module uses lightweight convolution, which greatly reduces the number of parameters.
[0064] In some other exemplary embodiments, Figure 7 As shown, the CVAAttention module includes a fourth convolutional layer, a fifth convolutional layer, a sixth convolutional layer, a seventh convolutional layer, a first Softmax layer and a second Softmax layer, and converts the second sub-feature map Q 62 Input into the CVAAttention module so that the CVAAttention module extracts the second sub-feature map Q 62 The global features and local features of the third sub-feature map Q 63 , including: transforming the second sub-feature graph Q 62 Input into the fourth convolutional layer to obtain the third output feature map, and reduce the dimension of the third output feature map to obtain the fourth output feature map; 62 Input it into the fifth convolutional layer to obtain the fifth output feature map, and input the fifth output feature map into the first Softmax layer, so that the first Softmax layer transposes the fifth output feature map to obtain the sixth output feature map; 62 Input into the sixth convolutional layer to obtain the seventh output feature map, and input the seventh output feature map into the second Softmax layer, so that the second Softmax layer transposes the seventh output feature map to obtain the eighth output feature map; matrix multiply the fourth output feature map with the sixth output feature map to obtain the ninth output feature map, and matrix multiply the ninth output feature map with the eighth output feature map to obtain the tenth output feature map; input the tenth output feature map into the seventh convolutional layer to obtain the third sub-feature map Q 63 .
[0065] In the above embodiment, through the processing of the CVAAttention module, global features and local features can be extracted from the second sub-feature map at the same time. This feature extraction method helps to capture richer information, thereby further improving the accuracy of the model's judgment on the posture of the disconnector. The above CVAttention module is used to achieve a balance in the receptive field, taking into account global and local information, while also reducing the interference of irrelevant information.
[0066] Specifically, the fourth convolutional layer, the fifth convolutional layer, the sixth convolutional layer, and the seventh convolutional layer are common convolutional layers in the field of deep learning; the first Softmax layer and the second Softmax layer are common Softmax layers in the field of deep learning.
[0067] Specifically, the CVAAttention module introduces a channel attention mechanism, which makes the model simple and runs fast.
[0068] In other embodiments, Figure 8 As shown, the ConvB module includes a second normalization module, a first PWConv module, a gated linear unit, a second DWConv1D layer, a fifth batch normalization layer, a second Cswish activation layer, a second PWConv module and a Dropout layer connected in sequence. The activation function of the second Cswish activation layer is the same as the activation function of the first Cswish activation layer. The fourth sub-feature map Q 64 Input into the above ConvB module, so that the above ConvB module extracts the above fourth sub-feature map Q 64 The fifth sub-feature map is obtained by: converting the fourth sub-feature map Q 64 Input to the second layer normalization module, so that the second layer normalization module can normalize the fourth sub-feature map Q 64Perform layer normalization processing to obtain a first intermediate feature map; input the above-mentioned first intermediate feature map into the above-mentioned first PWConv module, so that the above-mentioned first PWConv module performs element-by-element convolution on the above-mentioned first intermediate feature map to obtain a second intermediate feature map; input the above-mentioned second intermediate feature map into the above-mentioned gated linear unit to obtain a third intermediate feature map; input the above-mentioned third intermediate feature map into the above-mentioned second DWConv1D layer, so that the above-mentioned second DWConv1D layer performs one-dimensional lightweight convolution processing on the above-mentioned third intermediate feature map to obtain a fourth intermediate feature map; input the above-mentioned fourth intermediate feature map into the above-mentioned fifth batch normalization layer, so that the above-mentioned fifth batch normalization layer performs one-dimensional lightweight convolution processing on the third intermediate feature map The fourth intermediate feature map is batch normalized to obtain a fifth intermediate feature map; the fifth intermediate feature map is input into the second Cswish activation layer so that the second Cswish activation layer activates the fourth intermediate feature map to obtain a sixth intermediate feature map; the sixth intermediate feature map is input into the second PWConv module so that the second PWConv module performs element-by-element convolution on the sixth intermediate feature map to obtain a seventh intermediate feature map; the seventh intermediate feature map is input into the Dropout layer so that the Dropout layer performs regularization on the seventh intermediate feature map to obtain the fifth sub-feature map Q 65 .
[0069] In the above embodiment, through the multi-layer processing of the ConvB module, deeper feature information can be extracted from the fourth sub-feature map. This information is crucial for the subsequent monitoring result analysis, further ensuring that the monitoring results are more accurate.
[0070] Specifically, the second layer normalization module is a layer normalization operation common in the field of deep learning; the first PWConv module and the second PWConv module are element-by-element convolutions (i.e., point convolutions) common in the field of deep learning; the gated linear unit is a gated linear unit GLU (Gated Linear Unit) common in the field of deep learning; the second DWConv1D layer is a one-dimensional deep convolution layer common in the field of deep learning; the fifth batch normalization layer is a batch normalization operation common in the field of deep learning; the Dropout layer is a regularization operation common in the field of deep learning.
[0071] In other embodiments, Figure 3As shown, the voiceprint monitoring model also includes a third-layer normalization module, an Attentive Statistic Pooling layer, a sixth batch normalization layer and a second linear layer connected in sequence, the output end of the second linear layer is connected to the input end of the fully connected layer, the input end of the third-layer normalization module is connected to the output end of the splicing layer, and the seventh feature map Q7 is input into the fully connected layer to obtain the monitoring result, including: inputting the seventh feature map Q7 into the third-layer normalization module so that the third-layer normalization module performs layer normalization on the seventh feature map to obtain an eighth feature map Q8; inputting the eighth feature map Q8 into the Attentive Statistic Pooling layer so that the Attentive Statistic The Pooling layer captures the statistical features and dynamic changes of the eighth feature map Q8 through statistical pooling and attention mechanism to obtain the ninth feature map Q9; the ninth feature map Q9 is input into the sixth batch normalization layer, so that the sixth batch normalization layer performs batch normalization on the ninth feature map Q9 to obtain the tenth feature map Q 10 ; The tenth characteristic graph Q 10 Input into the second linear layer above to get the embedded code Q 11 ; Embed the above code Q 11 Input into the above-mentioned fully connected layer to obtain the above-mentioned monitoring results.
[0072] In the above embodiment, through the sequential processing of the third normalization module, the Attentive Statistic Pooling layer, the sixth batch normalization layer and the second linear layer, the model can more effectively capture and represent the statistical characteristics and dynamic changes of the input feature map. This processing method helps to extract richer and more distinctive features, thereby further improving the model's recognition accuracy of the isolating switch posture.
[0073] Specifically, the embedded code is converted into the final classification output through a fully connected layer, and whether the isolation switch is in a closed posture or an open posture is predicted based on the extracted features.
[0074] Specifically, the voiceprint monitoring model in the present application is a model obtained after training with a sample voice data set, wherein the sample voice data set is obtained by collecting voice clips of the historical isolating switch in the closed posture and the open posture. The specific training process is: first preprocess the sample voice data set to obtain the sample voice Mel spectrum data, and then divide the sample voice Mel spectrum data into a training set, a validation set, and a test set according to a certain ratio. The training set, the validation set, and the test set are mutually exclusive data. The training set accounts for 70% of the sample voice Mel spectrum data, and the validation set and the test set each account for 15% of the sample voice Mel spectrum data; then use the training set, the validation set, and the test set to train and verify the untrained voiceprint monitoring model, and set the margin of AM-softmax to 0.2 and the scale to 30, which is used as the recognition loss. The loss is optimized by the AdamW optimizer, with an initial learning rate of 0.001 and a weight decay of 10 -7 ; For the first 2000 steps, the learning rate is warmed up, and the learning rate is halved every 4 epochs. The batch size used for training is 152, and the trained voiceprint monitoring model is obtained.
[0075] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0076] An embodiment of the present application also provides an electronic device, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for determining the posture of any one of the above-mentioned isolating switches.
[0077] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0078] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0079] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0080] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0081] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0082] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0083] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0084] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0085] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0086] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0087] In the method for determining the posture of the isolating switch of the present application, the sound emitted by the isolating switch at the current moment is first obtained to obtain voice data, and the voice data is converted into a corresponding mel-spectrogram to obtain a voice mel-spectrogram, and finally the voice mel-spectrogram is input into the voiceprint monitoring model, so that the voiceprint monitoring model analyzes the voice mel-spectrogram to obtain a monitoring result characterizing that the posture of the isolating switch at the current moment is a closed posture or an open posture, wherein the voiceprint monitoring model includes a first SC attention mechanism layer and a fully connected layer, the first SC attention mechanism layer includes a global average pooling layer and a first Cswish layer, the global average pooling layer is used to extract the spatial features and channel features of the voice mel-spectrogram, and the activation function of the first Cswish activation layer is a function that improves the Swish function using exponential growth. Compared with the problem in the prior art that it is difficult to ensure both fast monitoring speed and high monitoring accuracy when the voiceprint recognition model performs posture monitoring on the isolating switch, in the voiceprint monitoring model of the present application, the activation function of the first Cswish activation layer helps to avoid the gradient vanishing problem by introducing an exponentially growing nonlinear part, so that the model can better learn deep features during the training process, thereby improving the recognition accuracy of the isolating switch voiceprint monitoring model. In addition, since the activation function of the first Cswish activation layer can maintain a large negative gradient value, the propagation of the gradient can be accelerated during the back propagation process, so that the model training converges faster, thereby improving the running speed of the model.
[0088] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining the posture of an isolating switch, characterized in that: include: Acquire the sound emitted by the isolating switch at the current moment to obtain voice data, and convert the voice data into a corresponding mel-spectrogram to obtain a voice mel-spectrogram; The speech mel-spectrogram is input into the voiceprint monitoring model so that the voiceprint monitoring model analyzes the speech mel-spectrogram to obtain a monitoring result, wherein the monitoring result is a result of characterizing whether the posture of the isolating switch at the current moment is a closed posture or an open posture, wherein the voiceprint monitoring model includes a first SC attention mechanism layer and a fully connected layer, the first SC attention mechanism layer includes a global average pooling layer and a first Cswish layer, the output end of the global average pooling layer is connected to the input end of the first Cswish activation layer, the global average pooling layer is used to extract the spatial features and channel features of the speech mel-spectrogram, the activation function of the first Cswish activation layer is a function that improves the Swish function using exponential growth, the output end of the first Cswish activation layer is connected to the input end of the fully connected layer, and the fully connected layer is used to output the monitoring result.
2. The method for determining the disconnector posture according to claim 1, characterized in that: The voiceprint monitoring model also includes a first convolutional layer and a first MobileNetV2 layer, the output end of the first convolutional layer is connected to the input end of the first MobileNetV2 layer, the output end of the first MobileNetV2 layer is connected to the input end of the first SC attention mechanism layer, the first SC attention mechanism layer also includes a second convolutional layer, a first batch of normalization layers, a ReLU layer and a third convolutional layer connected in sequence, the input end of the second convolutional layer is connected to the output end of the global average pooling layer, the output end of the third convolutional layer is connected to the input end of the first Cswish activation layer, the first SC attention mechanism layer also includes a product layer, the input end of the product layer is respectively connected to the output end of the first Cswish activation layer and the output end of the first convolutional layer, the output end of the product layer is connected to the input end of the fully connected layer, the speech Mel spectrum graph is input into the voiceprint monitoring model, so that the voiceprint monitoring model analyzes the speech Mel spectrum graph to obtain a monitoring result, including: Inputting the speech mel-spectrogram into a first convolutional layer, so that the first convolutional layer extracts local features of the speech mel-spectrogram to obtain a first feature map; Inputting the first feature map into the first MobileNetV2 layer, so that the first MobileNetV2 layer extracts features from the first feature map through depthwise separable convolution to obtain a second feature map; The second feature map is input into the global average pooling layer, so that the global average pooling layer performs global average pooling on the second feature map to obtain a matrix z, where Q2∈R C×F×T , Q2 represents the second feature map, C represents the number of channels in the second feature map, F represents the number of frequency components in the second feature map, T represents the number of time components in the second feature map, c represents the sequence number of the channel, t represents the sequence number of the time component, and f represents the sequence number of the frequency component; Inputting the matrix z into the interaction layer so that the interaction layer processes the matrix z to obtain a target matrix, wherein the interaction layer includes the second convolutional layer, the first batch of normalization layers, the ReLU layer, and the third convolutional layer connected in sequence; The target matrix is input into the first Cswish activation layer, so that the first Cswish activation layer performs nonlinear activation on the target matrix to obtain the attention weight, wherein the activation function of the first Cswish activation layer is f(x)=m(max(α(e x -1), x))+nx·sigmoid(x), α is a hyperparameter, m is a preset first adaptive parameter, n is a preset second adaptive parameter, x is the input of the first Cswish activation layer, and f(x) is the output of the first Cswish activation layer; Inputting the attention weight and the second feature map into the product layer, so that the product layer multiplies the attention weight and the second feature map element by element to obtain a third feature map; The third feature map is input into the fully connected layer to obtain the monitoring result.
3. The method for determining the disconnector posture according to claim 2, characterized in that: The voiceprint monitoring model also includes a second MobileNetV2 layer, a second SC attention mechanism layer, a first linear layer and a CFB combination layer connected in sequence, the CFB combination layer includes a plurality of CFB modules connected in sequence, the input end of the second MobileNetV2 layer is connected to the output end of the first SC attention mechanism layer, the voiceprint monitoring model also includes a splicing layer, the input end of the splicing layer is respectively connected to the output end of each of the CFB modules, the output end of the splicing layer is connected to the input end of the fully connected layer, the second SC attention mechanism layer has the same internal structure as the first SC attention mechanism layer, the third feature map is input into the fully connected layer, and the monitoring result is obtained, including: Inputting the third feature map into the second MobileNetV2 layer, so that the second MobileNetV2 layer extracts features from the third feature map through depthwise separable convolution to obtain a fourth feature map; Inputting the fourth feature map into the second SC attention mechanism layer to obtain a fifth feature map; Inputting the fifth feature map into the first linear layer to obtain a sixth feature map; Inputting the sixth feature map into the CFB combination layer, obtaining feature maps output by each of the CFB modules in the CFB combination layer, and inputting each of the feature maps into the splicing layer, so that the splicing layer performs a splicing operation on a plurality of the feature maps to obtain a seventh feature map, wherein the CFB combination layer is used to extract global features and local features of the sixth feature map; The seventh feature map is input into the fully connected layer to obtain the monitoring result.
4. The method for determining the disconnector posture according to claim 3, characterized in that: Arranging the plurality of CFB modules in sequence, inputting the sixth feature map into the CFB combination layer, and obtaining the feature map output by each of the CFB modules in the CFB combination layer, comprising: A first input step, inputting the sixth feature map into the first CFB module, so that the first CFB module extracts the global features and local features of the sixth feature map to obtain the first feature map; The second input step is to input the current feature map into the current CFB module, so that the current CFB module extracts the global features and local features of the current feature map to obtain the target feature map, wherein the current CFB module is any one of the remaining CFB modules in the CFB combination layer except the first CFB module, and the current feature map is the feature map output by the CFB module connected to the input end of the current CFB module; Repeat the second input step until the feature map output by the last CFB module is obtained.
5. The method for determining the disconnector posture according to claim 4, characterized in that: All the CFB modules have the same internal structure. The CFB module includes a first LFFB module, a CVAAttention module, a ConvB module, a second LFFB module and a first-layer normalization module connected in sequence. The sixth feature map is input into the first CFB module so that the first CFB module extracts the global features and local features of the sixth feature map to obtain the first feature map, including: Inputting the sixth feature map into the first LFFB module, so that the first LFFB module extracts features from the sixth feature map through lightweight convolution to obtain a first sub-feature map; Adding the sixth feature map to half of the first sub-feature map to obtain a second sub-feature map; Inputting the second sub-feature map into the CVAAttention module, so that the CVAAttention module extracts global features and local features of the second sub-feature map to obtain a third sub-feature map; Adding the third sub-feature map and the second sub-feature map to obtain a fourth sub-feature map; Inputting the fourth sub-feature map into the ConvB module, so that the ConvB module extracts deep features of the fourth sub-feature map to obtain a fifth sub-feature map; Adding the fifth sub-feature map to the fourth sub-feature map to obtain a sixth sub-feature map; Inputting the sixth sub-feature map into the second LFFB module, so that the second LFFB module extracts features from the sixth sub-feature map through lightweight convolution to obtain a seventh sub-feature map; Adding the sixth sub-feature map and half of the seventh sub-feature map to obtain an eighth sub-feature map; The eighth sub-feature map is input into the first layer normalization module, so that the first layer normalization module performs layer normalization processing on the eighth sub-feature map to obtain the first feature map.
6. The method for determining the disconnector posture according to claim 5, characterized in that: The first LFFB module has the same internal structure as the second LFFB module. The first LFFB module includes a first combination layer, a second combination layer, and a third combination layer connected in sequence. The first combination layer includes a first Conv1D layer, a first GELU layer, and a second batch of normalization layers connected in sequence. The second combination layer includes a first DWConv1D layer, a second GELU layer, and a third batch of normalization layers connected in sequence. The third combination layer includes a second Conv1D layer, a third GELU layer, and a fourth batch of normalization layers connected in sequence. The sixth feature map is input into the first LFFB module so that the first LFFB module extracts features from the sixth feature map through lightweight convolution to obtain a first sub-feature map, including: Inputting the sixth feature map into the first combination layer, so that the first combination layer performs one-dimensional convolution processing, activation processing and batch normalization processing on the sixth feature map to obtain a first output feature map; Inputting the first output feature map into the second combination layer, so that the second combination layer performs one-dimensional lightweight convolution processing, activation processing and batch normalization processing on the first output feature map to obtain a second output feature map; The second output feature map is input into the third combination layer, so that the third combination layer performs one-dimensional convolution processing, activation processing and batch normalization processing on the second output feature map to obtain the first sub-feature map.
7. The method for determining the disconnector posture according to claim 5, characterized in that: The CVAAttention module includes a fourth convolutional layer, a fifth convolutional layer, a sixth convolutional layer, a seventh convolutional layer, a first Softmax layer, and a second Softmax layer. The second sub-feature map is input into the CVAAttention module so that the CVAAttention module extracts global features and local features of the second sub-feature map to obtain a third sub-feature map, including: Inputting the second sub-feature map into the fourth convolutional layer to obtain a third output feature map, and performing dimension reduction on the third output feature map to obtain a fourth output feature map; Inputting the second sub-feature map into the fifth convolutional layer to obtain a fifth output feature map, and inputting the fifth output feature map into the first Softmax layer, so that the first Softmax layer transposes the fifth output feature map to obtain a sixth output feature map; Inputting the second sub-feature map into the sixth convolutional layer to obtain a seventh output feature map, and inputting the seventh output feature map into the second Softmax layer, so that the second Softmax layer transposes the seventh output feature map to obtain an eighth output feature map; Performing matrix multiplication on the fourth output feature map and the sixth output feature map to obtain a ninth output feature map, and performing matrix multiplication on the ninth output feature map and the eighth output feature map to obtain a tenth output feature map; The tenth output feature map is input into the seventh convolutional layer to obtain the third sub-feature map.
8. The method for determining the disconnector posture according to claim 5, characterized in that: The ConvB module includes a second normalization module, a first PWConv module, a gated linear unit, a second DWConv1D layer, a fifth batch normalization layer, a second Cswish activation layer, a second PWConv module and a Dropout layer connected in sequence, the activation function of the second Cswish activation layer is the same as the activation function of the first Cswish activation layer, the fourth sub-feature map is input into the ConvB module, so that the ConvB module extracts the deep features of the fourth sub-feature map, and obtains the fifth sub-feature map, including: Inputting the fourth sub-feature map into the second-layer normalization module, so that the second-layer normalization module performs layer normalization processing on the fourth sub-feature map to obtain a first intermediate feature map; Inputting the first intermediate feature map into the first PWConv module, so that the first PWConv module performs element-by-element convolution on the first intermediate feature map to obtain a second intermediate feature map; Inputting the second intermediate feature map into the gated linear unit to obtain a third intermediate feature map; Inputting the third intermediate feature map into the second DWConv1D layer, so that the second DWConv1D layer performs a one-dimensional lightweight convolution process on the third intermediate feature map to obtain a fourth intermediate feature map; Inputting the fourth intermediate feature map into the fifth batch normalization layer, so that the fifth batch normalization layer performs batch normalization processing on the fourth intermediate feature map to obtain a fifth intermediate feature map; Inputting the fifth intermediate feature map into the second Cswish activation layer, so that the second Cswish activation layer performs activation processing on the fourth intermediate feature map to obtain a sixth intermediate feature map; Inputting the sixth intermediate feature map into the second PWConv module, so that the second PWConv module performs element-by-element convolution on the sixth intermediate feature map to obtain a seventh intermediate feature map; The seventh intermediate feature map is input into the Dropout layer, so that the Dropout layer performs regularization processing on the seventh intermediate feature map to obtain the fifth sub-feature map.
9. The method for determining the disconnector posture according to claim 3, characterized in that: The voiceprint monitoring model further includes a third normalization module, an Attentive Statistic Pooling layer, a sixth batch normalization layer, and a second linear layer connected in sequence, the output end of the second linear layer is connected to the input end of the fully connected layer, the input end of the third normalization module is connected to the output end of the splicing layer, the seventh feature map is input into the fully connected layer, and the monitoring result is obtained, including: Inputting the seventh feature map into the third layer normalization module, so that the third layer normalization module performs layer normalization processing on the seventh feature map to obtain an eighth feature map; Inputting the eighth feature map into the Attentive Statistic Pooling layer, so that the Attentive Statistic Pooling layer captures the statistical characteristics and dynamic changes of the eighth feature map through statistical pooling and attention mechanism, thereby obtaining a ninth feature map; Inputting the ninth feature map into the sixth batch normalization layer, so that the sixth batch normalization layer performs batch normalization processing on the ninth feature map to obtain a tenth feature map; Inputting the tenth feature map into the second linear layer to obtain an embedded code; The embedded code is input into the fully connected layer to obtain the monitoring result.
10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for determining the disconnector posture as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Power equipment fault sound intelligent diagnosis method and system, terminal and medium
CN112885372A
Voiceprint recognition method and device based on deep residual network and attention mechanism
CN114678030A
Intelligent voice forgery attack detection method based on attention mechanism
CN116416997A
Lightweight single-channel voiceprint recognition method and system based on deep learning
CN116504226A
Electric power communication system voiceprint recognition method and system based on EDRSN
CN116580714A