An attention-enhanced partial discharge identification method and system based on an improved optimization algorithm

CN122903992APending Publication Date: 2026-10-13SICHUAN ENERGY INTERNET RES INST TSINGHUA UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611102001.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

此类方案在常规图谱样本较稳定、类别差异较明显的场景下可完成局部放电模式识别,但在局部放电PRPD图谱样本来源不一致、相似放电类型图谱特征接近、模型训练超参数搜索空间较大的条件下,容易出现图谱样本状态与模型训练过程衔接不足、分类约束与相似类别特征分布不匹配、超参数搜索过程状态记录不连续等限制

Benefits of technology

(1)针对现有方案中图谱样本状态、模型训练过程和超参数搜索边界之间衔接不足的问题,通过图谱样本绑定、尺寸规范化处理和超参数搜索边界数据生成,使局部放电PRPD图谱样本、类别标签、待识别PRPD图谱和超参数搜索空间形成统一的数据输入关系,为后续模型训练模板构建和超参数寻优提供连续的数据索引。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903992A_ABST
    Figure CN122903992A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of power equipment state monitoring and artificial intelligence pattern recognition, and particularly relates to a method and system for attention-enhanced partial discharge identification based on an improved optimization algorithm. The method comprises: receiving partial discharge PRPD pattern samples, category labels, to-be-identified PRPD patterns and hyperparameter search spaces, generating pattern sample state data and hyperparameter search boundary data; constructing model training template data embedded with a convolution block attention module at each feature extraction stage of ConvNeXt and configured with ArcFace angle interval classification constraints; encoding candidate hyperparameter combinations as sparrow population individuals, triggering random restart based on individual fitness, global target fitness, continuous ineffective improvement state and population diversity lower than a threshold state, and generating target hyperparameter combinations; training a target partial discharge identification model based on the target hyperparameter combinations and outputting identification results and sample backwriting records. The present application effectively improves the consistency of the connection between pattern samples, model templates, optimization states and identification records.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power equipment condition monitoring and artificial intelligence pattern recognition technology, and in particular to an attention-enhanced partial discharge recognition method and system based on an improved optimization algorithm. Background Technology

[0002] In the field of power equipment condition monitoring and artificial intelligence pattern recognition technology, existing solutions for partial discharge (PRPD) map recognition typically involve collecting partial discharge signals using a partial discharge detector, generating phase-resolved partial discharge maps, and then performing denoising, normalization, size adjustment, or feature extraction on the maps before inputting them into convolutional neural networks, residual neural networks, attention neural networks, or partial discharge type determination models to obtain partial discharge type identification results. While such solutions can achieve partial discharge pattern recognition in scenarios where conventional map samples are relatively stable and category differences are significant, they are prone to limitations under conditions such as inconsistent sources of PRPD map samples, similar discharge type map features being close, and a large hyperparameter search space for model training. These limitations include insufficient connection between map sample states and model training processes, mismatch between classification constraints and the distribution of similar category features, and discontinuous state recording during the hyperparameter search process.

[0003] Existing solutions often rely on manually setting training parameters, using fixed network structures, or employing a single loss function. When the state of the map samples, the distribution of class labels, or the hyperparameter search boundary changes, there is a lack of stable connections between map sample preprocessing, model training template construction, hyperparameter optimization, and model version recording. This can easily lead to mismatches between candidate hyperparameter combinations and the current model structure, failure to continuously record stagnation states and population diversity states during the optimization process, and incomplete index relationships between the trained model version and subsequent recognition records.

[0004] For the joint processing of partial discharge PRPD map samples, category labels, PRPD maps to be identified, and hyperparameter search space, existing technologies still suffer from a common shortcoming: difficulty in linking map sample state data, model training template data, hyperparameter optimization states, and the target partial discharge identification model. Therefore, it is necessary to address the problem of how to form a target partial discharge identification model based on map sample state data and hyperparameter search boundary data, through model training template construction and dual-state random restart optimization, specifically for partial discharge PRPD map identification scenarios. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides an attention-enhanced partial discharge identification method based on an improved optimization algorithm, comprising: S100: Receive partial discharge PRPD map samples, category labels, PRPD maps to be identified, and hyperparameter search space; perform map sample binding and size normalization processing on the partial discharge PRPD map samples to generate map sample state data and hyperparameter search boundary data. S200. Construct an attention-enhanced ConvNeXt recognition model template based on the map sample state data, embed a convolutional block attention module after each feature extraction stage of ConvNeXt, configure ArcFace angular interval classification constraints, and generate model training template data. S300. Based on the model training template data and the hyperparameter search boundary data, the candidate hyperparameter combinations are encoded as sparrow population individuals, the individual fitness is calculated, and random restarts are triggered according to the state where the global target fitness has not been effectively improved and the state where the population diversity is lower than the threshold, thereby generating target hyperparameter combinations and optimization state records. S400. Train the target partial discharge identification model based on the target hyperparameter combination and the model training template data, and generate a model version record; S500: Input the PRPD map to be identified into the target partial discharge identification model to generate partial discharge type identification results, identification confidence and identification records, and generate sample write-back records based on the identification records.

[0006] Furthermore, the spectrum sample status data includes spectrum sample identifier, device identifier, acquisition timestamp, phase range, amplitude range, pulse frequency, category label, and sample usage identifier; the sample usage identifier includes training sample identifier, verification sample identifier, and sample identifier to be identified.

[0007] Further, the partial discharge PRPD map sample preprocessing in S100 includes: performing grayscale processing on the partial discharge PRPD map sample to determine the target grayscale PRPD map.

[0008] Furthermore, the convolutional block attention module in S200 includes a cascaded channel attention submodule and a spatial attention submodule; the channel attention submodule receives the stage feature map output by the feature extraction stage of ConvNeXt and generates channel attention weights; the spatial attention submodule receives the channel-weighted stage feature map, generates spatial attention weights, and generates a stage enhancement feature map.

[0009] Furthermore, the channel attention submodule performs global average pooling and global max pooling on the stage feature map to generate channel statistical features; performs shared network mapping and normalization on the channel statistical features to generate the channel attention weights; and multiplies the channel attention weights with the stage feature map channel by channel to generate the channel-weighted stage feature map.

[0010] Furthermore, the spatial attention submodule performs average pooling and max pooling on the channel-weighted stage feature map in the channel dimension to generate spatial statistical features; the spatial statistical features are concatenated and convolved to generate the spatial attention weights; the spatial attention weights are multiplied by the channel-weighted stage feature map to generate the stage enhancement feature map.

[0011] Furthermore, configuring ArcFace angular interval classification constraints in S200 includes: normalizing the feature vector output by the attention-enhanced ConvNeXt recognition model template; normalizing the class weights; calculating the target class angle between the normalized feature vector and the normalized class weights; and adding an additive angular interval to the target class angle to generate angular interval classification constraint data.

[0012] Furthermore, the candidate hyperparameter combination mentioned in S300 includes learning rate, weight decay, number of warm-up rounds, minimum learning rate, exponential moving average decay coefficient, and random deep path drop-off rate; the individual fitness is generated based on one or more of the validation set loss, recognition error rate, and F1 score corresponding to the validation sample set; the optimization state record includes global target fitness, stagnation state data, population diversity state data, random restart state data, and elite individual set.

[0013] Furthermore, triggering a random restart in S300 includes: generating stagnation state data when the global target fitness does not meet the effective improvement threshold within the consecutive stagnation number threshold; generating population diversity state data when the population diversity index is lower than the population diversity threshold; and retaining the elite individual set based on the stagnation state data or the population diversity state data, and re-initializing some sparrow population individuals in the non-elite individual set within the hyperparameter search boundary data.

[0014] Furthermore, an attention-enhanced partial discharge identification system based on an improved optimization algorithm includes: a spectrum sample acquisition module, a model structure construction module, an ISSA hyperparameter optimization module, a model training module, a partial discharge type identification module, and an identification record generation module; the system is used to implement the method described in any of the above embodiments.

[0015] The key innovations of this invention include: (1) The partial discharge PRPD map samples, category labels, PRPD maps to be identified, and hyperparameter search space are uniformly bound to form map sample state data and hyperparameter search boundary data. The map sample state data is used as the input for model training template construction, and the hyperparameter search boundary data is used as the boundary basis for candidate hyperparameter combination encoding. Experimental data show that, based on the unified data state management link described in this invention, the recognition accuracy of the improved ConvNeXt recognition model reaches 97.59%, which is significantly better than the traditional scheme lacking a unified data binding mechanism.

[0016] (2) An attention-enhanced ConvNeXt recognition model template was constructed based on the aforementioned spectral sample state data. A convolutional block attention module was embedded after each feature extraction stage of ConvNeXt, allowing the stage feature maps to be processed sequentially by channel attention weights and spatial attention weights. An ArcFace angular interval classification constraint was configured at the classification end to generate model training template data. Ablation experiment data showed that embedding the convolutional block attention module alone improved the model accuracy by 8.71 percentage points. Configuring the ArcFace angular interval classification constraint further improved the accuracy by 3.54 percentage points, demonstrating that the module combination effectively enhanced the model's ability to distinguish features of similar discharge types.

[0017] (3) Based on the model training template data and the hyperparameter search boundary data, candidate hyperparameter combinations are encoded as sparrow population individuals. Random restarts are triggered based on the states where individual fitness and global target fitness have not been effectively improved and the state where population diversity is below a threshold, generating target hyperparameter combinations and optimization state records, which are then used to train the target partial discharge recognition model. Experimental data show that after using the dual-state random restart mechanism described in this invention for hyperparameter optimization, the model accuracy is improved by 0.38 percentage points compared to the standard sparrow search algorithm, and it has a more significant performance advantage compared to manual experience-based parameter tuning.

[0018] The following are its main beneficial effects: (1) To address the problem of insufficient connection between the state of the spectral sample, the model training process and the hyperparameter search boundary in the existing scheme, the partial discharge PRPD spectral sample, category label, PRPD spectral to be identified and hyperparameter search boundary data are bound together to form a unified data input relationship, providing a continuous data index for subsequent model training template construction and hyperparameter optimization.

[0019] (2) To address the mismatch between the fixed network structure or single attention processing in existing schemes and the feature distribution of similar discharge types, a convolutional block attention module is embedded after each feature extraction stage of ConvNeXt, and ArcFace angle interval classification constraints are configured so that the stage feature map, channel attention weight, spatial attention weight and angle interval classification constraints are written into the model training template data to form a model structure record corresponding to the partial discharge PRPD map recognition process.

[0020] (3) To address the problem of discontinuous records of training parameters and optimization process status in existing schemes, candidate hyperparameter combinations are encoded as sparrow population individuals, and random restarts are triggered based on the state of continuous failure to effectively improve individual fitness and global target fitness, and the state of population diversity being lower than the threshold. This creates a traceable processing link between target hyperparameter combinations, optimization status records, model version records, and identification records. Attached Figure Description

[0021] Figure 1 A flowchart illustrating an attention-enhanced partial discharge identification method based on an improved optimization algorithm, provided for an embodiment of this application; Figure 2 This is a structural block diagram of an attention-enhanced partial discharge recognition system based on an improved optimization algorithm, provided in an embodiment of this application. Detailed Implementation

[0022] Example 1: Refer to Figure 1 This is a flowchart illustrating an attention-enhanced partial discharge identification method based on an improved optimization algorithm provided in an embodiment of the present invention. The flowchart may include at least steps S100-S500: S100: Receive partial discharge PRPD map samples, category labels, PRPD maps to be identified, and hyperparameter search space; perform map sample binding and size normalization processing on the partial discharge PRPD map samples to generate map sample state data and hyperparameter search boundary data. S200. Construct an attention-enhanced ConvNeXt recognition model template based on the map sample state data, embed a convolutional block attention module after each feature extraction stage of ConvNeXt, configure ArcFace angular interval classification constraints, and generate model training template data. S300. Based on the model training template data and the hyperparameter search boundary data, the candidate hyperparameter combinations are encoded as sparrow population individuals, the individual fitness is calculated, and random restarts are triggered according to the state where the global target fitness has not been effectively improved and the state where the population diversity is lower than the threshold, thereby generating target hyperparameter combinations and optimization state records. S400. Train the target partial discharge identification model based on the target hyperparameter combination and the model training template data, and generate a model version record; S500: Input the PRPD map to be identified into the target partial discharge identification model to generate partial discharge type identification results, identification confidence and identification records, and generate sample write-back records based on the identification records.

[0023] S100: Receive partial discharge PRPD map samples, category labels, PRPD maps to be identified, and hyperparameter search space; perform map sample binding and size normalization processing on the partial discharge PRPD map samples to generate map sample state data and hyperparameter search boundary data.

[0024] This step is performed by a spectrum sample acquisition module and a spectrum preprocessing module. The spectrum sample acquisition module is located in a power equipment condition monitoring platform, a partial discharge online monitoring server, or a model training server. The spectrum preprocessing module receives partial discharge PRPD spectrum samples from a partial discharge detector, a historical spectrum library, or a manually labeled sample library, and receives the category label corresponding to the partial discharge PRPD spectrum sample. PRPD is an abbreviation for Phase Resolved Partial Discharge, representing a phase-resolved partial discharge spectrum. In this embodiment, the partial discharge PRPD spectrum sample is a partial discharge spectrum organized according to phase and amplitude intervals, and the pixel values ​​or matrix elements in the spectrum correspond to pulse frequencies or normalized discharge intensities. The category label is a partial discharge type identifier corresponding to the partial discharge PRPD spectrum sample; in the scenario of gas-insulated metal-enclosed switchgear, the category label includes one of tip discharge, air gap discharge, surface discharge, metal particle discharge, and suspended discharge.

[0025] This step is initiated when the model training task starts, a new labeled map is added to the sample library, the model version is updated, or a PRPD map to be identified is accessed. The map sample acquisition module reads the sample source path, device identifier field, category label field, and hyperparameter search space configuration from the training task configuration; when the input comes from an online monitoring device, the map sample acquisition module receives the phase-synchronous discharge pulse data generated by the partial discharge detector, and counts the pulse frequency according to the phase interval and amplitude interval to form a partial discharge PRPD map sample; when the input comes from a historical map library, the map sample acquisition module reads the generated PRPD map file, label file, and sample purpose identifier, and writes each field into the same map sample record.

[0026] Specifically, the map sample binding includes associating partial discharge PRPD map samples with map sample identifiers, device identifiers, acquisition timestamps, category labels, and sample usage identifiers. The map sample identifier is a unique index within the sample library; the device identifier is the number of the power equipment or test device corresponding to the partial discharge signal; the acquisition timestamp is the time field when the partial discharge data was generated or imported; and the sample usage identifier includes training sample identifiers, verification sample identifiers, and sample identifiers to be identified. For multiple PRPD maps generated by the same device within the same acquisition window, the map sample acquisition module sorts them according to the acquisition timestamp and map sample identifier. For cases where the same map corresponds to multiple label fields, the map sample acquisition module retains manually verified labels and writes the original labels into the label source field.

[0027] The size normalization process includes reading the width, height, number of phase intervals, and number of amplitude intervals of the partial discharge PRPD image sample, and mapping the image size according to the target size in the model training configuration. If the PRPD image sample is in matrix form, the image preprocessing module constructs a two-dimensional matrix according to the index order of the phase intervals and amplitude intervals; if the PRPD image sample is in image form, the image preprocessing module reads the number of image channels, pixel width, pixel height, and grayscale range, and converts the image into a model input matrix.

[0028] For spectra with inconsistent sizes, interpolation mapping or interval resampling is used to generate size-normalized spectra; for spectra with missing phase intervals, the missing intervals are written into the spectra format exception marker and the original spectra file reference path is preserved.

[0029] During the size normalization process, the phase interval index in the original spectrum is set. Values Amplitude range index Values The corresponding pixel value The number of phase intervals in the target spectrum is The number of amplitude intervals is Bilinear interpolation mapping is used to calculate the position of any location in the target map. The pixel values, where , Map back to the original map coordinates satisfy , .

[0030] Formula ① gives the bilinear interpolation result:

[0031] in, : Target map at location Pixel value at; : Phase interval index in the target spectrum, value range to ; : Amplitude interval index in the target spectrum, value range to ; : Phase direction coordinate offset in the original spectrum; : Amplitude direction coordinate offset in the original spectrum; : Pixel values ​​or matrix elements of the original PRPD map; The lower bound of adjacent integer indices in the phase direction in the original spectrum; The upper limit of adjacent integer indices in the phase direction in the original spectrum; The lower bound of adjacent integer indices in the amplitude direction in the original spectrum; The upper limit of adjacent integer indices in the amplitude direction in the original spectrum; Continuous coordinates in the original map; : Floor function; : Total number of phase intervals in the original spectrum; : Total number of amplitude intervals in the original spectrum; The total number of phase intervals in the target map is given by the model training configuration; The total number of amplitude intervals in the target spectrum is given by the model training configuration.

[0032] Data source mapping: Extracting the original matrix from "Partial Discharge PRPD Atlas Samples" The target size parameters are extracted from the "model training configuration". , Together, they form the input quantity in formula ①.

[0033] In one embodiment, the spectrum preprocessing further includes grayscale processing. The spectrum preprocessing module performs grayscale processing on the partial discharge PRPD spectrum sample to determine the target grayscale PRPD spectrum; the grayscale processing is a weighted average method, and the target grayscale PRPD spectrum is written into the spectrum sample state data.

[0034] The formula for calculating the weighted average is shown in Formula ②:

[0035] In the formula, The brightness values ​​of the PRPD image after grayscale processing; The intensity of the red channel in the original PRPD map; The green channel intensity of the original PRPD map; The intensity of the blue channel in the original PRPD map; In another embodiment, the image preprocessing further includes normalization and cropping. The image preprocessing module reads the pixel value range or matrix value range in the target grayscale PRPD image and maps the pixel values ​​or matrix values ​​to a preset normalization interval, commonly a range of which is [missing information]. or Let the pixel value in the target grayscale image be... Its global minimum value is The maximum value is .

[0036] Formula ③ performs linear normalization:

[0037] in, : Normalized pixel values; : Phase direction pixel index; : Pixel index of amplitude direction; Location of the target grayscale PRPD image Pixel value at; The global minimum pixel value of the target grayscale image; The global maximum pixel value of the target grayscale image; The lower bound of the normalization interval, for example ; The upper limit of the normalization interval, for example .

[0038] For maps containing reference lines, coordinate borders, or non-discharge regions, the map preprocessing module clips the map edge regions according to a preset clipping area and writes the coordinates of the clipped areas into the map preprocessing data. If the size of the clipped map is inconsistent with the model input size, the map preprocessing module performs size normalization again. If a map with all pixel values ​​is found to be identical during the normalization process, the map preprocessing module writes the map into the abnormal sample list and retains its category label and original map path for manual review or subsequent sample library updates.

[0039] The hyperparameter search space is provided by the training task configuration, parameter table, or model training configuration file, and includes candidate hyperparameter names, hyperparameter types, lower bounds, upper bounds, and step sizes. Candidate hyperparameters may include learning rate, weight decay, warm-up rounds, minimum learning rate, exponential moving average decay coefficient, and random depth path dropout rate. For continuous hyperparameters, the graph sample acquisition module records their upper and lower boundaries; for discrete hyperparameters, the graph sample acquisition module records their candidate value sequences; for integer hyperparameters, the graph sample acquisition module records their value range and rounding rules. The hyperparameter search space, after field validation, is encapsulated as hyperparameter search boundary data, which serves as the basis for sparrow population initialization and individual out-of-bounds handling in subsequent S300 steps.

[0040] During project implementation, the power equipment condition monitoring platform imports a batch of PRPD map samples with category labels from the GIS partial discharge experimental platform, while simultaneously receiving real-time acquired PRPD maps to be identified. The platform writes the map samples into the sample library according to the equipment identifier and acquisition timestamp. The map preprocessing module converts the input maps into uniform-sized grayscale PRPD maps and generates a sample usage identifier for each map. The training task configuration file provides search boundaries for the learning rate, weight decay, and random depth path dropout rate; the map sample acquisition module writes these boundaries into the hyperparameter search boundary data. The map sample status data output in this step includes the map sample identifier, equipment identifier, acquisition timestamp, phase interval, amplitude interval, pulse frequency, category label, and sample usage identifier; the map sample status data enters S200, and the hyperparameter search boundary data enters S300.

[0041] S200. Construct an attention-enhanced ConvNeXt recognition model template based on the map sample state data. Embed a convolutional block attention module after each feature extraction stage of ConvNeXt and configure ArcFace angular interval classification constraints to generate model training template data.

[0042] This step is executed by the model structure construction module, the convolutional block attention enhancement module, and the ArcFace classification constraint module. The model structure construction module receives the map sample state data output by S100 and reads the input size, number of class labels, ConvNeXt feature extraction stage configuration, and classification constraint configuration from the model structure configuration. ConvNeXt is a convolutional neural network structure. The attention-enhanced ConvNeXt recognition model template includes an input layer, multiple feature extraction stages, a convolutional block attention module, a feature convergence layer, and a classification layer. CBAM is an abbreviation for Convolutional Block Attention Module. ArcFace is a common name for Additive Angular Margin Loss.

[0043] The model structure construction module receives the atlas sample state data output by S100 and reads the input size, number of class labels, ConvNeXt feature extraction stage configuration, and classification constraint configuration from the model structure configuration. The atlas sample state data includes the size information (height) of the target grayscale PRPD atlas. ,width ) and partial discharge category label set ,in The total number of partial discharge categories participating in the training is obtained by counting the unique labels in the category label set.

[0044] The model structure building module generates multiple stage structures according to the feature extraction stage sequence of ConvNeXt, assuming a total of The first feature extraction stage, the... stage( ) Receive the feature map output from the previous stage (for , (The initial feature map is processed by the input layer), and the output is the stage feature map of the current stage. Its dimensions are ,in , , These represent the number of channels, spatial height, and spatial width, respectively.

[0045] The convolutional block attention enhancement module is embedded after each feature extraction stage, making the feature maps at each stage more efficient. First, the system enters the channel attention submodule, then the spatial attention submodule. The channel attention submodule receives a feature map of the receiving stage. Channel statistical features are extracted using global average pooling and global max pooling, respectively, and then channel attention weights are generated through a shared network mapping. Let the stage feature map be... The first in the channel dimension Each channel plane is Global average pooling produces vectors , its first Each component is Global max pooling generates vectors. , its first Each component is These two vectors are input into the shared network respectively. (Constituted by a dimensionality reduction layer, ReLU activation, and dimensionality increase layer), two feature vectors are obtained, then added element-wise, and finally normalized by the Sigmoid function to obtain the channel attention weights. Formula ④ provides the calculation process for the channel attention weights:

[0046] in, Channel attention weight vector, with dimension 1 Each component takes a value in between; The Sigmoid activation function is defined as follows: Mapping real numbers to ; A shared multilayer perceptron contains a dimensionality-reducing fully connected layer (which reduces the input dimension from...). Down to A ReLU activation function, and an upscaling fully connected layer (to restore the dimension to 1). ); here Represents a vector Applying the above transformations sequentially, the output vector dimension is... ; Global average pooling vector, dimension its first Each component is ; : Global max-pooling vector, dimension its first Each component is ; : No. The stage feature map output by each feature extraction stage The number of channels; : Spatial height (in pixels) of the stage feature map; : Spatial width (in pixels) of the stage feature map; : Index in the spatial height direction, value range to ; : Index along the width of the space, range of values to ; Channel index, value range to ; Stage Feature Map The Each channel plane, dimension ; Dimensionality reduction ratio, typically 16. This value is used in the dimensionality reduction layer of an MLP. : The natural constant, approximately equal to 2.71828, appears in the Sigmoid function; function The internal ReLU function is defined as follows: ; Data source: Sourced from ConvNeXt Forward propagation of the phase, and Depend on Statistics show that...

[0047] Formula ④ addresses the practical problem of adaptively recalibrating the importance of each channel, suppressing noise channels unrelated to partial discharge, and enhancing channels containing discharge characteristics.

[0048] Subsequently, channel attention weights With stage feature map Perform channel-by-channel multiplication to generate a channel-weighted stage feature map. , its first Each channel plane is ,in for The Each component. This multiplication operation preserves the spatial structure of the original feature map, recalibrating only the channel intensities.

[0049] This section outputs: Channel-weighted stage feature map. As an intermediate product, it directly enters the subsequent spatial attention submodule, and the embedding position and number of input channels of the channel attention submodule are specified. and number of output channels It is written into the model structure configuration record, and is associated with the corresponding first... The index relationship is established in each feature extraction stage.

[0050] Following the channel-weighted stage feature map obtained from formula ④ The spatial attention submodule performs average pooling and max pooling on the channel dimension to generate two spatial statistical feature maps, which are then concatenated and convolved to generate spatial attention weights.

[0051] Specifically, input The size is Single-channel spatial feature maps are obtained by average pooling along the channel dimension. Its spatial location The value at that location is Max pooling is obtained in the channel dimension. Its value is These two feature maps are concatenated along the channel dimension to form a dual-channel feature map. Then it passes through a standard convolutional layer (with a kernel size of 1000 ppm). Spatial attention weights are typically generated using a 7) and a Sigmoid activation function. Formula ⑤ gives the calculation of spatial attention weights:

[0052] in, Spatial attention weight matrix, size Each element takes a value in between; : Sigmoid function; Convolution operation, the kernel size is The input channel has 2 channels, the output channel has 1 channel, the step size is 1, and the padding method is "same" (i.e., the output space size is the same as the input). The concatenation operation along the channel dimension combines two single-channel feature maps. and The features are stitched together to form a dual-channel feature map with a size of [size missing]. ; Channel average pooling result, size Its spatial location The value at that location is ; : Channel max pooling result, size Its value is ; The stage feature map after channel weighting is derived from formula ④. and Multiplying by channel, the dimension and same; : The One channel plane; Same as the definition in formula ④.

[0053] Data source: The output comes from formula ④. and Depend on It is obtained by pooling along the channel dimension.

[0054] Data source mapping: Channel-weighted feature map obtained from formula ④ extract and Together, they form the input for formula ⑤.

[0055] Formula ⑤ addresses the practical problem of identifying which spatial locations in the feature map are more important for partial discharge identification, such as the phase-amplitude region where the discharge pulse occurs, and suppressing background or interference regions.

[0056] Simple numerical example: Let the feature map space size be... Number of channels a certain location The values ​​of each channel are ,but , After splicing, the values ​​of the two channels at this position are... ;through Convolution (with boundary padding) yields a scalar. Sigmoid .

[0057] Then spatial attention weights Stage feature map weighted by channel Element-wise multiplication generates enhanced feature maps during the generation stage. Its spatial location Each channel value at that location is multiplied by the same spatial weight. : If the feature map space size at a certain stage is... If the padding configuration of the convolution is mismatched (e.g., the feature map size is less than 7 in the early stages), the attention enhancement module of the convolution block will adjust according to the spatial width of the feature map in the current stage. and spatial height Regenerate the convolution padding parameters to ensure the convolution output size matches the input, and record this adjustment in the model training template data. (Stage-based feature map enhancement) Then proceed to the next ConvNeXt feature extraction stage (if...) ) or enter the feature convergence layer (if Output of this section: Stage-enhanced feature map after spatial attention weighting. The data also includes a model training template data field that records convolutional padding adjustments. This data serves as the input to the subsequent feature pooling layer and enters the S300 as a fundamental component of the model for fitness calculation.

[0058] When the last feature extraction stage ( Stage-enhanced feature map After output, the model structure building module inputs it into the feature pooling layer (global average pooling layer) to generate feature vectors. The ArcFace classification constraint module receives the feature vector and reads the set of class labels. Corresponding category weight matrix , of which The row corresponds to the first The weight vectors for each category. The ArcFace angular margin classification constraint first performs feature normalization on the feature vectors: ,make Simultaneously, row normalization is performed on the category weights: This makes the weight vector for each category a unit vector. Then, the cosine similarity between the normalized feature vector and the weight of each normalized category is calculated. ,in For the eigenvector and the th The angle between class weights. Let the index corresponding to the true class label be... Then, add an additive angular interval to the angle of that category. (Usually taken as 0.5), to obtain the target category angle. Then, the ArcFace loss is calculated. Equation ⑥ gives the calculation expressions for feature normalization and angle cosine:

[0059] in, : Feature vector With the Category weight vectors Cosine similarity between them, range of values ; The angle corresponding to the cosine value satisfies ; The feature vector output by the feature pooling layer (global average pooling layer) has a dimension of . ; In the classification layer, the first The weight vector of each category, with dimensions ; L2 norm (Euclidean norm), for vectors , The result is a scalar; Category index, value range to ; The total number of partial discharge categories, represented by the category label set output by S100. Statistics show that; The final feature extraction stage (the last feature extraction stage) The number of feature map channels in the stage; The total number of feature extraction stages in the ConvNeXt backbone network.

[0060] Data source: Derived from the last stage enhanced feature map (After processing with formula ⑤) it is obtained through the feature aggregation layer; The training parameter matrix of the classification layer is the first... OK.

[0061] Formula ⑥ addresses the practical problem of constraining feature vectors and class weights to a unit hypersphere, eliminating the influence of modulus differences on classification decisions, and enabling the model to focus on angle discrimination.

[0062] Subsequently, the ArcFace classification constraint module adds an additive angular interval to the angle corresponding to the cosine value of the target class, and uses the scale parameter... (Typically 64) Magnify, and then feed it together with the logits of all categories into the cross-entropy loss. Formula ⑦ gives the calculation of the classification logits after adding the angular interval:

[0063] in, : No. The final logit value of each category before entering the Softmax function; : Scale parameter, typically 64; Additive angular margin, typically 0.5 radians. As defined in formula ⑥, is the eigenvector and the th... The angle between class weights; : Cosine function, with angle (radians) as the independent variable; : Input the true class index of the sample, with a range of values. to

[0064] Piecewise function: when When the value equals the true category index, add an interval to the angle inside the cosine function. Otherwise, keep the angle unchanged.

[0065] Data source: From formula ⑥, we can obtain... ; , These are preset hyperparameters derived from the model structure configuration; The category label field from the status data of the map sample output from S100.

[0066] Formula ⑦ addresses the practical problem of increasing the angular interval of the target category, forcing the model to learn a more compact intra-class distribution and a larger inter-class gap, thereby improving the ability to distinguish easily confused partial discharge types (such as air gap discharge and surface discharge).

[0067] The angle interval classification constraint data includes angle interval parameters. Scale parameters The data includes category weight matrix indices and label mappings, which, along with category labels, participate in the loss function calculation. The model training template data also records the mapping relationship between the hyperparameters to be optimized and the model training process. For example, the learning rate is mapped to the parameter update step size, weight decay to the regularization term, warm-up rounds to the learning rate scheduling stage, minimum learning rate to the lower bound, exponential moving average decay coefficient to the weight moving average, and random deep path drop rate to the path drop configuration during the ConvNeXt training stage.

[0068] The technical effects of this section are as follows: By concatenating channel attention and spatial attention after each ConvNeXt stage, adaptive enhancement of multi-scale stage features is achieved, ensuring that weak discharge signals are not drowned out in deep networks. Simultaneously, the angular spacing constraint of ArcFace constructs a more discriminative feature space, significantly different from the processing methods of ordinary convolutional networks or single attention networks. The innovation of this section lies in the close integration of mathematical operations such as global average pooling and max pooling dual-path aggregation, shared MLP, spatial convolutional attention, and additive angular spacing with the phase-amplitude spatial characteristics of the partial discharge PRPD spectrum. All formula inputs are derived from the spectrum sample state data and ConvNeXt intermediate feature maps, and the outputs directly serve the construction of model training template data, forming a complete model description that can be directly called upon in subsequent hyperparameter optimization steps.

[0069] S300. Based on the model training template data and the hyperparameter search boundary data, the candidate hyperparameter combinations are encoded as sparrow population individuals, the individual fitness is calculated, and random restarts are triggered according to the states where the global target fitness has not been effectively improved and the population diversity is below the threshold, thereby generating target hyperparameter combinations and optimization state records.

[0070] This step is executed by the ISSA hyperparameter optimization module and the random restart control module. ISSA is an abbreviation for Improved Sparrow Search Algorithm. In this embodiment, the search object of the improved sparrow search algorithm is the training hyperparameter combination of the attention-enhanced ConvNeXt recognition model template, rather than the model weight parameters. The ISSA hyperparameter optimization module receives the model training template data output by S200 and the hyperparameter search boundary data output by S100. The model training template data provides the model structure required for fitness calculation, the embedding position of the convolutional block attention module, ArcFace angular interval classification constraint data, and the hyperparameter terms to be optimized. The hyperparameter search boundary data provides the value range, value type, and boundary processing rules of the candidate hyperparameter combinations.

[0071] This step is initiated after the model training template data has undergone structural verification and both the training and validation sample sets have been written into the map sample state data. The ISSA hyperparameter optimization module reads the hyperparameter search boundary data and encodes one or more of the following as candidate hyperparameter combinations: learning rate, weight decay, number of warm-up rounds, minimum learning rate, exponential moving average decay coefficient, and random depth path drop-off rate. Each candidate hyperparameter combination corresponds to an individual sparrow in the population, and the position vector of the individual sparrow is composed of the encoded values ​​of each hyperparameter. For continuous hyperparameters, the encoded values ​​in the position vector are real numbers within the boundary interval; for integer hyperparameters, the encoded values ​​are mapped to integers using a rounding rule; for discrete hyperparameters, the encoded values ​​are mapped to a value in the candidate value sequence.

[0072] During population initialization, the ISSA hyperparameter optimization module generates multiple sparrow individuals within the hyperparameter search boundary data, and assigns an individual identifier, role identifier, and initial position vector to each sparrow individual. The role identifiers include discoverer, follower, and watchdog identifiers; these identifiers are generated according to a preset ratio or population fitness ranking rule. In one implementation, the initial population is generated using a uniform sampling method; in another implementation, it is generated using a low-discrepancy sequence sampling method. If the generated sparrow individual position vectors exceed the hyperparameter search boundary data, the ISSA hyperparameter optimization module generates boundary processing results according to boundary truncation, boundary reflection, or resampling rules, and writes these results into the optimization status record.

[0073] During individual fitness calculation, the ISSA hyperparameter optimization module writes the candidate hyperparameter combinations corresponding to individuals in the current sparrow population into the hyperparameters to be optimized in the model training template data, and calls the training sample set to perform temporary training, and calls the validation sample set to perform model validation. The individual fitness is generated based on one or more of the validation set loss, recognition error rate, and F1 score corresponding to the validation sample set. After each update, the diversity index of the current population is calculated. This is used to determine whether a population is prematurely clustering. The diversity index is based on the average Euclidean distance of the location vectors of all individuals relative to the population center. Since the hyperparameters have different scales, the location vectors of each individual are first normalized according to the hyperparameter search boundary.

[0074] Let the normalized position vector be Then the population center The diversity index is defined as the average normalized Euclidean distance from all individuals to the center. Formula ⑧ gives the calculation of the population diversity index:

[0075] in, Population diversity index, value range A larger value indicates that the population individuals are more dispersed in the normalized hyperparameter space; Total number of individuals in the population; Total number of hyperparameters; Individual index; Hyperparameter index; : No. The individual in the first Normalized encoded values ​​on each hyperparameter; : No. The mean of the normalized values ​​of all individuals over each hyperparameter.

[0076] Data source mapping: by truncated position vector With the boundary data of hyperparameter search Joint calculation And thus obtain .

[0077] Meanwhile, the module monitors the improvement of the global target fitness. Let the historical global target fitness be... The target fitness for the current round is ,when At that time, it was considered that effective improvement was not met, among which To effectively improve the threshold (dimensionless positive real number, for example) Define the stall count. The initial value is 0, and if there is no improvement in each round, then... If improved And update .

[0078] Formula 9 provides the criteria for determining a stagnant state:

[0079] in, : No. Stagnation count after round iteration; Previous round (number) Stagnation count after each iteration (round); initial time ; Historical global target fitness, initialized to the target fitness of the first round, and updated when effective improvements occur thereafter; : Current round (number) The global goal fitness of the round; : Effectively improves the threshold, which is set by configuration; The conditional statement "if...otherwise": when If no effective improvement is found, increment the stall count by 1; otherwise, reset it to zero.

[0080] The random restart control module receives the population diversity index obtained from formula ⑧. and the stagnation count obtained from formula ⑨ And read the preset population diversity threshold. (Dimensionless, e.g., 0.05) and threshold for the number of consecutive pauses (Dimensionless integer, such as 5).

[0081] A random restart is triggered when any of the following conditions are met: (1) That is, the global objective fitness has not been effectively improved for several consecutive rounds; (2) This refers to the excessive clustering of individuals within the population in the normalized hyperparameter space. During random restarts, the population is first sorted in ascending order of fitness (lower fitness is better), and the top-performing individuals are selected. Individuals as a collection of elite individuals The position vector and fitness record are preserved unchanged.

[0082] For the remaining non-elite individuals (number of which is...) ), in hyperparameter search boundary data Within a defined range, their position vectors are reinitialized to form a set of reinitialized individuals. .

[0083] Formula 10 describes a combined strategy of elite preservation and non-elite reinitialization:

[0084] in, : No. The set of sparrow populations in the round of iterations contains Individual; : A collection of elite individuals, consisting of the top-performing individuals in the current population with the highest fitness level. The system consists of several individuals. The position vectors and fitness values ​​of these individuals are fully preserved for the next round. : Reinitialize the set of individuals, including Each individual has its position vector within the hyperparameter search boundary. The inner part is regenerated uniformly and randomly, and then truncated at the boundary. Set union operation; :gather The base number, i.e., the number of elite individuals, is set by configuration (e.g. ); :gather The base is equal to .

[0085] Data source mapping: determined by fitness ranking results Generated from hyperparameter search boundary data Together, they form the output of formula 10.

[0086] Simple numerical example: Let , If the fitness is the best, the four individuals with the best fitness are retained, and the remaining 16 individuals are randomly re-initialized within their respective hyperparameter boundaries.

[0087] After reinitialization, a random restart of the control module will reset the stall count. The number of restarts is recorded and written into the optimization status data, and then the next round of position update and fitness calculation is performed.

[0088] When the maximum number of iterations is reached Or the global target fitness is lower than the preset fitness condition (e.g. The iteration terminates when no new global target fitness is generated after multiple rounds of random restarts. The ISSA hyperparameter optimization module encapsulates candidate hyperparameter combinations corresponding to the current global target individual and generates the target hyperparameter combination. Simultaneously, it encapsulates the optimization state record, including the global target fitness. The data includes stagnation count history, population diversity history, random restart count, snapshot of elite individual set, snapshot of reinitialized individual set, and hyperparameter search boundary data index.

[0089] In the implementation of the project, the training server uses the model training template data as the fitness evaluation object, and configures candidate hyperparameter combinations for individuals in multiple sparrow populations. When no effective fitness improvement is produced in several consecutive iterations, or when the positions of multiple individuals are concentrated in a small search area, the control module is randomly restarted to retain the elite individuals with high fitness ranking, and some non-elite individuals are reset within the search boundary. The target hyperparameter combination generated in this step is entered into S400, and the optimization status record is bound to the version index of the model training template data, and subsequently written into the model version record.

[0090] Table 1. Optimal Hyperparameter Configuration Obtained from ISSA Optimization

[0091] Under the aforementioned hyperparameter configuration, the improved ConvNeXt recognition model achieves target performance on the validation set. Experiments show that, compared to empirical hyperparameter tuning or grid search methods, the ISSA hyperparameter optimization method of this invention can quickly converge to the global target solution region in the continuous hyperparameter search space with fewer iterations. Furthermore, due to the introduction of a dual-state random restart mechanism based on stagnant states and population diversity states, it effectively avoids the problem of sparrow search algorithms getting stuck in local targets due to individual aggregation in the later stages of iteration.

[0092] S400. Train the target partial discharge identification model based on the target hyperparameter combination and the model training template data, and generate a model version record.

[0093] The model training module receives the target hyperparameter combination output by the S300. The model training module records the optimization state and receives the model training template data output by S200. It also reads the map sample state data generated by S100, obtaining the target grayscale PRPD map and category label corresponding to the training sample identifier, as well as the target grayscale PRPD map and category label corresponding to the verification sample identifier. After the target hyperparameter combination is encapsulated and passes hyperparameter boundary verification, the model training module will... The components of the learning rate are written into the model training template data as hyperparameters to be optimized: Write parameters to update configuration, weight decay Write regularization configuration, number of warm-up rounds Write the learning rate scheduling configuration, minimum learning rate Write the learning rate lower bound configuration, and the exponential moving average decay coefficient. Write weighted moving average configuration, random depth path drop rate The ConvNeXt training phase path discard configuration is written. If a hyperparameter is missing, the default value in the training task configuration is read and written to the default value source field in the model version record; if a hyperparameter exceeds the hyperparameter search boundary data, it is restored to the original value of the global target individual recorded by S300 and a boundary fallback marker is written. Subsequently, the model training module instantiates the attention-enhanced ConvNeXt recognition model template according to the model training template data. The partial discharge PRPD map in the training sample set is input into the model, and the stage feature map is generated after passing through the ConvNeXt input layer and the first feature extraction stage. Each stage feature map is sequentially processed by the channel attention submodule and the spatial attention submodule to generate a stage-enhanced feature map. , of which The output of the stage is ( The final stage enhances the feature map. Feature vectors are obtained through a feature pooling layer (global average pooling). The model training module calls the ArcFace classification constraint module: first, L2 normalization is performed on the feature vectors. For the category weight matrix Perform row normalization on each row Then calculate the normalized eigenvector and the first... Cosine similarity of class weight vectors Let the true category index be... Then, an additive angular interval is added to the angle of the target category. (radians), then scaled by a factor. Scaling is performed, and finally, the logits of all classes are fed into the cross-entropy loss. Equation 11 gives the expression for the ArcFace loss function:

[0094] in, The ArcFace loss value for a single sample is calculated using this formula; Natural logarithm function (base is 1) ); : The natural constant, approximately equal to 2.71828, appears in exponential functions; The scale parameter, typically 64, is derived from the ArcFace angular interval classification constraint data in the model structure configuration. : Cosine function, with angle (radians) as the independent variable; Feature vectors and true categories The angle between the weight vectors is determined by Received, among which Cosine similarity between the normalized feature vector and the true class weight vector; : Additive angular margin, typically 0.5, is derived from the ArcFace angular margin classification constraint data in the model structure configuration; : The total angle after adding the interval to the actual category's angle; : Summation symbol; Category index, value range to However, the summation conditions are limited. ; The true category index of the input sample is derived from the category label field in the graph sample state data; The total number of partial discharge categories is obtained by statistical analysis of the category label set; : Eigenvector and the first From the perspective of class weight vector, by get; Fraction bar: indicates the division of the numerator by the denominator; Exponential function :by Exponential operations with base 0; molecular: , which is the index term of the true category; Denominator: The sum of the exponents of the true category and the exponents of all other categories.

[0095] Data source mapping: Feature vectors are obtained through "model forward propagation". and category weight matrix Extracted from "Model Structure Configuration" and The true category is determined by the category label in the "map sample state data". Together, they form the input for formula ⑪.

[0096] The model training module performs backpropagation based on this loss, and schedules the learning rate according to the target hyperparameter combination (number of warm-up rounds). Postcosine annealing to minimum learning rate Update network weights and apply the exponential moving average decay factor. Maintain a weighted moving average. After each training epoch, calculate the validation loss, recognition error rate, and F1 score using the validation sample set, and write them to the training state record. When the training loss exhibits abnormal divergence, the model training module stops the current epoch, restores the model weights to the temporary weight cache of the previous epoch, and writes a training anomaly marker. If the input map dimensions do not match, regenerate the model input matrix using the S100 size normalization rule. If class labels are missing, move the corresponding samples to the verification set and remove them from the training index.

[0097] After training, the model training module solidifies the model structure, model weights, and classification layer parameters of the target partial discharge (PRPD) identification model and generates a model version record. The model version record includes a model version identifier, model structure configuration, convolutional block attention module embedding location, ArcFace angular interval classification constraint data, target hyperparameter combination, optimization state record index, training sample version, validation sample version, training timestamp, and training state record. In engineering implementation, the model training server reads the target hyperparameter combination output by S300, configures the attention-enhanced ConvNeXt identification model template according to this combination, and trains the model using GIS partial discharge PRPD atlas samples. After training, the server writes the target partial discharge identification model into the model library and the model version record into the version database. The target partial discharge identification model and model version record are then entered into S500. S500 calls the corresponding model weights and classification layer parameters based on the model version record to perform classification and identification of the PRPD atlas to be identified.

[0098] To verify the effectiveness of each technical module in this invention, ablation experiments were conducted on the five typical GIS partial discharge datasets. Five sets of comparative models were set up: M1 was the original ConvNeXt model without embedded convolutional block attention modules and using Softmax classification constraints; M2 was the ConvNeXt+CBAM model, which embeds convolutional block attention modules after each feature extraction stage of ConvNeXt based on M1; M3 was an improved ConvNeXt model based on M2, replacing Softmax classification constraints with ArcFace angular interval classification constraints; M4 was an SSA-improved ConvNeXt model, using the standard sparrow search algorithm to optimize the hyperparameters of M3; and M5 was the model described in this invention, i.e., using ISSA to optimize the hyperparameters of M3.

[0099] The performance comparison of the above models is shown in the table below: Table 2 Performance Comparison of Each Module in the Ablation Experiment

[0100] As shown in Table 2, the accuracy of M1 is 84.41%, indicating that although the original ConvNeXt uses a large convolutional kernel and a hierarchical structure, it lacks an effective screening mechanism for key discharge features, making it difficult to fully extract discriminative information from the PRPD map. After embedding the convolutional block attention module, the accuracy of M2 improved to 93.12%, an increase of 8.71 percentage points. This indicates that the channel attention submodule and spatial attention submodule respectively screen key features and locate discharge regions from the channel and spatial dimensions, enabling the model to adaptively highlight key discharge features in the map. After introducing ArcFace angular interval classification constraints, the accuracy of M3 further improved to 96.66%, an increase of 3.54 percentage points. This indicates that ArcFace, by introducing additive angular interval penalties in the angular space, expands the inter-class distance between feature vectors of different discharge types, enhancing the discriminative power of the features. After applying the standard sparrow search algorithm to optimize the hyperparameters of the improved ConvNeXt, M4 achieved an accuracy of 97.21%, an improvement of 0.55 percentage points, indicating that hyperparameter optimization can find parameter configurations with a higher degree of matching with data features. M5, the method described in this invention, further introduces a dual-state random restart mechanism based on stagnant states and population diversity states on the basis of the standard sparrow search algorithm, achieving an accuracy of 97.59%, an improvement of 0.38 percentage points compared to M4. This indicates that the random restart mechanism allows the population to escape the current search area when trapped in a local target or losing diversity, further improving the global search capability of hyperparameter optimization.

[0101] The ablation experiment data above fully demonstrates that the convolutional block attention module, ArcFace angular interval classification constraint, hyperparameter optimization based on the sparrow search algorithm, and the dual-state random restart mechanism described in this invention each make substantial technical contributions to the final recognition performance, and the combination of the modules produces a synergistic effect.

[0102] To further verify the overall superiority of the method described in this invention, a comparative experiment was conducted with typical recognition models in the prior art on the same dataset. The comparison models included traditional convolutional neural networks, ResNet18, ResNet50, ResNet101, and ResNet152. The performance comparison of each model is shown in the table below: Table 3 Performance comparison between the present invention and existing models

[0103] Table 3 shows that the accuracy of the traditional CNN model is 83.85%, indicating that due to the fixed receptive field of the convolutional kernel, traditional convolutional networks struggle to capture the long-range dependencies between discharge features scattered across different phase intervals in PRPD maps. Among the ResNet series models, ResNet50 achieves an accuracy of 86.64%, superior to ResNet18 (86.08%), ResNet101 (85.15%), and ResNet152 (85.71%). This demonstrates that in the task of partial discharge PRPD map recognition, model performance does not monotonically increase with network depth; excessively deep networks can introduce redundant parameters, weakening the ability to focus on key discharge features. The method described in this invention achieves an accuracy of 97.59%, representing a 10.95 percentage point improvement over the performance target-oriented ResNet50 (86.64%) and a 13.74 percentage point improvement over the traditional CNN (83.85%).

[0104] The comparative experimental data above demonstrate that the present invention achieves significant performance improvements through the synergistic effect of the following three technical means: First, embedding convolutional block attention modules after each feature extraction stage of ConvNeXt enables the model to adaptively filter key channels and locate discharge regions at different scales; second, configuring ArcFace angular interval classification constraints in the classification layer enhances the model's ability to discriminate features between similar discharge types; third, employing an improved sparrow search algorithm based on dual-state random restart to globally optimize hyperparameters, ensuring that the model obtains hyperparameter configurations highly matched to data features before training. The combined effect of these three technical means enables the present invention to achieve significantly superior recognition accuracy compared to existing technologies in the partial discharge PRPD map recognition task.

[0105] S500: Input the PRPD map to be identified into the target partial discharge identification model to generate partial discharge type identification results, identification confidence and identification records, and generate sample write-back records based on the identification records.

[0106] The partial discharge type identification module receives the target partial discharge identification model and model version record generated by S400, and receives the PRPD map to be identified already bound in S100. The PRPD map to be identified can come from the real-time acquisition results of the partial discharge online monitoring device, or from the samples to be verified in the historical map library. When the PRPD map to be identified comes from the online monitoring device, the map sample acquisition module generates the map status data to be identified according to the size normalization and map preprocessing rules of S100, and writes the identifier of the sample to be identified into the map sample status data; when it comes from the historical map library, if the preprocessing state is inconsistent with the model input configuration, the map preprocessing rules of S100 are called to regenerate the model input matrix.

[0107] After the target partial discharge (PRPD) identification model completes model version registration and the PRPD map to be identified completes input state construction, the partial discharge type identification module reads the model weights, ConvNeXt structure configuration, convolutional block attention module embedding position, and ArcFace angular interval classification constraint data according to the model version record, and inputs the PRPD map to be identified into the model. The PRPD map to be identified is enhanced through each feature extraction stage of ConvNeXt and the convolutional block attention module generation stage. The enhanced feature map in the last stage is then processed by the feature convergence layer to form the feature vector to be classified. The classification layer outputs a vector of class scores (logits). , of which Each component is (If ArcFace constraints are used) or directly output as a fully connected layer. The partial discharge type identification module converts logits into class probability values ​​using the Softmax function. The category corresponding to the highest probability is taken as the partial discharge type identification result, and this highest probability value is used as the identification confidence level. Formula 12 gives the calculation of the identification confidence level:

[0108] in, : Identify confidence level, value range The result is obtained by calculation using this formula; The maximum value function returns the maximum value in a set. Category index, value range to ; Total number of partial discharge categories, same as above; : Natural constant; : No. The logit values ​​for each category (output of the classification layer, without Softmax normalization) are obtained by forward propagation of the classification layer of the target partial discharge identification model. : Summation symbol; : Sum index, range of values to ; : No. Logit values ​​for each category; Fraction bar: The numerator is the first... The exponent of a class is the sum of the exponents of all classes, which is the Softmax function. :right Take the maximum value from the Softmax output.

[0109] Data source mapping: The logits vector is obtained through forward propagation of the "target partial discharge identification model". The probability is obtained by Softmax transformation, and then the maximum value is taken to obtain the result. .

[0110] The partial discharge type identification module writes the spectrum sample identifier, device identifier, model version identifier, partial discharge type field (the category with the highest probability), and category probability value into the partial discharge type identification result. The identification record generation module generates the identification result and identification confidence level. The model version identifier, the map sample identifier of the PRPD map to be identified, the acquisition timestamp, and the identification timestamp are written into the identification record. If the same map generates multiple identification results under multiple model versions, they are saved separately according to the model version identifier, and the record corresponding to the currently enabled model version is marked as the current identification record.

[0111] When generating sample write-back records based on identification records, the identification record generation module reads the identification confidence threshold and verification rules. If the identification confidence is lower than the identification confidence threshold, the identification record generation module generates a low-confidence verification mark and writes the PRPD map to be identified, the partial discharge type identification result, the identification confidence, and the model version identifier into the sample write-back record. If the manual verification result has been returned, the identification record generation module compares the verification label with the partial discharge type identification result. When the two are inconsistent, the verification label is written into the sample write-back record, and the original identification result is written into the model output field. For identification records without manual verification results, the identification record generation module retains the low-confidence verification mark and sets the record to a pending verification state.

[0112] In one implementation, after the sample write-back record is entered into the sample library, the spectrum sample acquisition module uses it as the input source for new spectrum sample status data. The sample write-back record includes spectrum sample identifier, device identifier, acquisition timestamp, path of the PRPD spectrum to be identified, model version identifier, partial discharge type identification result, identification confidence level, verification label, and write-back timestamp. If the sample write-back record contains a verification label, the spectrum sample acquisition module writes the verification label as a category label into the spectrum sample status data in the next round S100; if the sample write-back record only contains a low-confidence verification label, the spectrum sample acquisition module writes the record into the set of samples to be verified and does not participate in the next round of model training.

[0113] In another implementation, the identification record generation module also generates a model re-optimization trigger record based on the sample write-back records. Specifically, the identification record generation module counts the number of sample write-back records, the distribution of verification labels, and the distribution of low-confidence samples according to the model version identifier. When the number of sample write-back records under the same model version reaches a preset number, or when a set of low-confidence samples corresponding to a certain partial discharge type appears, the identification record generation module generates a model re-optimization trigger record. The model re-optimization trigger record includes the model version identifier, trigger timestamp, number of write-back samples, the partial discharge type involved, and the hyperparameter search boundary data index of the suggested call. This record enters S300 as one of the inputs for subsequent local re-optimization.

[0114] During project implementation, the GIS online monitoring platform receives a new partial discharge pattern (PRPD) map to be identified. The partial discharge type identification module reads the currently activated target partial discharge identification model and uses the structural configuration and weight parameters in the model version record for classification. The model outputs probability values ​​for the categories of tip discharge, air gap discharge, surface discharge, metal particle discharge, and suspended discharge. The partial discharge type identification module writes the category with the highest probability value into the partial discharge type identification result and writes the corresponding probability value into the identification confidence level. If the identification confidence level is lower than the identification confidence level threshold, the identification record generation module writes the map into the sample write-back record and adds a low confidence verification mark. After manual verification, the verification mark is written back to the sample library and re-bound to the PRPD map sample in the next round of S100. Through this processing link, the identification record, sample write-back record, and model re-optimization trigger record formed in S500 can enter the subsequent sample update and hyperparameter optimization process. The map sample status data, model training template data, target hyperparameter combinations, model version records, and identification records formed from S100 to S500 have a continuous data index relationship within the system.

[0115] In a preferred embodiment, the process of the identification record generation module triggering model re-optimization based on sample write-back records is as follows.

[0116] In an online monitoring scenario for a gas-insulated metal-enclosed switchgear, a target partial discharge (PRPD) identification model classifies a PRPD image and outputs the probability values ​​for five PRPD types: tip discharge 0.89, air gap discharge 0.07, surface discharge 0.02, metal particle discharge 0.01, and suspended discharge 0.01. The identification confidence level, i.e., the maximum category probability value, is 0.89. The identification record generation module reads a preset identification confidence threshold of 0.85. After comparison, it is determined that the identification confidence level of 0.89 is not lower than the threshold of 0.85. Therefore, the identification record generation module directly outputs the tip discharge identification result without generating a low-confidence verification mark, and this identification result is stored in the identification record.

[0117] In another scenario, another PRPD image to be identified, after being processed by the target partial discharge identification model, outputs the following category probability values: tip discharge 0.52, air gap discharge 0.31, surface discharge 0.09, metal particle discharge 0.05, and suspended discharge 0.03, with an identification confidence level of 0.52. Since the identification confidence level of 0.52 is lower than the preset identification confidence level threshold of 0.85, the identification record generation module generates a low-confidence verification marker based on this, and writes the image sample identifier, device identifier, acquisition timestamp, model version identifier, partial discharge type identification result (tip discharge), and identification confidence level (0.52) of the PRPD image to be identified into the sample write-back record, while simultaneously setting this record to a pending verification state.

[0118] During the manual review phase, maintenance personnel, based on the actual waveform characteristics and phase distribution of the PRPD spectrum, confirmed that the actual type of partial discharge was air gap discharge. After receiving the manual review result, the identification record generation module compared the review label "air gap discharge" with the original partial discharge type identification result "tip discharge". If they did not match, the identification record generation module wrote the review label into the review label field of the sample write-back record, while retaining the original identification result and identification confidence level, and updating the label of the sample write-back record from "pending review" to "reviewed".

[0119] When the next round of model training begins, the map sample acquisition module reads the verification label from the sample write-back record and rewrites it into the map sample state data as a new category label for the PRPD map, thus converting the map from "samples to be identified" to "labeled training samples". When the number of accumulated verified sample write-back records under the same model version reaches a preset threshold (e.g., 50 records), or when the number of low-confidence samples corresponding to a specific partial discharge type increases intensively, the identification record generation module generates a model re-optimization trigger record. This trigger record includes the model version identifier, trigger timestamp, number of write-back samples, the partial discharge type involved, and hyperparameter search boundary data index. The model re-optimization trigger record enters S300 as input for subsequent local re-optimization, triggering a new round of ISSA hyperparameter optimization process to achieve continuous evolution of model performance.

[0120] This embodiment fully demonstrates the closed-loop processing chain from identification output, low confidence judgment, sample write-back, manual review to model retraining and re-optimization, verifying the feasibility and effectiveness of the identification recording and sample write-back mechanism described in this invention in actual engineering scenarios.

[0121] Example 2: Figure 2 A block diagram of an attention-enhanced partial discharge recognition system based on an improved optimization algorithm according to an embodiment of the present invention is shown. Figure 2 As shown, the structure may include: The spectral sample acquisition module 01 is used to receive partial discharge PRPD spectral samples, category labels, PRPD spectrals to be identified, and hyperparameter search space. It performs spectral sample binding and size normalization on the partial discharge PRPD spectral samples to generate spectral sample state data and hyperparameter search boundary data. Specifically, the spectral sample acquisition module receives partial discharge PRPD spectral samples from partial discharge detectors, historical spectral libraries, or manually labeled sample libraries, and receives the category labels corresponding to the partial discharge PRPD spectral samples. The partial discharge PRPD spectral samples are organized according to phase and amplitude intervals, and the matrix elements in the spectral correspond to pulse frequencies or discharge densities. The spectral sample acquisition module reads the spectral size, spectral channels, acquisition timestamp, and device identifier of the PRPD spectral to be identified, and binds the partial discharge PRPD spectral sample with the spectral sample identifier, device identifier, acquisition timestamp, category label, and sample usage identifier. The sample usage identifier includes training sample identifier, verification sample identifier, and sample identifier to be identified. The atlas sample acquisition module performs size normalization processing on the partial discharge PRPD atlas samples, mapping PRPD atlases of different sizes to atlas matrices with the same size as the model input. When atlas size is missing or phase interval is incomplete, the atlas sample acquisition module writes an atlas format anomaly marker and retains the original atlas path and category label. The atlas sample acquisition module receives the hyperparameter search space and writes the value boundaries of learning rate, weight decay, number of warm-up rounds, minimum learning rate, exponential moving average decay coefficient, and random depth path drop-off rate into the hyperparameter search boundary data. The atlas sample acquisition module provides the atlas sample state data to the model structure construction module and the hyperparameter search boundary data to the ISSA hyperparameter optimization module.

[0122] The model structure construction module 02, connected to the atlas sample acquisition module, is used to construct an attention-enhanced ConvNeXt recognition model template based on the atlas sample state data. It embeds a convolutional block attention module after each feature extraction stage of ConvNeXt and configures ArcFace angular interval classification constraints to generate model training template data. Specifically, the model structure construction module receives atlas sample state data from the atlas sample acquisition module, reads the atlas size, category label, training sample identifier, and validation sample identifier, and configures the input layer, feature extraction stage, and classification layer of the attention-enhanced ConvNeXt recognition model template accordingly. The model structure construction module establishes a stage index according to the sequence of ConvNeXt feature extraction stages and embeds a convolutional block attention module after each feature extraction stage. The convolutional block attention module includes a cascaded channel attention submodule and a spatial attention submodule. The channel attention submodule receives the stage feature map output from the feature extraction stage, performs global average pooling and global max pooling on the stage feature map to generate channel statistical features, and generates channel attention weights. The spatial attention submodule receives the channel-weighted stage feature map, performs channel-dimensional average pooling and max pooling on the channel-weighted stage feature map to generate spatial statistical features, and generates spatial attention weights. The spatial attention weights are multiplied with the channel-weighted stage feature map to form a stage enhancement feature map. The model structure construction module configures ArcFace angular interval classification constraints in the classification layer, performs feature normalization on the feature vectors, performs class weight normalization on the class weights, and records the processing relationship between the target class angle and the additive angular interval. The model structure construction module encapsulates the ConvNeXt backbone structure, the embedding position of the convolutional block attention module, the stage enhancement feature map generation rules, the ArcFace angular interval classification constraints, and the hyperparameters to be optimized into model training template data, and passes the model training template data to the ISSA hyperparameter optimization module and the model training module.

[0123] The ISSA hyperparameter optimization module 03, connected to the model structure construction module and the map sample acquisition module, is used to encode candidate hyperparameter combinations into sparrow population individuals based on the model training template data and the hyperparameter search boundary data. It calculates the individual fitness and triggers random restarts according to states where the global target fitness has not been effectively improved and where population diversity is below a threshold, generating target hyperparameter combinations and optimization state records. Specifically, the ISSA hyperparameter optimization module receives model training template data from the model structure construction module and hyperparameter search boundary data from the map sample acquisition module. The model training template data provides the model structure called for fitness calculation and ArcFace angular interval classification constraints, while the hyperparameter search boundary data provides the value range of candidate hyperparameter combinations. The ISSA hyperparameter optimization module initializes multiple sparrow population individuals according to the hyperparameter search boundary data, with each sparrow population individual corresponding to a candidate hyperparameter combination. The candidate hyperparameter combination includes one or more of the following: learning rate, weight decay, number of warm-up rounds, minimum learning rate, exponential moving average decay coefficient, and random deep path dropout rate. The ISSA hyperparameter optimization module writes candidate hyperparameter combinations into the model training template data, performs temporary training on the partial discharge PRPD map samples corresponding to the training sample identifiers, and performs model validation on the partial discharge PRPD map samples corresponding to the validation sample identifiers. The ISSA hyperparameter optimization module generates individual fitness based on the validation set accuracy. During the iteration process, the ISSA hyperparameter optimization module records the global target fitness; when the global target fitness does not meet the effective improvement threshold within the consecutive stagnation number threshold, it generates stagnation state data. The ISSA hyperparameter optimization module calculates the location dispersion state of sparrow population individuals; when the population diversity index is lower than the population diversity threshold, it generates population diversity state data. Based on the stagnation state data or the population diversity state data, the ISSA hyperparameter optimization module retains the elite individual set and reinitializes some sparrow population individuals in the non-elite individual set within the hyperparameter search boundary data. The ISSA hyperparameter optimization module encapsulates the candidate hyperparameter combinations corresponding to the final global historical individuals into target hyperparameter combinations, and encapsulates the global target fitness, stagnation state data, population diversity state data, random restart state data, and elite individual set into optimization state records; the target hyperparameter combinations and the optimization state records are passed to the model training module.

[0124] Model training module 04, connected to the ISSA hyperparameter optimization module and the model structure construction module, is used to train a target partial discharge recognition model based on the target hyperparameter combination and the model training template data, and generate a model version record. Specifically, the model training module receives the target hyperparameter combination and optimization status record from the ISSA hyperparameter optimization module, and receives the model training template data from the model structure construction module. The model training module writes the target hyperparameter combination into the hyperparameter items to be optimized in the model training template data; wherein, the learning rate is written into the parameter update configuration, the weight decay is written into the regularization configuration, the number of warm-up rounds is written into the learning rate scheduling configuration, the minimum learning rate is written into the learning rate lower bound configuration, the exponential moving average decay coefficient is written into the weight moving average configuration, and the random deep path drop rate is written into the path drop configuration of the ConvNeXt training stage. The model training module instantiates the attention-enhanced ConvNeXt recognition model template according to the model training template data, and calls the partial discharge PRPD atlas samples and category labels corresponding to the training sample identifiers in the atlas sample state data for model training. During training, the partial discharge PRPD atlas samples sequentially pass through multiple feature extraction stages and convolutional block attention modules of ConvNeXt to generate stage-enhanced feature maps, and generate training loss through ArcFace angular interval classification constraints. The model training module performs parameter updates based on the training loss and calls the validation sample set according to the validation sample identifier to generate training state records. When the training loss is abnormal or the atlas size is mismatched, the model training module restores the model weight cache of the previous round, or calls the size normalization processing in the atlas sample acquisition module to generate the model input matrix. After training, the model training module solidifies the model structure, model weights, and classification layer parameters of the target partial discharge recognition model, and generates a model version record. The model version record includes a model version identifier, model training template data index, target hyperparameter combination, optimization state record index, training sample version, validation sample version, and training timestamp. The model training module provides the target partial discharge identification model and the model version record to the partial discharge type identification module.

[0125] The partial discharge type identification module 05, connected to the model training module and the map sample acquisition module, is used to input the PRPD map to be identified into the target partial discharge identification model to generate a partial discharge type identification result, identification confidence level, and identification record. Specifically, the partial discharge type identification module receives the target partial discharge identification model and model version record from the model training module, and receives the PRPD map to be identified from the map sample acquisition module. The partial discharge type identification module reads the model weights, model structure configuration, convolutional block attention module embedding position, and ArcFace angular interval classification constraints according to the model version record, and inputs the PRPD map to be identified into the target partial discharge identification model. The PRPD map to be identified is processed through multiple feature extraction stages of ConvNeXt to generate stage feature maps; the stage feature maps are processed through the convolutional block attention module to generate stage enhancement feature maps; the last stage enhancement feature map is processed through feature convergence and classification layers to generate category probability values. The partial discharge type identification module writes the partial discharge type corresponding to the category probability value into the partial discharge type identification result, and writes the category probability value into the identification confidence level. The partial discharge type identification module encapsulates the spectrum sample identifier, device identifier, model version identifier, partial discharge type identification result, identification confidence level, category probability value, acquisition timestamp, and identification timestamp into an identification record. If the size normalization state of the PRPD spectrum to be identified is inconsistent with the input configuration in the model version record, the partial discharge type identification module calls the spectrum sample acquisition module to regenerate the model input matrix and writes the regenerated state into the identification record. The partial discharge type identification module provides the identification record to the identification record generation module.

[0126] The identification record generation module 06, connected to the partial discharge type identification module, is used to generate a sample write-back record based on the identification record. Specifically, the identification record generation module receives the identification record from the partial discharge type identification module and reads the identification confidence threshold and verification rules. The identification record generation module performs field matching based on the identification confidence in the identification record and the identification confidence threshold; when the identification confidence is lower than the identification confidence threshold, the identification record generation module generates a low-confidence verification mark and writes the PRPD map to be identified, the partial discharge type identification result, the identification confidence, and the model version identifier into the sample write-back record. When the identification record generation module receives the manual verification result, it compares the verification label with the partial discharge type identification result; when the verification label is inconsistent with the partial discharge type identification result, the identification record generation module writes the verification label into the sample write-back record and retains the original partial discharge type identification result and the corresponding identification confidence. The sample write-back record includes a spectrum sample identifier, device identifier, acquisition timestamp, path of the PRPD spectrum to be identified, model version identifier, partial discharge type identification result, identification confidence level, verification label, and write-back timestamp. The identification record generation module returns the sample write-back record to the spectrum sample acquisition module, so that the spectrum sample acquisition module can rebind the verification label to the PRPD spectrum to be identified in subsequent processing; the identification record generation module also saves the index relationship between the identification record and the sample write-back record.

Claims

1. A method for identifying attention-enhanced partial discharges based on an improved optimization algorithm, characterized in that, include: S100: Receive partial discharge PRPD map samples, category labels, PRPD maps to be identified, and hyperparameter search space; perform map sample binding and size normalization processing on the partial discharge PRPD map samples to generate map sample state data and hyperparameter search boundary data. S200. Construct an attention-enhanced ConvNeXt recognition model template based on the map sample state data, embed a convolutional block attention module after each feature extraction stage of ConvNeXt, configure ArcFace angular interval classification constraints, and generate model training template data. S300. Based on the model training template data and the hyperparameter search boundary data, the candidate hyperparameter combinations are encoded as sparrow population individuals, the individual fitness is calculated, and random restarts are triggered according to the state where the global fitness has not been effectively improved and the state where the population diversity is lower than the threshold, thereby generating the target hyperparameter combination and the optimization state record. S400. Train the target partial discharge identification model based on the target hyperparameter combination and the model training template data, and generate a model version record; S500: Input the PRPD map to be identified into the target partial discharge identification model to generate partial discharge type identification results, identification confidence and identification records, and generate sample write-back records based on the identification records.

2. The method according to claim 1, characterized in that, The spectrum sample status data includes spectrum sample identifier, device identifier, acquisition timestamp, phase range, amplitude range, pulse frequency, category label, and sample purpose identifier; the sample purpose identifier includes training sample identifier, verification sample identifier, and sample identifier to be identified.

3. The method according to claim 1, characterized in that, S100 includes performing spectral preprocessing on the partial discharge PRPD spectral sample: performing grayscale processing on the partial discharge PRPD spectral sample to determine the target grayscale PRPD spectral.

4. The method according to claim 1, characterized in that, The convolutional block attention module in S200 includes a cascaded channel attention submodule and a spatial attention submodule; the channel attention submodule receives the stage feature map output by the feature extraction stage of ConvNeXt and generates channel attention weights; The spatial attention submodule receives the stage feature map after channel weighting, generates spatial attention weights, and generates a stage enhancement feature map.

5. The method according to claim 4, characterized in that, The channel attention submodule performs global average pooling and global max pooling on the stage feature map to generate channel statistical features; The channel statistical features are subjected to shared network mapping and normalization to generate the channel attention weights; the channel attention weights are multiplied with the stage feature map channel by channel to generate the channel-weighted stage feature map.

6. The method according to claim 4, characterized in that, The spatial attention submodule performs average pooling and max pooling on the channel-weighted stage feature map in the channel dimension to generate spatial statistical features. The spatial statistical features are concatenated and convolved to generate the spatial attention weights; The spatial attention weights are multiplied by the channel-weighted stage feature map to generate the stage-enhanced feature map.

7. The method according to claim 1, characterized in that, The configuration of ArcFace angular interval classification constraints in S200 includes: normalizing the feature vector output by the attention-enhanced ConvNeXt recognition model template; normalizing the class weights; calculating the target class angle between the normalized feature vector and the normalized class weights; and adding an additive angular interval to the target class angle to generate angular interval classification constraint data.

8. The method according to claim 1, characterized in that, The candidate hyperparameter combination mentioned in S300 includes one or more of the following: learning rate, weight decay, number of warm-up rounds, minimum learning rate, exponential moving average decay coefficient, and random deep path drop-off rate; the individual fitness is generated based on one or more of the following: validation set loss, recognition error rate, and F1 score corresponding to the validation sample set; the optimization state record includes global target fitness, stagnation state data, population diversity state data, random restart state data, and elite individual set.

9. The method according to claim 1, characterized in that, Triggering a random restart in S300 includes: generating stagnation state data when the global target fitness does not meet the effective improvement threshold within the consecutive stagnation number threshold; generating population diversity state data when the population diversity index is lower than the population diversity threshold; and based on the stagnation state data or the population diversity state data, retaining the elite individual set and reinitializing some sparrow population individuals in the non-elite individual set within the hyperparameter search boundary data.

10. An attention-enhanced partial discharge recognition system based on an improved optimization algorithm, characterized in that, include: The module includes a spectrum sample acquisition module, a model structure construction module, an ISSA hyperparameter optimization module, a model training module, a partial discharge type identification module, and an identification record generation module. The system is used to implement the method described in any one of claims 1-9.