Electrode tip fault detection method and device, equipment and storage medium

By building a deep learning network, including feature enhancement and attention mechanism modules, the problems of information loss and low computing efficiency in electrode head detection are solved, and the accurate detection and positioning of electrode head faults are realized, ensuring the timely detection and processing of electrode head faults are ensured.

CN119810576AInactive Publication Date: 2025-04-11CHINA AUTOMOTIVE TECH & RES CENT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510293414.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-13
Publication Date
2025-04-11
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems such as loss of information, low calculation efficiency and inaccurate loss function in electrode head detection, which affects detection accuracy and real-timeness.

Method used

Build a deep learning network, including backbone network, head network, feature enhancement module and attention mechanism module. Through preprocessing, feature extraction, enhancement and screening, accurate detection and positioning of electrode head faults, and output alarm information when a fault is detected.

Benefits of technology

By optimizing the feature extraction and enhancement process, feature loss is reduced and discriminant strength is improved; attention mechanism reduces computing resource consumption, improves calculation accuracy, and ensures that electrode head failures can be discovered and dealt with in a timely manner to avoid safety hazards and economic losses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810576A_ABST
    Figure CN119810576A_ABST
Patent Text Reader

Abstract

The invention discloses an electrode tip fault detection method, device and equipment and a storage medium, and relates to the technical field of artificial intelligence, and the method comprises the steps: constructing a deep learning network which comprises a backbone network, a head network, a feature enhancement module and an attention mechanism module; preprocessing the electrode tip image data, wherein the preprocessing mode comprises normalization, size adjustment and data enhancement; inputting the preprocessed electrode tip image data into the deep learning network for feature extraction to obtain features; performing enhancement processing on the extracted features through a feature enhancement module; the attention mechanism module is used for screening and integrating the enhanced features; inputting the screened and integrated features into a head network for classification and positioning, and outputting an electrode tip fault detection result; and when a fault is detected in the electrode tip fault detection result, outputting alarm information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and storage medium for detecting electrode head faults. Background Art

[0002] With the rapid development of industrial automation and intelligent technology, real-time target detection technology is increasingly used in industrial production, safety monitoring, autonomous driving and other fields. Especially in the field of electrode head detection, since electrode heads are prone to wear, breakage and other faults during long-term use, timely and accurate detection of these faults is crucial to ensure production safety and efficiency. Traditional electrode head detection methods mainly rely on manual inspections, which is not only time-consuming and labor-intensive, but also difficult to ensure the accuracy and real-time performance of detection. Therefore, target detection technology based on deep learning has gradually become an effective way to solve this problem.

[0003] At present, target detection technology based on deep learning has made significant progress, among which the YOLO (You Only Look Once) series of algorithms are widely popular due to their efficiency and accuracy. In the field of electrode tip detection, researchers usually build target detection models based on the YOLO algorithm and combine it with deep learning technologies such as convolutional neural networks (CNN). These models extract features of electrode tip images through multiple convolutional layers and use fully connected layers for classification and regression, thereby realizing the detection and location of electrode tip faults.

[0004] Although the existing technology has achieved certain results in the field of electrode tip detection, there are still some defects and shortcomings. First, the traditional convolution operation is prone to information loss during the feature extraction process, especially when processing high-resolution images. This problem is particularly prominent. Secondly, the existing attention mechanism has a lot of redundant calculations in the calculation process, resulting in low model training efficiency. In addition, the traditional loss function may not be accurate enough when measuring the difference between the model prediction value and the true value, thus affecting the detection accuracy of the model. Summary of the invention

[0005] The purpose of this application is to provide a method, device, equipment and storage medium for detecting electrode head failure.

[0006] To achieve the above objectives, this application provides the following solutions: In a first aspect, the present application provides a method for detecting an electrode head failure, comprising: Constructing a deep learning network, wherein the deep learning network includes a backbone network, a head network, a feature enhancement module, and an attention mechanism module; Preprocessing the electrode tip image data, wherein the preprocessing method includes normalization, size adjustment and data enhancement; Inputting the preprocessed electrode tip image data into the deep learning network to extract features to obtain features; The extracted features are enhanced through the feature enhancement module; Use the attention mechanism module to filter and integrate the enhanced features; The filtered and integrated features are input into the head network for classification and positioning, and the electrode head fault detection results are output; When a fault is detected in the electrode tip fault detection result, an alarm message is output.

[0007] Optionally, the backbone network includes a standard convolution layer, a batch normalization layer and a LeakyReLU activation function layer.

[0008] Optionally, the feature enhancement module adopts an SPD downsampling operation, and the SPD downsampling operation includes local space rearrangement and channel dimension recombination.

[0009] Optionally, the attention mechanism module adopts a mechanism of filtering feature vectors using a routing matrix.

[0010] Optionally, the head network includes an initial convolution layer, an upsampling layer, a BConv layer and a Catconv layer.

[0011] Optionally, the method uses Normalized Wasserstein Distance LossFunction as a loss function during training.

[0012] Optionally, the alarm mechanism includes a sound alarm, a light alarm, or sending an alarm signal to a designated device.

[0013] In a second aspect, the present application provides a device for detecting an electrode head failure, the device for detecting an electrode head failure comprising: A network construction module, used to construct a deep learning network, wherein the deep learning network includes a backbone network, a head network, a feature enhancement module, and an attention mechanism module; A preprocessing module, used for preprocessing the electrode tip image data, wherein the preprocessing method includes normalization, size adjustment and data enhancement; A feature extraction module, used for inputting the preprocessed electrode tip image data into the deep learning network to extract features and obtain features; A detection module, used for enhancing the extracted features through a feature enhancement module; Use the attention mechanism module to filter and integrate the enhanced features; The filtered and integrated features are input into the head network for classification and positioning, and the electrode head fault detection results are output; The alarm module is used to output alarm information when a fault is detected in the electrode head fault detection result.

[0014] Optionally, the backbone network includes a standard convolution layer, a batch normalization layer and a LeakyReLU activation function layer.

[0015] Optionally, the feature enhancement module adopts an SPD downsampling operation, and the SPD downsampling operation includes local space rearrangement and channel dimension recombination.

[0016] Optionally, the attention mechanism module adopts a mechanism of filtering feature vectors using a routing matrix.

[0017] Optionally, the head network includes an initial convolution layer, an upsampling layer, a BConv layer and a Catconv layer.

[0018] Optionally, use Normalized Wasserstein Distance Loss Function as the loss function during training.

[0019] Optionally, the alarm mechanism includes a sound alarm, a light alarm, or sending an alarm signal to a designated device.

[0020] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the above-mentioned methods for detecting electrode head faults.

[0021] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-mentioned methods for detecting electrode head failures.

[0022] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for detecting electrode head failures.

[0023] According to the specific embodiments provided in this application, this application discloses the following technical effects: The present application provides a method, apparatus, device and storage medium for detecting electrode head faults. Through the construction and preprocessing steps of a deep learning network, it is ensured that the model can extract key features from complex images, eliminate differences between images, and increase the diversity of training samples. The feature extraction and enhancement module further optimizes feature representation, reduces feature loss, and improves feature discrimination. The introduction of the attention mechanism module enables the model to focus on important features more accurately, reduce computing resource consumption, and improve computing accuracy. The head network classifies and locates the integrated features, outputs fault detection results, and promptly outputs alarm information when a fault is detected, ensuring that the electrode head fault can be discovered and handled in a timely manner, effectively avoiding safety hazards and economic losses. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0025] Figure 1 A schematic flow chart of a method for detecting an electrode head fault provided in one embodiment of the present application; Figure 2 One of the electrode tip diagrams provided in one embodiment of the present application; Figure 3 The second example of the electrode tip provided in one embodiment of the present application; Figure 4 The third example of the electrode tip provided in one embodiment of the present application; Figure 5 The fourth example of the electrode tip provided in one embodiment of the present application; Figure 6 The fifth example of the electrode tip provided in one embodiment of the present application; Figure 7 A schematic diagram of functional modules of a device for detecting electrode head failure provided in one embodiment of the present application; Figure 8 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

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

[0027] like Figure 1 As shown, some embodiments of the present application provide a method for detecting an electrode head failure, which includes the following steps 101 to 107. Among them: Step 101, constructing a deep learning network, wherein the deep learning network includes a backbone network, a head network, a feature enhancement module, and an attention mechanism module; In the embodiment of the present application, building a deep learning network is the basis of the entire method, and the network is designed to detect electrode head failure in real time. The deep learning network includes the following main modules: Backbone network: As the core part of the network, the backbone network is responsible for the preliminary extraction of features of the electrode tip image. It is usually composed of multiple convolutional layers, batch normalization layers, and activation function layers, such as standard convolutional layers (Conv), convolutional layers (BConv) combined with batch normalization (BN) and LeakyReLU, as well as E-ELAN and MPConv layers. These layers extract features of different levels from the input image through convolution operations.

[0028] Head network: The head network is responsible for more specific tasks, such as classification or detection. It receives feature maps from the backbone network and further extracts and integrates features through operations such as upsampling and convolution, and finally outputs classification results or target locations.

[0029] Feature enhancement module: This module is used to enhance the features extracted by the backbone network to reduce feature loss and improve the performance of the model. In this method, the SPD downsampling operation is used as a feature enhancement method to optimize the feature representation through local spatial rearrangement and channel dimension recombination.

[0030] Attention mechanism module: The attention mechanism module further screens and integrates the enhanced features through the mechanism of filtering feature vectors through the routing matrix. This mechanism can reduce computing resource consumption and improve computing accuracy, allowing the model to focus on important features more accurately.

[0031] The feature map of the current layer is convolved by the convolution operation to obtain the feature map of the electrode head image of the next layer as shown in Formula 1. E-ELAN and MPCConv are permutations and combinations of different convolution scales. For the The value of the input feature map of the layer at position (i, j), For the The weight of the convolution kernel of the layer at position (m,n), is the bias term, is the activation function.

[0032] (1) in : No. The output feature value of the layer at position i, j. : Activation function, such as ReLU or LeakyReLU. is the weight of the convolution kernel of the lth layer at position (m, n), For the The value of the input feature map of the layer at position (i+m, j+m), is the bias term of the lth layer.

[0033] set up It is The feature map after layer convolution, It is The mean of the feature map after the convolution layer, or the The mean of the input feature maps of the layer Yes (No. The standard deviation of the feature map after the convolution layer is The standard deviation of the input feature map of the layer.

[0034] Normalized feature map It can be expressed as shown in formula 2, where and is the learning parameter, is a small positive number added to avoid division by zero errors.

[0035] (2) is the normalized feature map of the lth layer. are learning parameters used to adjust the scale and offset of normalization. and is the mean and standard deviation of the feature map of layer l. : Small positive number to prevent division by zero errors.

[0036] After convolution and batch normalization, the image needs to be pooled. The traditional maximum pooling is shown in Formula 3: For the The value of the layer feature map at position (i, j), c is the size of the pooling window, s is the step size, and the feature map after the pooling operation is applied is : (3) This maximum pooling operation has certain risks because of the way the maximum pooling operates. For each area in the pooling window, the maximum pooling only retains the maximum value and discards other values. Although it reduces the size of the feature map to a certain extent and improves the computational efficiency, this operation will lead to serious feature loss. Therefore, in the subsequent content, SPD is introduced to improve this problem.

[0037] Step 102, preprocessing the electrode tip image data, wherein the preprocessing method includes normalization, size adjustment and data enhancement; In the embodiment of the present application, in order to improve the training effect and performance of the model, it is necessary to preprocess the electrode tip image data. The preprocessing method includes: Normalization: Normalize the pixel values ​​of image data to a specific range (such as 0 to 1) to eliminate differences in brightness, contrast, etc. between different images.

[0038] Resizing: Resize images to a uniform size so that the model can handle input images of different sizes. This helps ensure the consistency of the model during training and testing.

[0039] Data enhancement: Generate more training samples by rotating, flipping, scaling, and cropping the original image to increase the generalization ability of the model. In this method, mosaic data enhancement technology can be used to further enrich the training data set.

[0040] Step 103, inputting the preprocessed electrode tip image data into the deep learning network to extract features to obtain features; In the embodiment of the present application, the pre-processed electrode tip image data is input into the deep learning network, and feature extraction is performed through the backbone network. The modules such as the convolution layer, batch normalization layer, and activation function layer in the backbone network work together to extract multi-level and multi-scale feature representations from the input image. These features are then passed to subsequent network modules for further processing.

[0041] Step 104, enhancing the extracted features through a feature enhancement module; In the embodiment of the present application, the extracted features are enhanced by the feature enhancement module. In the present method, the SPD downsampling operation is used to optimize the feature representation. SPD downsampling reduces feature loss and improves computational efficiency by rearranging the local space and recombining the channel dimensions. After the feature enhancement process, the quality of the features is improved, providing more powerful support for subsequent classification and positioning tasks.

[0042] Step 105, using the attention mechanism module to screen and integrate the enhanced features; In the embodiment of the present application, the enhanced features are input into the attention mechanism module for screening and integration. The attention mechanism module screens and integrates the features multiple times through the mechanism of filtering feature vectors by the routing matrix to extract the most useful features for classification and positioning tasks. This mechanism can reduce computing resource consumption and improve computing accuracy, allowing the model to focus on important features more accurately.

[0043] Step 106, input the filtered and integrated features into the head network for classification and positioning, and output the electrode head fault detection result; In the embodiment of the present application, the integrated features are input into the head network for classification and positioning. The head network further extracts and integrates features through operations such as upsampling and convolution, and finally outputs the classification result or the target location. The output of the head network includes the electrode head fault detection result, that is, whether a fault is detected and the specific location of the fault.

[0044] For example, refer to Figure 2 The electrode head in its original state will be judged as valid. Figure 3 The electrode tip with slight wear will be judged as failure. Figure 4 The electrode tip with moderate wear will be judged as failure. Figure 5 and Figure 6 Electrode heads that are all in a state of adhesion will be judged as failed.

[0045] Step 107: when a fault is detected in the electrode head fault detection result, an alarm message is output.

[0046] In the embodiment of the present application, when a fault is detected in the electrode head fault detection result, the system will output an alarm message to notify the staff to handle it in time. The alarm message can be prompted by sound, light, etc., or an alarm signal can be sent to a designated device so that the staff can respond quickly. This step ensures that the electrode head fault can be discovered and handled in time, thereby avoiding potential safety hazards and economic losses.

[0047] The embodiment of the present application ensures that the model can extract key features from complex images, eliminate differences between images, and increase the diversity of training samples through the construction and preprocessing steps of a deep learning network. The feature extraction and enhancement module further optimizes the feature representation, reduces feature loss, and improves feature discrimination. The introduction of the attention mechanism module enables the model to focus on important features more accurately, reduce computing resource consumption, and improve computing accuracy. The head network classifies and locates the integrated features, outputs fault detection results, and promptly outputs alarm information when a fault is detected, ensuring that the electrode head fault can be discovered and handled in a timely manner, effectively avoiding safety hazards and economic losses.

[0048] Optionally, the backbone network includes a standard convolution layer, a batch normalization layer and a LeakyReLU activation function layer.

[0049] In the embodiment of the present application, the standard convolution layer is one of the most basic building blocks in the convolutional neural network (CNN). It performs a sliding window operation on the input image through a series of learnable convolution kernels (or filters) to extract the spatial features of the image. The size, step size and padding method of the convolution kernel determine the size and receptive field of the output feature map. In the electrode head fault detection task, the standard convolution layer can capture low-level features such as edges and textures of the electrode head image, providing a basis for subsequent feature extraction and classification tasks.

[0050] Batch normalization layer is a technique used to accelerate deep learning model training and improve model stability. It normalizes each small batch of data (i.e. a batch) so that the input data of each layer maintains the same distribution, thereby alleviating the problem of internal covariate shift. In the backbone network, the batch normalization layer is usually located after the convolution layer. It first normalizes the output of the convolution layer, and then adjusts the normalized data through a learnable scaling parameter and offset parameter to maintain the representation ability of the network. The use of batch normalization layer can significantly accelerate the convergence speed of the model and improve the generalization ability of the model.

[0051] The LeakyReLU activation function is an improved ReLU activation function that is used to solve the problem of ReLU function's gradient vanishing in negative regions. Unlike the ReLU function, the LeakyReLU function introduces a small slope (commonly called the leakage rate) in the negative region, so that negative inputs can also obtain non-zero gradients. In the backbone network, the LeakyReLU activation function layer is located after the batch normalization layer to increase the nonlinear expression ability of the network. It enables the model to better cope with the gradient vanishing problem during training and improves the robustness of the model.

[0052] The embodiments of the present application can fully utilize the spatial feature extraction capability of the convolution operation, the data distribution stabilization capability of batch normalization, and the nonlinear expression capability of the LeakyReLU activation function, so as to construct an efficient and stable feature extraction network, providing strong support for subsequent electrode head fault detection tasks.

[0053] Optionally, the feature enhancement module adopts an SPD downsampling operation, and the SPD downsampling operation includes local space rearrangement and channel dimension recombination.

[0054] In the embodiment of the present application, SPD downsampling (Space-to-Depth Convolution) is a special downsampling technique that aims to reduce the spatial dimensions (height and width) of the feature map while retaining or enhancing important feature information. Compared with traditional downsampling methods (such as maximum pooling), SPD downsampling achieves downsampling of feature maps by re-arranging local space and recombining channel dimensions, thereby avoiding excessive loss of information.

[0055] Local spatial rearrangement is the first step of SPD downsampling. In this step, the input feature map is divided into multiple local regions, and the pixel values ​​in each local region are rearranged to the depth (channel) dimension of the new feature map. Specifically, for each local region (u, v) on the input feature map, its pixel value will be mapped to the depth position of the new feature map to form a new feature map. This process does not involve actual convolution operations, but is a rearrangement of pixel values ​​that aims to preserve the spatial information in the local region.

[0056] Let X be the input feature map. For each local region (u, v) on the electrode head feature map; u, v are the rows and columns in the local region), the depth (channel) position mapped to the new feature map D is shown in Formula 4. This step does not involve actual convolution operations, but a rearrangement of pixel values.

[0057] (4) is the rearranged feature map, X is the input feature map, is the scaling factor in the shuffle operation, and c, u, v are the channel, row, and column indices.

[0058] The new The pixels corresponding to each (u,v) are stacked up to form a new feature map Y, as shown in Formula 5: (5) is the rearranged feature map, Reorganize the new indexes of channels, rows and columns. Reorganize and merge the mapped pixel values ​​to form a new feature map with more channels, which can more effectively represent spatial information. This arrangement process uses the cumulative sum method on the depth dimension of the feature map to refine the corresponding feature information.

[0059] The second step of SPD downsampling is the recombination of the channel dimension. In this step, the new feature map obtained after the local spatial rearrangement is reassembled in the channel dimension. Specifically, the pixels corresponding to each (u, v) on the new feature map are stacked to form a new feature map. This process achieves the expansion of the feature map in the depth dimension while retaining the integrity of the spatial information. Through the recombination of the channel dimension, SPD downsampling can reduce the spatial size of the feature map while enhancing the expressiveness of the feature map.

[0060] In the embodiment of the present application, the SPD downsampling operation achieves effective downsampling of the feature map through local spatial rearrangement and recombination of channel dimensions, while avoiding excessive loss of information.

[0061] Optionally, the attention mechanism module adopts a mechanism of filtering feature vectors using a routing matrix.

[0062] In the embodiment of the present application, the attention mechanism is a mechanism that simulates the human visual attention process, which allows the model to dynamically focus on important parts and ignore unimportant parts when processing information. In deep learning networks, the attention mechanism is often used to enhance the ability of feature extraction and improve the performance of the model.

[0063] In the traditional attention mechanism, the model usually needs to calculate and compare all the feature vectors of the input data to determine which feature vectors are important. However, this method may consume a lot of computing resources when processing large-scale data. To solve this problem, a mechanism of filtering feature vectors by routing matrix is ​​introduced.

[0064] Specifically, first, the input data (such as images, text, etc.) is converted into a series of feature vectors. These feature vectors can be representations of the original data or representations of data after preliminary processing. Next, a routing matrix is ​​constructed. The routing matrix is ​​a special matrix used to represent the similarity or correlation between feature vectors. The construction of the routing matrix is ​​usually based on the dot product, cosine similarity or other measurement methods between feature vectors. Through the routing matrix, the feature vectors most relevant to the current task are screened out. Specifically, the feature vectors can be sorted according to the values ​​in the routing matrix, and the feature vectors with higher values ​​are selected as important features, while the feature vectors with lower values ​​are ignored. For the important feature vectors screened out, their attention weights are calculated. The attention weights are usually calculated based on the similarity between the feature vector and the query vector (or context vector). Finally, the important feature vectors screened out are weighted fused according to their attention weights to obtain the final attention feature representation.

[0065] Specifically, a 640x640 electrode head image is input, each pixel can be recorded, and the 640x640 pixels are expanded into a low-dimensional vector sequence. Each image is passed through three different linear projection matrices M_Q (query), M_K (key), and M_V (value). The compatibility between the query and all keys is calculated to get a score. This score is called the scoring function S. The calculation method of the scoring function is shown in Formula 6: (6) After obtaining the scoring function S, the attention is calculated as shown in Formula 7, where for Dimensions: (7) The traditional attention mechanism is that each image The matrices must be This results in a large amount of computing resource consumption. Therefore, a new attention mechanism is proposed to reduce computing resource consumption and improve computing accuracy by forming a routing matrix and performing multiple screening.

[0066] We will linear projection matrix and The row dimensions are averaged to obtain and vector, the purpose is to use and The vector constructs a routing matrix, and uses the routing matrix to find the more valued,key pairs. The generation formula of the routing matrix is As shown in Formula 8: (8) After obtaining the adjacency matrix, Sort the features in and get the maximum value, which can be considered Matrix and The topk parts of the matrix with the most correlation are clustered, and the index index of the key and value tensors corresponding to the highly correlated areas are gathered. Finally, the selected keys and values ​​are clustered and combined with Perform a dot product operation and get the output based on Formula 7, which can be expressed by Formula 9. Topk is the part most relevant to M_Q selected from M_K and M_V. is the final calculated attention value.

[0067] (9) Finally, features are extracted through the backbone network, and downsampling operations are used to further extract lossless features. The network output layer obtains the prediction results, which can timely mark the relevant electrode head fault problems and output the wrong classification.

[0068] Optionally, the head network includes an initial convolution layer, an upsampling layer, a BConv layer and a Catconv layer.

[0069] In the embodiment of the present application, the head network is usually located at the end of the entire deep learning network, and it receives feature maps from the backbone network, which already contain deep features of the input image. The task of the head network is to further process and transform these features to complete specific tasks, such as object classification, bounding box regression, etc.

[0070] The initial convolution layer is the first processing layer of the head network. Its main function is to perform preliminary feature extraction and transformation on the feature map from the backbone network. Through the convolution operation, the initial convolution layer can further extract key information from the feature map and provide stronger support for subsequent processing steps. In addition, the initial convolution layer can also control the size and depth of the feature map by adjusting the size and step size of the convolution kernel.

[0071] The upsampling layer is a key component in the head network, which is mainly used to increase the spatial size of the feature map. In the backbone network, the feature map usually undergoes multiple downsampling operations to reduce the amount of calculation and extract high-level features. However, in the head network, in order to accurately locate and classify the target, it is necessary to restore the spatial resolution of the feature map. The upsampling layer enlarges the spatial size of the feature map to a suitable ratio through interpolation and other methods for subsequent processing.

[0072] The BConv layer (Batch Convolution layer) is a special layer that combines batch normalization and convolution operations. Batch normalization can accelerate the convergence speed of the model and improve stability, while convolution operations are used to extract features. By combining these two operations, the BConv layer can normalize the feature map while extracting features, thereby further improving the performance of the model. In the head network, the BConv layer is usually used for fine feature extraction and transformation of feature maps.

[0073] Catconv layer (Concatenation Convolution layer) is a special layer for feature fusion. In deep learning networks, feature fusion is a method of combining features from different layers or different feature maps to improve the expressiveness of the model. The Catconv layer merges multiple feature maps in the channel dimension through concatenation operations, and then further processes and transforms the merged feature maps through convolution operations. In the head network, the Catconv layer is often used to fuse feature maps from different layers or different branches to extract richer feature information.

[0074] The head network in the embodiment of the present application can achieve fine extraction of input image features, restoration of spatial resolution, and fusion and transformation of features by combining multiple processing layers such as the initial convolution layer, upsampling layer, BConv layer, and Catconv layer. This design not only improves the expressiveness of the model, but also can adapt to image recognition tasks of different scales and complexities. In addition, through reasonable layer configuration and parameter adjustment, the head network can also reduce computational complexity while maintaining high performance, improving the practicality and efficiency of the model.

[0075] Optionally, the method uses Normalized Wasserstein Distance LossFunction as a loss function during training.

[0076] In the embodiment of the present application, the Normalized Wasserstein Distance Loss Function is a special loss function, which is constructed based on the Wasserstein distance (also known as Earth Mover's Distance, EMD). Wasserstein distance is a measure of the difference between two probability distributions. Compared with the common KL divergence or JS divergence, it is more sensitive to the situation where the support sets of the distributions do not overlap, so it can provide a more meaningful difference measure in some cases.

[0077] In deep learning models, the Normalized Wasserstein Distance Loss Function measures the accuracy of model predictions by calculating the Wasserstein distance between the probability distribution predicted by the model and the probability distribution of the true label. Since the Wasserstein distance takes into account the overall movement cost between the two distributions, it can better capture the differences between the distributions, especially when dealing with data with multi-peak distributions or long-tail distributions.

[0078] Compared with traditional loss functions, such as Cross Entropy Loss, Normalized Wasserstein Distance Loss Function is more effective in processing data with multimodal distribution. This is because Cross Entropy Loss focuses on the point-to-point difference between the predicted probability and the true label, while Wasserstein distance considers the overall movement cost between the two distributions, so it can better capture the shape and position differences of the distribution. During model training, using Normalized Wasserstein Distance Loss Function can usually improve the stability and robustness of the model. This is because Wasserstein distance has low sensitivity to small perturbations of the distribution, so it can reduce the risk of overfitting of the model during training and improve the generalization ability of the model to unseen data. Although the computational complexity of Wasserstein distance is high, Normalized Wasserstein Distance Loss Function reduces the computational cost by normalizing (i.e. dividing Wasserstein distance by a constant to make it have a reasonable numerical range). In addition, with the development of optimization algorithms and computing hardware, the computational efficiency of Wasserstein distance is also constantly improving.

[0079] Optionally, the alarm mechanism includes a sound alarm, a light alarm, or sending an alarm signal to a designated device.

[0080] In the embodiments of the present application, in modern target detection or monitoring systems, the alarm mechanism is usually designed to be flexible and diverse to adapt to different scenarios and needs. This diversity is mainly reflected in the choice of alarm methods, including but not limited to sound alarms, light alarms, and sending alarm signals to designated devices. These methods can be used alone or in combination to ensure that relevant personnel can be notified quickly and effectively when critical events are detected.

[0081] Sound alarm is one of the most direct and intuitive alarm methods. When the system detects an abnormal situation, it will trigger the sound alarm to emit a specific sound or voice prompt to attract the attention of people around. The advantages of sound alarm are its immediacy and wide coverage, which can convey information to people in a larger area in a shorter time. However, sound alarm may also be disturbed by environmental noise, affecting its effectiveness.

[0082] Light alarm is another common alarm method. It indicates the occurrence of abnormal conditions by changing the color, flashing frequency or brightness of the light. Light alarm is usually used in conjunction with surveillance cameras or other visual devices to visually attract attention. Compared with sound alarm, light alarm is not affected by environmental noise and is more concealed and energy-saving in some cases. However, it may require users to have a certain visual attention to detect the alarm information in time.

[0083] In addition to sound and light alarms, modern object detection or monitoring systems can also send alarm signals to designated devices. These devices can be mobile phones, tablets, computers or other smart terminals. When the system detects an abnormal situation, it will send the alarm information to the designated device through a wireless network or wired connection. Users can receive alarm notifications through these devices and view detailed abnormal information or monitoring images. The advantage of this alarm method is its flexibility and scalability, which can adapt to different user needs and scenarios.

[0084] In actual applications, the alarm mechanism is usually combined with multiple methods for comprehensive application. For example, when a critical event is detected, the system can trigger both sound alarm and light alarm to attract the attention of people around; at the same time, it can also send alarm signals to the designated monitoring center or the mobile phone of the manager so that they can understand and deal with abnormal situations in time. This comprehensive application method can make full use of the advantages of various alarm methods to improve the reliability and response speed of the system. In addition, the design of the alarm mechanism also needs to consider the personalized needs of users and the characteristics of the scene. For example, in some quiet or concealed occasions, sound alarms may not be applicable; in some occasions that require remote monitoring and management, sending alarm signals to designated devices is more important. Therefore, in actual applications, flexible configuration and adjustment are required according to specific circumstances.

[0085] Based on the same inventive concept, the embodiment of the present application also provides an electrode head fault detection device for implementing the electrode head fault detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more electrode head fault detection devices provided below can refer to the limitations of the electrode head fault detection method above, and will not be repeated here.

[0086] In an exemplary embodiment, Figure 7 As shown, a device 20 for detecting an electrode head fault is provided, comprising: A network construction module 201 is used to construct a deep learning network, wherein the deep learning network includes a backbone network, a head network, a feature enhancement module, and an attention mechanism module; A preprocessing module 202 is used to preprocess the electrode tip image data, wherein the preprocessing method includes normalization, size adjustment and data enhancement; A feature extraction module 203 is used to input the preprocessed electrode tip image data into the deep learning network to extract features to obtain features; A detection module 204, configured to enhance the extracted features through a feature enhancement module; Use the attention mechanism module to filter and integrate the enhanced features; The filtered and integrated features are input into the head network for classification and positioning, and the electrode head fault detection results are output; The alarm module 205 is used to output alarm information when a fault is detected in the electrode head fault detection result.

[0087] Optionally, the backbone network includes a standard convolution layer, a batch normalization layer and a LeakyReLU activation function layer.

[0088] Optionally, the feature enhancement module adopts an SPD downsampling operation, and the SPD downsampling operation includes local space rearrangement and channel dimension recombination.

[0089] Optionally, the attention mechanism module adopts a mechanism of filtering feature vectors using a routing matrix.

[0090] Optionally, the head network includes an initial convolution layer, an upsampling layer, a BConv layer and a Catconv layer.

[0091] Optionally, use Normalized Wasserstein Distance Loss Function as the loss function during training.

[0092] Optionally, the alarm mechanism includes a sound alarm, a light alarm, or sending an alarm signal to a designated device.

[0093] The embodiment of the present application ensures that the model can extract key features from complex images, eliminate differences between images, and increase the diversity of training samples through the construction and preprocessing steps of a deep learning network. The feature extraction and enhancement module further optimizes the feature representation, reduces feature loss, and improves feature discrimination. The introduction of the attention mechanism module enables the model to focus on important features more accurately, reduce computing resource consumption, and improve computing accuracy. The head network classifies and locates the integrated features, outputs fault detection results, and promptly outputs alarm information when a fault is detected, ensuring that the electrode head fault can be discovered and handled in a timely manner, effectively avoiding safety hazards and economic losses.

[0094] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store detection data of electrode head failure. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for detecting electrode head failure is implemented.

[0095] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0096] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0097] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0098] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0099] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0100] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0101] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0102] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0103] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A method for detecting electrode tip failure, characterized in that: The method for detecting the electrode tip failure comprises: Constructing a deep learning network, wherein the deep learning network includes a backbone network, a head network, a feature enhancement module, and an attention mechanism module; Preprocessing the electrode tip image data, including normalization, size adjustment and data enhancement; Inputting the preprocessed electrode tip image data into the deep learning network to extract features to obtain features; The extracted features are enhanced through the feature enhancement module; Use the attention mechanism module to filter and integrate the enhanced features; The filtered and integrated features are input into the head network for classification and positioning, and the electrode head fault detection results are output; When a fault is detected in the electrode tip fault detection result, an alarm message is output.

2. The method for detecting electrode tip failure according to claim 1, characterized in that: The backbone network includes a standard convolution layer, a batch normalization layer and a LeakyReLU activation function layer.

3. The method for detecting electrode tip failure according to claim 1, characterized in that: The feature enhancement module adopts an SPD downsampling operation, which includes local space rearrangement and channel dimension reorganization.

4. The method for detecting electrode tip failure according to claim 1, characterized in that: The attention mechanism module adopts a mechanism of filtering feature vectors using a routing matrix.

5. The method for detecting electrode tip failure according to claim 1, characterized in that: The head network includes an initial convolutional layer, an upsampling layer, a BConv layer, and a Catconv layer.

6. The method for detecting electrode tip failure according to claim 1, characterized in that: The method uses Normalized Wasserstein Distance Loss Function as the loss function during training.

7. The method for detecting electrode tip failure according to claim 1, characterized in that: The alarm mechanism includes sound alarm, light alarm or sending an alarm signal to a designated device.

8. A device for detecting electrode head failure, characterized in that: The electrode tip fault detection device comprises: A network construction module, used to construct a deep learning network, wherein the deep learning network includes a backbone network, a head network, a feature enhancement module, and an attention mechanism module; A preprocessing module is used to preprocess the electrode tip image data, and the preprocessing methods include normalization, size adjustment and data enhancement; A feature extraction module, used for inputting the preprocessed electrode tip image data into the deep learning network to extract features and obtain features; A detection module, used for enhancing the extracted features through a feature enhancement module; Use the attention mechanism module to filter and integrate the enhanced features; The filtered and integrated features are input into the head network for classification and positioning, and the electrode head fault detection results are output; The alarm module is used to output alarm information when a fault is detected in the electrode head fault detection result.

9. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the real-time detection method for electrode head faults according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the real-time detection method for electrode head faults described in any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Brain-computer interface signal acquisition system

    CN112971807A

  • Fault diagnosis method

    CN117150414A

  • Processing defect detection device, laser cutting device, and electric discharge processing device

    JP6758552B1