Threat detection method, device and equipment based on deep learning

By using discrete wavelet transform and high-frequency attention penalty mechanism, targeted adversarial perturbation samples are generated, which improves the robustness and detection accuracy of optical network threat detection model, solves the vulnerability of existing methods to covert physical layer attacks, and ensures the security and stability of power dispatch data network.

CN121864345APending Publication Date: 2026-04-14EAST CHINA BRANCH OF STATE GRID CORP
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing deep learning-based threat detection methods are vulnerable to adversarial attacks when facing covert physical layer attacks on optical networks, and struggle to cope with adaptive attacks, resulting in decreased detection accuracy and insufficient generalization.

Method used

High-frequency detail coefficients sensitive to attacks are selected by using discrete wavelet transform, targeted adversarial perturbations are generated, and combined with a high-frequency attention penalty mechanism, the target model is trained to generate temporal adversarial samples with high-frequency interference capabilities, thereby improving the model's robustness to high-frequency perturbations.

Benefits of technology

It significantly improves the detection accuracy and robustness of abnormal states in optical networks, and can effectively identify attacks such as optical signal attenuation and transient pulse interference, ensuring the operational resilience of the power dispatch data network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121864345A_ABST
    Figure CN121864345A_ABST
Patent Text Reader

Abstract

The invention provides a threat detection method, device and equipment based on deep learning, and the method comprises the steps: carrying out the discrete wavelet transformation of an obtained power optical network time series data signal, and obtaining a target coefficient for capturing different frequency data features; screening out an attack-sensitive high-frequency detail coefficient subset from the target coefficients in combination with a preset signal energy threshold; generating directional adversarial disturbance based on the high-frequency detail coefficient subset and the approximation coefficient; reconstructing the directional adversarial disturbance and the high-frequency detail coefficient subset to generate a time domain adversarial sample with high-frequency interference capability; the target model is trained in combination with the confrontation sample and a high-frequency attention penalty mechanism, a threat detection model is obtained, and the high-frequency attention penalty mechanism is used for penalizing excessive attention of the target model to pseudo high-frequency interference in the training process; and calling the threat detection model to perform threat detection on the power optical network data in the target power communication scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network security technology, and in particular to a threat detection method, apparatus, and device based on deep learning. Background Technology

[0002] Currently, optical networks have become the core foundation of power dispatch data networks, supporting data exchange for key business operations such as power grid operation monitoring and command interaction between power dispatching departments and between dispatching and substations. They also carry the transmission of time-series data on optical network operation status, such as optical power and signal amplitude. Their capacity and coverage continue to expand with the intelligent upgrading of the power grid. However, the continuous increase in system complexity, the deepening dependence of power services on optical networks, and the high-value attributes of the transmitted dispatching commands and equipment status data have made them a key target for cyberattacks. These attacks not only cover traditional forms such as service interruption and data eavesdropping, but also include covert physical layer attacks such as optical signal attenuation injection, instantaneous pulse interference, and pseudo-high-frequency detail tampering. These attacks tamper with the high-frequency characteristics of optical transmission signals (corresponding to the core characteristics of abnormal optical network states), disguising them as natural fluctuations or normal details, making them difficult to identify by traditional monitoring methods and directly threatening the operational integrity and signal transmission security of the power dispatch data network. Therefore, accurately defending against highly concealed and targeted attacks on the high-frequency anomalies of optical network time series data, ensuring the optical transmission system's ability to accurately identify normal and abnormal states, and thus guaranteeing the operational resilience of the power dispatch data network, has become a key and increasingly challenging task for the security of the power dispatch data network.

[0003] Early research highlighted the resilience of optical networks against physical layer attacks, including signal jamming and eavesdropping. Recent studies have emphasized the increasing sophistication of cyberattacks targeting optical networks, underscoring the need for advanced detection mechanisms to ensure operational integrity. These studies collectively point to the growing complexity of threats, ranging from service disruptions to covert physical layer manipulation. With the development of artificial intelligence, deep learning (DL)-based detection methods have become powerful tools for identifying attack-induced faults in optical networks by analyzing communication logs. These methods leverage the ability of neural networks to model complex patterns in high-dimensional data, achieving high detection accuracy across various fault types. However, these methods are vulnerable to adversarial attacks (such as FGSM causing classification errors through subtle perturbations, and PGD attacks further exposing vulnerabilities). For example, Fast Gradient Sign Method (FGSM) can cause deep models to misclassify through small, carefully designed perturbations. Similarly, Projected Gradient Descent (PGD) attacks further expose the vulnerability of deep learning-based detection methods in critical applications such as optical networks. To mitigate this vulnerability, researchers have explored a variety of defense strategies: enhancing the robustness of the model through adversarial examples may reduce the detection accuracy on clean data and make it difficult to cope with adaptive attacks; input preprocessing, feature denoising and other methods attempt to remove adversarial noise, but they lack generalization ability in multi-class attacks. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of the present invention provide a threat detection method based on deep learning, comprising: The obtained power optical network time series data signal is subjected to discrete wavelet transform to obtain target coefficients for capturing data features at different frequencies. The target coefficients include approximation coefficients for capturing low-frequency trends and detail coefficients for capturing high-frequency details. By combining a preset signal energy threshold, a subset of high-frequency detail coefficients that are sensitive to attacks are selected from the target coefficients; A directional adversarial perturbation is generated based on the high-frequency detail coefficient subset and approximation coefficients, wherein the directional adversarial perturbation is a wavelet perturbation; The targeted adversarial perturbation and the high-frequency detail coefficient subset are reconstructed to generate a temporal adversarial sample with high-frequency interference capability; The target model is trained by combining the adversarial examples and the high-frequency attention penalty mechanism to obtain a threat detection model for attacking and detecting abnormal threats to power optical networks. The high-frequency attention penalty mechanism is used to penalize the target model for excessive attention to pseudo-high-frequency interference during the training process. The threat detection model is invoked to perform threat detection on power optical network data in the target power communication scenario.

[0005] In one embodiment, performing discrete wavelet transform on the obtained power optical network time series data signal to obtain target coefficients for capturing data features at different frequencies includes: The obtained power optical network time series data signal is subjected to low-pass filtering and high-pass filtering to obtain the initial approximation coefficients and initial detail coefficients. Based on the initial approximation coefficients and initial detail coefficients, a step-by-step decomposition is performed to obtain the approximation coefficients and multiple resolution coefficients corresponding to different resolutions used to form the detail coefficients.

[0006] In one embodiment, the step of filtering out a subset of attack-sensitive high-frequency detail coefficients from the target coefficients by combining a preset signal energy threshold includes: The scale threshold used to form the signal energy threshold is determined based on historical power optical network attack data, wherein the scale in the scale threshold is the number of decomposition levels involved in decomposing the initial approximation coefficients and the initial detail coefficients; The decomposition level corresponding to each resolution coefficient is compared with the scale threshold to filter out the subset of high-frequency detail coefficients that are sensitive to attacks.

[0007] In one embodiment, generating directional adversarial perturbations based on the subset of high-frequency detail coefficients and approximation coefficients includes: The approximate function and the subset of high-frequency detail coefficients are reconstructed into a time-domain signal based on inverse wavelet transform; The time-domain signal is input into the target model to determine the target loss; Determine the gradient of the target loss with respect to the high-frequency detail subset, the gradient being used to characterize the direction of attention of the target model that is easily misled; The adversarial perturbation is generated based on the gradient.

[0008] In one embodiment, generating the adversarial perturbation based on the gradient includes: The global norm upper limit is determined based on the maximum permissible fluctuation value of optical network signals; The constraints against disturbances are set based on the global norm upper limit; An initial perturbation is generated based on the gradient; Determine whether the initial disturbance satisfies the constraint conditions; if so, determine that the initial disturbance is an adversarial disturbance. If the conditions are not met, the initial disturbance is normalized and pruned, and the pruned initial disturbance is determined as the adversarial disturbance.

[0009] In one embodiment, reconstructing the directed adversarial perturbation with the subset of high-frequency detail coefficients to generate a temporal adversarial sample with high-frequency interference capability includes: While keeping the approximation coefficients unchanged, the adversarial perturbation is superimposed with the high-frequency detail coefficient subset to obtain the superposition result; The superposition result is subjected to inverse discrete wavelet transform to reconstruct the temporal adversarial sample.

[0010] In one embodiment, training the target model by combining the adversarial examples and the high-frequency attention penalty mechanism includes: Obtain the first training sample; The adversarial sample is mixed with the first training sample to form the second training sample; The target model is trained based on the second training sample and the high-frequency attention penalty mechanism. The target model is either the initial model or a model whose parameters are adjusted through retraining.

[0011] In one embodiment, training the target model based on the second training samples and the high-frequency attention penalty mechanism includes: The temporal location of the corresponding high-frequency region in the second training sample is identified based on a binary mask, wherein the binary mask is generated based on wavelet analysis prior, and the high-frequency region is determined based on the adversarial sample. Based on the extracted attention weights and the binary mask, a subset of attention weights for the corresponding high-frequency regions is determined; The penalty for the target model's excessive focus on pseudo-high-frequency interference is achieved by minimizing the subset of attention weights and calculating the uniformly distributed KL divergence. The gradient of the parameters of the target model is determined by calculating the total loss of the classification loss and the high-frequency attention penalty term during training, and by backpropagation. The parameters are updated by performing gradient descent operation using the optimizer in conjunction with the gradient.

[0012] Another embodiment of the present invention also provides a threat detection device based on deep learning, comprising: The transformation module is used to perform discrete wavelet transform on the obtained power optical network time series data signal to obtain target coefficients for capturing data features of different frequencies. The target coefficients include approximate coefficients for capturing low-frequency trends and detail coefficients for capturing high-frequency details. The selection module is used to filter out a subset of attack-sensitive high-frequency detail coefficients from the target coefficients by combining a preset signal energy threshold. The generation module is used to generate a directional adversarial perturbation based on the high-frequency detail coefficient subset and the approximation coefficients, wherein the directional adversarial perturbation is a wavelet perturbation; The reconstruction module is used to reconstruct the directional adversarial perturbation and the high-frequency detail coefficient subset to generate a temporal adversarial sample with high-frequency interference capability. The training module is used to train the target model by combining the adversarial examples and the high-frequency attention penalty mechanism to obtain a threat detection model for attacking and detecting abnormal threats to power optical networks. The high-frequency attention penalty mechanism is used to penalize the target model for excessive attention to pseudo-high-frequency interference during the training process. The detection module is used to invoke the threat detection model to perform threat detection on power optical network data in the target power communication scenario.

[0013] Another embodiment of the present invention also provides an electronic device, comprising: One or more processors; Memory, configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the deep learning-based threat detection method as described in any one of the above descriptions.

[0014] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.

[0015] The technical solution of this application will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

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

[0017] Figure 1 This is a flowchart illustrating the deep learning-based threat detection method in an embodiment of the present invention.

[0018] Figure 2 This is a partial flowchart illustrating a deep learning-based threat detection method in one application embodiment of the present invention.

[0019] Figure 3 This is a partial flowchart of a deep learning-based threat detection method in another application embodiment of the present invention.

[0020] Figure 4 This is a structural block diagram of a deep learning-based threat detection device according to an embodiment of the present invention. Detailed Implementation

[0021] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings, but these are not intended to limit the scope of the invention.

[0022] It should be understood that various modifications can be made to the embodiments disclosed herein. Therefore, the following description should not be considered as limiting, but merely as an example of embodiments. Other modifications within the scope of this disclosure will be apparent to those skilled in the art.

[0023] The accompanying drawings, which are included in and form part of this specification, illustrate embodiments of the present disclosure and, together with the general description of the disclosure given above and the detailed description of the embodiments given below, serve to explain the principles of the disclosure.

[0024] These and other features of the invention will become apparent from the following description of preferred forms of embodiments given as non-limiting examples, with reference to the accompanying drawings.

[0025] It should also be understood that although the invention has been described with reference to some specific examples, those skilled in the art can certainly implement many other equivalent forms of the invention, which have the features described in the claims and are therefore all within the scope of protection defined herein.

[0026] The above and other aspects, features and advantages of this disclosure will become more apparent when taken in conjunction with the accompanying drawings and in view of the following detailed description.

[0027] Specific embodiments of the present disclosure are described thereafter with reference to the accompanying drawings; however, it should be understood that the disclosed embodiments are merely examples of the present disclosure and can be implemented in various ways. Well-known and / or repeated functions and structures are not described in detail to avoid unnecessary or redundant details that could obscure the present disclosure. Therefore, the specific structural and functional details disclosed herein are not intended to be limiting, but merely to serve as the basis and representative basis for the claims to teach those skilled in the art to use the present disclosure in a variety of substantially any suitable detailed structures.

[0028] This specification may use the phrases “in one embodiment,” “in another embodiment,” “in yet another embodiment,” or “in still another embodiment,” all of which may refer to one or more of the same or different embodiments according to this disclosure.

[0029] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0030] like Figure 1As shown, this embodiment of the invention provides a threat detection method based on deep learning, including: S1: Perform discrete wavelet transform on the obtained power optical network time series data signal to obtain target coefficients for capturing data features at different frequencies. The target coefficients include approximate coefficients for capturing low-frequency trends and detail coefficients for capturing high-frequency details. S2: Combine the preset signal energy threshold to filter out a subset of attack-sensitive high-frequency detail coefficients from the target coefficients; S3: Generate a directional adversarial perturbation based on the high-frequency detail coefficient subset and approximation coefficients, wherein the directional adversarial perturbation is a wavelet perturbation; S4: Reconstruct the directed adversarial perturbation and the high-frequency detail coefficient subset to generate a temporal adversarial sample with high-frequency interference capability; S5: The target model is trained by combining the adversarial examples and the high-frequency attention penalty mechanism to obtain a threat detection model for attacking and detecting abnormal threats to power optical networks. The high-frequency attention penalty mechanism is used to penalize the target model for excessive attention to pseudo-high-frequency interference during the training process. S6: Invoke the threat detection model to perform threat detection on power optical network data in the target power communication scenario.

[0031] In this embodiment, the detection accuracy for abnormal states and robustness to high-frequency perturbations are effectively improved through the synergistic optimization of Discrete Wavelet Transform (DWT) multi-scale analysis, Transformer attention mechanism, and adversarial training. The model proposed in this embodiment innovatively introduces a high-frequency attention penalty mechanism, enabling the model to generate adversarial perturbations and construct adversarial examples based on the wavelet domain loss gradient for attack-sensitive high-frequency detail coefficients (such as sensitive components corresponding to signal attenuation and impulse interference). This guides the model to evenly allocate attention weights during training, suppressing excessive attention to "vulnerable high-frequency noise / pseudo-attack details" and strengthening the effective focus on real and stable features.

[0032] In this embodiment, the Discrete Wavelet Transform (DWT) described above is used to decompose the "time-domain signal" of the power optical network time series into approximate coefficients and detail coefficients in the multi-scale "time-frequency domain". Then, based on a scale threshold set by prior knowledge, a subset of attack-sensitive high-frequency detail coefficients is selected from all detail coefficients. Wavelet domain adversarial perturbations are generated by the model loss gradient direction, and then reconstructed to the signal domain by Inverse Discrete Wavelet Transform (IDWT). Norm constraints are applied to ensure the rationality and concealment of the perturbation amplitude, thereby constructing adversarial samples simulating real attacks. Subsequently, through an adversarial closed-loop training mechanism of "generating targeted perturbations, adversarial training, recalculating gradients, and iterative optimization", the model is continuously forced to weaken its over-reliance on pseudo-high-frequency interference features and enhance its focus on effective discriminative features, significantly improving the robust detection capability against high-frequency interference and adversarial attacks.

[0033] Furthermore, the proposed Transformer threat detection model for power optical networks leverages the powerful feature extraction capabilities of its encoding module to deeply mine multi-scale temporal features in optical signal data. This model is trained using adversarial examples generated through wavelet domain adversarial perturbations. Through a high-frequency attention penalty mechanism, it effectively suppresses the model's oversensitivity and dependence on "pseudo-high-frequency details constructed by perturbations," thereby significantly improving its robustness against malicious attacks and high-frequency interference.

[0034] The method proposed in this embodiment is applicable to multiple fields such as fault diagnosis of power optical networks (e.g., signal attenuation and instantaneous pulse interference identification), and detection of optical transmission data anomalies and tampering, and can provide reliable technical support for the safe and stable operation of power dispatch data networks.

[0035] Furthermore, the step of performing discrete wavelet transform on the obtained power optical network time series data signal to obtain target coefficients for capturing data characteristics at different frequencies includes: S101: Perform low-pass filtering and high-pass filtering on the obtained power optical network time series data signal to obtain the initial approximation coefficients and initial detail coefficients; S102: Based on the initial approximation coefficients and initial detail coefficients, perform stepwise decomposition to obtain the approximation coefficients and multiple resolution coefficients corresponding to different resolutions used to form the detail coefficients. For example, for the input optical network time series data signal x The Mallat algorithm is used to perform Discrete Wavelet Transform (DWT). The signal is then passed through a low-pass filter. h ( n and high-pass filter The samples are processed and downsampled (even-indexed results are extracted at intervals) to obtain approximate coefficients for capturing low-frequency trends. a j[ k (The stable trend corresponding to normal operating conditions of power optical transmission) and the detail factor for capturing high-frequency details. d j [ k (Corresponding to rapidly changing characteristics such as attack perturbations and pulse interference). Multi-resolution coefficients are generated through step-by-step decomposition. and the final approximation a j This provides a time-frequency domain foundation for subsequent analysis. The decomposition iterative formula is shown below:

[0036] initial scale j When = 0, a 0[ n ]= d 0[ n ].in, j The number of decomposition layers, k This is the index for the coefficient position.

[0037] Furthermore, the step of filtering out a subset of attack-sensitive high-frequency detail coefficients from the target coefficients by combining a preset signal energy threshold includes: S201: Determine the scale threshold for forming the signal energy threshold based on historical power optical network attack data, wherein the scale in the scale threshold is the number of decomposition levels involved when decomposing the initial approximation coefficients and the initial detail coefficients; S202: Compare the decomposition level corresponding to each resolution coefficient with the scale threshold to filter out the subset of high-frequency detail coefficients that are sensitive to attacks.

[0038] For example, considering that power optical network attacks are mostly concentrated in specific frequency bands, a scale threshold is set through signal energy statistics and experimental verification. j high .when j ≥ j high At that time, the corresponding high-frequency detail coefficients d j [ k This belongs to an attack-sensitive frequency band (e.g., 100kHz-2MHz), and its energy in attack samples is significantly higher than that in normal samples. When j < j high At this time, the corresponding high-frequency components are mostly redundant noise unrelated to the attack (such as equipment vibration). Using this threshold, a subset of attack-sensitive high-frequency detail coefficients is selected from all wavelet coefficients. d j [ k ]| j ≥ jhigh}, serving as the target area for subsequent counter-disturbance generation.

[0039] After obtaining the subset of high-frequency detail coefficients, the step of generating directional adversarial perturbations based on the subset of high-frequency detail coefficients and approximate coefficients includes: S301: Reconstruct the approximate function and the high-frequency detail coefficient subset into a time-domain signal based on inverse wavelet transform; S302: Input the time-domain signal into the target model to determine the target loss; S303: Determine the gradient of the target loss with respect to the high-frequency detail subset, the gradient being used to characterize the direction of attention of the target model that is easily misled; S304: Generate the adversarial perturbation based on the gradient.

[0040] Wherein, generating the adversarial perturbation based on the gradient includes: S305: Determine the upper limit of the global norm based on the maximum permissible fluctuation value of optical network signals; S306: Set the constraint conditions against disturbances based on the global norm upper limit; S307: Generate an initial perturbation based on the gradient; S308: Determine whether the initial disturbance satisfies the constraint conditions. If it does, determine that the initial disturbance is an adversarial disturbance. S309: If not satisfied, the initial disturbance is normalized and pruned, and the pruned initial disturbance is determined as the counter-disturbance.

[0041] Specifically, the above steps in this embodiment are for selecting attack-sensitive high-frequency detail coefficients. d j [ k ]( j ≥ j high Generate targeted counter-perturbations delta The process specifically includes: first, approximating the coefficients of the original signal... a j [ k The aforementioned subset of high-frequency detail coefficients is reconstructed into a time-domain signal using a differentiable inverse wavelet transform (IDWT). x recon And input it into the current Transformer threat detection model to calculate the loss. L The loss is obtained through automatic differentiation and backpropagation. L For high-frequency detail coefficients d j [ k gradient of ] This gradient indicates the direction in which the model is efficiently misled.

[0042] Subsequently, an initial perturbation is generated based on the gradient. ( (The initial test amplitude is adapted to the amplitude resolution of the power signal). To ensure the feasibility of signal disturbance, the following must be met. , ( This is the upper limit of the global norm, set by the maximum allowable fluctuation of the optical network signal. If the constraint is exceeded, normalized pruning is performed. The final output is a compliant wavelet perturbation δ.

[0043] Furthermore, the step of reconstructing the directional adversarial perturbation with the subset of high-frequency detail coefficients to generate a temporal adversarial sample with high-frequency interference capability includes: S401: While keeping the approximation coefficients unchanged, the adversarial perturbation is superimposed with the high-frequency detail coefficient subset to obtain the superposition result; S402: Perform inverse discrete wavelet transform on the superposition result to reconstruct and generate the temporal adversarial sample.

[0044] For example, the wavelet domain adversarial perturbation δ generated in the aforementioned steps is superimposed onto the selected attack-sensitive high-frequency detail coefficients. d j [ k On the above, maintain the approximate coefficient. a j [ k [Unchanged]. Subsequently, the modified coefficients are subjected to inverse discrete wavelet transform (IDWT) to reconstruct and generate temporal adversarial examples. x adv The reconstruction formula is shown below:

[0045] generated x adv Visually, it is consistent with the original signal. x The differences are subtle, but they include targeted high-frequency interference that can be used to attack models or enhance training. j The number of decomposition layers, k This is the index for the coefficient position.

[0046] Furthermore, the training of the target model by combining the adversarial examples and the high-frequency attention penalty mechanism includes: S501: Obtain the first training sample; S502: Mix the adversarial sample with the first training sample to form a second training sample; S503: The target model is trained based on the second training sample and the high-frequency attention penalty mechanism. The target model is either the initial model or a model whose parameters are adjusted through retraining.

[0047] The step of training the target model based on the second training samples and the high-frequency attention penalty mechanism includes: S504: Identify the temporal location of the corresponding high-frequency region in the second training sample based on a binary mask, wherein the binary mask is generated based on wavelet analysis prior, and the high-frequency region is determined based on the adversarial sample; S505: Determine the subset of attention weights for the corresponding high-frequency region based on the extracted attention weights and the binary mask; S506: Penalize the target model for over-focusing on pseudo-high-frequency interference by minimizing the subset of attention weights and calculating the uniformly distributed KL divergence; S507: The gradient of the parameters of the target model is determined by calculating the total loss of the classification loss and the high-frequency attention penalty term during the training of the target model, and by backpropagation. S508: Update the parameters by performing gradient descent operation using the optimizer in conjunction with the gradient.

[0048] like Figure 2 As shown, the architecture of the Transformer model in this embodiment is as follows: Figure 2 As shown, the encoding module in this model employs a multi-head attention mechanism to process multi-scale features of the power-optical network extracted by discrete wavelet transform, capturing cross-frequency correlation patterns. By embedding a high-frequency adversarial attention penalty mechanism, redundant high-frequency noise can be suppressed, strengthening the focus on real attack features. Normalization and residual connections alleviate gradient vanishing and ensure training stability. Combined with a feedforward neural network to refine the extraction of local features and reapply residual connections, the perception of subtle attack patterns is improved. After global average pooling to compress global information, detection results are generated by a fully connected layer (MLP) for classification. This model integrates attention mechanisms (including high-frequency penalties), residual connections, and other techniques to construct a framework suitable for multi-scale feature learning and attack detection in optical networks.

[0049] When performing specific training, for example, using adversarial examples x adv To improve robustness, the Transformer model is adversarially trained by mixing it with normal samples. A high-frequency attention penalty term is introduced during training. First, a binary mask is generated based on wavelet analysis priors. M The corresponding input signal is identified j ≥ j highThe temporal location of the high-frequency region. Attention weights are extracted after the model's forward propagation. a and using a mask M Obtain its attention weight subset for high-frequency regions a high By minimizing a high With uniform distribution u The KL divergence between the intervals penalizes the model's excessive focus on pseudo-high-frequency interference. The total loss function is calculated as follows:

[0050] in, It is the model on the sample x Classification prediction and true labels (including normal samples and adversarial samples) y The loss, theta These are the trainable parameters of the model; lambda It is a penalty coefficient, balancing classification performance and anti-interference ability; KL( a high , u Constraints on attention weights corresponding to adversarial examples a Towards uniform distribution u To avoid the model's robustness being reduced due to over-focusing on pseudo-high-frequency interference, we need to move closer to it.

[0051] Next, by calculating the total loss resulting from the sum of the classification loss and the high-frequency attention penalty term, and then deriving the gradient of the trainable parameters of the model through backpropagation, the optimizer performs gradient descent to update the parameters. theta This forces the model to balance attention distribution and suppress sensitivity to specific high-frequency noise while maintaining classification accuracy.

[0052] Repeat the above steps, iterating through multiple rounds until the model converges, then terminate the training process to obtain a robust Transformer threat detection model. This model can then be deployed in power optical networks for the detection of attacks and anomalies.

[0053] In summary, when applying it, such as Figure 3As shown, within the model framework, raw monitoring data of the power optical network is used as input. High-frequency and low-frequency coefficients are obtained through Mallat algorithm decomposition, and attack-sensitive high-frequency components are screened based on preset thresholds. Next, the loss gradient of this high-frequency component is calculated to locate model dependency points. Adversarial perturbations are constructed in the wavelet domain along the gradient direction, and temporal adversarial examples are generated through inverse wavelet transform. These adversarial examples are then input into a Transformer model integrating a high-frequency attention penalty mechanism for training. By adjusting the attention weights, pseudo-high-frequency interference is suppressed, the representation of true features is enhanced, and the model parameters are updated. Based on the updated model, the gradient is recalculated to generate more complex adversarial examples for iterative training until the model converges. Finally, a robust model is deployed to achieve high-precision optical network threat detection.

[0054] The generated model was validated on a dedicated dataset for power optical transmission (covering typical scenarios such as normal operating conditions, fiber attenuation, pulse interference, and instantaneous fluctuations). The results show that the proposed adversarial training model based on gradient screening of high-frequency detail coefficients in the wavelet domain has a significantly higher prediction accuracy for normal and abnormal states than traditional detection models. Furthermore, for high-frequency disturbance-type anomalies unique to power communication scenarios (such as instantaneous fluctuations in optical signals and local interference), the model can accurately capture the high-frequency feature differences in abnormal states and effectively avoid misjudgments caused by natural noise (such as low-frequency fluctuations caused by environmental temperature drift), thus fully achieving the expected goal of "improving the accuracy and reliability of state identification in power optical transmission systems".

[0055] like Figure 4 As shown, another embodiment of the present invention also provides a threat detection device based on deep learning, comprising: The transformation module is used to perform discrete wavelet transform on the obtained power optical network time series data signal to obtain target coefficients for capturing data features of different frequencies. The target coefficients include approximate coefficients for capturing low-frequency trends and detail coefficients for capturing high-frequency details. The selection module is used to filter out a subset of attack-sensitive high-frequency detail coefficients from the target coefficients by combining a preset signal energy threshold. The generation module is used to generate a directional adversarial perturbation based on the high-frequency detail coefficient subset and the approximation coefficients, wherein the directional adversarial perturbation is a wavelet perturbation; The reconstruction module is used to reconstruct the directional adversarial perturbation and the high-frequency detail coefficient subset to generate a temporal adversarial sample with high-frequency interference capability. The training module is used to train the target model by combining the adversarial examples and the high-frequency attention penalty mechanism to obtain a threat detection model for attacking and detecting abnormal threats to power optical networks. The high-frequency attention penalty mechanism is used to penalize the target model for excessive attention to pseudo-high-frequency interference during the training process. The detection module is used to invoke the threat detection model to perform threat detection on power optical network data in the target power communication scenario.

[0056] In one embodiment, performing discrete wavelet transform on the obtained power optical network time series data signal to obtain target coefficients for capturing data features at different frequencies includes: The obtained power optical network time series data signal is subjected to low-pass filtering and high-pass filtering to obtain the initial approximation coefficients and initial detail coefficients. Based on the initial approximation coefficients and initial detail coefficients, a step-by-step decomposition is performed to obtain the approximation coefficients and multiple resolution coefficients corresponding to different resolutions used to form the detail coefficients. In one embodiment, the step of filtering out a subset of attack-sensitive high-frequency detail coefficients from the target coefficients by combining a preset signal energy threshold includes: The scale threshold used to form the signal energy threshold is determined based on historical power optical network attack data, wherein the scale in the scale threshold is the number of decomposition levels involved in decomposing the initial approximation coefficients and the initial detail coefficients; The decomposition level corresponding to each resolution coefficient is compared with the scale threshold to filter out the subset of high-frequency detail coefficients that are sensitive to attacks.

[0057] In one embodiment, generating directional adversarial perturbations based on the subset of high-frequency detail coefficients and approximation coefficients includes: The approximate function and the subset of high-frequency detail coefficients are reconstructed into a time-domain signal based on inverse wavelet transform; The time-domain signal is input into the target model to determine the target loss; Determine the gradient of the target loss with respect to the high-frequency detail subset, the gradient being used to characterize the direction of attention of the target model that is easily misled; The adversarial perturbation is generated based on the gradient.

[0058] In one embodiment, generating the adversarial perturbation based on the gradient includes: The global norm upper limit is determined based on the maximum permissible fluctuation value of optical network signals; The constraints against disturbances are set based on the global norm upper limit; An initial perturbation is generated based on the gradient; Determine whether the initial disturbance satisfies the constraint conditions; if so, determine that the initial disturbance is an adversarial disturbance. If the conditions are not met, the initial disturbance is normalized and pruned, and the pruned initial disturbance is determined as the adversarial disturbance.

[0059] In one embodiment, reconstructing the directed adversarial perturbation with the subset of high-frequency detail coefficients to generate a temporal adversarial sample with high-frequency interference capability includes: While keeping the approximation coefficients unchanged, the adversarial perturbation is superimposed with the high-frequency detail coefficient subset to obtain the superposition result; The superposition result is subjected to inverse discrete wavelet transform to reconstruct the temporal adversarial sample.

[0060] In one embodiment, training the target model by combining the adversarial examples and the high-frequency attention penalty mechanism includes: Obtain the first training sample; The adversarial sample is mixed with the first training sample to form the second training sample; The target model is trained based on the second training sample and the high-frequency attention penalty mechanism. The target model is either the initial model or a model whose parameters are adjusted through retraining.

[0061] In one embodiment, training the target model based on the second training samples and the high-frequency attention penalty mechanism includes: The temporal location of the corresponding high-frequency region in the second training sample is identified based on a binary mask, wherein the binary mask is generated based on wavelet analysis prior, and the high-frequency region is determined based on the adversarial sample. Based on the extracted attention weights and the binary mask, a subset of attention weights for the corresponding high-frequency regions is determined; The penalty for the target model's excessive focus on pseudo-high-frequency interference is achieved by minimizing the subset of attention weights and calculating the uniformly distributed KL divergence. The gradient of the parameters of the target model is determined by calculating the total loss of the classification loss and the high-frequency attention penalty term during training, and by backpropagation. The parameters are updated by performing gradient descent operation using the optimizer in conjunction with the gradient.

[0062] Another embodiment of the present invention also provides an electronic device, comprising: One or more processors; Memory, configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the deep learning-based threat detection method as described in any one of the above descriptions.

[0063] Furthermore, one embodiment of the present invention also provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the deep learning-based threat detection method described above. It should be understood that the various solutions in this embodiment have the corresponding technical effects in the above-described method embodiments, and will not be repeated here.

[0064] Furthermore, embodiments of the present invention also provide a computer program product, which is tangibly stored on a computer-readable medium and includes computer-readable instructions that, when executed, cause at least one processor to perform a deep learning-based threat detection method as described in the embodiments above.

[0065] It should be noted that the computer storage medium of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access storage medium (RAM), a read-only storage medium (ROM), an erasable programmable read-only storage medium (EPROM or flash memory), an optical fiber, a portable compact disk read-only storage medium (CD-ROM), an optical storage medium, a magnetic storage medium, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program configured for use by or in connection with an instruction execution system, system, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, antenna, optical fiber, RF, etc., or any suitable combination thereof.

[0066] Furthermore, those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0067] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A system that specifies functions in one or more boxes.

[0068] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including an instruction set implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0069] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of protection of this application is limited to these examples; within the framework of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of one or more embodiments of this application as described above, which are not provided in detail for the sake of brevity.

Claims

1. A threat detection method based on deep learning, characterized in that, include: The obtained power optical network time series data signal is subjected to discrete wavelet transform to obtain target coefficients for capturing data features at different frequencies. The target coefficients include approximation coefficients for capturing low-frequency trends and detail coefficients for capturing high-frequency details. By combining a preset signal energy threshold, a subset of high-frequency detail coefficients that are sensitive to attacks are selected from the target coefficients; A directional adversarial perturbation is generated based on the high-frequency detail coefficient subset and approximation coefficients, wherein the directional adversarial perturbation is a wavelet perturbation; The targeted adversarial perturbation and the high-frequency detail coefficient subset are reconstructed to generate a temporal adversarial sample with high-frequency interference capability; The target model is trained by combining the adversarial examples and the high-frequency attention penalty mechanism to obtain a threat detection model for attacking and detecting abnormal threats to power optical networks. The high-frequency attention penalty mechanism is used to penalize the target model for excessive attention to pseudo-high-frequency interference during the training process. The threat detection model is invoked to perform threat detection on power optical network data in the target power communication scenario.

2. The threat detection method based on deep learning according to claim 1, characterized in that, The step of performing discrete wavelet transform on the obtained power optical network time series data signal to obtain target coefficients for capturing data characteristics at different frequencies includes: The obtained power optical network time series data signal is subjected to low-pass filtering and high-pass filtering to obtain the initial approximation coefficients and initial detail coefficients. Based on the initial approximation coefficients and initial detail coefficients, a step-by-step decomposition is performed to obtain the approximation coefficients and multiple resolution coefficients corresponding to different resolutions used to form the detail coefficients.

3. The deep learning-based threat detection method according to claim 2, characterized in that, The step of filtering out a subset of attack-sensitive high-frequency detail coefficients from the target coefficients by combining a preset signal energy threshold includes: The scale threshold used to form the signal energy threshold is determined based on historical power optical network attack data, wherein the scale in the scale threshold is the number of decomposition levels involved in decomposing the initial approximation coefficients and the initial detail coefficients; The decomposition level corresponding to each resolution coefficient is compared with the scale threshold to filter out the subset of high-frequency detail coefficients that are sensitive to attacks.

4. The deep learning-based threat detection method according to claim 1, characterized in that, The generation of directional adversarial perturbations based on the high-frequency detail coefficient subset and approximation coefficients includes: The approximate function and the subset of high-frequency detail coefficients are reconstructed into a time-domain signal based on inverse wavelet transform; The time-domain signal is input into the target model to determine the target loss; Determine the gradient of the target loss with respect to the high-frequency detail subset, the gradient being used to characterize the direction of attention of the target model that is easily misled; The adversarial perturbation is generated based on the gradient.

5. The deep learning-based threat detection method according to claim 4, characterized in that, The generation of the adversarial perturbation based on the gradient includes: The global norm upper limit is determined based on the maximum permissible fluctuation value of optical network signals; The constraints against disturbances are set based on the global norm upper limit; An initial perturbation is generated based on the gradient; Determine whether the initial disturbance satisfies the constraint conditions; if so, determine that the initial disturbance is an adversarial disturbance. If the conditions are not met, the initial disturbance is normalized and pruned, and the pruned initial disturbance is determined as the adversarial disturbance.

6. The deep learning-based threat detection method according to claim 1, characterized in that, The step of reconstructing the directed adversarial perturbation with the subset of high-frequency detail coefficients to generate a temporal adversarial sample with high-frequency interference capability includes: While keeping the approximation coefficients unchanged, the adversarial perturbation is superimposed with the high-frequency detail coefficient subset to obtain the superposition result; The superposition result is subjected to inverse discrete wavelet transform to reconstruct the temporal adversarial sample.

7. The threat detection method based on deep learning according to claim 1, characterized in that, The training of the target model by combining the adversarial examples and the high-frequency attention penalty mechanism includes: Obtain the first training sample; The adversarial sample is mixed with the first training sample to form the second training sample; The target model is trained based on the second training sample and the high-frequency attention penalty mechanism. The target model is either the initial model or a model whose parameters are adjusted through retraining.

8. The deep learning-based threat detection method according to claim 7, characterized in that, The training of the target model based on the second training samples and the high-frequency attention penalty mechanism includes: The temporal location of the corresponding high-frequency region in the second training sample is identified based on a binary mask, wherein the binary mask is generated based on wavelet analysis prior, and the high-frequency region is determined based on the adversarial sample. Based on the extracted attention weights and the binary mask, a subset of attention weights for the corresponding high-frequency regions is determined; The penalty for the target model's excessive focus on pseudo-high-frequency interference is achieved by minimizing the subset of attention weights and calculating the uniformly distributed KL divergence. The gradient of the parameters of the target model is determined by calculating the total loss of the classification loss and the high-frequency attention penalty term during training, and by backpropagation. The parameters are updated by performing gradient descent operation using the optimizer in conjunction with the gradient.

9. A threat detection device based on deep learning, characterized in that, include: The transformation module is used to perform discrete wavelet transform on the obtained power optical network time series data signal to obtain target coefficients for capturing data features of different frequencies. The target coefficients include approximate coefficients for capturing low-frequency trends and detail coefficients for capturing high-frequency details. The selection module is used to filter out a subset of attack-sensitive high-frequency detail coefficients from the target coefficients by combining a preset signal energy threshold. The generation module is used to generate a directional adversarial perturbation based on the high-frequency detail coefficient subset and the approximation coefficients, wherein the directional adversarial perturbation is a wavelet perturbation; The reconstruction module is used to reconstruct the directional adversarial perturbation and the high-frequency detail coefficient subset to generate a temporal adversarial sample with high-frequency interference capability. The training module is used to train the target model by combining the adversarial examples and the high-frequency attention penalty mechanism to obtain a threat detection model for attacking and detecting abnormal threats to power optical networks. The high-frequency attention penalty mechanism is used to penalize the target model for excessive attention to pseudo-high-frequency interference during the training process. The detection module is used to invoke the threat detection model to perform threat detection on power optical network data in the target power communication scenario.

10. An electronic device, characterized in that, include: One or more processors; Memory, configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the deep learning-based threat detection method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Deep learning model anti-attack sensitive frequency band detection method and related device

    CN114757336A

  • Adversarial sample recovery method and system based on wavelet transform and attention mechanism

    CN116452918A

  • Threat event detection method and system based on Mallat wavelet transform

    CN119109687A

  • Frequency domain-based feature space confrontation sample attack method and system

    CN119942259A

  • Method and electronic apparatus for detecting tampering audio, and storage medium

    US20230076251A1