A series arc fault detection method and device based on a three-domain dynamic attention prototype learning model, equipment and medium

CN122548632APending Publication Date: 2026-08-11GUANGDONG POWER GRID CO LTD DONGGUAN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-21
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

其中,现有模型多为端到端“黑盒”结构,故障特征提取过程不可解释、决策依据不直观;同时,多数方法仅针对单一负载训练优化,难以适配住宅环境中多样化、动态变化的负载条件,在多负载复杂场景下泛化能力差,易出现误报与漏报

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122548632A_ABST
    Figure CN122548632A_ABST
Patent Text Reader

Abstract

This invention relates to the field of power fault detection technology, and discloses a method, device, equipment, and medium for detecting series arc faults based on a three-domain dynamic attention prototype learning model. The method includes: acquiring the original current signal in the circuit to be detected, and generating three-domain input data through preprocessing; inputting the three-domain input data into a pre-constructed three-domain dynamic attention convolutional neural network model for feature extraction to obtain high-dimensional feature vectors for each domain; fusing the high-dimensional feature vectors of each domain and mapping them to a three-dimensional prototype feature space to generate corresponding test sample points; and determining whether a series arc fault exists based on the positional relationship between the test sample points and the decision boundary of a preset arc fault prototype set in the three-dimensional prototype feature space. This effectively improves the interpretability and generalization ability of the detection model, can adapt to various dynamic load scenarios, enhances the fault feature representation ability and detection stability, and reduces the probability of false positives and false negatives.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power fault detection technology, and in particular to a method, apparatus, equipment and medium for detecting series arc faults based on a three-domain dynamic attention prototype learning model. Background Technology

[0002] Low-voltage AC series arc faults are a major cause of electrical fires, seriously threatening personal and property safety. While current deep learning-based arc fault detection methods can achieve high detection accuracy, they generally suffer from significant drawbacks. Existing models are mostly end-to-end "black box" structures, with uninterpretable fault feature extraction processes and unintuitive decision-making criteria. Furthermore, most methods are trained and optimized only for single loads, making it difficult to adapt to the diverse and dynamically changing load conditions in residential environments. They exhibit poor generalization ability in complex multi-load scenarios, leading to both false positives and false negatives.

[0003] Therefore, improvements to existing technologies are necessary. Summary of the Invention

[0004] This invention provides a method, apparatus, device, and medium for detecting serial arc faults based on a three-domain dynamic attention prototype learning model, in order to solve the problems existing in the prior art.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] A method for detecting serial arc faults based on a three-domain dynamic attention prototype learning model includes the following steps:

[0007] The original current signal in the circuit under test is acquired, and three-domain input data is generated through preprocessing. The three-domain input data includes time-domain waveform signal, frequency-domain distribution signal, and time-domain rate of change signal.

[0008] The three-domain input data are respectively input into a pre-constructed three-domain dynamic attention convolutional neural network model for feature extraction to obtain high-dimensional feature vectors for each domain; the three-domain dynamic attention convolutional neural network model includes a three-domain dynamic attention module, which is used to obtain attention weights by fusing a static identity matrix, a dynamic convolution weight matrix and a trainable offset matrix, and to dynamically weight and modulate the input features using the attention weights;

[0009] The high-dimensional feature vectors of each domain are fused and mapped to a three-dimensional prototype feature space to generate the corresponding test sample points.

[0010] Based on the positional relationship between the test sample point and the decision boundary of the preset arc fault prototype set in the three-dimensional prototype feature space, it is determined whether a series arc fault exists.

[0011] Optionally, the step of generating three-domain input data through preprocessing includes:

[0012] The original current signal is truncated using a sliding window of preset length to obtain multiple current signal samples;

[0013] The current signal samples are standardized to eliminate the dimensional differences in signals under different power loads.

[0014] Optionally, in the step of inputting the three-domain input data into a pre-constructed three-domain dynamic attention convolutional neural network model for feature extraction, and obtaining the high-dimensional feature vectors of each domain, the attention weights of the three-domain dynamic attention module are fused in the following manner:

[0015] ;

[0016] in, It is a static identity matrix used to provide stable initial priors; This is a dynamic convolution weight matrix used to adapt to load feature drift; α is a trainable offset matrix used to model nonlinear interactions between channels; α and β are learnable weighting coefficients.

[0017] Optionally, in the step of inputting the three-domain input data into a pre-constructed three-domain dynamic attention convolutional neural network model for feature extraction to obtain high-dimensional feature vectors for each domain, the three-domain dynamic attention convolutional neural network model includes the following feature extraction branches:

[0018] The temporal branch is used to extract temporal waveform distortion features based on a one-dimensional convolutional layer and a three-domain dynamic attention module.

[0019] The frequency domain branch is used to extract high-frequency harmonic features in the frequency domain based on a one-dimensional convolutional layer and a three-domain dynamic attention module.

[0020] The rate of change branch is used to extract transient current change features based on a one-dimensional convolutional layer, a three-domain dynamic attention module, and a gated linear unit (GLU).

[0021] Optionally, the step of fusing the high-dimensional feature vectors from each domain and mapping them to a three-dimensional prototype feature space to generate corresponding test sample points includes:

[0022] The high-dimensional feature vectors of each domain are sequentially passed through a global average pooling layer for dimensionality reduction and a fully connected layer for mapping, generating test sample points in the three-dimensional prototype feature space.

[0023] Optionally, the following steps are performed: Before determining whether a series arc fault exists based on the positional relationship between the test sample point and the decision boundary of the preset arc fault prototype set in the three-dimensional prototype feature space, arc fault prototype set boundary correction is also included.

[0024] The boundary correction of the arc fault prototype set includes:

[0025] A preliminary set of arc fault prototypes and a set of non-arc prototypes are constructed in a three-dimensional prototype feature space.

[0026] An improved convex hull algorithm is used to delineate the geometric boundaries of the two prototype sets and identify their overlapping regions.

[0027] The corrected decision boundary is obtained by removing points corresponding to overlapping areas from the initial arc fault prototype set.

[0028] Optionally, the improved convex hull algorithm includes:

[0029] Randomly select n boundary points as the initial vertex set V;

[0030] During the iteration process, the initial vertex set V is pre-expanded and its boundaries are corrected based on the convex hull volume increment of new points in the search space.

[0031] Convergence is determined by the rate of volume change before and after vertex correction, and boundary fitting is completed.

[0032] This invention also provides a series arc fault detection device based on a three-domain dynamic attention prototype learning model, used to implement the series arc fault detection method based on the three-domain dynamic attention prototype learning model as described in any of the preceding claims, comprising:

[0033] The data acquisition unit is used to acquire the raw current signal in the circuit under test;

[0034] The preprocessing unit is used to generate three-domain input data through preprocessing; the three-domain input data includes time-domain waveform signal, frequency-domain distribution signal, and time-domain rate of change signal.

[0035] The feature extraction and mapping unit is used to input the three-domain input data into a pre-constructed three-domain dynamic attention convolutional neural network model for feature extraction, obtaining high-dimensional feature vectors for each domain; and to fuse the high-dimensional feature vectors of each domain and map them to a three-dimensional prototype feature space to generate corresponding test sample points; the three-domain dynamic attention convolutional neural network model includes a three-domain dynamic attention module, which is used to obtain attention weights by fusing a static identity matrix, a dynamic convolution weight matrix, and a trainable offset matrix, and to dynamically weight and modulate the input features using the attention weights;

[0036] The fault determination unit is used to determine whether a series arc fault exists based on the positional relationship between the test sample point and the decision boundary of the preset arc fault prototype set in the three-dimensional prototype feature space.

[0037] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the serial arc fault detection method based on the three-domain dynamic attention prototype learning model as described in any of the preceding claims.

[0038] The present invention also provides a computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the serial arc fault detection method based on a three-domain dynamic attention prototype learning model as described in any of the preceding claims.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] This invention provides a series arc fault detection method, device, equipment, and medium based on a three-domain dynamic attention prototype learning model. It achieves comprehensive and accurate fault feature extraction through three-domain signal input and a three-domain dynamic attention module. Combined with prototype mapping and decision boundary judgment, it completes arc fault detection, effectively improving the interpretability and generalization ability of the detection model. It can adapt to various dynamic load scenarios, enhance the fault feature representation ability and detection stability, and reduce the probability of false positives and false negatives.

[0041] The present invention has other features and advantages, which will be apparent from or will be set forth in detail in the accompanying drawings and the following detailed description, which together serve to explain the particular principles of the invention. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0043] Figure 1 This is a flowchart of a serial arc fault detection method based on a three-domain dynamic attention prototype learning model provided in an embodiment of the present invention;

[0044] Figure 2 This is a flowchart of step S1 in a serial arc fault detection method based on a three-domain dynamic attention prototype learning model provided in an embodiment of the present invention;

[0045] Figure 3 This is a flowchart of step S3 in a serial arc fault detection method based on a three-domain dynamic attention prototype learning model provided in an embodiment of the present invention;

[0046] Figure 4 This is a schematic diagram of the attention mechanism principle in a series arc fault detection method based on a three-domain dynamic attention prototype learning model provided in an embodiment of the present invention;

[0047] Figure 5 This is a schematic diagram of the three-domain dynamic attention (TDDA) module structure in a serial arc fault detection method based on a three-domain dynamic attention prototype learning model provided in an embodiment of the present invention.

[0048] Figure 6 This is a schematic diagram of the overall architecture of the TDDA-CNN prototype learning model in a serial arc fault detection method based on a three-domain dynamic attention prototype learning model provided in an embodiment of the present invention.

[0049] Figure 7 This invention relates to a series arc fault detection method based on a three-domain dynamic attention prototype learning model, as provided in an embodiment of the present invention. The training and validation learning curves of the model;

[0050] Figure 8 In the series arc fault detection method based on a three-domain dynamic attention prototype learning model provided by the embodiments of the present invention, the fault arc prototype set exhibits obvious clustering feature maps in three-dimensional space under different loads. Detailed Implementation

[0051] To illustrate the possible application scenarios, technical principles, implementable specific solutions, and achievable objectives and effects of this invention in detail, the following description, in conjunction with the listed specific embodiments and accompanying drawings, provides a detailed explanation. The embodiments described herein are merely illustrative of the technical solutions of this invention and are therefore intended only as examples, not as limiting the scope of protection of this invention.

[0052] In this document, the term "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The term "embodiment" appearing in various places throughout the specification does not necessarily refer to the same embodiment, nor does it specifically limit its independence or connection with other embodiments. In principle, in this invention, as long as there are no technical contradictions or conflicts, the technical features mentioned in each embodiment can be combined in any way to form corresponding implementable technical solutions.

[0053] Unless otherwise defined, the technical terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains; the use of related terms herein is merely for the purpose of describing particular embodiments and is not intended to limit the invention.

[0054] In the description of this invention, the term "and / or" is used to describe the logical relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A exists, B exists, and A and B exist simultaneously. Additionally, the character " / " generally indicates that the preceding and following objects have an "or" logical relationship.

[0055] In this invention, terms such as “first” and “second” are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any actual quantity, hierarchy, or order between these entities or operations.

[0056] Without further limitations, the use of terms such as “comprising,” “including,” “having,” or other similar expressions in this invention is intended to cover non-exclusive inclusion, which does not exclude the presence of additional elements in a process, method, or product that includes the stated elements, such that a process, method, or product that includes a list of elements may include not only those defined elements but also other elements not expressly listed, or elements inherent to such a process, method, or product.

[0057] Similar to the understanding in the Examination Guidelines, in this invention, expressions such as "greater than," "less than," and "exceeding" are understood to exclude the stated number; expressions such as "above," "below," and "within" are understood to include the stated number. Furthermore, in the description of the embodiments of this invention, "multiple" means two or more (including two), and similar expressions related to "multiple" are also understood in this way, such as "multiple groups" and "multiple times," unless otherwise explicitly specified.

[0058] In the description of the embodiments of the present invention, the spatial related expressions used, such as "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "vertical," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," "circumferential," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the specific embodiments or drawings. They are only for the purpose of describing the specific embodiments of the present invention or for the reader's understanding, and do not indicate or imply that the device or component referred to must have a specific position, a specific orientation, or be constructed or operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of the present invention.

[0059] Unless otherwise explicitly stated or limited, the terms "installation," "connection," "linking," "fixing," and "setting," as used in the description of the embodiments of this invention, should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral arrangement; it can be a mechanical connection, an electrical connection, or a communication connection; it can be a direct connection or an indirect connection through an intermediate medium; it can be the internal connection of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in the embodiments of this invention according to the specific circumstances.

[0060] Low-voltage AC series arc faults are a major cause of electrical fires, posing a significant risk to life and property. While AI-based detection methods have achieved high accuracy, their interpretability is often limited, and they are typically tailored to specific loads, making them difficult to adapt to the diverse and dynamic load conditions in residential environments. To address these limitations, this invention proposes a novel interpretable arc fault detection model based on prototype learning and a hybrid attention mechanism.

[0061] The technical solutions provided by the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0062] like Figure 1 As shown in the figure, this invention discloses a series arc fault detection method based on a three-domain dynamic attention prototype learning model, including data preprocessing, feature extraction, prototype mapping, prototype set boundary correction and fault determination steps, which can achieve high-precision, high-interpretability and high-generalization detection of low-voltage AC series arc faults.

[0063] Specifically, the method includes:

[0064] S1. Acquire the original current signal in the circuit to be tested, and generate three-domain input data through preprocessing; the three-domain input data includes time-domain waveform signal, frequency-domain distribution signal and time-domain rate of change signal.

[0065] S2. Input the three-domain input data into the pre-built three-domain dynamic attention convolutional neural network model to extract features and obtain high-dimensional feature vectors for each domain.

[0066] S3. Fuse the high-dimensional feature vectors of each domain and map them to the three-dimensional prototype feature space to generate the corresponding test sample points;

[0067] S4. Based on the positional relationship between the test sample point and the decision boundary of the preset arc fault prototype set in the three-dimensional prototype feature space, determine whether a series arc fault exists.

[0068] In the aforementioned steps, specifically, the three-domain dynamic attention convolutional neural network model includes a three-domain dynamic attention module. The three-domain dynamic attention module is used to obtain attention weights by fusing a static identity matrix, a dynamic convolution weight matrix, and a trainable offset matrix, and to dynamically weight and modulate the input features using the attention weights.

[0069] Understandably, an interpretable arc fault detection model is built upon prototype learning and a hybrid attention mechanism. Since prototype learning falls under the category of metric learning, its core is to learn representative prototypes for each category and classify based on the distance between the query sample and each type of prototype. It maps input data to a low-dimensional space through an embedding function, where similar samples cluster around their corresponding prototypes, while different types of prototypes are separated. This approach features rapid modeling with small sample sizes, high computational efficiency, strong interpretability, and excellent generalization ability, effectively solving the classification challenge in scenarios with scarce fault data. Furthermore, this embodiment achieves comprehensive and accurate fault feature extraction through three-domain signal input and a three-domain dynamic attention module. Combined with prototype mapping and decision boundary judgment, arc fault detection is completed, effectively improving the interpretability and generalization ability of the detection model. It can adapt to diverse dynamic load scenarios, enhance fault feature representation capabilities and detection stability, and reduce the probability of false positives and false negatives.

[0070] Please refer to Figure 2 In some optional implementations of this embodiment, three-domain input data is generated through preprocessing, including:

[0071] S11. The original current signal is truncated using a sliding window of preset length to obtain multiple current signal samples;

[0072] S12. Standardize the current signal samples to eliminate the dimensional differences of the signals under different power loads.

[0073] In the aforementioned steps, the differences in signal dimensions under different loads are eliminated by sliding window truncation and standardized preprocessing, ensuring the consistency of input data and improving the model's adaptability to different power loads.

[0074] In some optional implementations of this embodiment, the three-domain input data are respectively input into a pre-built three-domain dynamic attention convolutional neural network model for feature extraction, and the attention weights of the three-domain dynamic attention modules are fused in the high-dimensional feature vectors of each domain as follows:

[0075] ;

[0076] in, It is a static identity matrix used to provide stable initial priors; This is a dynamic convolution weight matrix used to adapt to load feature drift; α is a trainable offset matrix used to model nonlinear interactions between channels; α and β are learnable weighting coefficients.

[0077] Understandably, by integrating the attention weight generation method with the static identity matrix, dynamic convolution weight matrix, and trainable offset matrix, the system takes into account physical priors, dynamic adaptation, and nonlinear modeling capabilities, thereby enhancing the robustness and adaptability of feature extraction.

[0078] In some optional implementations of this embodiment, the three-domain input data are respectively input into a pre-constructed three-domain dynamic attention convolutional neural network model for feature extraction, resulting in high-dimensional feature vectors for each domain. The three-domain dynamic attention convolutional neural network model includes the following feature extraction branches:

[0079] The temporal branch is used to extract temporal waveform distortion features based on a one-dimensional convolutional layer and a three-domain dynamic attention module.

[0080] The frequency domain branch is used to extract high-frequency harmonic features in the frequency domain based on a one-dimensional convolutional layer and a three-domain dynamic attention module.

[0081] The rate of change branch is used to extract transient current change features based on a one-dimensional convolutional layer, a three-domain dynamic attention module, and a gated linear unit (GLU).

[0082] In this embodiment, by constructing three parallel feature extraction branches (time domain, frequency domain, and rate of change), modeling waveform distortion, high-frequency harmonics, and transient changes respectively, the model's ability to comprehensively capture multi-dimensional features of arc faults is improved.

[0083] In some optional implementations of this embodiment, fusing the high-dimensional feature vectors of each domain and mapping them to a three-dimensional prototype feature space to generate corresponding test sample points includes: sequentially passing the high-dimensional feature vectors of each domain through a global average pooling layer for dimensionality reduction and mapping through a fully connected layer to generate test sample points in the three-dimensional prototype feature space.

[0084] By fusing multi-domain features and mapping them to a three-dimensional prototype space through global average pooling and fully connected layers, a low-dimensional visualization of high-dimensional features is achieved, enhancing the intuitiveness and interpretability of fault diagnosis.

[0085] In some optional implementations of this embodiment, before performing the step of determining whether a series arc fault exists based on the positional relationship between the test sample point and the decision boundary of the preset arc fault prototype set in the three-dimensional prototype feature space, the step of arc fault prototype set boundary correction is also included.

[0086] Please refer to Figure 3 Specifically, the boundary correction of the arc fault prototype set includes:

[0087] S31. Construct a preliminary set of arc fault prototypes and a set of non-arc prototypes in the three-dimensional prototype feature space;

[0088] S32. Use the improved convex hull algorithm to delineate the geometric boundaries of the two prototype sets respectively, and identify the overlapping areas of the two sets.

[0089] S33. Remove the points corresponding to the overlapping areas from the initial arc fault prototype set to obtain the corrected decision boundary.

[0090] By introducing a boundary correction method for the arc fault prototype set and using an improved convex hull algorithm to remove samples in overlapping regions, the decision boundary was optimized, effectively reducing the risk of misjudgment between normal and fault states.

[0091] Specifically, the improved convex hull algorithm includes:

[0092] Randomly select n boundary points as the initial vertex set V;

[0093] During the iteration process, the initial vertex set V is pre-expanded and its boundaries are corrected based on the convex hull volume increment of new points in the search space.

[0094] Convergence is determined by the rate of volume change before and after vertex correction, and boundary fitting is completed.

[0095] By improving the convex hull algorithm, high-precision boundary fitting of irregular and non-convex feature point sets is achieved through volume increment expansion and convergence judgment, thereby improving the accuracy and computational efficiency of boundary correction.

[0096] The steps of this embodiment will be described in detail below.

[0097] First, a data preprocessing step is performed. The raw current signal from the circuit under test is acquired using a current sensor, preferably at a sampling rate of 100kHz, with 1000 points collected per power frequency cycle to fully preserve the millisecond-level transient characteristics of the current. Because the raw current signal is characterized by high-frequency fluctuations, nonlinearity, and strong randomness, and because the current amplitude varies greatly with different power loads, directly inputting it into the model would lead to identification bias and reduced generalization ability. Therefore, this embodiment uses a sliding window of preset length to segment the raw current signal, obtaining multiple equal-length current signal samples. Subsequently, the current signal samples are standardized to eliminate dimensional differences under different power loads, ensuring input consistency. Based on this, three-domain input data is generated through signal transformation, including a time-domain waveform signal, a frequency-domain distribution signal obtained through fast Fourier transform, and a time-domain rate of change (di / dt) signal obtained through differentiation. The three-domain input comprehensively characterizes the physical properties of the electric arc from three dimensions: macroscopic signal morphology, frequency energy composition, and microscopic transient changes, providing a stable and reliable data foundation for solving the problem of difficult fault identification under complex and variable loads.

[0098] Next, the feature extraction step is performed. The three-domain input data generated above are respectively input into a pre-constructed three-domain dynamic attention convolutional neural network (...). The model employs a three-pronged approach, with three parallel feature extraction branches corresponding to the time domain, frequency domain, and time-domain rate of change signals, respectively, enabling multi-dimensional complementary feature extraction. Specifically:

[0099] Temporal branch: A one-dimensional convolutional layer (Conv1D) is used in conjunction with a three-domain dynamic attention module. The nonlinear expression is enhanced by the ReLU activation function, and typical fault features such as current waveform distortion and zero-segment "flat shoulder" are extracted.

[0100] Frequency domain branching: A one-dimensional convolutional layer is used in conjunction with a three-domain dynamic attention module to extract the high-frequency harmonics and energy distribution characteristics unique to arc faults, thereby enhancing the expression of nonlinear relationships between frequency bands;

[0101] Rate of change branch: A gated linear unit (GLU) is added to the one-dimensional convolutional layer and the three-domain dynamic attention module to suppress background noise, enhance the characteristics of millisecond-level current transient jumps, and improve the sensitivity to weak fault signals.

[0102] In the feature extraction process, the Three-Domain Dynamic Attention (TDDA) module is the core feature enhancement structure. The input data dimension is B×L×C, where B is the batch size, L is the sequence length, and C is the number of channels. The module first compresses the sequence dimension through global average pooling (GAP) to generate channel-level statistical description vectors; then, it adapts the dimension transpose to meet the 1×1 convolution input requirements, and achieves channel dimensionality reduction through convolution; subsequently, it obtains a symmetric matrix A1 through dynamic weight expansion; finally, the static identity matrix A0, the dynamic convolution weight matrix A1, and the trainable offset matrix A2 are weighted and fused to obtain the attention weights.

[0103] In this embodiment, the attention weights are fused according to the following formula: , As a static identity matrix, it provides stable physical prior constraints for the model, ensuring that the model training does not deviate from the basic physical laws of electric arcs and improving operational stability; It is a dynamic convolution weight matrix that can adaptively adjust in real time according to the fluctuations of the input signal, effectively adapting to feature drift caused by load switching and environmental interference; This is a trainable offset matrix used to capture high-order nonlinear interactions between feature channels, compensating for the insufficient modeling capabilities of traditional attention mechanisms. Through automatic weighting of learnable coefficients α and β, it achieves coordinated modulation of static prior, dynamic adaptation, and nonlinear compensation.

[0104] Please refer to Figure 4This diagram illustrates the principle of the attention mechanism. The core of this mechanism is to calculate the similarity between the query vector and the key vector, generating weight coefficients for the corresponding value vectors. These weighted coefficients are then summed to produce the feature output. This allows for focused enhancement of key fault features within the global information and suppression of invalid background noise, fundamentally improving the model's ability to extract arc fault features and its fault detection accuracy. This structure fundamentally solves the problems of poor generalization, low robustness, and susceptibility to load interference in traditional AI detection models, giving the output high-dimensional feature vectors extremely strong fault discrimination power.

[0105] The backbone network of the model consists of three convolutional blocks: ConvBlock1, ConvBlock2, and ConvBlock3. Each convolutional block uses Conv1D to extract features and ReLU to introduce nonlinearity. TDDA modules are embedded in the second and third convolutional blocks to complete attention calibration and noise suppression. Finally, the model is compressed by one-dimensional global average pooling (GAP1D) and fully connected layers (Dense) to output a high-resolution prototype vector.

[0106] The core of the Attention mechanism is to calculate the weight of the Value based on the similarity between the Query and the Key, and then generate the output by weighted summation. The specific calculation formula is shown in Equation (1). Where, ' 'Represents 'Query', 'Represents 'Key', ' 'Represents 'Value' The dimension representing the key.

[0107] (1);

[0108] By integrating multiple attention mechanisms, the hybrid attention mechanism effectively enhances the ability of deep learning models to capture and select key features. When the input feature map is X∈RH×W×C, H, W, and C represent the height, width, and number of channels, respectively. The global information extraction of channel attention is shown in Equation (2).

[0109] (2);

[0110] Let i represent the global channel statistics vector, and i and j represent the number of spatial locations. The channel weight is calculated as shown in equation (3).

[0111] (3);

[0112] F1 and F2 are the weights of the fully connected layer. It is the sigmoid function. is the modified linear unit (ReLU) activation function, and Ac is the channel attention weight. In spatial attention, spatial feature extraction is represented by equations (4) and (5).

[0113] (4);

[0114] (5);

[0115] and Let represent the average feature map and the maximum feature map, respectively. C is the channel index. The spatial weights are calculated as shown in equation (6).

[0116] (6);

[0117] In equation (6), It is the result of concatenating two feature maps, where f is a k×k convolution operation, usually k=7. This refers to the spatial attention weights. The weight combination for hybrid attention is shown in equation (7).

[0118] (7);

[0119] In equation (7), To learn the fusion weights, .

[0120] Specifically, such as Figure 5 The diagram shown illustrates the structural principle of the Three-Domain Dynamic Attention (TDDA) module of this invention. The module's input data dimension is B×L×C (B is the batch size, L is the sequence length, and C is the number of channels). The data is first compressed using Global Average Pooling (GAP) to generate channel-level statistical description vectors. Then, it undergoes dimension transposition to adapt to the 1×1 convolution input requirement, and channel dimensionality reduction is achieved through convolution. Finally, it is expanded with dynamic weights to generate a symmetric matrix. ; Finally, the static identity matrix Dynamic convolution weight matrix Trainable offset matrix Weighted fusion is used to generate the final attention weights, enabling dynamic feature modulation of one-dimensional arc fault signals.

[0121] To address the one-dimensional nature of arc fault signals and the need for precise identification and extraction of key fault diagnosis regions, this invention combines the analysis of the physical characteristics of arc faults to construct a highly discriminative feature representation for low-voltage AC arc faults. Arc faults manifest as millisecond-level high-frequency oscillations within the current waveform, with their energy distribution exhibiting nonlinear variations depending on load conditions and being easily masked by background noise. Traditional feature extraction methods struggle to simultaneously capture transient details and adapt to different operating conditions; fixed-threshold methods easily lose weak arc features; and purely data-driven models are prone to overfitting in scenarios with limited data.

[0122] To overcome the above-mentioned shortcomings, embodiments of the present invention employ a ternary attention fusion paradigm, which integrates three types of complementary components: a static identity matrix for encoding fundamental physical constraints. Dynamic convolution weights used to adapt to feature drift caused by load and a trainable offset matrix for modeling nonlinear interactions between channels. Based on the above paradigm, this invention proposes a Three-Domain Dynamic Attention (TDDA) module, which is a lightweight, dedicated module that can be embedded in CNN architectures. It integrates global statistical aggregation, channel reweighting, and spatial sequence focusing as core designs, decoupling the hybrid attention mechanism into three synergistic matrices.

[0123] Among them, the static identity matrix Provides stable priors for channel attention, forming a constant and reliable initial reference state; dynamic convolution weights By constructing learnable bottleneck operations, it simulates the adaptive weight generation of self-attention input, and combines the region-focusing characteristics of spatial attention; a trainable offset matrix is ​​also included. A higher-order nonlinear interaction is introduced as a parameter set for gradient learning optimization, used to refine... and The combined weights enhance the ability to model complex cross-channel dependencies. Working together, it significantly enhances the stability, selectivity, and nonlinear modeling capabilities of one-dimensional fault signal processing while retaining the classical attention representation capabilities.

[0124] Combination Figure 5 The schematic diagram of the TDDA module shown indicates that the module's input data has dimensions B×L×C, where B is the batch size, L is the sequence length, and C is the number of channels. First, global average pooling (GAP) is used to compress the sequence dimensions, generating channel-level statistical descriptive vectors to extract the overall features of each channel. Then, the dimensions are transposed to adapt to the 1×1 convolution input format. A 1×1 convolution is then used to compress the number of channels to C / r (where r is a preset compression ratio), and finally, dynamic weight expansion expands the dimensions to a multiple of C / r, resulting in a symmetric matrix. , The generation process is represented by formula (8), where U is defined by formula (9).

[0125] Attention weight fusion is performed at the end of the module, first applying static priors. With dynamic weights Perform a weighted summation, then add the trainable offsets. This generates the final attention weights for feature modulation, and the design continues and extends the principle of hybrid attention weighted fusion.

[0126] (8);

[0127] (9);

[0128] In a further embodiment, this invention proposes a backbone network architecture suitable for multi-dimensional feature extraction. This architecture is specifically optimized for three types of derived signals of 50Hz power frequency AC current: time-domain waveform signal, frequency-domain distribution signal, and time-domain rate of change (di / dt) signal. The network is constructed based on data collected at a 100kHz sampling rate, with 1000 sampling points collected per power frequency cycle. A three-way parallel three-domain dynamic attention-convolutional neural network (TDDA-CNN) branch is used as the backbone network to process the one-dimensional input data. Layered feature extraction is performed sequentially through three convolutional modules, and finally, a high-resolution prototype vector is output after compression by a fully connected (Dense) layer to obtain the basic features of the fault prototype, such as... Figure 6 The diagram shows the overall architecture of the TDDA-CNN prototype learning model of this invention. The model adopts a three-way parallel branch structure, corresponding to the input signals in the time domain waveform, frequency domain distribution, and time domain rate of change (di / dt), respectively. Each branch sequentially completes hierarchical feature extraction through three layers of convolutional blocks, where the second and third convolutional blocks embed the TDDA module to achieve channel attention calibration and noise suppression. The high-dimensional features extracted by each branch are compressed by global average pooling and fully connected layers, and then fused and mapped to the three-dimensional prototype feature space to form an intuitively visualized arc fault prototype, realizing the interpretable expression and accurate discrimination of fault features.

[0129] Features extracted from the backbone network are embedded into a unified three-dimensional feature space, which simultaneously integrates time-domain, frequency-domain, and rate-of-change dimension information to construct a visualized fault prototype. The first convolutional block uses one-dimensional convolution (Conv1D) to extract local features, introduces nonlinearity through the ReLU activation function, and then downsamples using one-dimensional max pooling (MaxPool1D) to retain core features. The second convolutional block uses Conv1D to expand the receptive field, enhances nonlinearity with ReLU, and performs channel attention calibration and noise suppression through the TDDA module, followed by MaxPool1D downsampling. The third convolutional block further expands the receptive field using Conv1D, reinforces nonlinearity with ReLU, performs secondary feature calibration using the TDDA module, and performs global averaging along the sequence dimension using one-dimensional global average pooling (GlobalAvgPool1D) to output a global feature vector. After obtaining the feature vectors in the three dimensions, feature fusion, dimensionality reduction, and visualization processes are performed to generate a fault prototype in three-dimensional space.

[0130] The rate-of-change branch incorporates gated linear units (GLUs) to more accurately capture transient current signal characteristics. The ReLU activation function enhances the nonlinear expression of arc oscillation characteristics in the time-domain branch, improves the nonlinear correlation representation capability between frequency bands in the frequency-domain branch, and achieves gated control and feature nonlinear enhancement of the rate-of-change branch. The structure and output dimensions of each layer of the backbone network are shown in Table 1, where L is the sequence length and C is the number of channels. Taking a 1000×1 dimension sample as a typical input, the data is progressively extracted and reduced in dimensionality through three convolutional blocks, ultimately outputting stable high-dimensional features.

[0131] Table 1 Backbone Network Parameters

[0132]

[0133] Experiments have verified that this model uses stratified random sampling to divide the dataset into training, validation, and test sets, employing Adam as the optimizer and cross-entropy as the loss function. Before model training, stratified random sampling is used to divide the dataset, ensuring the ratio of arc-containing to non-arc-containing samples remains consistent with the original data. The distribution is 75% for the training set, 15% for the validation set, and 10% for the test set, as shown in Table 2. After 10 rounds of training, the detection accuracy reaches 99.65%, precision 99.75%, recall 99.41%, false positive rate 0.174%, and false negative rate 0.594%, maintaining excellent detection performance in both single-load and complex multi-load scenarios.

[0134] Table 2. Division of different datasets

[0135]

[0136] The model was trained using the Adam optimizer with a learning rate of 0.0001, a random seed of 42, and cross-entropy as the loss function. It underwent 10 training epochs with a batch size of 32. The model learning curve is shown below. Figure 7 As shown, this is the present invention. The model's training and validation learning curves are described. The model employs a three-way parallel branch structure, corresponding to the input signals in the time domain waveform, frequency domain distribution, and time domain rate of change (di / dt), respectively. Each branch sequentially extracts hierarchical features through three convolutional blocks, with the second and third convolutional blocks embedding a TDDA module for channel attention calibration and noise suppression. The high-dimensional features extracted from each branch are then compressed through global average pooling and fully connected layers, and finally fused and mapped to a three-dimensional prototype feature space to form an intuitively visualized arc fault prototype, enabling interpretable representation and accurate identification of fault features. Figure 7 (a) in the figure is the accuracy curve. Figure 7 In Table 3, (b) represents the loss rate curve, and the horizontal axis Epoch represents the training rounds; the final detection metrics are shown in Table 3.

[0137] Table 3 Training Results of TDDA-CNN Model

[0138]

[0139] Further, a prototype mapping step is performed. The high-dimensional feature vectors extracted from the three branches are fused, then sequentially passed through a global average pooling layer for dimensionality reduction, and finally mapped to a three-dimensional prototype feature space through a fully connected layer to generate the corresponding test sample points. The three coordinate axes of the three-dimensional prototype feature space correspond to time-domain features, frequency-domain features, and time derivative features, respectively. This transforms the high-dimensional complex classification problem into a low-dimensional geometric distribution problem, replacing the traditional "black box" classification logic with a geometric distance metric, significantly improving the interpretability of fault determination. (Refer to...) Figure 8 Under different loads (such as water dispensers and electric irons), the fault arc prototype set exhibits obvious clustering characteristics in three-dimensional space. Different loads correspond to different ranges and distribution patterns, providing an intuitive basis for fault identification.

[0140] like Figure 8 (a) in the text refers to a water dispenser. Figure 8 (b) in the figure represents an electric iron. The fault arc prototype sets under different loads exhibit different ranges and maximum values ​​on the three-dimensional feature space coordinate axis, and are clustered within a fixed range, providing an intuitive basis for dividing the arc prototype feature set range under different working conditions.

[0141] Before performing fault determination, this embodiment also sets up a boundary correction step for the arc fault prototype set to further improve the determination accuracy. The technical derivation is as follows: In actual power consumption environments, the current characteristics of normal loads such as switching power supplies, dimmer lights, and coffee machines during start-up, shutdown, and switching may overlap with the characteristics of arc faults in three-dimensional space, which can easily lead to false alarms if directly determined. To this end, this embodiment constructs a preliminary arc fault prototype set and a non-arc prototype set in the three-dimensional prototype feature space, respectively, and uses an improved convex hull algorithm to accurately delineate the geometric boundaries of the two sets, identify and locate the overlapping and ambiguous regions; the sample points corresponding to the overlapping regions are removed from the preliminary arc fault prototype set, and finally a corrected decision boundary with clear boundaries and reliable discrimination is obtained.

[0142] The improved convex hull algorithm is executed as follows: n boundary points are randomly selected as the initial vertex set V. These points should be located at or near the boundary of the true prototype set so that the algorithm can iterate from a reasonable starting point. For the t-th iteration, each point in the vertex set V(t) is pre-expanded and corrected, and finally, the convergence result after the spatial update is judged.

[0143] Convex Hull Pre-expansion and Boundary Correction: In the search space Fi(t), find a new point v such that replacing the current vertex vi(t) with this new point maximizes the volume of the new convex hull. This is achieved by removing vertex vi(t) from the current vertex set V(t), resulting in the set V(t)i2. Find a point v in the search space V(t)i2 such that the convex hull formed by adding v to V(t)i2 maximizes the volume. This newly discovered point is denoted as vi(pre), the pre-expansion point. Since the pre-expansion point vi(pre) may not be on the boundary of the true prototype set, it needs to be modified to the boundary. For point v(t), the loss function L(v) is defined as the classification confidence, and the gradient is shown in equation (10).

[0144] (10);

[0145] The iterative update formula is shown in equation (11), where For adaptive step size, This is the projection along the normal vector.

[0146] (11);

[0147] The adaptive step size is shown in equation (12), where It is the basic learning rate. It is the boundary threshold.

[0148] (12);

[0149] Following the steps described above, using vi(pre) as input, a point vi(corr) close to the true boundary is obtained through iterative correction. After obtaining the corrected point vi(corr), the search space corresponding to this vertex needs to be updated for further optimization in subsequent iterations. First, the normal vector ni(t) at the corrected point vi(corr) is calculated. This normal vector can be understood as the vertical direction of the true boundary at this point, pointing to the outside of the convex hull. Then, the search space Fi(t) is updated to the intersection of the original search space and the half-space. This half-space is defined by the normal vector ni(t) and the point vi(corr), considering only points inside or on the boundary, thus narrowing the search range. After completing one iteration for all vertices, a new vertex set V(t+1) is obtained, and then the volume change rate between the new and old convex hulls is calculated. If this relative change is less than a preset threshold, the convex hull is considered to have converged, and the iteration stops. Otherwise, the next iteration continues.

[0150] In this embodiment, convergence is determined by the rate of change of the volumes of the old and new convex hulls. Iteration stops when the rate of change is lower than a preset threshold, achieving high-precision boundary fitting for irregular, non-convex feature point sets. This "negative stripping" correction logic effectively eliminates the decision ambiguity between normal operating conditions and fault states, significantly reducing the system's false alarm rate and improving detection reliability.

[0151] Finally, the fault determination step is executed. The position of the sample point to be tested is compared with the decision boundary of the corrected arc fault prototype set in the three-dimensional prototype feature space. If the sample point to be tested falls inside the decision boundary, it is determined that there is a series arc fault in the circuit, and a fault signal is output, which can further trigger power-off protection or audible and visual alarms. If it falls outside the decision boundary, it is determined to be in normal operating condition.

[0152] This invention also discloses a series arc fault detection device based on a three-domain dynamic attention prototype learning model, used to implement the above-mentioned detection method. The device includes: a data acquisition unit for real-time acquisition of the raw current signal of the circuit under test; a preprocessing unit for performing sliding window truncation, standardization, and three-domain transformation on the signal to generate data that meets the model input requirements; a feature extraction and mapping unit integrating a three-domain dynamic attention convolutional neural network model to complete three-domain feature extraction, feature fusion, and three-dimensional prototype space mapping; and a fault determination unit for determining the fault and outputting instructions based on the geometric positional relationship between the test sample point and the boundary of the arc fault prototype set. The coordinated operation of these units enables arc fault detection to be completed within milliseconds, meeting the online real-time protection requirements of low-voltage power distribution systems.

[0153] Based on the above embodiments, this invention also discloses a computer device, including a memory and a processor. The memory stores a computer program that can implement the above detection method. When the processor executes the program, it drives the system to complete the entire process of signal acquisition, three-domain feature extraction, attention-weighted modulation, prototype space mapping, boundary correction, and fault determination.

[0154] Based on the above embodiments, this invention also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, can transform complex physical characteristics of arc faults into intuitive three-dimensional spatial location information, thereby achieving high-precision, highly interpretable, and highly generalizable series arc fault detection.

[0155] In summary, this invention proposes a series arc fault detection method based on a three-domain dynamic attention (TDDA) prototype learning model. It integrates the three-dimensional features of the current signal in the time domain, frequency domain, and time derivative (rate of change), and performs deep feature extraction through a parallel TDDA-CNN backbone network, constructing an intuitive and visual fault prototype set in the three-dimensional feature space. To further improve classification accuracy, this invention also introduces an improved convex hull approximation algorithm to refine the decision boundary, effectively identifying and eliminating overlapping and ambiguous regions between normal operation and arc faults.

[0156] This invention not only overcomes the technical bottleneck of traditional deep learning end-to-end models lacking interpretability due to their "black box" nature, enabling spatial visualization analysis of fault features, but also thoroughly solves the problem of poor generalization ability of existing models under complex and dynamic load scenarios. Experimental results show that this model maintains extremely low false positive and false negative rates while achieving an overall detection accuracy of up to 99.65%.

[0157] Finally, it should be noted that although the above embodiments have been described in the description and drawings of this invention, this should not be construed as limiting the scope of protection of this invention. Any technical solutions resulting from equivalent structural or procedural substitutions or modifications made based on the essential concept of this invention and utilizing the content described in the description and drawings, as well as the direct or indirect application of the technical solutions of the above embodiments to other related technical fields, are all included within the scope of protection of this invention.

Claims

1. A series arc fault detection method based on a three-domain dynamic attention prototype learning model, characterized in that, Includes the following steps: The original current signal in the circuit under test is acquired, and three-domain input data is generated through preprocessing. The three-domain input data includes time-domain waveform signal, frequency-domain distribution signal, and time-domain rate of change signal. The three-domain input data are respectively input into a pre-constructed three-domain dynamic attention convolutional neural network model for feature extraction to obtain high-dimensional feature vectors for each domain; the three-domain dynamic attention convolutional neural network model includes a three-domain dynamic attention module, which is used to obtain attention weights by fusing a static identity matrix, a dynamic convolution weight matrix and a trainable offset matrix, and to dynamically weight and modulate the input features using the attention weights; The high-dimensional feature vectors of each domain are fused and mapped to a three-dimensional prototype feature space to generate the corresponding test sample points. Based on the positional relationship between the test sample point and the decision boundary of the preset arc fault prototype set in the three-dimensional prototype feature space, it is determined whether a series arc fault exists.

2. The three-domain dynamic attention prototype learning model-based series arc fault detection method according to claim 1, characterized in that, The process of generating three-domain input data through preprocessing includes: The original current signal is truncated using a sliding window of preset length to obtain multiple current signal samples; The current signal samples are standardized to eliminate the dimensional differences in signals under different power loads.

3. The three-domain dynamic attention prototype learning model-based series arc fault detection method according to claim 1, characterized in that, The three-domain input data are respectively input into a pre-constructed three-domain dynamic attention convolutional neural network model for feature extraction. In the high-dimensional feature vectors of each domain, the attention weights of the three-domain dynamic attention module are fused in the following way: ; wherein, is a static identity matrix for providing stable initial priors; is a dynamic convolution weight matrix for adapting load feature drift; is a trainable offset matrix for modeling inter-channel nonlinear interactions; and a, b are learnable weighting coefficients.

4. The serial arc fault detection method based on a three-domain dynamic attention prototype learning model according to claim 1, characterized in that, The process of inputting the three-domain input data into a pre-constructed three-domain dynamic attention convolutional neural network model for feature extraction, resulting in high-dimensional feature vectors for each domain, includes the following feature extraction branches: The temporal branch is used to extract temporal waveform distortion features based on a one-dimensional convolutional layer and a three-domain dynamic attention module. The frequency domain branch is used to extract high-frequency harmonic features in the frequency domain based on a one-dimensional convolutional layer and a three-domain dynamic attention module. The rate of change branch is used to extract transient current change features based on a one-dimensional convolutional layer, a three-domain dynamic attention module, and a gated linear unit (GLU).

5. The three-domain dynamic attention prototype learning model-based series arc fault detection method according to claim 1, characterized in that, The process of fusing high-dimensional feature vectors from various domains and mapping them to a three-dimensional prototype feature space to generate corresponding test sample points includes: The high-dimensional feature vectors of each domain are sequentially passed through a global average pooling layer for dimensionality reduction and a fully connected layer for mapping, generating test sample points in the three-dimensional prototype feature space.

6. The three-domain dynamic attention prototype learning model-based series arc fault detection method according to claim 1, characterized in that, Before determining whether a series arc fault exists, the following steps are performed: based on the positional relationship between the test sample point and the decision boundary of the preset arc fault prototype set in the three-dimensional prototype feature space, arc fault prototype set boundary correction is also included. The boundary correction of the arc fault prototype set includes: A preliminary set of arc fault prototypes and a set of non-arc prototypes are constructed in a three-dimensional prototype feature space. An improved convex hull algorithm is used to delineate the geometric boundaries of the two prototype sets and identify their overlapping regions. The corrected decision boundary is obtained by removing points corresponding to overlapping areas from the initial arc fault prototype set.

7. The method of claim 6, wherein the three-domain dynamic attention prototype learning model-based series arc fault detection method is characterized by, The improved convex hull algorithm includes: Randomly select n boundary points as the initial vertex set V; During the iteration process, the initial vertex set V is pre-expanded and its boundaries are corrected based on the convex hull volume increment of new points in the search space. Convergence is determined by the rate of volume change before and after vertex correction, and boundary fitting is completed.

8. A series arc fault detection device based on a three-domain dynamic attention prototype learning model, characterized in that, The method for implementing the serial arc fault detection method based on a three-domain dynamic attention prototype learning model as described in any one of claims 1 to 7 includes: The data acquisition unit is used to acquire the raw current signal in the circuit under test; The preprocessing unit is used to generate three-domain input data through preprocessing; the three-domain input data includes time-domain waveform signal, frequency-domain distribution signal, and time-domain rate of change signal. The feature extraction and mapping unit is used to input the three-domain input data into a pre-constructed three-domain dynamic attention convolutional neural network model for feature extraction, obtaining high-dimensional feature vectors for each domain; and to fuse the high-dimensional feature vectors of each domain and map them to a three-dimensional prototype feature space to generate corresponding test sample points; the three-domain dynamic attention convolutional neural network model includes a three-domain dynamic attention module, which is used to obtain attention weights by fusing a static identity matrix, a dynamic convolution weight matrix, and a trainable offset matrix, and to dynamically weight and modulate the input features using the attention weights; The fault determination unit is used to determine whether a series arc fault exists based on the positional relationship between the test sample point and the decision boundary of the preset arc fault prototype set in the three-dimensional prototype feature space.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the serial arc fault detection method based on the three-domain dynamic attention prototype learning model as described in any one of claims 1-7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by the processor, it implements the serial arc fault detection method based on the three-domain dynamic attention prototype learning model as described in any one of claims 1-7.