An electrical fusion scar type identification method, system, device and medium

CN122906484APending Publication Date: 2026-10-13SHANGHAI FIRE RES INST OF MEM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611381813.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0005]但在实际火灾鉴定场景中仍存在以下技术缺陷:真实火场环境错综复杂,金相试样普遍存在边界模糊、内部晶粒块严重粘连、制样侵蚀不均以及显微镜拍摄打光存在暗角等物理噪声

Benefits of technology

[0048]上述技术方案的有益效果是:引入改进型特征提取网络,能够自适应地聚焦并强化金相图像中与熔痕性质密切相关的微观判别性特征,从而显著提升了对一次短路、二次短路及火烧等不同熔痕类别的识别精度和鲁棒性,使模型在面对实际复杂的火灾现场样本时具备更强的泛化能力。该方法免去了繁琐的专家读图环节,实现了从输入原始金相图像到直接输出分类标签的快速自动判定,大幅缩减了鉴定周期并降低了人力依赖,为火灾物证鉴定领域提供了高效、客观、准确的智能化辅助决策手段。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122906484A_ABST
    Figure CN122906484A_ABST
Patent Text Reader

Abstract

The application discloses an electrical fusion mark type identification method, system, device and medium, and belongs to the technical field of electrical fire evidence identification. The method comprises the following steps: obtaining a metallographic image of an electrical fusion mark to be identified; inputting the metallographic image of the electrical fusion mark into a fusion mark identification model for sampling operation processing to obtain a first output result; inputting the first output result into a feature extraction module for fusion mark feature extraction to obtain a second output result; inputting the second output result into a first attention calculation module for attention calculation to obtain a third output result; inputting the third output result into the fusion mark identification model for continuous N times of fusion mark feature extraction and attention calculation processing to obtain a fourth output result; inputting the fourth output result into a pooling module of the fusion mark identification model for processing to obtain a pooling processing result; and performing linear operation on the pooling processing result to obtain and output the type of the electrical fusion mark. The scheme can accurately identify the type of the electrical fusion mark.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of electrical fire evidence identification, and in particular to a method, system, device and medium for identifying electrical melt marks. Background Technology

[0002] Electrical fires are among the most common types of fire accidents, and determining their cause directly impacts the conclusions of fire investigations and the determination of liability. At the scene of an electrical fire, the weld marks (including fire weld marks, primary short-circuit weld marks, secondary short-circuit weld marks, and electrothermal weld marks) formed on wires and electrical equipment due to different causes exhibit different microscopic morphological characteristics under a metallographic microscope, such as grain morphology, distribution patterns, dendritic structures, and porosity defects. These characteristics are key physical evidence for determining the cause of the fire.

[0003] The identification of melt marks mainly relies on experienced metallographic experts to conduct manual observation and judgment under a microscope. This method has prominent problems such as strong subjectivity, poor consistency, low efficiency, and high requirements for the experience of the identification personnel, making it difficult to meet the growing demand for fire evidence identification.

[0004] To address the limitations of manual identification, computer image processing technology has been introduced to assist in the metallographic analysis of melt marks, primarily focusing on quantitative metallographic analysis using traditional digital image processing techniques. With the development of artificial intelligence and deep learning technologies, fire evidence identification is also beginning to move into the field of deep learning, striving to reduce reliance on manual features through end-to-end learning.

[0005] However, the following technical shortcomings still exist in actual fire identification scenarios: real fire scene environments are complex, metallographic samples generally have blurred boundaries, severe adhesion of internal grain blocks, uneven sample preparation and etching, and physical noise such as vignetting during microscopic imaging. Traditional operators are prone to failure when faced with different magnifications and varying lighting environments, easily leading to oversegmentation or false grain boundary fractures, causing the extracted geometric quantitative parameters to drift, insufficient accuracy in identifying electrical melt marks, and difficulty in covering the complexity and diversity of real fire scenes. Summary of the Invention

[0006] This invention provides a method, system, device, and medium for identifying electrical weld mark types, which can accurately identify electrical weld mark types.

[0007] The technical solution of the present invention is as follows:

[0008] A method for identifying electrical melt marks, comprising:

[0009] Obtain metallographic images of the electrical weld marks to be identified;

[0010] The metallographic image of the electrical weld mark is input into the weld mark recognition model for sampling processing to obtain the first output result;

[0011] The first output result is input into the feature extraction module of the weld line recognition model to extract weld line features, and a second output result is obtained.

[0012] The second output result is input into the first attention calculation module of the melt mark recognition model for attention calculation to obtain the third output result;

[0013] The third output result is input into the weld line recognition model for N consecutive weld line feature extractions and attention calculations to obtain the fourth output result; N is a positive integer greater than or equal to 1.

[0014] The fourth output result is input into the pooling module of the melt mark recognition model for processing to obtain the pooling result;

[0015] A linear operation is performed on the pooling result to obtain and output the type of electrical melt mark.

[0016] Optionally, the metallographic image of the electrical weld mark is input into the weld mark recognition model for sampling processing to obtain a first output result, including:

[0017] The metallographic image of the electrical weld mark is input into the first convolution kernel module of the first layer module of the weld mark recognition model for convolution operation processing to obtain intermediate operation results;

[0018] The intermediate operation results are input into the first-level normalization module of the first-level module for normalization processing to obtain the first output result.

[0019] Optionally, the first output result is input into the feature extraction module of the weld line recognition model to extract weld line features, resulting in a second output result, including:

[0020] The first output result is input into the 7×7 convolution module of the feature extraction module of the melt mark recognition model to perform a convolution operation, and the convolution operation result is obtained.

[0021] The convolution operation result is input into the first linear operation module for linear operation processing to obtain the first linear operation processing result.

[0022] The result of the first linear operation is input into the normalization operation module for normalization processing to obtain the normalization result.

[0023] The normalization result is input into the GeLU activation function for processing to obtain the activation result;

[0024] The activation processing result is input into the Global Response Normalization (GRN) module for processing to obtain the GRN processing result.

[0025] The GRN processing result is input into the second linear operation module for linear operation processing to obtain the second linear operation processing result.

[0026] The result of the linear operation is input into the random depth module for random depth processing to obtain the second output result.

[0027] Optionally, the second output result is input into the first attention calculation module of the weld line recognition model for attention calculation to obtain a third output result, including:

[0028] The second output result is input into the first branch module of the first attention calculation module for processing to obtain the first branch output result;

[0029] The second output result is input into the second branch module of the first attention calculation module for processing to obtain the second branch output result;

[0030] The second output result is input into the third branch module of the first attention calculation module for processing to obtain the third branch output result;

[0031] The output results of the first branch, the second branch, and the third branch are input into the feature fusion module for feature fusion to obtain the third output result.

[0032] Optionally, the third output result is input into the weld line recognition model for N consecutive weld line feature extractions and attention calculations to obtain a fourth output result, including:

[0033] The third output result is input into the second layer module of the melt mark recognition model for processing to obtain the second layer output result. The processing of the second layer module includes: a second layer normalization module, a first 2×2 convolution module, a second feature extraction module, and a second attention calculation module.

[0034] The output of the second layer is input into the third layer module of the melt mark recognition model for processing to obtain the third layer output. The processing of the third layer module includes: the third layer normalization module, the second 2×2 convolution module, the third feature extraction module, and the third attention calculation module.

[0035] The output of the third layer is input into the fourth layer module of the melt mark recognition model for processing to obtain the fourth layer output. The processing of the fourth layer module includes: the fourth layer normalization module, the third 2×2 convolution module, the fourth feature extraction module, and the fourth attention calculation module.

[0036] Optionally, a linear operation is performed on the pooling result to obtain the type of electrical weld mark, including:

[0037] After performing layer normalization on the pooling result, a linear operation is then performed to obtain the processed global feature vector.

[0038] The processed global feature vector is classified and mapped to the output dimension corresponding to the number of melt mark categories, and the original prediction score corresponding to each melt mark property is obtained.

[0039] The original prediction scores are converted into prediction probabilities corresponding to each melt mark category;

[0040] The category of the weld mark corresponding to the highest predicted probability is determined as the electrical weld mark identification result.

[0041] Optionally, after performing a linear operation on the pooling result to obtain and output the type of electrical weld mark, the method further includes:

[0042] The classification results of the electrical melt marks are evaluated based on the preset model evaluation indicators to obtain the evaluation results. The preset model evaluation indicators include precision, recall, F1 score and overall accuracy.

[0043] Embodiments of the present invention also provide an electrical melt mark type identification system, comprising:

[0044] The acquisition module is used to acquire metallographic images of the electrical weld marks to be identified.

[0045] The processing module is used to input the metallographic image of the electrical weld mark into the weld mark recognition model for sampling processing to obtain a first output result; input the first output result into the feature extraction module of the weld mark recognition model for weld mark feature extraction to obtain a second output result; input the second output result into the first attention calculation module of the weld mark recognition model for attention calculation to obtain a third output result; input the third output result into the weld mark recognition model for N consecutive weld mark feature extraction and attention calculation processing to obtain a fourth output result; N is a positive integer greater than or equal to 1; input the fourth output result into the pooling module of the weld mark recognition model for processing to obtain a pooling processing result; perform a linear operation on the pooling processing result to obtain and output the type of electrical weld mark.

[0046] Embodiments of the present invention also provide a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the method described above.

[0047] Embodiments of the present invention also provide a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described above.

[0048] The beneficial effects of the above technical solution are as follows: The introduction of an improved feature extraction network adaptively focuses on and strengthens the microscopic discriminative features closely related to the properties of melt marks in metallographic images, thereby significantly improving the recognition accuracy and robustness for different melt mark categories such as primary short circuits, secondary short circuits, and fire damage. This enables the model to have stronger generalization ability when facing complex real-world fire scene samples. This method eliminates the tedious expert image interpretation process, achieving rapid and automatic determination from inputting the original metallographic image to directly outputting classification labels. It significantly reduces the identification cycle and human intervention, providing an efficient, objective, and accurate intelligent auxiliary decision-making tool for the field of fire evidence identification. Attached Figure Description

[0049] Figure 1 This is a flowchart illustrating the electrical melt mark type identification method according to an embodiment of the present invention.

[0050] Figure 2 This is a block diagram of the target feature extraction network in the electrical melt mark type identification method of this invention.

[0051] Figure 3 This is an architectural block diagram of the feature extraction module in the electrical melt mark type identification method of this invention.

[0052] Figure 4 This is an architectural block diagram of the attention calculation module in the electrical melt mark type identification method of this invention.

[0053] Figure 5 This is a block diagram of the modules of the electrical melt mark type identification system according to an embodiment of the present invention. Detailed Implementation

[0054] The present invention will be further described in detail below with reference to all the accompanying drawings.

[0055] like Figure 1 As shown, this embodiment of the invention discloses a method for identifying electrical melt marks, including:

[0056] S1, acquire the metallographic image of the electrical weld mark to be identified;

[0057] S2, input the metallographic image of the electrical weld mark into the weld mark recognition model for sampling processing to obtain the first output result;

[0058] S3, input the first output result into the feature extraction module of the weld line recognition model to extract weld line features and obtain the second output result;

[0059] S4, input the second output result into the first attention calculation module of the melt mark recognition model to perform attention calculation, and obtain the third output result;

[0060] S5, input the third output result into the weld line recognition model to perform weld line feature extraction and attention calculation processing N times consecutively to obtain the fourth output result; N is a positive integer greater than or equal to 1, preferably 3;

[0061] S6, input the fourth output result into the pooling module of the melt mark recognition model for processing, and obtain and output the pooling processing result;

[0062] S7, perform a linear operation on the pooling result and output the type of electrical weld mark.

[0063] This embodiment of the invention, through multi-layer feature extraction and attention calculation in the melt mark recognition model, can identify the feature differences between different categories in the melt mark image, and achieve accurate differentiation of different types of melt marks such as fire melt marks, single short circuit melt marks, double short circuit melt marks, and electrothermal melt marks. It effectively avoids the subjectivity and fatigue error of manual evaluation, and significantly improves the detection efficiency, objectivity and recognition accuracy in the field of fire evidence identification.

[0064] like Figure 2 The diagram shows the overall architecture of the weld line recognition model in an embodiment of the present invention. In the input B×3×224×224, B represents the batch size; 3 represents the RGB three channels; and 224×224 represents the image height and width pixel dimensions. The overall architecture of the weld line recognition model includes: a first-layer module, a second-layer module, a third-layer module, a fourth-layer module, a pooling module (AvgPooling), a final-layer normalization module, and a linear operation module (Linear). The first-layer module includes: a 4×4 convolution module (Conv4×4), a first-layer normalization module, a first-feature extraction module, and a first-attention calculation module. The second-layer module includes: a second-layer normalization module, a first 2×2 convolution module, a second-feature extraction module, and a second-attention calculation module. The processing flow of the third and fourth-layer modules is the same as that of the second-layer module.

[0065] like Figure 3 As shown, the feature extraction module includes a sequentially connected 7×7 convolution module Conv7×7, a layer normalization operation module, a first linear operation module, a GeLU activation function, a global normalization GRN module, a second linear operation module, and a random depth module. The symbol "+" is an element-wise addition operation, used to add the original features (skip branches) input to the module to the features obtained after the transformation of the entire main branch above.

[0066] like Figure 4As shown, the first, second, third, and fourth attention calculation modules are all identical, including: an input (B×H×W×C), a first branch module, a second branch module, a third branch module, and a feature fusion module that fuses features with the outputs of the first, second, and third branch modules. Here, B represents the batch size, H represents the height dimension, W represents the width dimension, and C represents the channel dimension. The first branch module corresponds to the W-dimensional branch, the second branch module corresponds to the H-dimensional branch, and the third branch module corresponds to the C-dimensional branch. The first branch module includes: a first-dimensional reconstruction module, a first pooling operation module, a first 7×7 convolution module, a first activation function, and a second-dimensional reconstruction module. The second branch module includes: a third-dimensional reconstruction module, a second pooling operation module, a second 7×7 convolution module, a second activation function, and a fourth-dimensional reconstruction module. The third branch module includes: a third pooling operation module, a third 7×7 convolution module, and a third activation function. The first branch module's input feature tensor is B×W×H×C, with the width dimension placed in the second dimension as the priority calculation dimension for the current branch. The "×" symbol in the first branch module represents element-wise multiplication, used to multiply the generated width attention weights element-wise with the reconstructed original features of that branch, completing the width-direction feature weighting. The second branch module maintains the tensor dimension order B×H×W×C, placing the height H dimension in the priority calculation position. The "×" symbol in the second branch module represents element-wise multiplication, used to multiply the attention weights with the input features of this path, completing the height-direction feature weighting. The third branch module's input feature tensor is transformed to B×C×H×W, with the channel dimension placed in the second dimension. The "×" symbol in the third branch module represents element-wise multiplication, used to multiply the channel attention weights element-wise with the original input features, completing the channel-dimensional feature weighting. The "×" symbol after the feature fusion module represents element-wise multiplication, used to multiply the fused comprehensive 3D attention weights again with the module's initial input features, achieving the final attention enhancement of the overall feature map.

[0067] In an optional embodiment of the present invention, in step S2, inputting the metallographic image of the electrical weld mark into the weld mark recognition model for sampling processing to obtain a first output result may include:

[0068] S21, the metallographic image of the electrical weld mark is input into the first convolution kernel module of the first layer module of the weld mark recognition model for convolution operation processing to obtain intermediate operation results; the first convolution kernel can be a 4×4 convolution kernel.

[0069] S22, the intermediate operation result is input into the first-level normalization module of the first-level module for normalization operation processing to obtain the first output result.

[0070] In this embodiment, in S21, it can be achieved through the formula The metallographic image of the electrical weld mark is processed by convolution to obtain intermediate operation results;

[0071] in, The image representing the result of the intermediate operation. , These represent the width and height of the convolution, respectively, and s represents the stride. This represents the pixel in the i-th row and j-th column of the input image. This represents extracting the value of the pixel with (i·s, j·s) as its top-left corner and an offset of (m, n) within the convolution window from the input image. represents the convolution kernel, and b is the learning bias.

[0072] Here, a cross-correlation variant of discrete convolution is used, and a stride s and a learning bias are introduced to control the size of the output features of the image.

[0073] In S22, the intermediate operation results are normalized to facilitate convolution operations in the second layer module.

[0074] In an optional embodiment of the present invention, in step S3, inputting the first output result into the feature extraction module of the weld line identification model to extract weld line features and obtain a second output result may include:

[0075] S31, input the first output result into the 7×7 convolution module of the feature extraction module of the melt mark recognition model to perform a convolution operation to obtain the convolution operation result; the convolution operation here can be the same as the operation in step S21, and the operation is performed according to the 7×7 convolution kernel.

[0076] S32, the convolution operation result is input into the first linear operation module for linear operation processing to obtain the first linear operation processing result;

[0077] S33, the convolution operation result is input to the layer normalization module for normalization processing to obtain the normalized result; here, a normalization process is adopted. The result of the 7×7 convolution operation is normalized to obtain the normalized result; that is, normalization is performed along the channel dimension C, which means normalization is performed along the channel for each spatial location (h, w). For the input tensor: Calculated by formula in, The average value is calculated along all channel dimensions for each spatial location (b, h, w); c is the current channel index, and C is the total number of channels; This represents the original pixel values ​​in the b-th sample, at row h, column w, and channel c. The standard deviation is calculated along all channel dimensions for each spatial location (b, h, w); 10 -6 .

[0078] S34, the normalization result is input into the GeLU activation function for processing to obtain the activation result; the calculation formula is: , It is the cumulative distribution function of the standard normal distribution;

[0079] S35, the activation processing result is input into the Global Response Normalization (GRN) module for processing to obtain the GRN processing result; for each channel, the L2 norm is calculated in the spatial dimension (H, W) using the following formula:

[0080] Among them, G b,c Let L2 norm be the feature map of the entire feature map of sample b and channel c; To obtain sample b, the entire two-dimensional feature map corresponding to channel c is used. The two dots represent traversing the entire height h and width w. The L2-norm (Euclidean norm) operator; h = 1, 2, ..., H, where h is the height traversal index and H is the feature map height (total number of rows); w = 1, 2, ..., W, where w is the width traversal index and W is the feature map width (total number of columns).

[0081] S36, the processing result of the global response normalization GRN module is input into the second linear operation module for linear operation processing to obtain the second linear operation processing result; here the linear operation is a 1×1 convolution operation.

[0082] S37, the linear operation processing result is input into the random depth module for random depth processing to obtain the second output result; here, the linear operation processing result is subjected to random depth processing, the main convolution branch is retained, and the second output result is obtained.

[0083] This embodiment of the invention uses 7×7 depthwise convolution instead of traditional 3×3 convolution, achieving decoupling between spatial feature extraction and channel information interaction; it fully utilizes... Alternative This eliminates the dependence on batch size, making the model more stable during small batch training;

[0084] Will Upgrade to The activation function provides a smoother gradient flow; random depth is introduced. As a regularization method, replacing traditional .

[0085] Among them, the Global Response Normalization (GRN) module effectively purifies discriminative features through competitive calibration between channels. Specifically, strong response channels correspond to key discriminative structures such as pore boundaries and columnar crystals in the melting transition zone, where the channel response intensity is significantly higher than the average level; while weak interference channels correspond to noise unrelated to the cause of fire, such as polishing scratches, corrosion artifacts, and background inclusions.

[0086] The Global Response Normalization (GRN) module calculates the ratio of each channel's intensity to the overall average intensity through global response normalization, automatically enhancing the contribution of contour-discriminating channels such as pore boundaries while suppressing the influence of interfering channels such as background impurities. This mechanism is highly consistent with the identification logic of metallographic experts who "judge prominent structures from a global perspective," making it irreplaceable in melt mark identification tasks where "features and interference coexist," effectively solving the feature collapse problem in deep networks.

[0087] In an optional embodiment of the present invention, S4, the second output result is input into the first attention calculation module of the melt mark recognition model for attention calculation to obtain a third output result, which may include:

[0088] S41, the second output result is input into the first branch module of the first attention calculation module for processing to obtain the first branch output result;

[0089] S42, the second output result is input into the second branch module of the first attention calculation module for processing to obtain the second branch output result;

[0090] S43, the second output result is input into the third branch module of the first attention calculation module for processing to obtain the third branch output result;

[0091] S44, input the output results of the first branch, the output results of the second branch, and the output results of the third branch into the feature fusion module for feature fusion to obtain the third output result.

[0092] In S41 of this embodiment, the original spatial features (B, W, H) of the second output result, C is the channel; the first branch module is the height-channel (HC) dimension interaction branch, the channel-width (CW) dimension interaction branch and the height-width (HW) dimension interaction branch;

[0093] The first branch module processing includes:

[0094] In S411, the first dimension reconstruction module of the first branch performs (HC) dimension reconstruction on the second output result, replacing the original (B, W, H, C) arranged feature tensor with dimensions to obtain the tensor after HC rearrangement. In the HC dimension interaction branch, attention interaction between H and C needs to be performed, so W needs to be taken as the dimension to be aggregated. Through dimension rearrangement, W is moved to the axis position of the executable Z-pool, preparing for subsequent Z-pooling compression to eliminate the W dimension.

[0095] S412, input the tensor after HC rearrangement into the first pooling operation module of the first branch module for Z pooling, perform Z pooling operation along the width W dimension to eliminate the width dimension, and obtain the intermediate tensor (B, H, C) with the width dimension removed.

[0096] S413, input the intermediate tensor with the width dimension removed into the first 7×7 convolution module of the first branch module to perform 7×7 convolution to obtain the convolution operation result; the convolution operation here can be performed in the same way as step S21, according to the 7×7 convolution kernel.

[0097] S414, the result of the convolution operation is input into the first activation function of the first branch module, and the calculation formula is: Where z is the result of the convolution operation. Activate the Sigmoid function and output the result;

[0098] S415, multiply the tensor after HC rearrangement with the Sigmoid activation output, and the product is the weighted feature tensor;

[0099] S416, input the product into the second dimension reconstruction module of the first branch module to perform dimension reconstruction and obtain the output result of the first branch; the dimension arrangement of the feature tensor after weighting is rearranged and is no longer the standard tensor format of the main network link; therefore, dimension reconstruction is performed again to restore the order of the tensor axes to the standard four-dimensional feature arrangement format of the main network link (B, W, H, C).

[0100] The second branch module processing includes:

[0101] S421, the third dimension reconstruction module of the second branch module performs (CW) dimension reconstruction on the second output result, replacing the original (B, W, H, C) arranged feature tensor with dimensions to obtain the CW rearranged tensor. In the CW dimension interaction branch, attention interaction between W and C needs to be performed, so H needs to be taken as the dimension to be aggregated. Through dimension rearrangement, H is moved to the axis position of the executable Z-pool, preparing for subsequent Z-pooling compression to eliminate the H dimension;

[0102] S422, input the tensor after CW rearrangement into the second pooling operation module of the second branch module for Z pooling, perform Z pooling operation along the height H dimension to eliminate the height dimension, and obtain the intermediate tensor (B, W, C) with the height dimension removed.

[0103] S423, input the intermediate tensor with the height dimension removed into the second 7×7 convolution module of the second branch module for 7×7 convolution to obtain the convolution operation result; the convolution operation here can be the same as in step S21, and the operation is performed according to the 7×7 convolution kernel;

[0104] S424, input the convolution operation result into the second activation function of the second branch module. The activation operation here can be the same as the operation in step S414.

[0105] S425, multiply the tensor after CW rearrangement with the result of the Sigmoid activation function to obtain the product;

[0106] S426, input the product into the fourth dimension reconstruction module of the second branch module, perform dimension reconstruction, obtain the output result of the second branch, and restore the order of the tensor axes back to the standard four-dimensional feature arrangement format of the main network link (B, W, H, C).

[0107] The processing procedure for the third branch module is as follows:

[0108] S431, when performing HW dimension interaction, the feature tensor of the original (B, W, H, C) arrangement is input into the third pooling operation module of the third branch module for Z pooling to obtain the intermediate tensor;

[0109] S432, input the intermediate tensor into the third 7×7 convolution module of the third branch module to perform 7×7 convolution, and obtain the convolution operation result. The convolution operation here can be performed in the same way as step S21, according to the 7×7 convolution kernel.

[0110] S433, input the convolution operation result into the third activation function of the third branch module. The activation operation here can be the same as in step S414, to obtain the attention weight matrix of HW dimension interaction, which is the output result of the third branch.

[0111] In S44, the output results of the first branch, the second branch, and the third branch are input into the feature fusion module for feature fusion, which may include: Where out is the final feature map output after fusion, and scale is a scaling factor used to adjust the magnitude of the fusion result. The output features of the HC dimension interaction branch, The output features of the CW dimension interaction branch, The output features of the HW dimension interaction branch.

[0112] In this embodiment, the HC dimension interaction branch is used to capture the collaborative relationship between height and channel; the CW dimension interaction branch is used to capture the collaborative relationship between channel and width; and the HW dimension interaction branch is used to capture spatial positional relationships. By performing tensor dimension transformation on the input hierarchical features through dimension reconstruction, the interaction operation dimension requirements of each of the three branches are adapted, decomposing a single feature tensor into three sets of processing data streams with different dimensional interactions. This allows for the simultaneous mining of correlation information between grains, grain boundaries, bubbles, and melt mark boundaries in melt mark metallographic images from multiple dimensions, including channel semantics and spatial position, providing a data foundation for the subsequent generation of multiple sets of attention weights.

[0113] Z-pooling and 7×7 convolution operations are performed on the input features of the three branches. Z-pooling aggregates global information along the Z-axis to collect global context information. 7×7 convolution learns the non-linear dependencies between different dimensions and captures the differences between the target region of the melt mark and the background region. The activation function maps the output to the 0-1 interval to generate a normalized attention weight matrix. The magnitude of the weight value represents the importance of the feature at the corresponding position. The higher the value, the higher the probability that the position belongs to the key region for melt mark discrimination.

[0114] The attention weight matrix generated by each branch is multiplied element-wise with the input features of that branch to obtain the feature-weighted feature data. This identity mapping operation adaptively amplifies the key features of the melt mark region and suppresses background noise features while preserving the original image details and low-level information.

[0115] The feature data tensors after weighted operations of each branch are restored to a unified dimensional format, eliminating the impact of dimensional transformation caused by internal dimensional reconstruction of the branches, ensuring that the output feature dimensions of the three branches remain consistent, providing dimensional matching conditions for subsequent pairwise multiplication and fusion of multi-branch features, and avoiding computational failure caused by dimensional mismatch.

[0116] The output features of the three branches are fused by pairwise multiplication to obtain the fused features, which are then passed to the next layer. The calculation formula is as follows: Where out is the final feature map output after fusion, and scale is a scaling factor used to adjust the magnitude of the fusion result. The output features of the HC dimension interaction branch, The output features of the CW dimension interaction branch, This represents the output feature of the HW dimension interaction branch. The pairwise multiplication fusion method couples the interactive information of multiple HC, CW, and HW dimensions, combining channel coordination information with spatial location information to further strengthen the key discrimination features of weld lines and amplify the feature differences between different types of weld lines.

[0117] In this embodiment of the invention, attention calculation is performed after feature extraction, which further enhances the ability to capture cross-dimensional and cross-scale discriminative features in metallographic images of melt marks. This effectively overcomes the limitations of conventional attention modules in dimensional modeling, enabling the model to establish richer collaborative response relationships between space and channels.

[0118] In the task of metallographic image recognition of melt marks, discriminative features often do not exist in isolation in a single dimension, but rather manifest as joint anomalies across multiple dimensions. For example, porosity defects may simultaneously manifest as abnormal channel intensity distribution and abrupt changes in local spatial texture; morphological changes in the melting transition zone depend on the coupling of spatial geometry and channel feature responses. By using the HC and CW branches, cross-attention weights can be established between channels and spatial dimensions to capture fine-grained semantics of "which channels are more important in which spatial locations"; while the HW branch acts as spatial attention, strengthening the overall response of key structural regions. The three branches are fused through product and mean to form a unified third-order attention output, achieving comprehensive modeling of complex and heterogeneous discriminative features in metallographic images.

[0119] In an optional embodiment of the present invention, in step S5, the third output result is input into the weld line recognition model for N consecutive weld line feature extractions and attention calculations to obtain a fourth output result, which may include:

[0120] S51, the third output result is input into the second layer module of the melt mark recognition model for processing to obtain the second layer output result. The processing of the second layer module includes: a second layer normalization module, a first 2×2 convolution module, a second feature extraction module, and a second attention calculation module. The processing of the second feature extraction module is the same as that of step S3 above, and the calculation process of the second attention calculation module is the same as that of step S4 above, which will not be repeated here.

[0121] S52, the output of the second layer is input into the third layer module of the melt mark recognition model for processing to obtain the third layer output. The processing of the third layer module includes: the third layer normalization module, the second 2×2 convolution module, the third feature extraction module, and the third attention calculation module. The processing of the third feature extraction module is the same as that of step S3 above, and the calculation process of the third attention calculation module is the same as that of step S4 above, which will not be repeated here.

[0122] S53, the output result of the third layer is input into the fourth layer module of the melt mark recognition model for processing to obtain the fourth layer output result. The processing of the fourth layer module includes: the fourth layer normalization module, the third 2×2 convolution module, the fourth feature extraction module, and the fourth attention calculation module. The processing of the feature extraction module is the same as that of step S3 above, and the calculation process of the attention calculation module is the same as that of step S4 above, which will not be repeated here.

[0123] In this embodiment, through multi-layer feature extraction and attention calculation, details such as melt marks and textures in the image can be accurately identified, thus improving the recognition accuracy.

[0124] In an optional embodiment of the present invention, in step S6, the fourth output result is input into the pooling module of the melt mark recognition model for processing to obtain the pooling result processing, which may include:

[0125] The fourth output result is processed using the following formula: ;in, Represents the local region covered by the pooling window. AvgPool(Ω) is the output of the average pooling operation, which is the mean of the features within the local region Ω. i and j are the row and column indices of the pixels on the two-dimensional feature map, respectively. Let be the eigenvalue of the deep feature map of the melt mark at position (i, j).

[0126] Global average pooling is performed on the deep feature map of the melt line, compressing the two-dimensional feature map into a one-dimensional channel vector. Global average pooling is another key component of CNN, and its main function is to downsample the spatial dimension of the deep feature map of the melt line, realizing local aggregation and abstraction of features. The pooling operation executes a certain aggregation function on the feature map through a sliding window, mapping multiple pixel values ​​within the window to a single output value.

[0127] Average pooling calculates the arithmetic mean of all feature values ​​within a local region. Its function is to smoothly aggregate local features, preserving the overall statistical information of the region rather than extreme responses. Average pooling can effectively suppress noise perturbations in the feature map and provide a more stable feature representation.

[0128] In an optional embodiment of the present invention, in S7, performing a linear operation on the pooling process result to obtain the type of electrical weld mark may include:

[0129] S71, after performing layer normalization on the pooling result, a linear operation is then performed to obtain the processed global feature vector;

[0130] S72, the processed global feature vector is classified and mapped to the output dimension corresponding to the number of melt mark categories, and the original prediction score corresponding to each melt mark property is obtained;

[0131] S73, convert the original prediction score into the prediction probability corresponding to each melt mark category;

[0132] S74. The category of the melt mark corresponding to the highest predicted probability is determined as the electrical melt mark identification result.

[0133] In this embodiment, the pooling result is input into the final layer normalization module for layer normalization. The normalized result is then input into the linear operation module to obtain the processed global feature vector. This global feature vector condenses all the discrimination information of grain, grain boundary, bubble, and molten bead morphology in the melt mark metallographic image. The mean and variance of the global feature vector are statistically analyzed along the channel dimension. The global feature vector is then translated and scaled for normalization to constrain the feature values ​​to a stable distribution range.

[0134] Matrix multiplication is performed using the learnable weight matrix and the normalized global feature vector, and learnable bias terms are superimposed to obtain an original prediction score vector with the same dimension as the number of melt mark categories. In this embodiment, the identified categories include four types: single short-circuit melt marks, double short-circuit melt marks, fire melt marks, and electrothermal melt marks. The output dimension is four-dimensional, and each dimension of the vector corresponds to the original prediction score of a melt mark property. The original prediction score only represents the model's response strength to that category, not the probability.

[0135] The Softmax activation function is used to operate on the original predicted score vector, converting the original predicted score, which has an unlimited value range, into a predicted probability in the range of 0-1. The sum of the predicted probabilities corresponding to the four types of melt marks is 1. The predicted probability values ​​of each category are compared, and the category index corresponding to the highest predicted probability is found. The melt mark category corresponding to this index is used as the final recognition result of the metallographic image of the electrical melt mark.

[0136] In an optional embodiment of the present invention, after S7, the following may be included:

[0137] S8. The classification results of the electrical melt mark types are evaluated according to the preset model evaluation indicators to obtain the evaluation results. The preset model evaluation indicators include precision, recall, F1 score and overall accuracy.

[0138] In S7 of this embodiment, after the metallographic image corresponds to the classification result of the melt mark properties, the system compares the "predicted category" of the sample with the "true category" and assigns it to one of four statistical counters based on the comparison result: if the true category is P and the prediction is also P, the TP counter is incremented by 1 (correct detection); if the true category is another class (negative class) but the prediction is misclassified as P, the FP counter is incremented by 1 (false alarm); if the true category is P but the model predicts another class, the FN counter is incremented by 1 (missed detection); if the true category is another class and the prediction is also another class (and neither is P), the TN counter is incremented by 1 (correct exclusion). After traversing all samples in the test set, the system accumulates four specific count values. Based on the TP, FP, TN, and FN, the precision, recall, F1 score, and overall accuracy are determined respectively.

[0139] P stands for Precision, expressed as... R represents recall, expressed as F1 represents F1 score, expressed as OA represents overall precision, expressed as The overall accuracy (OA) of the embodiments in this application reached 86.59% on the test set, demonstrating excellent model performance.

[0140] The embodiments of the present invention employ deep convolutional structures and attention mechanisms on the original metallographic images of electrical weld marks to extract hierarchical features from the images step by step along the forward propagation. Cross-dimensional interaction and feature calibration are achieved through specific branches and residual connections, ultimately aggregating multi-scale feature representations covering microscopic metallographic changes and macroscopic structural differences. Based on the extracted comprehensive feature vector, original score vectors representing the response intensity of each candidate category are output. The index corresponding to the maximum score is taken as the final classification label, thereby completing end-to-end automatic identification and determination from the input image to the specific weld mark nature (fire weld mark, single short-circuit weld mark, double short-circuit weld mark, or electrothermal weld mark), thus accurately identifying the type of electrical weld mark.

[0141] like Figure 5 As shown, this embodiment of the invention also discloses an electrical melt mark type identification system 500, comprising:

[0142] The acquisition module 501 is used to acquire metallographic images of electrical weld marks to be identified;

[0143] The processing module 502 is used to input the metallographic image of the electrical weld mark into the weld mark recognition model for sampling processing to obtain a first output result; input the first output result into the feature extraction module of the weld mark recognition model for weld mark feature extraction to obtain a second output result; input the second output result into the first attention calculation module of the weld mark recognition model for attention calculation to obtain a third output result; input the third output result into the weld mark recognition model for continuous N times of weld mark feature extraction and attention calculation processing to obtain a fourth output result; N is a positive integer greater than or equal to 1; input the fourth output result into the pooling module of the weld mark recognition model for processing to obtain a pooling processing result; and perform a linear operation on the pooling processing result to obtain and output the type of electrical weld mark.

[0144] Optionally, the metallographic image of the electrical weld mark is input into the weld mark recognition model for sampling processing to obtain a first output result, including:

[0145] The metallographic image of the electrical weld mark is input into the first convolution kernel module of the first layer module of the weld mark recognition model for convolution operation processing to obtain intermediate operation results;

[0146] The intermediate operation results are input into the first-level normalization module of the first-level module for normalization processing to obtain the first output result.

[0147] Optionally, the first output result is input into the feature extraction module of the weld line recognition model to extract weld line features, resulting in a second output result, including:

[0148] The first output result is input into the 7×7 convolution module of the feature extraction module of the melt mark recognition model to perform a convolution operation, and the convolution operation result is obtained.

[0149] The convolution operation result is input into the first linear operation module for linear operation processing to obtain the first linear operation processing result.

[0150] The result of the first linear operation is input into the normalization operation module for normalization processing to obtain the normalization result.

[0151] The normalization result is input into the GeLU activation function for processing to obtain the activation result;

[0152] The activation processing result is input into the Global Response Normalization (GRN) module for processing to obtain the GRN processing result.

[0153] The GRN processing result is input into the second linear operation module for linear operation processing to obtain the second linear operation processing result.

[0154] The result of the linear operation is input into the random depth module for random depth processing to obtain the second output result.

[0155] Optionally, the second output result is input into the first attention calculation module of the weld line recognition model for attention calculation to obtain a third output result, including:

[0156] The second output result is input into the first branch module of the first attention calculation module for processing to obtain the first branch output result;

[0157] The second output result is input into the second branch module of the first attention calculation module for processing to obtain the second branch output result;

[0158] The second output result is input into the third branch module of the first attention calculation module for processing to obtain the third branch output result;

[0159] The output results of the first branch, the second branch, and the third branch are input into the feature fusion module for feature fusion to obtain the third output result.

[0160] Optionally, the third output result is input into the weld line recognition model for N consecutive weld line feature extractions and attention calculations to obtain a fourth output result, including:

[0161] The third output result is input into the second layer module of the melt mark recognition model for processing to obtain the second layer output result. The processing of the second layer module includes: a second layer normalization module, a first 2×2 convolution module, a second feature extraction module, and a second attention calculation module.

[0162] The output of the second layer is input into the third layer module of the melt mark recognition model for processing to obtain the third layer output. The processing of the third layer module includes: the third layer normalization module, the second 2×2 convolution module, the third feature extraction module, and the third attention calculation module.

[0163] The output of the third layer is input into the fourth layer module of the melt mark recognition model for processing to obtain the fourth layer output. The processing of the fourth layer module includes: the fourth layer normalization module, the third 2×2 convolution module, the fourth feature extraction module, and the fourth attention calculation module.

[0164] Optionally, a linear operation is performed on the pooling result to obtain the type of electrical weld mark, including:

[0165] After performing layer normalization on the pooling result, a linear operation is then performed to obtain the processed global feature vector.

[0166] The processed global feature vector is classified and mapped to the output dimension corresponding to the number of melt mark categories, and the original prediction score corresponding to each melt mark property is obtained.

[0167] The original prediction scores are converted into prediction probabilities corresponding to each melt mark category;

[0168] The category of the weld mark corresponding to the highest predicted probability is determined as the electrical weld mark identification result.

[0169] Optionally, after performing a linear operation on the pooling result to obtain and output the type of electrical weld mark, the method further includes:

[0170] The classification results of the electrical melt marks are evaluated based on the preset model evaluation indicators to obtain the evaluation results. The preset model evaluation indicators include precision, recall, F1 score and overall accuracy.

[0171] It should be noted that this system is the same as the method described above. All implementation methods in the above method embodiments are applicable to this embodiment and can achieve the same technical effect.

[0172] This invention also discloses a computing device, including: a processor and a memory storing a computer program, wherein the computer program, when executed by the processor, performs the method described above. All implementations in the above method embodiments are applicable to this embodiment and can achieve the same technical effects.

[0173] This invention also discloses a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the method described above. All implementations in the above method embodiments are applicable to this embodiment and achieve the same technical effect. Computer-readable storage media include, for example, various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0174] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on these embodiments, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art can still combine, add, delete, or otherwise adjust the features of the various embodiments of the present invention according to the circumstances without conflict or creative effort, thereby obtaining different technical solutions that do not fundamentally depart from the concept of the present invention. These technical solutions also fall within the scope of protection of the present invention.

Claims

1. A method for identifying the type of electrical weld marks, characterized in that, Includes the following steps: Obtain metallographic images of the electrical weld marks to be identified; The metallographic image of the electrical weld mark is input into the weld mark recognition model for sampling processing to obtain the first output result; The first output result is input into the feature extraction module of the weld line recognition model to extract weld line features, and a second output result is obtained. The second output result is input into the first attention calculation module of the melt mark recognition model for attention calculation to obtain the third output result; The third output result is input into the weld line recognition model for N consecutive weld line feature extractions and attention calculations to obtain the fourth output result; N is a positive integer greater than or equal to 1. The fourth output result is input into the pooling module of the melt mark recognition model for processing to obtain the pooling result; A linear operation is performed on the pooling result to obtain and output the type of electrical melt mark.

2. The method for identifying electrical melt marks according to claim 1, characterized in that, The metallographic image of the electrical weld mark is input into the weld mark recognition model for sampling processing to obtain the first output result, including: The metallographic image of the electrical weld mark is input into the first convolution kernel module of the first layer module of the weld mark recognition model for convolution operation processing to obtain intermediate operation results; The intermediate operation results are input into the first-level normalization module of the first-level module for normalization processing to obtain the first output result.

3. The method for identifying electrical melt marks according to claim 1, characterized in that, The first output result is input into the feature extraction module of the weld line recognition model to extract weld line features, resulting in a second output result, including: The first output result is input into the 7×7 convolution module of the feature extraction module of the melt mark recognition model to perform a convolution operation, and the convolution operation result is obtained. The convolution operation result is input into the first linear operation module for linear operation processing to obtain the first linear operation processing result. The result of the first linear operation is input into the normalization operation module for normalization processing to obtain the normalization result. The normalization result is input into the GeLU activation function for processing to obtain the activation result; The activation processing result is input into the Global Response Normalization (GRN) module for processing to obtain the GRN processing result. The GRN processing result is input into the second linear operation module for linear operation processing to obtain the second linear operation processing result. The result of the linear operation is input into the random depth module for random depth processing to obtain the second output result.

4. The method for identifying electrical melt marks according to claim 1, characterized in that, The second output result is input into the first attention calculation module of the melt mark recognition model for attention calculation to obtain the third output result, including: The second output result is input into the first branch module of the first attention calculation module for processing to obtain the first branch output result; The second output result is input into the second branch module of the first attention calculation module for processing to obtain the second branch output result; The second output result is input into the third branch module of the first attention calculation module for processing to obtain the third branch output result; The output results of the first branch, the second branch, and the third branch are input into the feature fusion module for feature fusion to obtain the third output result.

5. The method for identifying electrical weld mark types according to claim 1, characterized in that, The third output result is input into the weld line recognition model for N consecutive weld line feature extractions and attention calculations to obtain a fourth output result, including: The third output result is input into the second layer module of the melt mark recognition model for processing to obtain the second layer output result. The processing of the second layer module includes: a second layer normalization module, a first 2×2 convolution module, a second feature extraction module, and a second attention calculation module. The output of the second layer is input into the third layer module of the melt mark recognition model for processing to obtain the third layer output. The processing of the third layer module includes: the third layer normalization module, the second 2×2 convolution module, the third feature extraction module, and the third attention calculation module. The output of the third layer is input into the fourth layer module of the melt mark recognition model for processing to obtain the fourth layer output. The processing of the fourth layer module includes: the fourth layer normalization module, the third 2×2 convolution module, the fourth feature extraction module, and the fourth attention calculation module.

6. The method for identifying electrical melt marks according to claim 1, characterized in that, Performing a linear operation on the pooling result yields the types of electrical weld marks, including: After performing layer normalization on the pooling result, a linear operation is then performed to obtain the processed global feature vector. The processed global feature vector is classified and mapped to the output dimension corresponding to the number of melt mark categories, and the original prediction score corresponding to each melt mark property is obtained. The original prediction scores are converted into prediction probabilities corresponding to each melt mark category; The category of the weld mark corresponding to the highest predicted probability is determined as the electrical weld mark identification result.

7. The method for identifying electrical weld mark types according to claim 1, characterized in that, After performing a linear operation on the pooling result to obtain and output the type of electrical weld mark, the process further includes: The classification results of the electrical melt marks are evaluated based on the preset model evaluation indicators to obtain the evaluation results. The preset model evaluation indicators include precision, recall, F1 score and overall accuracy.

8. An electrical melt mark type identification system, characterized in that, include: The acquisition module is used to acquire metallographic images of the electrical weld marks to be identified. The processing module is used to input the metallographic image of the electrical weld mark into the weld mark recognition model for sampling and processing to obtain a first output result; and to input the first output result into the feature extraction module of the weld mark recognition model for weld mark feature extraction to obtain a second output result. The second output result is input into the first attention calculation module of the weld mark recognition model for attention calculation to obtain a third output result; the third output result is input into the weld mark recognition model for N consecutive weld mark feature extraction and attention calculation processing to obtain a fourth output result; N is a positive integer greater than or equal to 1; the fourth output result is input into the pooling module of the weld mark recognition model for processing to obtain a pooling processing result; a linear operation is performed on the pooling processing result to obtain and output the type of electrical weld mark.

9. A computing device, characterized in that, include: A processor, a memory storing a computer program, wherein the computer program, when executed by the processor, performs the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The system stores instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1 to 7.