A lightning very low frequency electromagnetic wave signal compression method based on importance perception
Patent Information
- Application Number
- CN202610746810.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-28
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2046-05-28
AI Technical Summary
(1)多数方法以整体重构误差最小化为目标,更关注全局重构精度,对瞬态脉冲这类局部剧烈变化的波形容易产生幅值衰减、峰值偏移或波形失真,从而破坏与电网故障关联的关键时序特征,影响故障定位的准确性;
(1)本发明通过构建包含共享特征编码器、时序-频域双路注意力模块及双分支解码结构的重要性预测模型,能够自适应地学习雷电甚低频电磁波信号的时频特性,精准区分脉冲核心区域与背景噪声片段,避免了传统方法依赖人工设定阈值或固定规则的主观性与误判风险,显著提升了对关键瞬态脉冲的识别鲁棒性。
Smart Images

Figure CN122268379B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of signal processing technology, and in particular to a method for compressing very low frequency electromagnetic wave signals from lightning based on importance perception. Background Technology
[0002] Monitoring and analyzing lightning electromagnetic waves is a crucial step in power grid fault early warning and location. With advancements in monitoring technology and acquisition equipment, modern lightning very low frequency (VLF) electromagnetic wave signals are typically acquired at high sampling rates and continuously over long periods, resulting in extremely large data volumes per record, often containing tens of thousands or even more sampling points. The storage, transmission, and processing of this massive amount of data places significant pressure on system bandwidth, real-time performance, and long-term archiving. Especially for rapid power grid fault location, lightning strikes easily trigger discharge faults and insulation damage. The ability to quickly and accurately extract fault-related features from lightning signals and locate fault points directly impacts the stable operation of the power grid and the reliability of power supply. Therefore, while ensuring no loss of critical information, efficient compression of lightning electromagnetic wave time-series signals has become a vital technical requirement for improving data transmission efficiency and supporting rapid fault diagnosis and location.
[0003] Lightning electromagnetic wave signals are characterized by significant non-stationarity, the coexistence of transient pulses and strong background noise. Among these, the lightning pulses, with their specific waveform characteristics, truly contain information about the physical processes and the correlation features of power grid faults, while background noise (such as random electromagnetic interference and system background noise) is highly random and lacks a specific pattern. Noise segments not only lack valuable fault diagnosis information but also consume significant storage and transmission resources, delaying fault location. An ideal compression method should effectively distinguish between pulses and noise, preserving pulse waveform details and timing characteristics to the maximum extent during compression, while significantly compressing noise. This would reduce data volume without compromising the accuracy of subsequent fault feature extraction and location.
[0004] Currently, compression methods for lightning electromagnetic wave signals mainly suffer from the following shortcomings: 1. Uniform downsampling method This method downsampling at fixed intervals is simple to implement and has low computational cost, but it does not consider the non-stationary characteristics of the signal. The key information of a lightning pulse is concentrated in an extremely short transient segment. Uniform sampling is prone to information loss at the pulse rising edge, peak value, and fine waveform, which in turn affects the accuracy of subsequent lightning feature extraction and fault location, and may even lead to location deviation or delay.
[0005] 2. Compression methods based on the transform domain Methods based on Fourier transform, wavelet transform, or discrete cosine transform achieve compression by mapping the signal to the frequency domain or multi-scale domain and then clipping the coefficients. These methods are effective for stationary or quasi-stationary signals, but for strong transient, sparse, and time-varying signals like lightning, they often require manually designed transform bases or threshold parameters, resulting in poor adaptability. They struggle to maintain the integrity of pulse characteristics under different lightning events and noise environments, hindering reliable fault location.
[0006] 3. Rule-based or threshold-based adaptive sampling methods These methods perform non-uniform sampling by setting preset amplitude, slope, or energy thresholds to retain more points in the pulse region. However, their performance is highly dependent on human experience in setting the thresholds, making them subjective. In complex scenarios such as low signal-to-noise ratio and multiple pulse superposition, they are prone to misjudgment or missed detection, and cannot accurately assess the importance of signal segments, which may lead to the loss of critical fault-related pulse information.
[0007] 4. Deep learning methods based on autoencoders In recent years, deep learning-based compression methods based on autoencoders have attracted attention in time-series data processing, but they still have significant limitations in the compression of lightning electromagnetic wave signals: (1) Most methods aim to minimize the overall reconstruction error and pay more attention to the global reconstruction accuracy. They are prone to amplitude attenuation, peak shift or waveform distortion for transient pulses and other locally drastic waveforms, thereby destroying the key timing characteristics associated with power grid faults and affecting the accuracy of fault location. (2) The complex structure of alternating pulses and noise in lightning signals makes it difficult for existing autoencoder methods to achieve stable compression and reconstruction effects across different signal morphologies, and lacks a targeted mechanism for preserving fault-related pulse characteristics. (3) The compression results are usually stored in the form of hidden features or low-dimensional vectors, which must be reconstructed by a specific decoding model. This not only increases the complexity of the system, but also makes it difficult to be directly compatible with the existing lightning analysis and fault location process based on the original time series, thus restricting its promotion and application in actual engineering.
[0008] In summary, existing methods for compressing VLF electromagnetic wave signals from lightning have significant drawbacks, including insufficient retention of key transient information at high compression ratios, weak long-term sequence modeling capabilities, reliance on manual parameters and empirical thresholds, and poor compatibility with existing engineering processes. Therefore, there is an urgent need for an efficient compression method that can adaptively distinguish between pulses and noise, prioritize the retention of key fault features during compression, possess strong long-term sequence modeling capabilities, and be easily integrated into existing lightning monitoring and fault location processes. Summary of the Invention
[0009] To overcome the shortcomings of the prior art, this invention proposes a method for compressing very low frequency electromagnetic wave signals of lightning based on importance perception.
[0010] To achieve the above objectives, the present invention employs the following technical solution: a method for compressing very low frequency electromagnetic wave signals from lightning based on importance perception, comprising: S1: Obtain the original lightning very low frequency electromagnetic wave timing signal and preprocess it to obtain the normalized timing signal; S2: Input the normalized time series signal into the importance prediction model to obtain the importance score of all time segments; The model includes a shared feature encoder, a time-to-frequency domain dual-path attention module, and a dual-branch decoding structure. The dual-branch decoding structure includes a reconstruction decoder and an importance predictor. The shared feature encoder is used to extract time-series features based on key pulse morphology using normalized time-series signals to obtain the final encoded features. The time-to-frequency domain dual-path attention module is used to extract and fuse time-domain pulse features and frequency-domain resonance characteristics to obtain time-frequency enhanced features. The reconstruction decoder is used to generate a reconstructed signal based on the time-frequency enhanced features and to train the model based on the reconstructed signal. The importance predictor is used to generate importance scores for all time segments based on the time-frequency enhanced features. S3: Based on the importance scores of all time segments, the original lightning VLF electromagnetic wave time series signal is processed using an importance-aware adaptive compression sampling strategy to obtain the final compressed signal.
[0011] Preferably, the shared feature encoder adopts N A one-dimensional convolutional neural network with multiple layers, and a pulse-enhanced convolutional module integrated in each layer; n The layer encoding extraction process is as follows: a one-dimensional convolutional layer is used to encode the features of the previous layer. E n-1 Convolution, normalization, and non-linear activation are performed to extract basic convolutional features, while pulse-enhanced convolution modules are used to identify the encoded features of the previous layer. E n-1 The pulse pattern in the data is used to generate dynamic gain weights; then, a pulse enhancement adjustment factor is used. The dynamic gain weights are scaled to construct a residual multiplicative gate operator; finally, the basic convolutional features are multiplied element-wise by the multiplicative gate operator to obtain the first... n Layer coding features E n The calculation method is as follows: ; in, n =1,2,..., N , E0 represents the normalized timing signal. ; E n-1 For the first n -1 encoding features of convolutional layers; W n For the first n Convolutional layer kernel weights; s n For the first n The total downsampling stride in the convolutional layer; BN is the batch normalization layer; GELU is the Gaussian error linear unit activation function. This indicates element-wise multiplication; The impulse enhancement adjustment factor is denoted by ; Sigmoid(·) is the Sigmoid activation function. C pulse For pulsed convolution kernels; Conv1D n (·) indicates a one-dimensional convolution operation; The encoded features obtained from the last layer of the shared feature encoder are labeled as the final encoded features. Z .
[0012] Preferably, the processing procedure of the time-frequency domain dual-path attention module includes: First, the temporal attention branch contributes to the final encoded features. Z Perform three independent linear transformations to generate a time-series query. ,key Sum ,Right now , , ; in, , and These are the time-series query, key, and value learnable weight matrices, respectively. , , These are time-series queries, key and value biases, respectively; The frequency domain attention branch first applies the final encoded features Z Perform a short-time Fourier transform to map time-domain features to frequency-domain features. Then, using logic consistent with the temporal attention branch, perform three independent linear transformations on the frequency-domain features to generate a frequency-domain query. ,key Sum ; Finally, the fused attention score matrix is calculated to achieve time-frequency feature fusion and obtain the time-frequency enhanced feature H. TF The calculation formula is as follows: ; Where Softmax(·) is the normalized attention weight; These are learnable fusion weights; , These are the learnable channel weight vectors in the time and frequency domains, respectively; the superscript T denotes the transpose of the matrix. d This represents the channel dimension of the final encoded feature.
[0013] Preferably, the reconstruction branch adopts a hierarchical decoding structure symmetrical to the shared feature encoder, and the operation process is as follows: when n Value less than N At that time, the first n The layer decoding operation is as follows: ; when n The value is equal to N At that time, the final decoding operation is: ; in, N The number of coding layers for a shared feature encoder; For the first n Layer deconvolution decoding operation; front N Each decoding structure in layer -1 includes a transposed convolutional layer, a batch normalization (BN) layer, and a GELU activation function layer; D n-1 For the first n -1 layer of deconvolution decoding features, D 0 Real-time frequency enhancement features H TF Concat(,) is a feature concatenation operation; UpSample(·) is an upsampling operation. E N-n For the first Nn Encoding features of convolutional layers; For reconstructing the signal.
[0014] Preferably, the operation process of the importance predictor is as follows: First, time-frequency enhancement features are processed using a multilayer perceptron (MLP). H TF The feature vector at each time step is mapped to a time-frequency fusion feature, yielding the importance prior value for each time step: ; in, h r Time-frequency enhancement features H TF In the r Feature vectors at each time step; For the first rPrior values for the importance of each time step; W l This is the weight matrix; v This is the weight vector; c This is the output layer bias scalar; Here is the hidden layer bias vector; Sigmoid(·) is the Sigmoid activation function; This yields an importance prior vector composed of the importance prior values at all time steps. ; The length after convolution downsampling; Then the importance prior vector P Upsampled to the original signal length via linear interpolation. L This yields the final importance prior vector composed of the final importance prior values. ; The final importance prior vector Divided into E A series of consecutive segments of equal length; each segment contains M The final prior importance value for each time step is used to obtain the importance score for each time segment. s k ; in, E=L / M The importance score for each time segment is defined as the average of the prior importance values for all time steps within that segment.
[0015] The preferred loss function for the importance prediction model is: ; in, i Number the time steps; L This represents the total sampling time length of the signal; α The adaptive enhancement coefficients for the reconstruction loss; For the first i Normalized signal at each time step; For the first i The reconstructed signal at each time step; t To reconstruct the error sensitivity parameters; l Weights for importance regularization terms; Indicates the first i The importance score of the segment in which each time step is located; or It is a very small constant.
[0016] Preferably, step S3 includes: For importance score Key segments More than 95% of the original sampling points are retained, and non-uniform weighted sampling based on local gradient intensity is used within the key segments; The importance score is satisfied. The transition segments are uniformly sampled in each segment, and selected AG There are 1 sampling point, among which, A This is a preset proportional coefficient; G The preset number of samples; The importance score is satisfied. s k < Redundant segments are removed by sparse sampling, retaining only the overall trend information of the electromagnetic wave signal.
[0017] Preferred key segments for importance scoring Retain over 95% of the original sampling points; the probability distribution of each sampling point selected within the key segment. Por ( j ) is represented as: ; in, j Number the sampling points within the key segments; For the first y A set of sampling points in each key segment; For the first i Local gradient intensity at each sampling point; For the normalized first i The original electromagnetic wave signal at each sampling point d This is a preset minimum constant; c It is an exponential factor.
[0018] Preferably, step S1 includes: The acquired raw lightning very low frequency electromagnetic wave timing signal x : ; in, i Number the time steps; L Indicates the total sampling time length of the signal; For the first i The electromagnetic wave amplitude at each time step; R represents the real number field; calculate L The mean of the original lightning VLF electromagnetic wave time series signal with a total time series length. m : ; Calculate the standard deviation of the original lightning VLF electromagnetic wave time series signals with a total time series length of L. : ; in, It is a very small constant; The raw very low frequency electromagnetic waves of lightning at each time step are normalized based on the mean and standard deviation: Thus, the normalized timing signal is obtained. = .
[0019] A readable storage medium having a computer program stored thereon, which, when executed, implements the aforementioned method for compressing very low frequency electromagnetic wave signals from lightning based on importance awareness.
[0020] The advantages of this invention are: (1) By constructing an importance prediction model that includes a shared feature encoder, a time-frequency domain dual-path attention module and a dual-branch decoding structure, this invention can adaptively learn the time-frequency characteristics of lightning very low frequency electromagnetic wave signals, accurately distinguish the pulse core region from background noise segments, avoid the subjectivity and misjudgment risk of traditional methods that rely on manually set thresholds or fixed rules, and significantly improve the robustness of identification of key transient pulses.
[0021] (2) The present invention integrates a pulse-enhanced convolution module in the shared feature encoder. By identifying the rising and falling edge patterns in the input features, dynamic gain weights are generated, and a residual multiplicative gate operator is constructed to perform pulse-guided feature calibration on the basic convolution features. This effectively suppresses background noise interference, enhances the feature expression of the real pulse shape, and provides a high-quality feature foundation for subsequent importance assessment and signal reconstruction.
[0022] (3) The present invention adopts a time-frequency dual attention module to capture pulse features and resonance characteristics from the time domain and frequency domain respectively and fuse them, which solves the problem that traditional convolutional neural networks are difficult to model long sequence dependencies. At the same time, it enriches the comprehensiveness of feature expression, so that the model can still output accurate importance scores stably in complex scenarios such as low signal-to-noise ratio and multiple pulse superposition.
[0023] (4) The importance prediction branch designed in this invention can output the importance score of each time segment. Combined with the importance-aware adaptive hierarchical compression strategy, more than 95% of the original sampling points are retained for key segments and non-uniform sampling with local gradient intensity weighting is adopted. Uniform sampling and sparse sampling are adopted for transition segments and redundant segments respectively. Thus, under the condition of high compression ratio, the key waveform details such as the rising edge, peak and falling edge of the lightning pulse are retained to the maximum extent, avoiding the loss of key information caused by uniform downsampling or transform domain compression.
[0024] (5) This invention uses multi-task joint training of reconstruction branch and importance prediction branch, and designs a composite loss function that combines reconstruction loss and importance perception weighting, so that the model can adaptively focus on information-dense pulse regions during training, effectively suppressing the interference of background noise on reconstruction error, significantly reducing pulse peak error and arrival time error, improving pulse waveform correlation coefficient, and ensuring the availability of compressed signal in subsequent applications such as fault location.
[0025] (6) The compressed signal output by the present invention is directly stored in the original time sequence format such as CSV. The signal amplitude sequence can be restored without relying on a specific decoding model. It has good compatibility with the existing lightning monitoring and fault location process, reduces the complexity of system integration, and is easy to promote and apply in actual engineering.
[0026] (7) Experimental verification shows that at a compression ratio of 10:1, the pulse peak error of the present invention is less than 1%, the pulse arrival time error is no more than 1 sampling point, the pulse waveform correlation coefficient reaches more than 0.97, and the comprehensive indicators such as mean square error and signal-to-noise ratio are better than uniform downsampling, wavelet transform compression, fixed threshold adaptive sampling and traditional autoencoder compression methods. This fully demonstrates that the present invention has excellent preservation ability of key lightning pulse features while compressing efficiently. Attached Figure Description
[0027] Figure 1 This is a flowchart of the method steps of the present invention; Figure 2 This is a schematic diagram of the original lightning very low frequency electromagnetic wave timing signal in an embodiment of the present invention; Figure 3 This is a schematic diagram of the compressed waveform of the original lightning very low frequency electromagnetic wave timing signal in an embodiment of the present invention; Figure 4 This is a comparison diagram of pulse waveforms in an embodiment of the present invention; Figure 5 This is a schematic diagram of the overall architecture of the model of the present invention. Detailed Implementation
[0028] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0029] Example 1 like Figure 1-Figure 5 As shown, this invention proposes a method for compressing very low frequency electromagnetic wave signals from lightning based on importance awareness, comprising: S1: Obtain the original lightning very low frequency electromagnetic wave timing signal and perform preprocessing to obtain the normalized timing signal.
[0030] Suppose that the original very low frequency electromagnetic wave time-series signal x obtained by the lightning location system is a discrete sampling sequence: ; in, i Number the time steps; L Indicates the total sampling time length of the signal; x i For the first i The electromagnetic wave amplitude at each time step; R represents the real number field.
[0031] Lightning VLF electromagnetic wave time-series signals from different sources often exhibit amplitude scale differences. These differences can lead to gradient update imbalances during subsequent deep model training, reducing the effectiveness of model feature learning. To eliminate the impact of amplitude scale on modeling while preserving the temporal structure and relative change characteristics of the signal, sample-by-sample standardization is performed on the original lightning VLF electromagnetic wave time-series signals of L total time-series lengths. The specific steps are as follows: calculate L The mean of the original lightning VLF electromagnetic wave time series signal with a total time series length. m This reflects the overall amplitude level of the signal. ; calculate L Standard deviation of the original lightning VLF electromagnetic wave time series signal with a total time series length s To reflect the amplitude fluctuation range of the signal, a minimum constant is introduced. Avoid the extreme case where the denominator is zero: ; The raw very low frequency electromagnetic waves of lightning at each time step are normalized based on the mean and standard deviation: Thus, the normalized timing signal is obtained. = .
[0032] After normalization, the signal has a mean of 0 and a standard deviation of 1, which maps time-series signals of different scales to the same data distribution range, providing a stable data input foundation for feature learning of subsequent deep models.
[0033] S2: Input the normalized time series signal into the importance prediction model to obtain the importance score of all time segments; The importance prediction model constructs a multi-task learning architecture, simultaneously completing two core tasks: signal reconstruction and importance prediction. The overall model architecture includes a shared feature encoder (integrating a pulse-enhanced convolutional module), a time-frequency domain dual-path attention module (TFDA), and a dual-branch decoding structure. The dual-branch decoding structure includes a reconstruction decoder and an importance predictor. These modules work together to achieve local pulse feature enhancement, time-frequency domain correlation capture, and accurate importance assessment. The shared feature encoder extracts time-series features based on key pulse morphology using normalized time-series signals to obtain the final encoded features. The time-frequency domain dual-path attention module extracts and fuses time-domain pulse features and frequency-domain resonance characteristics to obtain time-frequency enhanced features. The reconstruction decoder generates a reconstructed signal based on the time-frequency enhanced features and trains the model using the reconstructed signal. The importance predictor generates importance scores for all time segments based on the time-frequency enhanced features.
[0034] S21: Shared Feature Encoder (Encoding Module) A four-layer one-dimensional convolutional neural network (CNN) is employed, with a pulse-enhanced convolution (PEC) module integrated after each convolutional layer to achieve local temporal feature extraction and dynamic enhancement of pulse features. Dimensionality compression is achieved through layer-by-layer downsampling. Traditional CNNs often struggle to effectively distinguish between pulse features and random noise in temporal signal processing. Therefore, the pulse-enhanced convolution module is introduced to adaptively enhance the real pulse pattern and suppress background noise.
[0035] No. n Layer coding features E n The extraction process is as follows: using a one-dimensional convolutional layer to process the input features E n-1 Convolution, normalization, and non-linear activation are performed to extract basic convolutional features, while the input features are identified through a pulse-enhanced convolutional module (PEC). E n-1 The pulse pattern is used to generate dynamic gain weights; then, the pulse enhancement adjustment factor is used. The dynamic gain weights are scaled to construct a residual multiplicative gate operator; finally, the basic convolutional features are multiplied element-wise by the multiplicative gate operator to obtain the first... n Layer coding features E n This enables adaptive enhancement of the real pulse pattern and suppression of background noise.
[0036] The shared feature encoder is used to extract rising / falling edge features from the input signal to generate a dynamic gating signal while downsampling and compressing the data dimension layer by layer. It also uses a pulse-guided feature calibration of the mainstream convolution features through a multiplicative gating mechanism, thereby outputting highly robust temporal features that suppress background noise interference and retain the key pulse morphology.
[0037] No. n Layer encoding operations can be represented as: ; when n When =1, ; in, E 0 represents the normalized timing signal. ; E n-1 For the first n -1 encoding features of convolutional layers; W n For the first n Convolutional layer kernel weights; s n For the first n The total downsampling stride in the convolutional layer; BN is the batch normalization layer, used to alleviate gradient vanishing; GELU is the Gaussian error linear unit activation function; This indicates element-wise multiplication; The impulse enhancement adjustment factor is denoted by ; Sigmoid(·) is the Sigmoid activation function. C pulse The convolutional kernel is a pulsed convolution with a size of 5 and fixed weights of [2, 4, 0, -4, -2], used to monitor rising / falling edges; Conv1D n (·) is used for one-dimensional convolution operations.
[0038] The final encoded features are obtained after encoding by the shared feature encoder. Z = E 4 , The total temporal length after downsampling by the shared feature encoder. d This represents the channel dimension of the final encoded feature.
[0039] S22: Timing-Frequency Domain Dual-Path Attention Module (TFDA) To simultaneously capture temporal impulse features and frequency resonance characteristics, a dual-path attention mechanism is designed, including a temporal attention branch and a frequency domain attention branch, addressing the challenges of CNNs in modeling long sequence dependencies and the insufficient representation of features in a single domain. The core computational flow is as follows: First, the temporal attention branch contributes to the final encoded features.Z Perform three independent linear transformations to generate a time-series query. Q t ,key K t Sum V t ,Right now , , ; ( , , These are the time-series query, key, and value learnable weight matrices, respectively. , , These are time-series queries, key and value biases, respectively; after transformation, all three dimensions are [missing information]. L '× d .
[0040] The frequency domain attention branch first applies the final encoded features Z Perform a Short-Time Fourier Transform (STFT) to map time-domain features to frequency-domain features (preserving information such as frequency distribution and resonant peaks). Then, using logic consistent with the time-series attention branch, perform three independent linear transformations on the frequency-domain features to generate a frequency-domain query. Q f ,key K f Sum V f .
[0041] Finally, the fused attention score matrix is calculated to achieve time-frequency feature fusion and obtain time-frequency enhanced features. H TF This enhances the comprehensiveness of feature representation. The calculation formula is as follows: ; Where Softmax(·) is the normalized attention weight; H TF Enhanced features are generated using the output of the Time-Frequency Domain Dual-Path Attention Module (TFDA); The learnable fusion weights are initialized to 0.5. w t , w f These are the learnable channel weight vectors in the time and frequency domains, respectively; the superscript T is the transpose of the matrix.
[0042] S23: Dual-branch decoding structure This includes the reconstruction branch formed by the reconstruction decoder and the importance prediction branch formed by the importance predictor.
[0043] (1) Refactoring branches In the reconstruction branch, the decoder and encoder modules have a symmetrical structure. To preserve the multi-scale features extracted during the encoding process, the decoder first introduces skip connections, directly fusing the features output from each layer of the encoder module with the input features of the corresponding layer of the decoder (the output features of the layer above the decoder). Then, a four-level transposed convolution is used to expand the feature dimensions and restore the time length. Finally, a nonlinear transformation is performed to reconstruct a signal with the same time length as the original signal – the reconstructed signal. This improves the accuracy of reconstruction, namely: In this embodiment of the invention, the reconstruction branch adopts a hierarchical decoding structure symmetrical to the encoding module, and achieves feature dimension expansion and temporal length recovery through four-level transposed convolution; specifically, the top-level features are first... H TF As initial input D 0. In each decoding operation, skip connections are used to combine the upsampled and aligned coding layer features through the feature concatenation operator Concat. E 4-n Compared with the previous layer's decoding features D n-1 Fusion is performed along the channel dimension to preserve multi-scale temporal details; subsequently, the decoded features from the first three layers are restored layer by layer through transposed convolution, batch normalization, and non-linear activation mapping; finally, the fourth transposed convolutional layer is connected via skip connections. D 3 and upsampling E 1. Channel concatenation is performed, and the fused features of the concatenated signals are linearly mapped to reconstruct a reconstructed signal with the same dimension as the original sampling sequence. This significantly improves the accuracy of pulse feature reconstruction.
[0044] First, perform initialization. D 0= H TF ; No. n Layer decoding operations ( n ≤3): ; Final output layer (fourth layer) ; Among them, ConvTranspose1D n For the first n The layer deconvolution decoding operation consists of a module structure of "transposed convolutional layer + batch normalization layer (BN) + GELU activation function" in the first 3 layers. To reconstruct the signal, its length is the same as the original normalized signal. Completely identical; UpSample(·) is an upsampling operation; Concat(,) is a feature concatenation operation (skip connection), which directly fuses the output features of the current layer of the decoder with the features of the corresponding layer of the encoding module, for example, D 1=[1,2,3], E 1=[3,4,5],(Concat( D 1, E 1))=[1,2,3,3,4,5].
[0045] (2) Importance prediction branch First, time-frequency enhancement features are processed using a multilayer perceptron (MLP). H TF The feature vector at each time step is mapped to a scalar time-frequency fusion feature, yielding the importance prior value for each time step: ; in, h r = H TF [ r ,:]∈R d Time-frequency enhancement features H TF In the r Feature vectors at each time step; For the first r Prior values for the importance of each time step; W l This is the weight matrix; v This is the weight vector; c This is the output layer bias scalar. c ∈R; b l This is the hidden layer bias vector; D h is the dimension of the hidden layer; Sigmoid(·) is the Sigmoid function, which compresses the output to the (0,1) interval; the superscript T is the transpose of the matrix.
[0046] This yields an importance prior vector composed of the importance prior values at all time steps. , ( L ' is the length after convolutional downsampling.
[0047] Then, the importance prior vector P is upsampled to the original signal length using linear interpolation. L This yields a final importance prior vector composed of the final importance prior values corresponding to the length of each sampling point in the original signal. ∈[0,1] LThis ensures that each sampling point of the original signal obtains a corresponding importance prior value.
[0048] The final importance prior vector Divided into E ( E = L / M ) consecutive segments of equal length, each segment containing M The final prior importance value for each time step is used to obtain the importance score for each time segment. s k The importance score for each time segment is defined as the average of the prior values of the final importance corresponding to all time steps within that segment.
[0049] This leads to an importance score vector composed of importance scores for all time segments. .
[0050] The reconstruction branch accurately recovers the complete waveform of the signal through four levels of transposed convolution and skip connections. On the one hand, it provides a "real signal benchmark" for the importance prediction branch. The difference in reconstruction accuracy between the lightning pulse region (rising edge, peak, and falling edge) and the background noise region can guide the importance prediction branch to quickly locate the key signal information-rich region and avoid misjudging noise as effective features. On the other hand, the multi-scale local features, pulse enhancement features, and time-frequency fusion features relied upon by the reconstruction branch in the decoding process can be directly reused by the pulse sensing mechanism of the importance prediction branch without additional feature extraction. This greatly improves the targeting and efficiency of importance assessment and ensures that the importance score can accurately anchor the time segment containing the key features of the lightning pulse signal, providing a reliable basis for subsequent differentiated compression sampling strategies.
[0051] Model training To guide the model to learn key signal features more effectively, especially transient information such as lightning pulses, we designed a composite loss function that combines the basic reconstruction loss with an importance-aware weighting mechanism. This loss function allows the model to adaptively focus on information-dense regions of the signal (such as pulse peaks and edges) rather than stationary background noise during training, thus achieving a better balance between compression and reconstruction. The calculation formula is: ; in, i Number the time steps; L This represents the total sampling time length of the signal; α The adaptive enhancement coefficients for the reconstruction loss; For the first i Normalized signal at each time step; For the firsti The reconstructed signal at each time step; t To reconstruct the error sensitivity parameters; l Weights for importance regularization terms; Indicates the first i The importance score of the segment in which each time step is located; or =10 -7 It is a very small constant.
[0052] S3: Based on the importance scores of all time segments, the original lightning VLF electromagnetic wave time series signal is processed hierarchically using an importance-aware adaptive compression sampling strategy to obtain the final compressed signal. This includes: To meet the target compression length L Under the premise of meeting constraints such as the Shannon sampling theorem, the proposed strategy maximizes the retention of key information in electromagnetic wave signals. Different sampling strategies are applied to time segments at different importance levels based on their importance scores.
[0053] Specifically, time segments are divided into three levels based on importance scores, and each level is processed separately: Key segments For importance score Key segments More than 95% of the original sampling points are retained to ensure that key details in the pulse waveform are not lost.
[0054] To further optimize the distribution of sampling points, a non-uniform weighted sampling method based on local gradient intensity is adopted within the key segments. This allows sampling points to automatically cluster in regions where electromagnetic wave signals change drastically, namely at the rising edge, peak, and falling edge of the pulse, thereby enhancing the ability to preserve waveform details while maintaining high sampling density.
[0055] Probability distribution of each sampling point selected within the key segment Por ( j ) is represented as: ; in, j Number the sampling points within the key segments. For the first j The set of sampling points in a key segment; let the number of key segments be . Y ; For the first i The local gradient intensity at each sampling point is used to reflect the drastic change in the electromagnetic wave signal, in the rising edge, peak, and falling edge regions of the pulse. G ( i The value is relatively large. For the normalized first iThe original electromagnetic wave signal value of each sampling point δ= 10 -6 This is a preset minimum constant used to prevent the gradient from being zero; c =2 is an exponential factor used to amplify the sampling probability of high gradient points.
[0056] Based on the sampling probability distribution of each sampling point in the key segment Por ( j ), through weighted random sampling from The required number of sampling points are extracted, and the sampling points are automatically concentrated in the region where the electromagnetic wave signal changes drastically, thereby enhancing and preserving the details of the pulse waveform.
[0057] Transition segment The importance score is satisfied. Transition segments, with 0.6g selected evenly within each segment. G There are 1 sampling points, among which G This is the preset number of samples.
[0058] Redundant fragments The importance score is satisfied. Redundant segments are processed using a sparse sampling strategy, retaining only the overall trend information of the electromagnetic wave signal. Specifically, the redundant segments are further divided into several sub-segments, each retaining its start point, end point, maximum amplitude point, and minimum amplitude point.
[0059] Finally, the electromagnetic wave signal data after the above compression and sampling process is stored in CSV format.
[0060] Example 2 This invention proposes a readable storage medium storing a computer program, which, when executed, implements a method for compressing very low frequency electromagnetic wave signals of lightning based on importance awareness.
[0061] Example 3 like Figure 2-Figure 3 As shown, Step 1: Data preparation and compression parameter initialization
[0062] The experiment used very low frequency (VLF) lightning electromagnetic wave signals collected by ground positioning stations of the power grid lightning monitoring system. The original sampling rate was 10MHz, and each signal contained 20,000 sampling points (corresponding to 2ms). The dataset contained 10,000 valid signals, divided into training, validation, and test sets in an 8:1:1 ratio, all stored in CSV format. Model training employed dynamic batch processing (batch size 8) and incorporated data augmentation strategies such as pulse position offset and amplitude perturbation to improve the model's generalization ability to different lightning scenarios. In the preprocessing stage, sample-by-sample normalization was performed on each signal to eliminate amplitude scale differences between signals from different sources while preserving core temporal features, ultimately yielding a standardized signal with a mean of 0 and a standard deviation of 1.
[0063] Step 2: Importance Assessment Network and Compression Strategy Design 2.1 Importance Assessment Network The network adopts a multi-task learning architecture, the core of which includes a shared feature encoder, a time-frequency domain dual-path attention module, and a dual-branch decoding structure, simultaneously completing signal reconstruction and segment importance scoring output.
[0064] Shared feature encoder: It consists of 4 layers of one-dimensional convolutional neural network. Each convolutional layer integrates a pulse enhancement module to enhance the lightning pulse features and suppress background noise. Dimensional compression is achieved through layer-by-layer downsampling.
[0065] The time-frequency domain dual-path attention module captures signal features from the time and frequency domains respectively, and enhances the comprehensiveness of feature representation after fusion, solving the problem that traditional convolution is difficult to model long sequence dependencies.
[0066] Dual-branch decoding structure: The reconstruction branch restores the original length of the signal and preserves multi-scale details through 4-level transposed convolution and skip connections; the importance prediction branch combines multi-module feature output and accurately outputs the importance score (0-1 interval) of each time segment through the impulse sensing mechanism. The signal is divided into several segments according to a fixed number of sampling points.
[0067] Model training is guided by a customized loss function and employs an adaptive optimizer. After multiple training rounds, the optimal model on the validation set is retained.
[0068] 2.2 Adaptive Hierarchical Compression Strategy Based on importance scores, signal segments are divided into three levels, and differentiated sampling is implemented under the constraint of target compression ratio: Key segments (high importance score): corresponding to the core region of the lightning pulse, retaining more than 95% of the sampling points, using a weighted sampling method, and increasing the sampling density in areas of drastic pulse changes to ensure that key features are not distorted.
[0069] Transition segment (medium importance score): First, select a portion of sampling points evenly, and then allocate the remaining points to locations where the signal changes drastically, taking into account both signal trends and local features.
[0070] Redundant segments (low importance score): mainly background noise, using sparse sampling, only retaining the start point, end point and amplitude extreme points of the segments to maximize the compression of data volume.
[0071] Step 3: Importance Assessment and Adaptive Compression Execution The normalized signal from the test set is input into the trained model to obtain the importance score of each segment and complete the normalization process. The number of sampling points is allocated according to the score, prioritizing the sampling density of key segments. Finally, two types of data are output with a 90% compression rate: compressed signal amplitude stored in CSV format.
[0072] Through the method of the present invention, the following was obtained Figure 3 The diagram shows the result of compressing the original very low frequency electromagnetic wave timing signal of lightning. As can be seen from the diagram, the waveform after compression is consistent with the original waveform.
[0073] like Figure 4 The waveform compression and reconstruction were achieved using an autoencoder method. It can be seen that, under the same compression ratio, the waveform reconstructed by the autoencoder method shows obvious peak positions and reduced peak amplitudes.
[0074] Example 4 (a) Compression ratio Compression ratio (CR) is a core efficiency metric for measuring the data reduction capability of an algorithm. It is defined as the ratio of the original signal data size to the compressed signal data size. The formula is as follows: ; in, S o The data size representing the original signal, S c This represents the data size of the compressed signal.
[0075] (ii) Root Mean Square Error ; in, x i The original signal, To reconstruct the signal, N This is the signal length. MSE The lower the value, the smaller the overall reconstruction error.
[0076] (iii) Signal-to-Noise Ratio (SNR) It is the most classic fidelity metric in communication and signal processing, used to measure the energy ratio of the effective signal component to the noise (i.e., reconstruction error) in the reconstructed signal. Its calculation formula is: ; SNR The higher the value, the better the reconstruction quality.
[0077] (iv) Local Feature Fidelity Index To assess the retention of pulse characteristics, which are crucial for fault localization, local metrics need to be introduced: Pulse Amplitude Error (PAE): Measures the accuracy of pulse peak amplitude reconstruction.
[0078] ; in, A p and These are the peak amplitudes of the original and reconstructed pulses, respectively.
[0079] Pulse Arrival Time Error (PATE): Measures the accuracy of reconstructing the time position of the pulse start or peak point, and directly affects time difference positioning.
[0080] ; in, t p and These are the reference time points for the original and reconstructed pulses, respectively, in units of the number of sampling points.
[0081] Pulse Waveform Correlation Coefficient (PCC): Within a local time window containing the pulse, the Pearson correlation coefficient between the original signal and the reconstructed signal is calculated to assess the similarity of the overall waveform shape.
[0082] ; Here, represents the time window centered on the pulse. and These represent the mean values of the original and reconstructed signals within the window, respectively. PCC The closer it is to 1, the better the waveform shape is preserved.
[0083] Table 1
[0084] Of course, those skilled in the art will recognize that the present invention is not limited to the details of the exemplary embodiments described above, but also includes the same or similar structures that can be implemented in other specific forms without departing from the spirit or essential characteristics of the invention. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0085] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
[0086] The technologies, shapes, and structures not described in detail in this invention are all known technologies.
Claims
1. A method for compressing lightning very low frequency electromagnetic wave signals based on importance perception, characterized in that, include: S1: Obtain the original lightning very low frequency electromagnetic wave timing signal and preprocess it to obtain the normalized timing signal; S2: Input the normalized time series signal into the importance prediction model to obtain the importance score of all time segments; The model includes a shared feature encoder, a time-frequency domain dual-path attention module, and a dual-branch decoding structure, which includes a reconstruction decoder and an importance predictor. The shared feature encoder is used to extract time-series features based on key pulse morphology using normalized time-series signals to obtain the final encoded features; The time-frequency domain dual-path attention module is used to extract and fuse time-domain pulse features and frequency-domain resonance characteristics to obtain time-frequency enhancement features; The reconstruction decoder is used to generate a reconstructed signal based on time-frequency enhancement features, and to train the model based on the reconstructed signal; the importance predictor is used to generate importance scores for all time segments based on time-frequency enhancement features. S3: Based on the importance scores of all time segments, the original lightning VLF electromagnetic wave time series signal is processed using an importance-aware adaptive compression sampling strategy to obtain the final compressed signal.
2. The method for compressing very low frequency electromagnetic wave signals of lightning based on importance awareness as described in claim 1, characterized in that, Shared feature encoder adopts N A one-dimensional convolutional neural network with multiple layers, and a pulse-enhanced convolutional module integrated in each layer; n The layer encoding extraction process is as follows: a one-dimensional convolutional layer is used to encode the features of the previous layer. E n-1 Convolution, normalization, and non-linear activation are performed to extract basic convolutional features, while pulse-enhanced convolution modules are used to identify the encoded features of the previous layer. E n-1 The pulse pattern in the data is used to generate dynamic gain weights; then, a pulse enhancement adjustment factor is used. The dynamic gain weights are scaled to construct a residual multiplicative gate operator; finally, the basic convolutional features are multiplied element-wise by the multiplicative gate operator to obtain the first... n Layer coding features E n The calculation method is as follows: in, n =1,2,..., N , E 0 represents the normalized timing signal. ; E n-1 For the first n -1 encoding features of convolutional layers; W n For the first n Convolutional layer kernel weights; s n For the first n The total downsampling stride in the convolutional layer; BN is the batch normalization layer; GELU is the Gaussian error linear unit activation function. This indicates element-wise multiplication; The impulse enhancement adjustment factor is denoted by ; Sigmoid(·) is the Sigmoid activation function. C pulse For pulsed convolution kernels; Conv1D n (·) indicates a one-dimensional convolution operation; The encoded features obtained from the last layer of the shared feature encoder are labeled as the final encoded features. Z .
3. The method for compressing very low frequency electromagnetic wave signals of lightning based on importance perception as described in claim 1, characterized in that, The processing steps of the time-frequency domain dual-path attention module include: First, the temporal attention branch contributes to the final encoded features. Z Perform three independent linear transformations to generate a time-series query. ,key Sum ,Right now , , ; in, , and These are the time-series query, key, and value learnable weight matrices, respectively. , , These are time-series queries, key and value biases, respectively; The frequency domain attention branch first applies the final encoded features Z Perform a short-time Fourier transform to map time-domain features to frequency-domain features. Then, using logic consistent with the temporal attention branch, perform three independent linear transformations on the frequency-domain features to generate a frequency-domain query. ,key Sum ; Finally, the fused attention score matrix is calculated to realize time-frequency feature fusion, and time-frequency enhanced features H are obtained TF The calculation formula is as follows: Where Softmax(·) is the normalized attention weight; These are learnable fusion weights; , These are the learnable channel weight vectors in the time and frequency domains, respectively; the superscript T denotes the transpose of the matrix. d This represents the channel dimension of the final encoded feature.
4. The method for compressing very low frequency electromagnetic wave signals of lightning based on importance perception as described in claim 1, characterized in that, The reconstruction branch adopts a hierarchical decoding structure symmetrical to the shared feature encoder, and the operation process is as follows: when n Value less than N At that time, the first n The layer decoding operation is as follows: when n The value is equal to N At that time, the final decoding operation is: in, N The number of coding layers for a shared feature encoder; For the first n Layer deconvolution decoding operation; front N Each decoding structure in layer -1 includes a transposed convolutional layer, a batch normalization (BN) layer, and a GELU activation function layer; D n-1 For the first n -1 layer of deconvolution decoding features, D 0 Real-time frequency enhancement features H TF Concat(,) is a feature concatenation operation; UpSample(·) is an upsampling operation. E N-n For the first Nn Encoding features of convolutional layers; For reconstructing the signal.
5. The method for compressing very low frequency electromagnetic wave signals of lightning based on importance awareness as described in claim 1, characterized in that, The operation process of the importance predictor is as follows: First, time-frequency enhancement features are processed using a multilayer perceptron (MLP). H TF The feature vector at each time step is mapped to a time-frequency fusion feature, yielding the importance prior value for each time step: in, h r Time-frequency enhancement features H TF In the r Feature vectors at each time step; For the first r Prior values for the importance of each time step; W l This is the weight matrix; v This is the weight vector; c This is the output layer bias scalar; Here is the hidden layer bias vector; Sigmoid(·) is the Sigmoid activation function; This yields an importance prior vector composed of the importance prior values at all time steps. ; The length after convolution downsampling; Then the importance prior vector P Total sampling time length upsampled to the original signal via linear interpolation L This yields the final importance prior vector composed of the final importance prior values. ; The final importance prior vector Divided into E A series of consecutive segments of equal length; each segment contains M The final importance prior value for each time step is used to obtain the importance score for each time segment. s k ; in, E=L / M The importance score for each time segment is defined as the average of the prior importance values for all time steps within that segment.
6. The method for compressing very low frequency electromagnetic wave signals of lightning based on importance awareness as described in claim 1, characterized in that, The loss function for the importance prediction model is: in, i Number the time steps; L This represents the total sampling time length of the original signal; α The adaptive enhancement coefficients for the reconstruction loss; For the first i Normalized signal at each time step; For the first i The reconstructed signal at each time step; τ To reconstruct the error sensitivity parameters; λ Weights for importance regularization terms; Indicates the first i The importance score of the segment in which each time step is located; η It is a very small constant.
7. The method for compressing very low frequency electromagnetic wave signals of lightning based on importance perception as described in claim 1, characterized in that, Step S3 includes: For importance score Key segments More than 95% of the original sampling points are retained, and non-uniform weighted sampling based on local gradient intensity is used within the key segments; The importance score is satisfied. The transition segments are uniformly sampled in each segment, and selected AG There are 1 sampling point, among which, A This is a preset proportional coefficient; G The preset number of samples; and These are the preset upper and lower limits for the rating; The importance score is satisfied. s k < Redundant segments are removed by sparse sampling, retaining only the overall trend information of the electromagnetic wave signal.
8. The method for compressing very low frequency electromagnetic wave signals of lightning based on importance awareness as described in claim 7, characterized in that, Key segments for importance scoring Retain over 95% of the original sampling points; the probability distribution of each sampling point selected within the key segment. Por ( j ) is represented as: in, j Number the sampling points within the key segments; For the first y A set of sampling points in each key segment; For the first i Local gradient intensity at each sampling point; For the normalized first i The original electromagnetic wave signal at each sampling point δ This is a preset minimum constant; γ It is an exponential factor.
9. The method for compressing very low frequency electromagnetic wave signals of lightning based on importance perception as described in claim 1, characterized in that, Step S1 includes: The acquired raw lightning very low frequency electromagnetic wave timing signal x : in, i Number the time steps; L Indicates the total sampling time length of the original signal; For the first i The electromagnetic wave amplitude at each time step; R represents the real number field; calculate L The mean of the original lightning VLF electromagnetic wave time series signal with a total sampling time length of 1 original signal. μ : Calculate the standard deviation of the original lightning VLF electromagnetic wave time series signal with a total time series length of L original signal samples. : in, It is a very small constant; The raw very low frequency electromagnetic waves of lightning at each time step are normalized based on the mean and standard deviation: Thus, the normalized timing signal is obtained. = .
10. A readable storage medium, characterized in that, It stores a computer program, which, when executed, implements the method for compressing very low frequency electromagnetic wave signals of lightning based on importance perception as described in any one of claims 1-9.
Citation Information
Patent Citations
Lightning electromagnetic pulse waveform compression method and system based on artificial intelligence
CN114417722A
Audio signal processing method and device, equipment and storage medium
CN121054011A