A Method and System for Extracting Discharge Pulse Signals Based on Accelerated Training Neural Networks

By employing a global-local fusion attention mechanism and a deep neural network with physical prior coding, the problem of separating discharge pulse signals and displacement currents in power electronic devices is solved, achieving efficient and accurate discharge pulse extraction and display, which is suitable for insulation reliability assessment of power electronic devices.

CN122132891APending Publication Date: 2026-06-02STATE GRID JIBEI ELECTRIC POWER CO LTD TANGSHAN POWER SUPPLY CO

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID JIBEI ELECTRIC POWER CO LTD TANGSHAN POWER SUPPLY CO
Filing Date
2026-04-15
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively separate highly overlapping discharge pulse signals and displacement currents in power electronic devices, and lack prior physical knowledge and adaptive modeling capabilities, resulting in low extraction efficiency and insufficient accuracy.

Method used

A deep neural network employing a global-local fusion attention mechanism, physical prior coding, and adaptive constraint loss achieves adaptive modeling and accurate separation of signals across multiple time scales through the global-local fusion attention network and physical prior location coding, and is embedded in a digital oscilloscope for real-time processing.

Benefits of technology

It significantly improves the feature extraction capability across multiple time scales, enhances the signal-to-noise ratio and extraction efficiency of discharge pulse signals, simplifies the testing process, lowers the technical threshold, and enables discharge pulse analysis to be widely applied in engineering testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122132891A_ABST
    Figure CN122132891A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for extracting discharge pulses from power electronic devices based on deep learning. The method includes: acquiring and preprocessing multiple cycles of current signals and square wave voltage signals to form a dataset; extracting physical prior features based on the square wave voltage signals, including region partitioning probability, theoretical displacement current, and voltage derivative features; constructing a deep neural network integrating a global-local attention mechanism; building an adaptive partitioned physical constraint loss function, including region-weighted reconstruction loss, monotonicity / flatness / energy conservation constraint loss, frequency domain consistency loss, and smoothing regularization loss; training the neural network to reconstruct the displacement current and calculating the residual to obtain the discharge pulse. This invention achieves end-to-end automated discharge pulse extraction without manual parameter setting, exhibits excellent generalization performance under small sample conditions, and significantly improves the efficiency and accuracy of power electronic device quality inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power electronic device reliability testing and signal processing technology, specifically relating to a method and system for extracting discharge pulses from power electronic devices based on deep learning. Background Technology

[0002] In power electronic systems, the insulation reliability of power semiconductor devices is a key factor limiting system lifespan. The interface between the polyimide material of the IGBT chip passivation layer and the encapsulating silicone gel is prone to surface discharge under repetitive square wave voltages, and its cumulative effect ultimately leads to insulation breakdown failure. The characteristic parameters of this interface discharge are important for assessing the remaining device lifespan. However, extracting the discharge pulse signal presents significant challenges. The rising and falling edges of the square wave voltage cause rapid polarization and depolarization of the interface medium, generating displacement currents with amplitudes reaching the ampere level, far exceeding discharge pulses in the milliampere to microampere ranges. Further complicating matters, forward discharge pulses are mainly concentrated in the rising edge region, while reverse discharge pulses are concentrated in the falling edge region, with a high degree of overlap in the time domain. This strong coupling characteristic causes the discharge pulses to be submerged in the displacement current background, making effective separation difficult using traditional signal processing methods.

[0003] Existing technologies mainly include indirect methods based on auxiliary sensors, direct methods based on signal processing, and traditional machine learning methods, but all have fundamental flaws. Deep learning, with its automatic feature learning capabilities, has emerged as a potential solution, but its direct application faces multiple challenges: Multi-timescale modeling: Discharge pulse signals involve three timescales: nanosecond-level discharge transients, microsecond-level displacement current changes, and millisecond-level square wave periodic patterns. Traditional convolutional neural networks with fixed kernels can only capture single-scale features; passively expanding the receptive field by deepening the network cannot achieve scale-adaptive modeling. While the standard Transformer's global self-attention can establish long-range dependencies, it is limited for high-sampling-rate signals (10^6 Hz, ... 6 ~10 7 The computational complexity of O(L²) (points / second) is not feasible, and it lacks a selective modeling mechanism for different scales, which assigns equal resources to all location pairs.

[0004] Insufficient utilization of physics knowledge: Current deep learning adopts purely data-driven end-to-end learning without integrating domain-specific physics knowledge. For example, patent application CN116794553A utilizes deep learning-based artificial intelligence detection technology to extract implicit feature distribution information about high-frequency power supply faults from the discharge pulse signal provided by the high-frequency power supply through the ViT model. However, the standard Transformer's sine and cosine position encoding only provides an abstract position index, ignoring the proportional relationship between displacement current and the square wave voltage derivative.

[0005] Limitations of the loss function: Traditional models use a uniform loss function such as mean square error, which implicitly assumes that the reconstruction error is equally important at all time points. However, the edge region of the square wave is the region of rapid change in displacement current and the main superposition region of discharge, and the reconstruction error is directly transmitted to the extraction error, which has the most stringent accuracy requirements; the displacement current in the plateau region is close to zero and flat, and has a large tolerance for error.

[0006] Training efficiency and generalization issues: Obtaining labeled data for discharge pulse extraction tasks is difficult, the actual displacement current cannot be directly measured, and the labels themselves contain uncertainties. Large-scale data acquisition involves multiple combinations of operating conditions, resulting in high costs and long processing times. Traditional SGD algorithms converge slowly, are sensitive to the learning rate, and are prone to getting trapped in local optima; while the Adam optimizer improves convergence, it has many hyperparameters and sometimes poor generalization performance. Summary of the Invention

[0007] To address the challenges of multi-timescale feature modeling, insufficient utilization of prior physical knowledge, lack of regional adaptability in loss functions, and low model training efficiency in existing technologies, this invention provides a deep learning-based method and system for extracting discharge pulses from power electronic devices. This method constructs a deep neural network that integrates a global-local attention mechanism, physical prior encoding, and adaptive constraint loss to accurately separate displacement current and discharge pulses from mixed current signals. The trained neural network is then directly embedded into the signal processing unit of a digital oscilloscope, enabling real-time extraction and display of discharge pulses, thus providing an intelligent technical means for assessing the insulation reliability of power electronic devices.

[0008] The present invention adopts the following technical solution.

[0009] This invention provides a deep learning-based method for extracting discharge pulses from power electronic devices, comprising: The original current signal and corresponding square wave voltage signal of the power electronic device under the action of repetitive square wave pulse voltage are obtained in multiple cycles. The original signal is preprocessed to construct a training dataset. The square wave voltage signal in the training dataset is divided into square wave regions based on the soft-assignment probability calculation method, and the theoretical displacement current is calculated. Based on the divided square wave regions and the theoretical displacement current, a physical prior feature vector is generated. A global-local fusion attention network is constructed, including an input projection layer, a physical prior position encoding module, a multi-layer global-local fusion attention module, an output projection layer, and a post-processing smoothing layer; the physical prior position encoding module includes standard sine and cosine position encoding, physical feature encoding, and physical region feature encoding; the encoding result of the physical feature encoding is calculated using the physical prior feature vector; An adaptive partitioning physical constraint loss function is constructed, and the global-local fusion attention network is trained based on the training dataset to obtain the displacement current prediction value; the adaptive partitioning physical constraint loss function is obtained by weighted summation of region weighted reconstruction loss, physical constraint loss, frequency domain consistency loss, and smoothing regularization loss; A global-local fusion attention network is used to read the real-time acquired current signal to obtain the corresponding displacement current prediction value; a residual signal is calculated based on the original current signal and the displacement current prediction value; and the discharge number and discharge energy of the discharge pulse are calculated based on the residual signal.

[0010] More preferably, the specific implementation method of the square wave region division is as follows: The time axis of the square wave voltage signal is divided into four physical characteristic regions using the soft-assignment probability calculation method: rising edge region, high level plateau region, falling edge region, and low level plateau region. The method for calculating the soft assignment probability is as follows: The mean value of the derivative of the square wave voltage signal is used as the central characteristic value of region r, and the Gaussian function value of region r is calculated; the ratio of the Gaussian function value to the sum of the Gaussian function values ​​of all regions is calculated, and the ratio is used as the soft allocation probability. The theoretical displacement current is calculated by multiplying the equivalent capacitance by the square wave voltage derivative at time t to obtain the theoretical displacement current. The implementation method of the region feature encoding is as follows: The physical feature vector is composed of the soft allocation probability, normalized voltage value, voltage derivative, and theoretical displacement current value corresponding to different regions.

[0011] More preferably, the global-local fusion attention module includes a local window self-attention branch, a global memory attention branch, and an adaptive fusion mechanism; In the local window self-attention branch, local features are obtained through self-attention calculation; The implementation process of the global memory attention branch is as follows: Memory unit groups are constructed for different regions, including memory key matrices and memory value matrices; The self-attention calculation results based on the corresponding memory unit groups in different regions are weighted and summed to obtain the global features; The implementation method of the adaptive fusion mechanism is as follows: The local features and the global features are fused based on the set fusion weights to obtain fused features.

[0012] More preferably, the encoding result of the physical prior location encoding module is obtained by summing the encoding result of the standard sine and cosine location encoding, the encoding result of the physical feature encoding, and the encoding result of the regional feature encoding; The position code value of the corresponding position and the corresponding dimension obtained by combining the soft allocation probability with sine and cosine calculation is used as the encoding result of the standard sine and cosine position code; The physical prior feature vector is projected through a linear projection to obtain the encoding result of the physical feature encoding; The learnable embedding vectors of the corresponding regions are weighted using the soft assignment probabilities of different regions, and the weighted sum of all learnable embedding vectors is calculated to obtain the encoding result of the physical region feature encoding.

[0013] More preferably, the specific calculation methods for the region-weighted reconstruction loss, physical constraint loss, frequency domain consistency loss, and smoothing regularization loss are as follows: In different square wave regions at each time point of the current sequence, the absolute value of the difference between the predicted displacement current and the actual displacement current is taken and squared to obtain the squared result; the soft allocation probability of the region is used as the weight of the squared result; the squared results of all regions under all time points are weighted and summed and divided by the sequence length to obtain the weighted reconstruction loss of the region. The physical constraint loss is the sum of the monotonicity constraint loss, the flatness constraint loss, and the energy conservation constraint loss; The predicted displacement current and the actual displacement current are subjected to Fourier transform to obtain the predicted discrete displacement current and the actual discrete displacement current. At each frequency, the absolute value of the difference between the predicted and actual discrete displacement currents is taken and squared to obtain the squared result. The squared results corresponding to different frequencies are weighted, and the weighted sum of the squared results at all frequencies is calculated to obtain the frequency domain consistency loss. At each time point in the current sequence, the difference between the first-order difference of the predicted displacement current and the first-order difference of the theoretical displacement current is calculated. The absolute value of the difference is then squared to obtain the squared result. The squared results of all time points are summed and averaged to obtain the smoothing regularization loss.

[0014] More preferably, the divided square wave region includes a rising edge region, a high-level plateau region, a falling edge region, and a low-level plateau region; The method for calculating the monotonicity constraint loss is as follows: For each sampling point in the rising edge region and the falling edge region, a penalty value is given to the sampling point that violates the rising monotonicity. The value of the penalty value is the absolute value of the first difference of the displacement current prediction value. All penalty values ​​corresponding to all sampling points are added together, and the sum is divided by the number of sampling points in the corresponding region to obtain the division result. The monotonicity constraint loss is obtained by summing the division results corresponding to the rising edge region and the falling edge region. The method for calculating the flatness constraint loss is as follows: For each sampling point in the high-level platform and low-level platform regions, calculate the square of the absolute value of the first difference of the displacement current prediction value, sum the squares of all sampling points, and take the mean; add the mean values ​​corresponding to the high-level platform and low-level platform regions to obtain the flatness constraint loss; The method for calculating the energy conservation constraint loss is as follows: The predicted displacement current and the actual displacement current are integrated over a complete square wave cycle. The absolute value of the two integrals is subtracted and squared to obtain the energy conservation constraint loss.

[0015] More preferably, the method for counting the number of discharges is as follows: At time t, if the absolute value of the residual signal is greater than the amplitude threshold and is a local peak, then time t is recorded as one discharge; the number of discharges is obtained by counting the times that meet the judgment conditions. The method for calculating the discharge energy is as follows: During each sampling interval, the corresponding residual signal is multiplied by the square wave voltage signal. The multiplication results from all sampling intervals are summed, and the summation result is multiplied by the interval time to obtain the discharge energy.

[0016] This invention also proposes a deep learning-based system for extracting discharge pulses from power electronic devices, comprising a data acquisition module, a physical prior extraction module, a neural network construction module, a physical prior encoding module, a loss function configuration module, and a discharge pulse extraction module. The data acquisition and processing module, based on a deep learning-based method for extracting discharge pulses from power electronic devices, is characterized by: acquiring multi-cycle raw current signals and corresponding raw voltage signals of power electronic devices under the action of repetitive square wave pulse voltages, preprocessing the raw signals, and constructing a training dataset; The physical prior extraction module divides the square wave voltage signal in the training dataset into square wave regions based on the soft-assignment probability calculation method, calculates the theoretical displacement current, and generates a physical prior feature vector based on the divided square wave regions and the theoretical displacement current. The neural network building module constructs a global-local fusion attention network, including an input projection layer, a physical prior location encoding module, a multi-layer global-local fusion attention module, an output projection layer, and a post-processing smoothing layer. The physical prior coding module includes standard sine and cosine position coding, physical feature coding, and physical region feature coding; the coding result of the physical feature coding is calculated using the physical prior feature vector. The loss function configuration module constructs an adaptive partitioned physical constraint loss function, trains the global-local fusion attention network based on the training dataset, and obtains the displacement current prediction value; the adaptive partitioned physical constraint loss function is obtained by weighted summation of region-weighted reconstruction loss, physical constraint loss, frequency domain consistency loss, and smoothing regularization loss; The discharge pulse extraction module uses a global-local fusion attention network to read the real-time acquired current signal and obtain the corresponding displacement current prediction value; it calculates the residual signal based on the original current signal and the displacement current prediction value; and it calculates the discharge number and discharge energy of the discharge pulse based on the residual signal.

[0017] The present invention also proposes a terminal, including a processor and a storage medium: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps according to the method described above.

[0018] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0019] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. Significantly improved multi-timescale adaptive modeling capability This invention employs a global-local fusion attention mechanism, organically combining local window self-attention and global memory attention to simultaneously capture nanosecond-level discharge transients, microsecond-level displacement current changes, and millisecond-level square wave periodic patterns. The learnable window size of the local branches enables adaptation to different time scales, while the global memory branch explicitly models long-range dependencies through physical prototypes, avoiding the O(L²) computational complexity of the standard Transformer. Experiments show that compared to traditional convolutional neural networks and the standard Transformer, this invention's method improves multi-scale feature extraction capabilities by over 30% and inference speed by over 50%.

[0020] 2. Deep integration of physics knowledge and data-driven learning This invention innovatively embeds prior physical knowledge of power electronic devices into several key modules of a deep neural network. Physical prior location encoding injects square wave voltage characteristics, theoretical displacement current, and region partitioning rules into the network input, guiding the direction of feature learning. The regional prototype mechanism of global memory attention reflects the essential differences between different square wave regions. The adaptive partitioning loss function strengthens the satisfaction of physical constraints. This design paradigm of a physical information neural network retains the automatic feature learning capability of deep learning while avoiding the overfitting risk of purely data-driven methods. Experiments show that after incorporating physical priors, the model's generalization ability under small sample conditions is improved by more than 40%, and its cross-condition transfer performance is improved by more than 35%.

[0021] 3. Regional differentiation constraints improve the accuracy of key areas. The adaptive partitioned physical constraint loss function proposed in this invention overcomes the limitations of traditional unified loss functions. By employing a region-weighted mechanism, it assigns higher optimization weights to key regions such as the rising and falling edges of the square wave, ensuring the reconstruction accuracy of rapidly changing displacement current regions. The physical constraint loss, through multiple constraints including monotonicity, flatness, and energy conservation, guarantees the physical rationality of the prediction results. The frequency domain consistency loss avoids the problem of good time-domain fitting but incorrect frequency-domain characteristics. Experiments show that the displacement current reconstruction error in edge regions is reduced by more than 60%, and the signal-to-noise ratio of the extracted discharge pulse is improved by more than 15 dB.

[0022] 4. Achieve intelligent processing and intuitive display at the laboratory front end. The core advantage of this invention lies in directly embedding a trained neural network into a digital oscilloscope, achieving intelligent processing throughout the entire process from signal acquisition to result display. When users perform measurements using the oscilloscope in the laboratory, no complex post-processing is required; the oscilloscope interface displays the separated discharge pulse waveform and statistical parameters in real time. This "what you see is what you get" working mode greatly simplifies the testing process, compressing offline data analysis that originally required hours into millisecond-level real-time processing, significantly improving the efficiency of scientific research and engineering testing. Compared to traditional methods that require exporting data to a computer for post-processing, the oscilloscope integration solution of this invention reduces the time cost of data transmission and software operation, lowers the requirements for users' professional skills, and makes discharge pulse analysis technology more widely available to engineering technicians for mastery and application.

[0023] 5. End-to-end processing achieves full automation The method of this invention only requires input of the original current signal and square wave voltage signal, without the need for manual setting of threshold parameters or feature engineering, to automatically and accurately reconstruct the displacement current and quantitatively extract the discharge pulse. The fully automated nature of the process solves the problems of existing methods relying on manual parameter tuning and being difficult to scale, significantly reducing the technical threshold and labor costs, and achieving a leap from offline analysis to online monitoring. Attached Figure Description

[0024] Figure 1 This is a flowchart of the deep learning-based power electronic device discharge pulse extraction method of the present invention. Figure 2 This includes the voltage, current, and PMT output signal for surface discharge. Figure 3 A schematic diagram illustrating the location of the discharge pulse extreme point using the PMT extreme point; Figure 4 A schematic diagram illustrating the use of the extreme points of the discharge pulse itself to locate the discharge pulse; Figure 5 This is a schematic diagram illustrating the functional principle of the method of the present invention; Figure 6 Classify single-cycle current signals; Figure 7 Diagram of the improved Transformer network structure; Figure 8 Global-local attention fusion module; Figure 9 This is the confusion matrix for the test set.

[0025] Figure 10 The curves show a comparison of the training loss functions of the ADAM optimizer and the optimizer of this invention.

[0026] in, Figure 2 Figure a) shows a schematic diagram of the voltage, current, and PMT output waveforms for a single cycle. Figure 2 Figure b) is a magnified view of the rising edge of the square wave period. Detailed Implementation

[0027] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this invention. The embodiments described in this application are merely some embodiments of this invention, and not all embodiments. Based on the spirit of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of this invention.

[0028] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present invention will be further described below with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.

[0029] The present invention proposes the following technical solution: like Figure 1 As shown, this invention proposes a deep learning-based method for extracting discharge pulses from power electronic devices. The specific method includes: The original current signal and corresponding square wave voltage signal of the power electronic device under the action of repetitive square wave pulse voltage are obtained in multiple cycles. The original signal is preprocessed to construct a training dataset. The square wave voltage signal in the training dataset is divided into square wave regions based on the soft-assignment probability calculation method, and the theoretical displacement current is calculated. Based on the divided square wave regions and the theoretical displacement current, a physical prior feature vector is generated. The specific implementation method for the square wave region division is as follows: The time axis of the square wave voltage signal is divided into four physical characteristic regions using the soft-assignment probability calculation method: rising edge region, high level plateau region, falling edge region, and low level plateau region. The method for calculating the soft assignment probability is as follows: The mean value of the derivative of the square wave voltage signal is used as the central characteristic value of region r, and the Gaussian function value of region r is calculated; the ratio of the Gaussian function value to the sum of the Gaussian function values ​​of all regions is calculated, and the ratio is used as the soft allocation probability. The theoretical displacement current is calculated by multiplying the equivalent capacitance by the square wave voltage derivative at time t to obtain the theoretical displacement current. The implementation method of the region feature encoding is as follows: The physical feature vector is composed of the soft allocation probability, normalized voltage value, voltage derivative, and theoretical displacement current value corresponding to different regions.

[0030] A global-local fusion attention network is constructed, including an input projection layer, a physical prior location encoding module, a multi-layer global-local fusion attention module, an output projection layer, and a post-processing smoothing layer; The global-local fusion attention module includes a local window self-attention branch, a global memory attention branch, and an adaptive fusion mechanism; In the local window self-attention branch, local features are obtained through self-attention calculation; The implementation process of the global memory attention branch is as follows: Memory unit groups are constructed for different regions, including memory key matrices and memory value matrices; The self-attention calculation results based on the corresponding memory unit groups in different regions are weighted and summed to obtain the global features; The implementation method of the adaptive fusion mechanism is as follows: The local features and the global features are fused based on the set fusion weights to obtain fused features.

[0031] The physical prior location encoding module includes standard sine and cosine location encoding, physical feature encoding, and physical region feature encoding; the encoding result of the physical feature encoding is calculated using the physical prior feature vector. The encoding result of the physical prior location encoding module is obtained by summing the encoding result of the standard sine and cosine location encoding, the encoding result of the physical feature encoding, and the encoding result of the regional feature encoding. The position code value of the corresponding position and the corresponding dimension obtained by combining the soft allocation probability with sine and cosine calculation is used as the encoding result of the standard sine and cosine position code; The physical prior feature vector is projected through a linear projection to obtain the encoding result of the physical feature encoding; The learnable embedding vectors of the corresponding regions are weighted using the soft assignment probabilities of different regions, and the weighted sum of all learnable embedding vectors is calculated to obtain the encoding result of the physical region feature encoding.

[0032] An adaptive partitioning physical constraint loss function is constructed, and the global-local fusion attention network is trained based on the training dataset to obtain the displacement current prediction value; the adaptive partitioning physical constraint loss function is obtained by weighted summation of region weighted reconstruction loss, physical constraint loss, frequency domain consistency loss, and smoothing regularization loss; The specific calculation methods for the region-weighted reconstruction loss, physical constraint loss, frequency domain consistency loss, and smoothing regularization loss are as follows: In different square wave regions at each time point of the current sequence, the absolute value of the difference between the predicted displacement current and the actual displacement current is taken and squared to obtain the squared result; the soft allocation probability of the region is used as the weight of the squared result; the squared results of all regions under all time points are weighted and summed and divided by the sequence length to obtain the weighted reconstruction loss of the region. The physical constraint loss is the sum of the monotonicity constraint loss, the flatness constraint loss, and the energy conservation constraint loss; The predicted displacement current and the actual displacement current are subjected to Fourier transform to obtain the predicted discrete displacement current and the actual discrete displacement current. At each frequency, the absolute value of the difference between the predicted and actual discrete displacement currents is taken and squared to obtain the squared result. The squared results corresponding to different frequencies are weighted, and the weighted sum of the squared results at all frequencies is calculated to obtain the frequency domain consistency loss. At each time point in the current sequence, the difference between the first-order difference of the predicted displacement current and the first-order difference of the theoretical displacement current is calculated. The absolute value of the difference is then squared to obtain the squared result. The squared results of all time points are summed and averaged to obtain the smoothing regularization loss.

[0033] The square wave region is divided into rising edge region, high-level plateau region, falling edge region, and low-level plateau region; The method for calculating the monotonicity constraint loss is as follows: For each sampling point in the rising edge region and the falling edge region, a penalty value is given to the sampling point that violates the rising monotonicity. The value of the penalty value is the absolute value of the first difference of the displacement current prediction value. All penalty values ​​corresponding to all sampling points are added together, and the sum is divided by the number of sampling points in the corresponding region to obtain the division result. The monotonicity constraint loss is obtained by summing the division results corresponding to the rising edge region and the falling edge region. The method for calculating the flatness constraint loss is as follows: For each sampling point in the high-level platform and low-level platform regions, calculate the square of the absolute value of the first difference of the displacement current prediction value, sum the squares of all sampling points, and take the mean; add the mean values ​​corresponding to the high-level platform and low-level platform regions to obtain the flatness constraint loss; The method for calculating the energy conservation constraint loss is as follows: The predicted displacement current and the actual displacement current are integrated over a complete square wave cycle. The absolute value of the two integrals is subtracted and squared to obtain the energy conservation constraint loss.

[0034] A global-local fusion attention network is used to read the real-time acquired current signal to obtain the corresponding displacement current prediction value; a residual signal is calculated based on the original current signal and the displacement current prediction value; and the discharge number and discharge energy of the discharge pulse are calculated based on the residual signal.

[0035] The method for counting the number of discharges is as follows: At time t, if the absolute value of the residual signal is greater than the amplitude threshold and is a local peak, then time t is recorded as one discharge; the number of discharges is obtained by counting the times that meet the judgment conditions. The method for calculating the discharge energy is as follows: During each sampling interval, the corresponding residual signal is multiplied by the square wave voltage signal. The multiplication results from all sampling intervals are summed, and the summation result is multiplied by the interval time to obtain the discharge energy.

[0036] This invention also proposes a deep learning-based system for extracting discharge pulses from power electronic devices, comprising a data acquisition module, a physical prior extraction module, a neural network construction module, a physical prior encoding module, a loss function configuration module, and a discharge pulse extraction module. The data acquisition and processing module, based on a deep learning-based method for extracting discharge pulses from power electronic devices, is characterized by: acquiring multi-cycle raw current signals and corresponding raw voltage signals of power electronic devices under the action of repetitive square wave pulse voltages, preprocessing the raw signals, and constructing a training dataset; The physical prior extraction module divides the square wave voltage signal in the training dataset into square wave regions based on the soft-assignment probability calculation method, calculates the theoretical displacement current, and generates a physical prior feature vector based on the divided square wave regions and the theoretical displacement current. The neural network building module constructs a global-local fusion attention network, including an input projection layer, a physical prior location encoding module, a multi-layer global-local fusion attention module, an output projection layer, and a post-processing smoothing layer. The physical prior coding module includes standard sine and cosine position coding, physical feature coding, and physical region feature coding; the coding result of the physical feature coding is calculated using the physical prior feature vector. The loss function configuration module constructs an adaptive partitioned physical constraint loss function, trains the global-local fusion attention network based on the training dataset, and obtains the displacement current prediction value; the adaptive partitioned physical constraint loss function is obtained by weighted summation of region-weighted reconstruction loss, physical constraint loss, frequency domain consistency loss, and smoothing regularization loss; The discharge pulse extraction module uses a global-local fusion attention network to read the real-time acquired current signal and obtain the corresponding displacement current prediction value; it calculates the residual signal based on the original current signal and the displacement current prediction value; and it calculates the discharge number and discharge energy of the discharge pulse based on the residual signal.

[0037] The present invention also proposes a terminal, including a processor and a storage medium: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps according to the method described above.

[0038] The present invention also proposes a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method.

[0039] Example 1 The first aspect of this invention proposes a method for extracting discharge pulses from power electronic devices based on deep learning.

[0040] This method constructs a deep neural network based on a global-local fusion attention and physical prototype memory mechanism, physical prior embedded position encoding, and adaptive partitioned physical constraint loss function. The trained neural network is used to extract displacement current from the original current signal and separate discharge pulses. The neural network is then embedded into a digital oscilloscope to achieve real-time processing and display.

[0041] The method includes the following steps: The overall process of the method of this invention includes steps such as data acquisition and preprocessing, physical prior feature extraction, neural network construction, loss function configuration, network training, and oscilloscope integration.

[0042] Step 1: Data Acquisition and Preprocessing like Figure 2 As shown in figure a, the original current signal I(t) and the corresponding square wave voltage signal V(t) of the power electronic device under the action of repetitive square wave pulse voltage are obtained, as follows: Figure 2 As shown in b, in the rising edge region of the square wave, the displacement current exhibits a steep change characteristic, and the discharge pulses are randomly distributed and superimposed on the displacement current. The original signal is denoised, normalized, and time-aligned to construct a training dataset. (See figure below.) Figure 3 As shown, the extreme point of the discharge pulse is located with the assistance of a PMT (photomultiplier tube); as Figure 4 As shown, precise positioning is achieved by utilizing the extreme point characteristics of the discharge pulse itself.

[0043] The mathematical expression of the original current signal is:

[0044] In the formula: The original measured current signal; This refers to the displacement current component; This is the discharge pulse component; For measuring noise; t is a time variable.

[0045] Signal normalization processing uses a standardization method:

[0046] In the formula: This is the normalized current signal; The mean value of the current signal; denoted as the standard deviation of the current signal.

[0047] like Figure 5 As shown, the method of the present invention achieves the function of accurately separating displacement current and discharge pulse from mixed current signals by integrating physical prior features and deep learning.

[0048] Step 2: Physical Prior Feature Extraction Physical prior features are extracted based on the square wave voltage signal V(t), including: (1) Square wave region division: Based on the voltage derivative dV / dt, the time axis is divided into four physical characteristic regions: rising edge region R_rising, high-level plateau region R_high, falling edge region R_falling, and low-level plateau region R_low, as shown below. Figure 6 As shown.

[0049] The square wave region division adopts a soft allocation strategy, and the probability of each time point belonging to multiple regions at the same time is determined by a Gaussian function.

[0050] The formula for calculating the soft-assignment probability of the square wave region is:

[0051] In the formula: Let be the probability that time t belongs to region r; r is the region index, r∈{1,2,3,4} corresponding to the rising edge, high-level plateau, falling edge, and low-level plateau, respectively; dV / dt is the derivative of the square wave voltage. The mean of the derivative of the square wave voltage signal is... As the central feature value of region r For the region The central eigenvalue, Let be the standard deviation of the voltage derivative.

[0052] For different regions, the central feature value is set as follows: Rising edge region:

[0053] In the formula: The peak voltage of the square wave; Rising time; This is the falling edge time.

[0054] (2) Calculation of theoretical displacement current: The waveform of theoretical displacement current is calculated based on dielectric polarization theory and capacitance model.

[0055] In the formula: This is the theoretical displacement current; The equivalent capacitance is determined by the dielectric constant and geometric parameters of the dielectric, and V(t) is a square wave voltage signal.

[0056] (3) Regional feature encoding: Generate a physical prior feature vector for each time point, containing regional identifier, voltage phase, and theoretical displacement current value:

[0057] In the formula: For physical feature vectors; This is the normalized voltage value; the superscript T indicates transpose.

[0058] Step 3: Construct a global-local fusion attention network like Figure 7 As shown, a deep neural network for displacement current reconstruction is constructed. The network includes an input projection layer, a physical prior location encoding module, a multi-layer global-local fusion attention module, an output projection layer, and a post-processing smoothing layer.

[0059] The global-local fusion attention module includes: (1) Local window self-attention branch: Self-attention is calculated locally using a learnable window size W. The calculation formula is as follows:

[0060]

[0061] In the formula: X is the input feature matrix; A linear transformation matrix for query, key, and value; , , These are the query matrix, key matrix, and value matrix, respectively; the window size W is a learnable parameter that is adaptively adjusted through gradient optimization, and its value range is constrained as follows:

[0062] In the formula: and These are the lower and upper limits of the window size, respectively, and are usually set to... =64, =256.

[0063] (2) Global Memory Attention Branch: Global attention is constructed based on the physical prototype memory mechanism, which includes memory unit groups for four square wave regions. Each group contains N learnable prototype feature vectors: In the formula: Let be the memory bond matrix for region r; Let be the memory value matrix for region r; N is the number of prototypes for each region, usually N=16~32; dv is the dimension of the value.

[0064] memory unit group Initialization is achieved by extracting features from each region in the training set and clustering them into 32 centers using the K-means algorithm, which serve as the initial values ​​for the memory units. During training, these memory units are continuously optimized using a momentum update strategy, combining the mean of the current batch features with the previous batch's memory values ​​for a weighted average.

[0065] The formula for calculating global memory attention is:

[0066] In the formula: (t) is the probability weight of time t belonging to region r, which is determined by the above formula; The memory cells are updated online using a momentum update strategy.

[0067]

[0068] In the formula: the superscript (n) indicates the nth update; β is the momentum coefficient, with a value range of 0.9≤β≤0.99; and The mean of the key-value features belonging to region r in the current batch: (3) Adaptive fusion mechanism: such as Figure 8 As shown, local and global features are dynamically combined through the learned fusion weight α(t):

[0069] Fusion weights Generated by concatenating bi-branch features and then using a feedforward network and a sigmoid activation function:

[0070]

[0071] This is the weight matrix of the feedforward network; , These are the bias vectors for the first and second layer linear transformations, respectively, and cannot be merged; σ( ) is the sigmoid activation function; ReLU is the modified linear unit activation function.

[0072] (4) Physical prior embedded position coding A physical prior location code PPEPE(t) is introduced after the input projection layer. This code consists of three components:

[0073] in: 1) Standard sine and cosine position encoding preserves sequence position information:

[0074]

[0075] In the formula: i is the dimension index; and Let be the encoded values ​​of position t in dimensions 2i and 2i+1, respectively. It refers to the dimension of the feature vector in the Transformer model, also known as the hidden layer dimension or embedding dimension.

[0076] 2) Encode physical features and map them to the model dimension using linear projection:

[0077] In the formula: The projection matrix represents the physical characteristics; It is the bias vector; This represents the physical prior feature vector.

[0078] 3) For physical region feature encoding, learnable embedding vectors are used:

[0079] In the formula: Let r be the learnable embedding vector for region r; (t) represents the regional probability weights, i.e., the soft allocation probability.

[0080] Step 4: Adaptive Partitioning Physical Constraint Loss Function An adaptive partitioning physical constraint loss function is constructed to guide network training. This loss function consists of four components:

[0081] In the formula: λ1, λ2, λ3, λ4 are loss weight coefficients, which are adaptively adjusted through the validation set.

[0082] (1) Regional weighted reconstruction loss Differentiated weights are applied to different square wave regions to enhance the reconstruction accuracy of key areas.

[0083] In the formula: L is the sequence length; The displacement current is predicted by the network; This is a label for the actual displacement current. (t) is the region weight function, which is the soft assignment probability.

[0084] (2) Physical constraint loss The displacement current predicted by the constraint satisfies the physical laws:

[0085] Among them, monotonicity constraint loss Ensure the monotonic variation characteristics of the edge region:

[0086] In the formula: For predicting the first-order difference of displacement current; and These represent the number of sampling points in the rising and falling edge regions, respectively; penalties are imposed on parts that violate monotonicity.

[0087] Flatness constraint loss Ensure the gradient in the platform region is close to zero:

[0088] Energy conservation constraint loss Ensure the energy distribution throughout the entire lifecycle matches the capacitor storage relationship:

[0089] In the formula: T is the period of the square wave; the integral is calculated using numerical methods (such as the trapezoidal rule).

[0090] (3) Frequency domain consistency loss The frequency domain characteristics of the constrained prediction signal conform to the characteristics of a square wave.

[0091] In the formula: and Predicted and actual displacement currents at different frequencies are respectively. Fourier transform coefficients at the location; is the weighting coefficient for the k-th frequency.

[0092] (4) Smoothing regularization loss Suppressing non-physical oscillations in the predicted waveform:

[0093] In the formula: L is the sequence length; First-order difference for predicting displacement current; The first-order difference of the theoretical displacement current serves as a reference for smoothness.

[0094] Step 5: Network Training Configuration Configure network training parameters, use the AdamW optimizer for gradient descent, and the weight update formula is:

[0095] In the formula: These are the network parameters for the nth iteration; The learning rate; and These are the bias correction values ​​for the first and second momentum estimates of the gradient; This is the weight decay coefficient; is the numerical stability constant.

[0096] The learning rate adopts a cosine annealing scheduling strategy. The batch size is set to B=16 and the maximum training period is Nepoch=200. An early stopping mechanism is introduced, which terminates training when the validation set loss has not improved for Npatience=20 consecutive periods.

[0097] Step 6: Oscilloscope Embedded Integration The compressed and optimized neural network model is deployed to the signal processing unit of a digital oscilloscope to achieve real-time extraction and display of discharge pulses.

[0098] (1) Real-time inference engine: The acquired current signal is segmented into sliding windows within the oscilloscope, with a window length of L. window The step size is S step The data for the i-th window is:

[0099] The data from each window is input into the neural network for forward computation to obtain the corresponding displacement current prediction value:

[0100] In the formula: fθ( ) represents the forward inference function of a neural network; This is the corresponding square wave voltage window data.

[0101] (2) The residual signal is calculated in real time using the mathematical operation unit built into the oscilloscope:

[0102] (3) Real-time statistical parameter calculation: The discharge count was determined using a threshold detection method.

[0103] In the formula: The amplitude threshold is adaptively set to 3 to 5 times the noise standard deviation. Determine whether time t is a local peak. In the threshold detection method, both the amplitude threshold and the local peak must be satisfied simultaneously to count it as one discharge cycle.

[0104] Discharge energy statistics:

[0105] in, Indicates the interval time.

[0106] Preferably, the method further includes: In step 7, the oscilloscope embedded integration adopts a pipelined processing architecture, distributing data acquisition, preprocessing, neural network inference, post-processing calculation, and display refresh to different hardware processing units for parallel execution, achieving real-time processing performance with an end-to-end latency of less than 10 milliseconds. The end-to-end latency calculation formula is as follows:

[0107] In the formula: For data collection time; Preprocessing time; For neural network inference time; Post-processing time; To display refresh time, hardware acceleration and pipeline parallelism are used to ensure... <10ms.

[0108] Preferably, the method further includes: In step 7, the oscilloscope provides a user interface that supports the following functions: ① Online loading and switching of neural network models, allowing users to select pre-trained dedicated models according to different test objects and operating conditions; ② One-button switch for discharge pulse extraction function, allowing users to switch between raw signal display and discharge pulse display; ③ Real-time adjustment of region weighting parameters, allowing users to dynamically adjust the reconstruction accuracy preferences of rising edge, falling edge, and plateau region according to their focus; ④ Data export of extraction results, supporting the saving of the separated displacement current and discharge pulse waveforms as CSV or MAT format for further analysis.

[0109] Example 2 A second aspect of this invention proposes a deep learning-based system for extracting discharge pulses from power electronic devices. The system includes: The data acquisition module is used to acquire the original current signal and square wave voltage signal of the power electronic device under the action of repetitive square wave pulse voltage, and to perform synchronous acquisition, noise reduction, normalization and time alignment processing on the signal; The physical prior extraction module is used to extract physical prior features based on the square wave voltage signal and perform formula calculations. The neural network building module is used to build deep neural networks that integrate global and local attention mechanisms; The loss function configuration module is used to construct the adaptive partitioning physical constraint loss function and perform loss calculation. The network training module is used to configure training parameters and train neural networks using training datasets; An oscilloscope integration module is used to deploy optimized neural network models to the signal processing unit of a digital oscilloscope for real-time inference and statistical calculations. The signal processing module is used to perform neural network inference, displacement current reconstruction, discharge pulse separation, and characteristic parameter calculation within the oscilloscope. The human-computer interaction module provides user interaction functions on the oscilloscope interface, such as model loading and switching, function switch control, real-time parameter adjustment, and data export and saving.

[0110] Preferably, the oscilloscope integrated module includes: The hardware interface submodule is responsible for configuring the data path between the oscilloscope's FPGA or DSP processor and the neural network inference engine, and establishing a high-speed mapping relationship from the acquisition channel to the model input. The inference engine submodule embeds an optimized neural network model and uses a sliding window mechanism to perform segmented inference on the real-time data stream, supporting pipelined parallel processing to reduce end-to-end latency. The mathematical operations submodule utilizes the oscilloscope's built-in hardware accelerator to perform post-processing algorithms such as residual calculation, threshold detection, and peak search. The display rendering submodule manages the multi-channel waveform display of the oscilloscope screen and supports synchronous refresh and scaling operations for raw current, displacement current, and discharge pulses. The statistical analysis submodule calculates the characteristic parameters of the discharge pulse in real time and presents them on the oscilloscope interface in numerical and graphical form.

[0111] Preferably, the human-computer interaction module provides the following functional interfaces: The model library management interface allows users to switch between multiple pre-installed neural network models via the oscilloscope's touchscreen or knob. Each model is specifically optimized for a particular device type, voltage level, or frequency range. The function control interface provides an enable / disable switch for the "discharge pulse extraction" function. When enabled, the oscilloscope automatically displays the separated discharge pulse waveform; when disabled, it restores the display of the original current signal. The parameter adjustment interface allows users to adjust the region weighting coefficient, threshold parameters, etc. in real time and observe the impact of different parameter settings on the extraction effect. The data export interface supports exporting the currently displayed waveform data, statistical results, and model configuration information into standard format files, facilitating subsequent offline analysis and report generation.

[0112] Preferably, the system is integrated into an intelligent digital oscilloscope hardware platform, which includes: High-speed analog-to-digital converter (ADC) with a sampling rate of no less than 100MS / s and a resolution of no less than 12 bits is used for high-precision acquisition of raw current and voltage signals. The signal processing unit, using an FPGA (Field Programmable Gate Array) or a high-performance DSP (Digital Signal Processor), is equipped with no less than 4GB of DDR memory and a hardware floating-point unit to run the neural network inference engine. The storage unit is equipped with no less than 32GB of solid-state storage for storing pre-trained neural network model libraries, user profiles, and historical measurement data. The display unit uses a high-resolution touchscreen of no less than 10 inches, which supports high refresh rate display of multi-channel waveforms and touch interaction; The communication interface is equipped with Ethernet, USB 3.0 and other interfaces, supporting remote control, data transmission and model updates.

[0113] Preferably, the global-local fusion attention module in the neural network construction module includes: The local window self-attention submodule uses a sliding window mechanism to calculate self-attention in a local area. The window size is a learnable parameter, and the initial value is set to 64~256 sampling points. The global memory attention submodule contains memory unit groups targeting four regions: rising edge, falling edge, high level plateau, and low level plateau. Each group contains 16 to 32 prototype feature vectors, with dimensions consistent with the model's hidden layer dimensions. The adaptive fusion submodule generates time-varying fusion weights through a two-layer feedforward neural network and a sigmoid activation function. The hidden layer dimension of the feedforward network is twice the model dimension.

[0114] Preferably, the physical prior location encoding module includes: The standard position code generator uses sine and cosine functions to generate position codes, and the frequency parameter is adaptively set according to the sequence length. The physical feature encoding generator extracts the instantaneous value, derivative, and theoretical displacement current of the square wave voltage, and maps them to a feature space with the same dimension as the model through linear projection. The region feature embedding layer learns trainable embedding vectors for each of the four square wave regions and performs a weighted summation based on the region probabilities. The feature fusion layer fuses the three types of codes into a unified positional coding representation through linear transformation and layer normalization.

[0115] Preferably, the region weight function in the loss function configuration module adopts a piecewise constant form: w region(t)=w edge When t belongs to the rising or falling edge region w region (t)=w plateau When t belongs to the high-level or low-level plateau region The ratio of the two reflects the degree of enhancement in the accuracy of key areas.

[0116] Preferably, the system further includes: The visualization analysis module is used to display the raw current signal, predicted displacement current, extracted discharge pulse waveform, and time-domain and frequency-domain feature distribution of discharge events in real time. The performance evaluation module is used to calculate the root mean square error, mean absolute error, peak signal-to-noise ratio, and other indicators of displacement current reconstruction, as well as the accuracy, recall, and F1 score of discharge pulse detection. The model management module is used to save trained network weights, record the loss curve and validation metrics during the training process, and support model loading and transfer learning.

[0117] Example 3 A third aspect of this invention proposes an intelligent digital oscilloscope integrating a neural network.

[0118] This oscilloscope integrates a deep neural network processing unit for discharge pulse extraction at the hardware level and provides a complete solution from signal acquisition to result display at the software level, including: The hardware architecture layer includes: (1) Multi-channel high-speed ADC, supporting at least 2 independent channels to synchronously acquire current and voltage signals; (2) FPGA or GPU-accelerated signal processing unit, pre-installed with neural network inference engine and optimized model library; (3) Large-capacity buffer memory, supporting real-time processing of continuous data streams and playback of historical data; (4) High refresh rate display screen, supporting multi-waveform simultaneous display and touch interaction; The software functional layer includes: (1) Intelligent waveform analysis software, integrating neural network model loading, real-time inference, and result visualization functions; (2) Parameter configuration interface, which provides graphical operation for model selection, function switch, and parameter adjustment; (3) Data management system, which supports the storage, export, playback and report generation of measurement data; (4) Remote control interface, supporting remote operation and automated testing via SCPI commands or WebAPI; The application functionality layer includes: (1) One-click discharge pulse extraction function: users only need to connect the device under test and click the "discharge analysis" button, and the oscilloscope will automatically complete data acquisition, neural network processing and result display; (2) Real-time waveform comparison display, displaying the original current, displacement current and discharge pulse curves on the same screen, supporting independent scaling and vernier measurement; (3) Intelligent statistical analysis, automatically identify discharge events, and statistically analyze parameters such as the number of discharges, peak distribution, and energy accumulation, and present them in the form of tables and charts; (4) Trend monitoring function: continuously monitor the evolution trend of discharge characteristic parameters over a long period of time for device aging assessment and lifetime prediction.

[0119] Preferably, the intelligent digital oscilloscope adopts a modular design: The neural network processing module is available as an optional accessory, and users can choose to install or upgrade it according to their needs. Existing oscilloscopes can add this function through firmware updates or hardware expansion cards. The model library supports online updates, allowing users to download the latest pre-trained or custom models from the cloud via a network connection to suit different application scenarios.

[0120] Example 4 The fourth aspect of this invention provides a terminal.

[0121] It includes a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method of the first aspect.

[0122] The processor is a high-performance computing processor, equipped with a graphics processing unit (GPU) or a tensor processing unit (TPU) to accelerate the training and inference of the neural network; the storage medium is a non-volatile memory used to persistently store the training dataset, network model weights, and configuration files.

[0123] The computing server terminal includes a processor and a storage medium; the storage medium is used to store instructions; the processor is used to perform operations according to the instructions to execute the steps of the method described in Embodiment 1.

[0124] Hardware configuration: Processor: Intel Xeon Gold 6248R (24 cores, 48 ​​threads, 3.0GHz base frequency) GPU: NVIDIA A100 (6912 CUDA cores, 40GB HBM2 memory) Memory: 256GB DDR4 ECC memory Storage: 2TB NVMe SSD + 10TB HDD Operating System: Ubuntu 20.04 LTS Server Application scenario: As a cloud training server, it can batch train specialized models for multiple device types and support remote submission of training tasks by multiple users.

[0125] Example 4-2: Edge computing terminal Employing the embedded computing platform NVIDIA Jetson AGXXavier: Processor: 8-core ARM Carmel CPU GPU: 512 CUDA cores, Volta architecture Memory: 32GB LPDDR4x Storage: 32GB eMMC Example 5 The fifth aspect of this invention provides a computer-readable storage medium.

[0126] It stores a computer program that, when executed by a processor, implements the steps of the method of the first aspect.

[0127] The computer-readable storage media include, but are not limited to, non-volatile storage devices such as solid-state drives, hard disk drives, flash memory, and optical discs.

[0128] Example 6 The sixth aspect of this invention proposes a neural network model file.

[0129] This file contains trained, compressed, and optimized deep neural network weight parameters, network structure definitions, and inference configuration information, stored in ONNX, TensorRT, or a custom binary format, and can be directly loaded into a digital oscilloscope or other embedded device to perform discharge pulse extraction tasks.

[0130] Example 7 This embodiment provides a preferred method for extracting discharge pulses from power electronic devices based on deep learning. By constructing a deep neural network that integrates global-local attention mechanisms, physical prior encoding, and adaptive constraint loss, the method achieves accurate separation of displacement current and discharge pulses from mixed current signals. The overall process of this method includes the following steps: Step 1: Data Acquisition and Preprocessing The experiment was conducted on an IGBT module surface discharge test platform. The test system included a repetitive square wave pulse voltage source, the IGBT module under test, a high-speed oscilloscope (sampling rate of 1GS / s), a current probe (bandwidth of 100MHz), and a coaxial cable.

[0131] The specific test conditions are set as follows: Square wave voltage peak value: Vpeak = 1000V Square wave frequency: f=1kHz Rise time: trise = 100 ns Falling edge time: tfall=100ns tfall=100ns Duty cycle: 50% Test temperature: 25℃ Relative humidity: 60% The raw current signal Iraw(t) and the corresponding square wave voltage signal V(t) are acquired for 200 consecutive square wave cycles, with each cycle containing 10,000 sampling points. The raw current signal consists of a superposition of displacement current and discharge pulses, where the displacement current exhibits steep changes at the rising and falling edges of the square wave, and the discharge pulses are superimposed on the displacement current with random time and amplitude distributions.

[0132] Data preprocessing steps: (1) Noise reduction: Median filtering is used to remove high-frequency noise, with a filter window size of 5 sampling points.

[0133] (2) Normalization: Standardize the current signal:

[0134]

[0135] (3) Time alignment: Based on the rising edge of the square wave voltage, time alignment is performed on the current signal of all cycles to ensure that sampling points with the same phase correspond to the same physical process.

[0136] (4) Tag construction: The true displacement current value is constructed for each cycle of current signal by combining PMT (photomultiplier tube) assisted positioning and manual labeling. The specific method is as follows: Under no-discharge conditions (low-voltage test), the pure displacement current is collected as a reference; under discharge conditions, the current is then measured using... Calculate the discharge pulse.

[0137] Dataset partitioning: The 200 periods of data were divided into a training set (140 periods), a validation set (40 periods), and a test set (20 periods) in a ratio of 7:2:1.

[0138] Step 2: Physical Prior Feature Extraction Physical prior features are extracted based on square wave voltage signal V(t), providing domain knowledge guidance for subsequent neural networks.

[0139] (1) Division of square wave region: First, calculate the derivative of the square wave voltage using the central difference method:

[0140] The central eigenvalues ​​and standard deviations of the four regions were determined based on the statistical properties of the voltage derivative: Rising edge region:

[0141] High-level platform:

[0142] Falling edge region:

[0143] Low-level platform:

[0144] Calculate the probability P of belonging to each region at each time point. regionr (t), the square wave period is clearly divided into four physical characteristic regions, and the displacement current in each region exhibits significantly different waveform characteristics.

[0145] (2) Calculation of theoretical displacement current: Based on the equivalent capacitance model of the IGBT module and the dielectric polarization theory, the theoretical displacement current is calculated. The equivalent capacitance of the module under test is measured using an impedance analyzer. The calculation yields:

[0146] In the rising and falling edge regions, the theoretical displacement current reaches a peak value of approximately ±25mA; in the plateau region, the theoretical displacement current approaches 0.

[0147] (3) Regional feature coding: Constructing a 7-dimensional physical feature vector f physics (t), including: 4-dimensional region probability:

[0148] 1D normalized voltage:

[0149] 1D voltage derivative: normalized dV / dt One-dimensional theoretical displacement current: normalized

[0150] Step 3: Construct a global-local fusion attention network The deep neural network architecture used for displacement current reconstruction includes the following modules: I. Input projection layer: The input data dimension is [B,L,1], where the batch size B=16 and the sequence length L=10000. A linear projection layer maps the input to a model dimension dmodel=256.

[0151] In the formula: .

[0152] II. Physical Prior Location Encoding Module: This module consists of three sub-modules: (a) Standard position code generator: Generates sine and cosine position codes PE according to the formula. sin (t)∈R 256 , where the dimension index i=0,1,…,127.

[0153] (b) Physical Feature Encoding Generator: Generates 7-dimensional physical features f physics (t) Projected to 256 dimensions:

[0154] (c) Region Feature Embedding Layer: Initializes learnable embedding vectors for the four regions. The initial value is initialized using Xavier, and the final result is obtained by fusing the three encodings. .

[0155] III. Global-Local Fusion Attention Module: The network consists of N layers (4 layers) of global-local fusion attention modules. Each layer has the same structure but independent parameters. Each module includes: (a) Local window self-attention branch: The initial window size W=128 is used as a learnable parameter to optimize during training. The linear transformation matrix of query, key, and value is set to dk=dv=64 (i.e., dmodel / 4, using a 4-head multi-head attention mechanism).

[0156] For time t, the local window range is [t]. We compute local attention using [W / 2, t+W / 2]. To handle boundary cases, we pad the ends of the sequence with zeros.

[0157] (b) Global memory attention branch: Initialize memory cells for each of the four square wave regions:

[0158] Each region contains N=32 prototype feature vectors. The memory cells are initialized using a clustering method: features belonging to each region are extracted from the training set and clustered into 32 centers using the K-means algorithm, which serve as the initial values ​​for the memory cells.

[0159] Global memory attention region weight w r (t) is provided by physical priors.

[0160] During training, the memory units undergo momentum updates, with the momentum coefficient set to β=0.95.

[0161] (c) Adaptive Fusion Submodule: Calculate the fusion weight α(t), and the parameters of the feedforward network are:

[0162] The final output combines local and global attention.

[0163] Each attention module is followed by a residual connection and layer normalization: Attention )

[0164] In the formula: FFN is a feedforward neural network, which contains two layers of linear transformation and the GELU activation function: IV. Output projection layer and post-processing smoothing layer: After six attention layers, the feature dimension remains [B, L, 256]. A linear projection layer maps it to a 1D output. To suppress high-frequency oscillations, a Savitzky-Golay filter is used for smoothing, with a window size of 11 and a polynomial order of 3.

[0165] Step 4: Adaptive Partitioning Physical Constraint Loss Function The multi-objective composite loss function follows a "priority-first" principle in weighting coefficients: reconstruction accuracy has the highest weight (λ1=2.0), followed by physical constraints (λ2=1.0), while frequency domain and smoothness have lower weights (λ3=0.5, λ4=0.3). For region weighting, although edge regions only account for 2% of sampling points, they are crucial for discharge occurrences and are weighted at 3.0, while the platform regions, which account for 98% of the total, theoretically have no discharge information and are weighted at 0.8, thus avoiding a large number of zero-value samples dominating training. Sampling point configuration is based on training set statistics: approximately 100 points at each edge are used for monotonicity constraints, and approximately 4900 points at each platform are used for flatness constraints. All weights are determined through ablation experiments and grid search optimization. The weight coefficients for each component are set as follows: λ1=2.0, λ2=1.0, λ3=0.5, λ4=0.3 (1) The weights for the region-weighted reconstruction loss are set as follows:

[0166] (2) Physical constraint loss: includes three components of physical constraint loss. Monotonicity constraint loss L monotonic The training set contains an average of 100 sampling points in the rising edge region and an average of 100 sampling points in the falling edge region. The penalty for violating monotonicity is calculated for each.

[0167] Flatness constraint loss L flatness The high-level plateau region contains an average of 4900 sampling points, the low-level plateau region contains an average of 4900 sampling points, and the sum of squares of the constraint gradients.

[0168] Energy conservation constraint loss L energy Calculate the total periodic integral energy; the theoretical value is:

[0169] (3) Frequency domain consistency loss: The frequency domain coefficients are calculated using the FFT algorithm, considering the first K=128 frequency components. The fundamental frequency of the square wave is f0=1kHz, and the frequency index set F of the fundamental frequency and the first 9 harmonics (1kHz, 3kHz, 5kHz, ..., 19kHz) is retained. harmonic ,set up:

[0170]

[0171] (4) Smoothing regularization loss: Using the gradient of the theoretical displacement current as a reference, the total loss L is obtained by weighted summation. total .

[0172] Step 5: Network Training Configuration Implement network training using the PyTorch deep learning framework, including training environment configuration: Hardware: NVIDIA RTX 3090 GPU (24GB VRAM) Software: Python 3.8, PyTorch 1.12, CUDA 11.6 Operating System: Ubuntu 20.04 LTS Training hyperparameter settings: Optimizer: AdamW, parameters β1=0.9, β2=0.999. =10 8 ,λ wd=10 5 Initial learning rate: η max =1×10 4 Learning rate scheduling: cosine annealing, period Tcycle=40, minimum learning rate ηmin=1×10 6 Batch size: B=16 Maximum training cycles: Nepoch=200 Early cessation tolerance: Npatience=20 Gradient clipping: Maximum gradient norm is 1.0 Model parameter initialization: Linear layer weights: Xavier uniform initialization Linear layer bias: zero initialization Layer normalization parameters: γ=1, β=0 Step 6: Displacement current reconstruction and discharge pulse extraction The trained neural network was used to infer data from 20 cycles of the test set, with each cycle taking approximately 8 ms to infer.

[0173] Training results as follows Figure 9 As shown, the confusion matrix on the test set demonstrates that the model achieves a classification accuracy of over 95% in all four square wave regions, validating the effectiveness of the physical prior feature extraction. Figure 10 As shown, compared with the standard Adam optimizer, the AdamW optimizer adopted in this invention, combined with the cosine annealing learning rate scheduling strategy, achieves faster convergence of the training loss function and lower final loss value, verifying the superiority of the optimization strategy.

[0174] Example 8 Neural network model compression and embedded integration with oscilloscopes.

[0175] This embodiment, based on the neural network trained in Embodiment 7, performs model compression optimization and deploys it on a digital oscilloscope to achieve real-time extraction and display of discharge pulses.

[0176] Step 1: Model Quantization The FP32 model was converted to an INT8 model using Post-Training Quantization (PTQ) technology. The FP32 model was then run on the validation set to calculate the maximum and minimum values ​​of the weights and activations of each layer. The quantized weights were stored in INT8 format, reducing the storage space from 32 bits to 8 bits, with a compression rate of 75%.

[0177] The intermediate activation values ​​of the network are dynamically quantized, and the scaling factor is calculated in real time during inference. Key layers (such as the softmax output of the attention layer) maintain FP16 precision to ensure numerical stability, forming a mixed-precision quantization scheme.

[0178] Step 2: Operator fusion and model transformation (1) Operator fusion: The main fusion modes for fusing continuous operators in a network into a single computational kernel include: Conv1D+InstanceNorm+LeakyReLU→FusedConvBlock Linear+LayerNorm+GELU→FusedFFN MatMul(Q,K)+Softmax+MatMul(·,V)→FusedAttention After fusion, memory read and write operations for intermediate results are reduced, and inference speed is improved by 1.8 times.

[0179] (2) Model conversion: Using the ONNX (Open Neural Network Exchange) format as an intermediate representation, the PyTorch model is converted to ONNX, and then TensorRT is used to optimize the ONNX model to generate an inference engine optimized for embedded GPUs.

[0180] Step 3: Oscilloscope Software Architecture Design The oscilloscope software uses a layered architecture: Hardware Abstraction Layer (HAL): Encapsulates hardware interfaces such as ADC, GPU, and display, and provides a unified API for upper layers to call.

[0181] Data acquisition layer: Configure ADC sampling parameters, establish DMA (direct memory access) channels to achieve high-speed data transmission, and store the acquired data in a circular buffer.

[0182] Signal processing layer: includes preprocessing module, neural network inference module, and post-processing module. (1) Preprocessing module: Denoising, normalization and physical prior extraction are performed in parallel on the GPU with a processing latency of <1ms.

[0183] (2) Neural network inference module: Load the TensorRT optimized model and perform inference on the GPU.

[0184] (3) Post-processing module: performs discharge pulse calculation, threshold detection, and characteristic parameter statistics.

[0185] Display rendering layer: Manages the multi-channel waveform display of the oscilloscope screen, and displays statistical parameters such as discharge count, peak amplitude, and average energy in real time. The refresh rate is set to 30fps to ensure a smooth visual experience.

[0186] Human-Computer Interaction Layer: Its main functions include: (1) Function switch: Enable / disable the "intelligent discharge analysis" function with one key. When enabled, the oscilloscope automatically loads the neural network model and starts real-time processing; when disabled, it restores the waveform display mode of the traditional oscilloscope.

[0187] (2) Model library management: 3 dedicated models are pre-installed: users select the corresponding model through the drop-down menu, the system automatically uninstalls the current model and loads the new model, and the switching time is <2 seconds.

[0188] (3) Parameter adjustment: Provides slider control to adjust key parameters in real time. The adjustment takes effect immediately after the parameter is adjusted. Users can observe the effect of different parameters on the extraction effect.

[0189] (4) Data Export: Supports exporting waveform data and statistical reports. Example 9 Discharge Pulse Extraction System Based on Deep Learning This embodiment provides a complete system implementation, including a hardware platform, software modules, and a user interface.

[0190] Includes the following modules: 1. Data Acquisition Module Hardware components: High-speed ADC: AD9680 (14-bit resolution, 1 GS / s sampling rate) Signal conditioning circuit: differential amplifier, anti-aliasing filter (cutoff frequency 200MHz) Synchronization trigger circuit: FPGA-based multi-channel precise synchronization (time error <1ns) Functionality implementation: Acquire raw current signal and square wave voltage signal Perform noise reduction processing (median filtering, Gaussian filtering). Perform normalization (Formula 2). Execution time alignment (based on cross-correlation algorithm) 2. Physical Prior Extraction Module Hardware acceleration based on FPGA: Voltage derivative calculation: A pipelined architecture is used to implement center differential, with a delay of 3 clock cycles. Regional probability calculation: A pre-stored Gaussian function lookup table is used to quickly look up the value based on dV / dt. Theoretical displacement current calculation: directly calculated based on capacitance and voltage derivative. Processing latency: <100ns, meeting real-time requirements.

[0191] 3. Neural Network Inference Module GPU-based implementation: GPU Model: NVIDIA Jetson AGXXavier Inference framework: TensorRT 8.0 Batch processing: Supports batch size B∈[1,32], which can be dynamically adjusted according to real-time requirements. Optimization techniques: Kernel merging: Merging consecutive CUDA kernels to reduce startup overhead. Memory pool: Pre-allocates GPU memory to avoid dynamic memory allocation. Pipelining: Using CUDA streams to achieve parallel data transfer and computation 4. Post-processing module Functionality implementation: Discharge pulse calculation: Perform residual calculation Threshold detection: Perform peak detection using an adaptive threshold (based on noise standard deviation). Feature extraction: Calculate 12 feature parameters including discharge count, peak amplitude, duration, energy, and frequency. Smoothing Filter: Savitzky-Golay Filter smooths the output waveform 5. Display rendering module Implementing a graphical interface based on the Qt framework: Waveform display: Supports 3-channel real-time waveform display with a refresh rate of 30fps; Scaling operation: Supports independent scaling of the time axis and amplitude axis, with scaling factor from 1x to 1000x; Vernier measurement: Dual vernier measurement of time difference and amplitude difference; Statistical charts: The bar chart shows the distribution of discharge amplitude, and the line chart shows the evolution of discharge energy over time.

[0192] Compared with the prior art, the beneficial effects of the present invention are as follows: (1) Achieve end-to-end automated discharge pulse extraction, significantly simplifying the technical process. This invention, based on a global-local fusion attention network, achieves end-to-end automatic processing from raw current signal to discharge pulse extraction. Only a current signal and a square wave voltage signal need to be input to automatically complete displacement current reconstruction and discharge pulse separation, eliminating the need for manual intervention to set complex parameters. Compared to existing technologies that require first using a PMT to locate the discharge pulse's maximum point, or manually setting a threshold in the current signal to find the maximum value, and then identifying all discharge pulses before and after the maximum point—a multi-step process—this invention simplifies the process from a three-step method of "peak point location → parameter setting → local extraction" to a one-step method of "direct input → automatic output," reducing operational complexity by 67% and making discharge pulse identification simpler and more intelligent.

[0193] Experimental data shows that traditional thresholding methods require operators to set 5-8 parameters (including threshold size, window length, filtering parameters, peak determination criteria, etc.) based on experience. Differences in settings by different operators lead to repeatability errors in the extraction results as high as 15%-25%. PMT-assisted methods require additional photomultiplier tube equipment, increasing system costs by 30%-50%, and the light signal acquisition is affected by ambient light interference, with a false detection rate increasing by 18% in strong light environments. The method of this invention requires no parameter adjustment or auxiliary equipment, and the extraction results are completely consistent across different users, times, and environments, with a repeatability error of <1%, truly achieving intelligent and automatic analysis.

[0194] (2) Integrating prior physical knowledge to overcome the accuracy bottleneck of pure data-driven methods This invention innovatively embeds prior physical knowledge from the field of power electronics into the architecture design and training optimization of deep neural networks. Through Physical Prior Embedded Position Encoding (PPEPE) and an adaptive partitioning physical constraint loss function, physical laws such as square wave region division, theoretical displacement current models, and the law of energy conservation are explicitly encoded into the network. Compared to purely data-driven black-box neural networks that require a large number of labeled samples to implicitly learn physical laws, this invention achieves high accuracy even with a small sample size (only 140 cycles in the training set), with a test set RMSE of 0.78 mA, compared to 2.35 mA for the pure CNN method, representing a 67.2% improvement in accuracy.

[0195] (3) A global-local fusion attention mechanism is adopted to capture features at multiple time scales simultaneously. The global-local fusion attention mechanism proposed in this invention handles local details and global patterns separately through a dual-branch structure: the local window self-attention branch adopts a sliding window mechanism with a learnable window size, reducing the computational complexity from O(L) of the standard Transformer. 2 ) decreased to O(L When the sequence length L=10000, the computational load is reduced by 98.7% and the inference speed is increased by 5.6 times. The global memory attention branch is based on physical prototype memory units, which maintain typical feature prototypes for the four square wave regions respectively. It is continuously optimized through the momentum update mechanism, enabling the network to have long-term memory capabilities.

[0196] Ablation experiments verified the necessity of dual-branch fusion: when using only local attention, the network struggles to establish long-range dependencies within the square wave period, and the flatness constraint fails in the plateau region, increasing the RMSE to 1.52 mA (95% performance degradation); when using only global attention, the network fails to adequately model the high-frequency transient features of the discharge pulse, resulting in decreased separation capability in dense discharge scenarios and an increase in the false negative rate from 3.5% to 12.8%. The adaptive weight α(t) of the fusion mechanism dynamically balances local and global features at different times, with α(t) ≈ 0.7 (biased to local) in the rising / falling edge region and α(t) ≈ 0.3 (biased to global) in the plateau region, achieving spatiotemporally adaptive feature extraction.

[0197] (4) Construct an adaptive partitioning physical constraint loss function to enhance the reconstruction accuracy of key areas. The adaptive partitioned physical constraint loss function designed in this invention comprises four components (region-weighted reconstruction loss, physical constraint loss, frequency domain consistency loss, and smoothing regularization loss). Through region-differentiated weights (edge ​​region weight wedge=3.0, plateau region weight wplateau=0.8), the network focuses on optimizing the reconstruction accuracy of the rising and falling edges of the square wave. Experimental results show that the baseline model trained with uniform weights has an RMSE of 2.10 mA in the rising edge region, while the method of this invention reduces the RMSE in this region to 1.05 mA, improving the accuracy in key regions by 50%. The physical constraint loss, through three sub-losses—monotonality constraint, flatness constraint, and energy conservation constraint—ensures that the predicted displacement current conforms to the physical laws of capacitor charging and discharging. The frequency domain consistency loss, through weighted constraints on the fundamental frequency and harmonic components of the square wave, ensures that the reconstructed displacement current conforms to the theoretical spectral characteristics of square wave excitation in the frequency domain.

[0198] (5) Realize model compression and oscilloscope embedded integration, creating a new paradigm for real-time intelligent analysis. This invention innovatively deploys deep neural networks directly into the signal processing unit of a digital oscilloscope. Compared to the traditional two-stage process of "oscilloscope acquisition → offline analysis," which takes 5 minutes to complete a test, this invention achieves real-time processing of "acquisition and analysis simultaneously," reducing test time to 30 seconds and improving efficiency by 10 times.

[0199] This disclosure can be a system, method, and / or computer program product. A computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for causing a processor to implement various aspects of this disclosure.

[0200] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing. The computer-readable storage media used herein are not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0201] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0202] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0203] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the protection scope of the claims of the present invention.

Claims

1. A method for extracting discharge pulses from power electronic devices based on deep learning, characterized in that, include: The original current signal and corresponding square wave voltage signal of the power electronic device under the action of repetitive square wave pulse voltage are obtained in multiple cycles. The original signal is preprocessed to construct a training dataset. The square wave voltage signal in the training dataset is divided into square wave regions based on the soft-assignment probability calculation method, and the theoretical displacement current is calculated. Based on the divided square wave regions and the theoretical displacement current, a physical prior feature vector is generated. A global-local fusion attention network is constructed, including an input projection layer, a physical prior location encoding module, a multi-layer global-local fusion attention module, an output projection layer, and a post-processing smoothing layer; The physical prior location encoding module includes standard sine and cosine location encoding, physical feature encoding, and physical region feature encoding; the encoding result of the physical feature encoding is calculated using the physical prior feature vector. An adaptive partitioning physical constraint loss function is constructed, and the global-local fusion attention network is trained based on the training dataset to obtain the displacement current prediction value; the adaptive partitioning physical constraint loss function is obtained by weighted summation of region weighted reconstruction loss, physical constraint loss, frequency domain consistency loss, and smoothing regularization loss; A global-local fusion attention network is used to read the real-time acquired current signal and obtain the corresponding displacement current prediction value. The residual signal is calculated based on the original current signal and the predicted displacement current value; The number of discharges and the discharge energy of the discharge pulse are calculated based on the residual signal.

2. The method for extracting discharge pulses from power electronic devices based on deep learning according to claim 1, characterized in that: The specific implementation method for the square wave region division is as follows: The time axis of the square wave voltage signal is divided into four physical characteristic regions using the soft-assignment probability calculation method: rising edge region, high level plateau region, falling edge region, and low level plateau region. The method for calculating the soft assignment probability is as follows: The mean value of the derivative of the square wave voltage signal is used as the central characteristic value of region r, and the Gaussian function value of region r is calculated; the ratio of the Gaussian function value to the sum of the Gaussian function values ​​of all regions is calculated, and the ratio is used as the soft allocation probability. The theoretical displacement current is calculated by multiplying the equivalent capacitance by the square wave voltage derivative at time t to obtain the theoretical displacement current. The implementation method of the region feature encoding is as follows: The physical feature vector is composed of the soft allocation probability, normalized voltage value, voltage derivative, and theoretical displacement current value corresponding to different regions.

3. The method for extracting discharge pulses from power electronic devices based on deep learning according to claim 1, characterized in that: The global-local fusion attention module includes a local window self-attention branch, a global memory attention branch, and an adaptive fusion mechanism; In the local window self-attention branch, local features are obtained through self-attention calculation; The implementation process of the global memory attention branch is as follows: Memory unit groups are constructed for different regions, including memory key matrices and memory value matrices; The self-attention calculation results based on the corresponding memory unit groups in different regions are weighted and summed to obtain the global features; The implementation method of the adaptive fusion mechanism is as follows: The local features and the global features are fused based on the set fusion weights to obtain fused features.

4. The method for extracting discharge pulses from power electronic devices based on deep learning according to claim 1, characterized in that: The encoding result of the physical prior location encoding module is obtained by summing the encoding result of the standard sine and cosine location encoding, the encoding result of the physical feature encoding, and the encoding result of the regional feature encoding. The position code value of the corresponding position and the corresponding dimension obtained by combining the soft assignment probability with the sine and cosine calculation is used as the encoding result of the standard sine and cosine position code; The physical prior feature vector is projected through a linear projection to obtain the encoding result of the physical feature encoding; The learnable embedding vectors of the corresponding regions are weighted using the soft assignment probabilities of different regions, and the weighted sum of all learnable embedding vectors is calculated to obtain the encoding result of the physical region feature encoding.

5. The method for extracting discharge pulses from power electronic devices based on deep learning according to claim 1, characterized in that: The specific calculation methods for the region-weighted reconstruction loss, physical constraint loss, frequency domain consistency loss, and smoothing regularization loss are as follows: In different square wave regions at each time point of the current sequence, the absolute value of the difference between the predicted displacement current and the actual displacement current is taken and squared to obtain the squared result; the soft allocation probability of the region is used as the weight of the squared result. The weighted sum of the squared results for all regions under all time periods is divided by the sequence length to obtain the weighted reconstruction loss for that region. The physical constraint loss is the sum of the monotonicity constraint loss, the flatness constraint loss, and the energy conservation constraint loss; The predicted displacement current value and the actual displacement current are subjected to Fourier transform to obtain the predicted discrete value of displacement current and the actual discrete value of displacement current. At each frequency, the absolute value of the difference between the predicted discrete value of displacement current and the actual discrete value of displacement current is taken and squared to obtain the squared result; the squared results corresponding to different frequencies are weighted, and the weighted sum of the squared results at all frequencies is calculated to obtain the frequency domain consistency loss. At each time point in the current sequence, the difference between the first-order difference of the predicted displacement current and the first-order difference of the theoretical displacement current is calculated. The absolute value of the difference is then squared to obtain the squared result. The squared results of all time points are summed and averaged to obtain the smoothing regularization loss.

6. The method for extracting discharge pulses from power electronic devices based on deep learning according to claim 5, characterized in that: The square wave region is divided into rising edge region, high-level plateau region, falling edge region, and low-level plateau region; The method for calculating the monotonicity constraint loss is as follows: For each sampling point in the rising edge region and the falling edge region, a penalty value is given to the sampling point that violates the rising monotonicity. The value of the penalty value is the absolute value of the first difference of the displacement current prediction value. All penalty values ​​corresponding to all sampling points are added together, and the sum is divided by the number of sampling points in the corresponding region to obtain the division result. The monotonicity constraint loss is obtained by summing the division results corresponding to the rising edge region and the falling edge region. The method for calculating the flatness constraint loss is as follows: For each sampling point in the high-level platform and low-level platform regions, calculate the square of the absolute value of the first difference of the displacement current prediction value, sum the squares of all sampling points, and take the mean; add the mean values ​​corresponding to the high-level platform and low-level platform regions to obtain the flatness constraint loss; The method for calculating the energy conservation constraint loss is as follows: The predicted displacement current and the actual displacement current are integrated over a complete square wave cycle. The absolute value of the two integrals is subtracted and squared to obtain the energy conservation constraint loss.

7. The method for extracting discharge pulses from power electronic devices based on deep learning according to claim 1, characterized in that: The method for counting the number of discharges is as follows: At time t, if the absolute value of the residual signal is greater than the amplitude threshold and is a local peak, then time t is recorded as one discharge; the number of discharges is obtained by counting the times that meet the judgment conditions. The method for calculating the discharge energy is as follows: During each sampling interval, the corresponding residual signal is multiplied by the square wave voltage signal. The multiplication results from all sampling intervals are summed, and the summation result is multiplied by the interval time to obtain the discharge energy.

8. A deep learning-based power electronic device discharge pulse extraction system utilizing the method described in any one of claims 1-7, comprising a data acquisition module, a physical prior extraction module, a neural network construction module, a physical prior encoding module, a loss function configuration module, and a discharge pulse extraction module, characterized in that: The data acquisition and processing module, based on a deep learning-based method for extracting discharge pulses from power electronic devices, is characterized by: acquiring multi-cycle raw current signals and corresponding raw voltage signals of power electronic devices under the action of repetitive square wave pulse voltages, preprocessing the raw signals, and constructing a training dataset; The physical prior extraction module divides the square wave voltage signal in the training dataset into square wave regions based on the soft-assignment probability calculation method, calculates the theoretical displacement current, and generates a physical prior feature vector based on the divided square wave regions and the theoretical displacement current. The neural network building module constructs a global-local fusion attention network, including an input projection layer, a physical prior location encoding module, a multi-layer global-local fusion attention module, an output projection layer, and a post-processing smoothing layer. The physical prior coding module includes standard sine and cosine position coding, physical feature coding, and physical region feature coding; the coding result of the physical feature coding is calculated using the physical prior feature vector. The loss function configuration module constructs an adaptive partitioned physical constraint loss function, trains the global-local fusion attention network based on the training dataset, and obtains the displacement current prediction value; the adaptive partitioned physical constraint loss function is obtained by weighted summation of region-weighted reconstruction loss, physical constraint loss, frequency domain consistency loss, and smoothing regularization loss; The discharge pulse extraction module uses a global-local fusion attention network to read the real-time acquired current signal and obtain the corresponding displacement current prediction value; it calculates the residual signal based on the original current signal and the displacement current prediction value; and it calculates the discharge number and discharge energy of the discharge pulse based on the residual signal.

9. A terminal, comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to perform the steps of the method according to any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1-7.