Power cross-domain attack defense strategy deduction optimization method based on hierarchical knowledge distillation

CN122933065APending Publication Date: 2026-10-16CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610949914.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]本发明提供了一种基于分层知识蒸馏的电力跨域攻击防御策略推演优化方法,以解决无法满足应急决策需求,简化模型则会使防御成功率下降,导致难以兼顾高速高精度推演与动态更新的核心需求,无法有效应对极端电力跨域攻击的问题

Benefits of technology

[0010]本发明利用多模态教师模型分别对通用、极端两类样本集推理生成防御策略软标签,可同步覆盖常规攻防与高危跨域攻击场景。软标签承载完整策略概率分布,相比单一判定结果保留多层攻防决策信息,为分层蒸馏提供精细监督信号。区分两类样本独立推理,实现通用规则与极端场景特征解耦,避免样本场景互相干扰,保障后续粗、细粒度蒸馏训练的数据基础质量,提升模型对不同攻击场景的适配区分能力。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933065A_ABST
    Figure CN122933065A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of power system network security defense, and discloses a power cross-domain attack defense strategy deduction optimization method based on hierarchical knowledge distillation, which realizes efficient migration of attack and defense knowledge by adopting hierarchical knowledge distillation, realizes coarse-grained distillation by relying on a structured knowledge graph, and realizes fine-grained optimization by combining scene-specific loss, so that the model size can be compressed through lightweight processing under the premise of ensuring the accuracy of the strategy, and the model can be deployed on low-computing-power edge terminals such as substation gateways, thereby realizing rapid deduction of attack scenarios. Meanwhile, the teacher-student model is iterated cooperatively by relying on online incremental data, so that the model can be adapted to new attacks and power grid topology changes without full retraining. Compared with the traditional cloud big model scheme, the present application greatly reduces the reasoning delay, solves the pain points of limited edge deployment, difficult balance between deduction speed and defense accuracy, and high model updating cost, and significantly improves the local real-time defense capability of power cross-domain attacks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system network security defense technology, specifically to a method for deducing and optimizing power cross-domain attack defense strategies based on layered knowledge distillation. Background Technology

[0002] With the continuous improvement of the cyber-physical integration level of power systems, the functional domains of power generation, transmission, distribution, and dispatch control are deeply interconnected, significantly increasing the system's openness and coupling. Cross-domain attacks, capable of breaching multi-domain boundary protection and relying on multi-domain collaborative penetration and dynamic path switching, have become a core security risk jeopardizing the stable operation of power systems. Among them, extreme cross-domain attacks launched by national and regional hacker groups are characterized by strong concealment, rapid propagation, and wide-ranging damage, placing extremely high demands on the real-time performance, accuracy, and dynamic adaptability of defense strategies. Therefore, efficient attack-defense simulation and strategy optimization technologies are urgently needed to support power system security defense.

[0003] Current power cross-domain attack defense simulation and optimization mainly rely on complex intelligent models such as reinforcement learning and generative adversarial networks. However, existing technologies have many key defects. For example, it is difficult to balance simulation accuracy and efficiency, which cannot meet the needs of emergency decision-making. Simplifying the model will reduce the success rate of defense, making it difficult to meet the core requirements of high-speed and high-precision simulation and dynamic updates, and thus unable to effectively deal with extreme power cross-domain attacks. Summary of the Invention

[0004] This invention provides a method for deducing and optimizing defense strategies against cross-domain power attacks based on hierarchical knowledge distillation. This method addresses the problems of failing to meet emergency decision-making requirements, simplifying models leading to a decrease in defense success rate, and making it difficult to balance the core requirements of high-speed, high-precision deduction with dynamic updates, thus failing to effectively cope with extreme cross-domain power attacks.

[0005] In a first aspect, the present invention provides a method for deducing and optimizing a defense strategy against cross-domain attacks on the power grid based on hierarchical knowledge distillation, the method comprising: A multimodal teacher model is constructed based on multi-source attack and defense data from the power system. The multimodal teacher model is used to infer the probability distribution of each sample in the general sample set and the extreme cross-domain attack sample set, and generate corresponding soft labels for the defense strategy probability distribution. The defense strategy probability distribution of the samples in the general sample set is input into a preset student model for coarse-grained rule distillation training. The defense strategy probability distribution soft labels of the samples in the extreme cross-domain attack sample set are used to perform fine-grained strategy distillation optimization on the trained student model; Extract the optimal defense strategy output by the optimized student model, calculate the strategy prediction error of the execution effect corresponding to the optimal defense strategy, and backpropagate to fine-tune the optimized student model. The fine-tuned student model is lightweighted and deployed to the power edge node. Defense strategies under various attack scenarios are simulated in real time. Based on the simulation results and real-time incremental data, the multimodal teacher model and the processed student model are collaboratively optimized.

[0006] This invention employs hierarchical knowledge distillation to achieve efficient transfer of offensive and defensive knowledge. It utilizes structured knowledge graph constraints for coarse-grained distillation, combined with scenario-specific losses for fine-grained optimization. While ensuring policy accuracy, it compresses the model size through lightweight processing, enabling deployment on low-computing-power edge terminals such as substation gateways, allowing for rapid attack scenario simulation. Simultaneously, it leverages online incremental data for collaborative model iteration between teachers and students, adapting to new attacks and power grid topology changes without requiring full retraining. Compared to traditional cloud-based large-model solutions, it significantly reduces inference latency, addresses pain points such as limited edge deployment, difficulty in balancing simulation speed and defense accuracy, and high model update costs, and significantly improves local real-time defense capabilities against cross-domain power attacks.

[0007] In one optional implementation, the step of constructing a multimodal teacher model based on multi-source attack and defense data of the power system includes: Collect and combine equipment topology data, vulnerability database data, expert experience rules, extreme cross-domain attack simulation case data, and power attack event review data from various aspects of the power system to generate multi-source attack and defense data. Based on the aforementioned multi-source attack and defense data, a multimodal teacher model is constructed; From the multimodal teacher model, extract general attack and defense rules, scenario adaptation, and strategy priority knowledge to construct a structured knowledge graph.

[0008] This invention integrates power grid topology, vulnerabilities, expert rules, and various attack cases to form multi-source attack and defense data. This data is used to train a multimodal teacher model and extracts multi-dimensional attack and defense knowledge to build a structured knowledge graph. The graph can standardize and unify various discrete attack and defense information, providing standardized constraints for subsequent model distillation. This enables the structured accumulation and reuse of attack and defense knowledge, effectively avoiding the problems of incomplete rules and insufficient scenario coverage caused by a single data source. It improves the model's cognitive completeness regarding both conventional and extreme cross-domain attacks, laying a reliable knowledge foundation for accurately predicting and adapting defense strategies.

[0009] In one optional implementation, the step of inferring from each sample in the general sample set and the extreme cross-domain attack sample set using the multimodal teacher model to generate corresponding soft labels for the probability distribution of defense strategies includes: Obtain a general sample set and an extreme cross-domain attack sample set, and input them into the multimodal teacher model respectively; The multimodal teacher model is used to infer the probability distribution soft labels of the corresponding samples in the general sample set and the extreme cross-domain attack sample set, respectively, to generate the corresponding defense strategy.

[0010] This invention utilizes a multimodal teacher model to generate soft labels for defense strategies from both general and extreme sample sets, simultaneously covering both conventional attack and defense scenarios and high-risk cross-domain attack scenarios. The soft labels carry a complete strategy probability distribution, preserving multi-layered attack and defense decision information compared to a single judgment result, providing fine-grained supervisory signals for tiered distillation. By distinguishing between the two types of samples and enabling independent inference, general rules and extreme scenario features are decoupled, avoiding mutual interference between sample scenarios and ensuring the quality of the data foundation for subsequent coarse and fine-grained distillation training, thus improving the model's adaptability and discrimination capabilities across different attack scenarios.

[0011] In one optional implementation, the step of inputting the soft-label of the defense strategy probability distribution of the samples in the general sample set into a preset student model for coarse-grained rule distillation training includes: A student model is constructed using a lightweight neural network; Using the general attack and defense rules within the structured knowledge graph as training constraints, the soft labels of the defense strategy probability distribution of the general attack and defense samples in the general sample set are input into the student model; The student model is trained using coarse-grained rule distillation based on the KL divergence loss function.

[0012] This invention employs a lightweight network to build a student model, relying on general attack and defense rules from a knowledge graph for training, and combining KL divergence loss for coarse-grained distillation. Complete prior attack and defense knowledge is transferred through soft labels from the teacher model, and the knowledge graph constraints standardize the model's learning logic, preventing rules from deviating from power grid safety standards. KL divergence narrows the gap in policy distribution between teachers and students, efficiently completing the transfer of general attack and defense rules. The lightweight network structure significantly reduces the number of parameters, balancing the learning effect of basic rules with the needs of subsequent edge deployment, and efficiently mastering defense logic for common scenarios.

[0013] In one optional implementation, the step of using soft labels representing the probability distribution of defense strategies from the samples in the extreme cross-domain attack sample set to perform fine-grained policy distillation optimization on the trained student model includes: Extract the temporal scene features corresponding to the extreme cross-domain attack scenario-specific samples in the extreme cross-domain attack sample set, and construct a scenario-specific loss function; Input the soft labels of the probability distribution of the defense strategy corresponding to the specific samples of each extreme cross-domain attack scenario into the trained student model; Based on the scenario-specific loss function, fine-grained policy distillation optimization is performed on the trained student model according to multiple extreme attack scenarios.

[0014] This invention extracts temporal features of extreme attacks to construct a dedicated loss function for fine-grained distillation, enabling targeted adaptation to complex cross-domain attacks involving cyber-physical coupling. Leveraging experience in attacking and defending high-risk scenarios using soft-label transfer from extreme samples, the dedicated loss function enhances temporal attack feature learning, compensating for the shortcomings of coarse-grained training in recognizing composite attacks. Specialized optimizations are applied to different types of extreme scenarios, refining the model's defense decision-making capabilities and effectively improving the accuracy of strategy output under complex collaborative attacks, balancing basic capabilities in conventional scenarios with the effectiveness of handling extreme high-risk scenarios.

[0015] In one optional implementation, the step of extracting the optimal defense strategy output by the optimized student model, calculating the strategy prediction error of the execution effect corresponding to the optimal defense strategy, and backpropagating to fine-tune the optimized student model includes: Extract the optimized student model and output the optimal defense strategy matching various extreme attack scenarios; The system execution effect corresponding to each optimal defense strategy is calculated based on the attack and defense simulation data, and the strategy prediction error is solved. With the goal of minimizing the policy prediction error, all model parameters of the optimized student model are iteratively adjusted using the backpropagation algorithm.

[0016] This invention quantifies the effectiveness of defense strategies through simulation data and calculates prediction errors. It then iteratively updates model parameters with the goal of minimizing these errors, forming a closed-loop self-correction mechanism. This allows for precise measurement of the actual effectiveness of defense schemes under different extreme attacks. By relying on real simulation feedback to correct model decision biases, it continuously narrows the gap between strategy output and ideal protection effects, improves the adaptability of defense schemes in complex scenarios, and continuously optimizes model decision accuracy, preventing model output from deviating from the actual protection requirements of the power grid.

[0017] In one optional implementation, the step of lightweighting the fine-tuned student model and deploying it to a power edge node, performing real-time simulations of defense strategies under various attack scenarios, and collaboratively optimizing the multimodal teacher model and the processed student model based on the simulation results and real-time incremental data includes: The fine-tuned student model is subjected to structured pruning, feature fusion, and quantization compression to generate a lightweight inference model. The lightweight inference model is deployed to power edge nodes, and attack traffic data is monitored in real time through the power edge nodes. Extract the attack features corresponding to the attack traffic data and input them into the lightweight inference model for deduction, and output the defense strategy; The defense strategy is executed by the power edge node according to the simulation results, and the strategy execution effect is generated. We aggregate data on newly added attack variants and power grid topology changes to construct an incremental dataset. Based on the incremental dataset and the policy prediction error corresponding to the policy execution effect, the multimodal teacher model and the lightweight inference model are jointly optimized.

[0018] This invention deploys a lightweight student model on edge nodes, enabling real-time local monitoring, attack simulation, and defense execution while reducing cloud transmission latency. Error data is generated based on the on-site policy execution results, and this data, combined with new attacks and topology changes, forms an incremental dataset that is used to simultaneously update the teacher and student models. It adapts to new attacks and power grid changes without requiring full retraining, balancing the needs of low-computing-power edge deployments with long-term iteration capabilities, and continuously optimizing the accuracy of local defense decisions in extreme cross-domain scenarios.

[0019] Secondly, this invention provides a device for deducing and optimizing cross-domain attack defense strategies based on hierarchical knowledge distillation, the device comprising: The module is used to build a multimodal teacher model based on multi-source attack and defense data of the power system; The inference module is used to infer the probability distribution soft labels of the corresponding defense strategy by using the multimodal teacher model to infer the samples in the general sample set and the extreme cross-domain attack sample set. The training module is used to input the soft labels of the defense strategy probability distribution of the samples in the general sample set into a preset student model for coarse-grained rule distillation training. The optimization module is used to perform fine-grained policy distillation optimization on the trained student model using soft labels of the probability distribution of defense strategies of the samples in the extreme cross-domain attack sample set. The extraction module is used to extract the optimal defense strategy output by the optimized student model, calculate the strategy prediction error of the execution effect corresponding to the optimal defense strategy, and backpropagate to fine-tune the optimized student model. The execution module is used to perform lightweight processing on the fine-tuned student model and deploy it to the power edge node, perform real-time simulation of defense strategies under various attack scenarios, and perform collaborative optimization of the multimodal teacher model and the processed student model based on the simulation results and real-time incremental data.

[0020] Thirdly, the present invention provides an electronic device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the above-described method for deducing and optimizing power cross-domain attack defense strategies based on hierarchical knowledge distillation or any corresponding embodiment.

[0021] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the above-described method for deducing and optimizing a power cross-domain attack defense strategy based on hierarchical knowledge distillation, or any of its corresponding embodiments. Attached Figure Description

[0022] 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.

[0023] Figure 1 This is a schematic diagram of the first process of the power cross-domain attack defense strategy deduction and optimization method based on hierarchical knowledge distillation according to an embodiment of the present invention. Figure 2 This is a schematic diagram of the "teacher-student" dual-model architecture according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the second process of the power cross-domain attack defense strategy deduction and optimization method based on hierarchical knowledge distillation according to an embodiment of the present invention. Figure 4 This is a schematic diagram of a hierarchical knowledge distillation process according to an embodiment of the present invention; Figure 5 This is a structural block diagram of a power cross-domain attack defense strategy deduction and optimization device based on hierarchical knowledge distillation according to an embodiment of the present invention; Figure 6 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.

[0025] It is understood that before using the technical solutions disclosed in the various embodiments of the present invention, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in the present invention and their authorization should be obtained in accordance with relevant laws and regulations through appropriate means.

[0026] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0027] This invention provides a method for inferring and optimizing defense strategies against cross-domain attacks on the power grid based on hierarchical knowledge distillation. It achieves efficient transfer of attack and defense knowledge through hierarchical knowledge distillation, utilizes structured knowledge graph constraints for coarse-grained distillation, and combines scenario-specific losses for fine-grained optimization. While ensuring strategy accuracy, it compresses the model size through lightweight processing, enabling deployment on low-computing-power edge terminals such as substation gateways, achieving rapid inference of attack scenarios. Simultaneously, it leverages online incremental data for collaborative model iteration between teachers and students, adapting to new attacks and power grid topology changes without requiring full retraining. Compared to traditional cloud-based large model solutions, it significantly reduces inference latency, addresses pain points such as limited edge deployment, difficulty in balancing inference speed and defense accuracy, and high model update costs, and significantly improves local real-time defense capabilities against cross-domain attacks on the power grid.

[0028] This embodiment provides a method for deducing and optimizing cross-domain power attack defense strategies based on hierarchical knowledge distillation. Figure 1 This is a flowchart of a method for deducing and optimizing a cross-domain power attack defense strategy based on hierarchical knowledge distillation according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps: In a specific embodiment, this invention is based on a "teacher-student" dual-model architecture and uses hierarchical knowledge distillation technology to achieve efficient deduction and optimization of power extreme cross-domain attack defense strategies. The overall architecture is shown in the attached figure. Figure 2 As shown, the core working logic is as follows: (1) Teacher model construction and knowledge reserve A multi-source integrated teacher model is constructed, integrating three core knowledge sources to form a comprehensive offensive and defensive knowledge system. The first is a power cross-domain offensive and defensive expert knowledge graph, covering key content such as attack kill chain rules, equipment vulnerability levels, and defense strategy priorities. The second is large-scale offensive and defensive simulation data, covering extreme attack scenarios across the entire process of power generation, transmission, transformation, distribution, consumption, and dispatch, with over 100,000 simulation cases accumulated. The third is real-world offensive and defensive event review data, including attack cases from various hacker groups targeting the power system, comprehensively covering the behavioral characteristics and response experiences of different types of extreme cross-domain attacks.

[0029] (2) Design of a hierarchical knowledge distillation framework The design employs a layered architecture of "coarse-grained rule distillation + fine-grained strategy distillation." In the coarse-grained distillation stage, general attack and defense rules from the teacher model are transformed into structured knowledge, including cross-domain attack path determination rules and basic principles for defense resource allocation. This knowledge is then transferred to the student model through soft-label supervision, building a foundational defense logic for the student model. In the fine-grained distillation stage, the focus is on the specific characteristics of extreme cross-domain attacks. Targeting core features such as temporal-step coupling propagation characteristics and cyber-physical collaborative attack mechanisms, precise distillation is performed using real attack case data to optimize the strategy adaptation accuracy of the student model.

[0030] (3) Lightweight student model training Based on the knowledge obtained from distillation, a "parameter pruning + feature fusion" technique is used to optimize the student model structure, remove redundant parameters, retain core decision paths, and construct a lightweight model suitable for edge deployment. During training, a multi-objective fusion distillation loss function is introduced, integrating knowledge distillation loss, policy accuracy loss, and inference efficiency loss to achieve multi-objective optimization of accuracy, efficiency, and lightweightness, ensuring that the model maintains high-quality defense decision-making capabilities while reducing resource consumption.

[0031] (4) Strategy deduction and dynamic optimization The trained student models are deployed on edge nodes or attack and defense ranges to quickly deduce optimal defense strategies for extreme cross-domain attacks detected in real time. Simultaneously, based on newly generated attack and defense data, including attack variant characteristics and strategy execution effect feedback, incremental distillation technology is used to update the knowledge of the teacher model, and the student model is iteratively optimized in parallel. This enables the dynamic evolution of defense strategies, continuously adapting to the evolution of attack methods and changes in power system topology.

[0032] Step S101: Construct a multimodal teacher model based on the multi-source attack and defense data of the power system.

[0033] In this embodiment of the invention, multi-source attack and defense data, such as power system equipment topology, security vulnerabilities, attack and defense simulation cases, and real attack replays, are collected and cleaned and fused. Based on a multimodal deep learning architecture, the heterogeneous attack and defense data are characterized in a unified manner. The correlation features and decision-making rules of conventional attack and defense and extreme cross-domain attacks in the power system are fully explored. Based on this, a multimodal teacher model with complete attack and defense knowledge representation capabilities is trained and constructed.

[0034] Step S102: Inferring each sample in the general sample set and the extreme cross-domain attack sample set through the multimodal teacher model to generate corresponding soft labels for the probability distribution of defense strategies.

[0035] In this embodiment of the invention, the general sample set and the extreme cross-domain attack sample set are sequentially input into the trained multimodal teacher model to perform forward inference calculations, and the output probability values ​​of various defense strategies corresponding to the two types of samples are extracted respectively, and integrated to form a soft label of the probability distribution of defense strategies carrying complete attack and defense decision information.

[0036] Step S103: Input the soft labels of the defense strategy probability distribution of the samples in the general sample set into the preset student model for coarse-grained rule distillation training.

[0037] In this embodiment of the invention, a lightweight neural network is pre-built as a student model. Training constraints are set based on the general attack and defense rules in the structured knowledge graph constructed above. The soft label of the probability distribution of the defense strategy of general sample matching is input into the student model. The KL (Kullback-Leibler, KL) divergence loss function is used to carry out coarse-grained rule distillation training, so that the student model can quickly learn the basic attack and defense handling logic of the power system.

[0038] Step S104: Use the soft label of the probability distribution of defense strategies of samples from the extreme cross-domain attack sample set to perform fine-grained strategy distillation optimization on the trained student model.

[0039] In this embodiment of the invention, based on the student model that has completed coarse-grained rule distillation training and mastered basic attack and defense rules, soft labels for the probability distribution of defense strategies corresponding to extreme cross-domain attack sample sets are introduced. Fine-grained strategy distillation optimization is carried out in combination with loss functions specific to extreme attack scenarios, which accurately makes up for the model's cognitive shortcomings in complex and high-risk cross-domain attack scenarios and refines the model's defense decision-making capabilities.

[0040] Step S105: Extract the optimal defense strategy output by the optimized student model, calculate the strategy prediction error of the execution effect corresponding to the optimal defense strategy, and backpropagate to fine-tune the optimized student model.

[0041] In this embodiment of the invention, the optimal defense strategy for each extreme attack scenario is output based on the student model optimized by fine-grained distillation. The actual execution effect of each defense strategy is quantitatively evaluated by combining power attack and defense simulation data. The strategy prediction error is obtained by solving the error. With minimizing the error as the optimization objective, the student model parameters are iteratively updated through the backpropagation algorithm to further correct the model decision bias and improve the accuracy of the model's defense strategy output.

[0042] Step S106: The fine-tuned student model is lightweighted and deployed to the power edge node. The defense strategy under each attack scenario is simulated in real time. Based on the simulation results and real-time incremental data, the multimodal teacher model and the processed student model are collaboratively optimized.

[0043] In this embodiment of the invention, the student model with fine-tuned parameters is subjected to lightweight processing such as pruning, quantization and feature fusion to generate an inference model adapted to edge computing power and deployed to the power edge node. The edge node is used to monitor attack traffic in real time and complete the deduction and execution of defense strategies for each attack scenario. On-site strategy execution feedback and incremental power grid data are continuously collected. Based on this, the multimodal teacher model and the lightweight inference model are updated synchronously and iteratively to achieve closed-loop collaborative optimization of teacher and student models.

[0044] The multi-source attack and defense data is a power grid security dataset integrating information from multiple dimensions, including power equipment topology, system vulnerabilities, security expert rules, attack simulation cases, and real attack debriefings. The multimodal teacher model is a large-capacity deep network model trained on the multi-source attack and defense data, capable of learning complete power grid attack and defense logic and outputting soft labels carrying complete decision-making information. The general sample set is a dataset containing basic attack samples such as routine power grid penetration and common fake data injection. The extreme cross-domain attack sample set is a dataset of high-risk and complex attack cases involving physical coupling of stored information, multi-path collaboration, and electromagnetic superposition. The defense strategy probability distribution soft label is a set of probability values ​​corresponding to various defense strategies output by the teacher model, distinct from a single judgment label. The student model is a lightweight neural network architecture with far fewer parameters and computational cost than the teacher model. Coarse-grained rule distillation training is a basic distillation process based on general attack and defense constraints and general sample soft labels from a knowledge graph. Fine-grained strategy distillation optimization is a secondary distillation based on extreme attack samples and a specific loss function, specifically optimizing the output accuracy of defense strategies under complex high-risk attack scenarios. The policy prediction error is the difference between the actual protection effect and the ideal protection effect of the defense policy output by the student model after attack and defense simulation. Backpropagation fine-tuning is an iterative optimization method that updates the student model network parameters layer by layer in reverse to correct model decision bias, aiming to minimize the policy prediction error. Lightweight processing reduces the size of student model parameters and computational overhead through structured pruning, feature fusion, and quantization compression to adapt to low-computing-power edge hardware. Power edge nodes are local terminal devices deployed in substations and distribution stations. Incremental data refers to new real-time data collected during edge node operation, such as new attack variants, power grid topology changes, and on-site policy execution feedback. Collaborative optimization utilizes incremental data and on-site execution errors to synchronously update the multimodal teacher model and the lightweight edge inference model.

[0045] This embodiment provides a method for deducing and optimizing cross-domain power attack defense strategies based on hierarchical knowledge distillation. Figure 3 This is a flowchart of a method for deducing and optimizing a cross-domain power attack defense strategy based on hierarchical knowledge distillation according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps: Step S201: Construct a multimodal teacher model based on the multi-source attack and defense data of the power system.

[0046] Specifically, step S201 includes: Step S2011: Collect and combine equipment topology data, vulnerability database data, expert experience rules, extreme cross-domain attack simulation case data, and power attack event review data from various links of the power system to generate multi-source attack and defense data.

[0047] In this embodiment of the invention, multi-source attack and defense knowledge data is collected: this data covers equipment topology data, vulnerability database data, expert experience rules, extreme cross-domain attack simulation case data, and real power attack event review data for each link of the power system "generation, transmission, transformation, distribution, consumption, and dispatch". Among them, the expert experience rules are compiled into more than 200 core contents through structured interviews, the simulation case data exceeds 100,000 sets, covering mixed attack scenarios such as fake data injection, electromagnetic interference, and physical damage to equipment, and the real attack event review data reaches more than 500 cases.

[0048] Data preprocessing operations: ① Perform structured transformation on expert rules. For example, transform "when the attack source is from the external network and attempts to access the main transformer control interface, the port blocking policy should be executed first" into a logical expression: (attack source = external network) ∧ (access target = main transformer control interface) → defense policy = port blocking; ② Feature engineering was performed on the simulation case data to extract 12 core features, including attack source type, propagation path length, affected device level, and attack duration. Min-Max standardization was used to map the feature values ​​to the [0,1] interval. ③ The real attack event data is labeled with scenarios and classified according to four dimensions: "attack initiation domain - attack target domain - attack method - impact consequences", forming 8 typical extreme cross-domain attack scenario datasets.

[0049] Step S2012: Construct a multimodal teacher model based on multi-source attack and defense data.

[0050] In this embodiment of the invention, a multimodal teacher model is constructed: an attack and defense knowledge graph model is built based on graph neural networks (GNN), and expert rules and vulnerability data are integrated; a strategy generation model is built based on deep reinforcement learning (DRL), and the optimal defense strategy generation capability is obtained by training with simulation case data; the outputs of the two types of models are weighted and fused to form a multimodal teacher model with the best comprehensive performance, and its defense strategy accuracy is ≥95%.

[0051] It is worth mentioning that the input to the GNN-based attack and defense knowledge graph model is power equipment topology data, power system vulnerability database information, and power cross-domain attack and defense expert rules; the output includes attack path inference results, equipment vulnerability levels, domain boundary relationships, semantic relationship triples between attack and defense entities, and a set of candidate defense rules. The main function of this GNN-based attack and defense knowledge graph model is to output matching scores for candidate defense strategies that comply with power safety regulations, thus playing a role in power rule constraints and compliance safeguards.

[0052] The DRL-based strategy generation model takes as input extreme cross-domain attack simulation case data, attack feature sequences (attack source, propagation path, attack intensity, affected device types, etc.), real-time operating status of power grid equipment, and system topology status; and outputs the value scores of various optional defense strategies, the probability distribution of the optimal defense strategy action, and the strategy execution priority ranking results. The main function of this DRL-based strategy generation model is to autonomously learn from the perspectives of attack and defense gains and system losses based on massive attack and defense simulation scenarios and real-time attack states, outputting the dynamic optimal defense strategy decision probability, and is responsible for scenario adaptation and real-time optimal decision-making.

[0053] The outputs of the attack and defense knowledge graph model based on GNN and the reinforcement learning policy generation model based on DRL are fused together by a decision layer with fixed weights: GNN ensures that the defense strategy conforms to industry rules and logic, and DRL ensures that the optimal strategy is dynamically deduced under complex attack scenarios. After fusion, a high-precision teacher model is formed, which provides reliable soft labels for subsequent hierarchical knowledge distillation.

[0054] set up Y GNN The defense rule feature vector / policy score vector output by the GNN knowledge graph model; Y DRL The defense strategy probability vector / action score vector output by the DRL strategy model is generated; α=0.4 and β=0.6 are fixed fusion weights.

[0055] The final output of the fused multimodal teacher model is: .

[0056] Step S2013: Extract general attack and defense rule knowledge, scenario adaptation knowledge, and strategy priority knowledge from the multimodal teacher model to construct a structured knowledge graph.

[0057] In this embodiment of the invention, core knowledge is extracted from the multimodal teacher model and divided into three categories: general attack and defense rule knowledge (such as "cross-domain attacks require breaking through at least two domain boundary protection devices"), scenario adaptation knowledge (such as "extreme attacks in the power transmission domain prioritize defense of the main transformer equipment"), and strategy priority knowledge (such as "false data injection attacks prioritize the activation of data verification strategies before activating isolation strategies"). This forms a structured knowledge graph, providing a foundation for subsequent distillation and transfer.

[0058] Step S202: Inferring each sample in the general sample set and the extreme cross-domain attack sample set through the multimodal teacher model to generate corresponding soft labels for the probability distribution of defense strategies.

[0059] Specifically, step S202 includes: Step S2021: Obtain the general sample set and the extreme cross-domain attack sample set, and input them into the multimodal teacher model respectively.

[0060] In this embodiment of the invention, a general sample set covering conventional attack and defense scenarios and an extreme cross-domain attack sample set adapted to high-risk and complex scenarios are extracted from the multimodal teacher model. The two types of sample sets are independently input into the trained multimodal teacher model to provide complete sample support for subsequent accurate inference to generate soft labels for the probability distribution of defense strategies.

[0061] Step S2022: Using a multimodal teacher model, reason about each sample corresponding to the general sample set and the extreme cross-domain attack sample set, and generate corresponding soft labels for the probability distribution of defense strategies.

[0062] In this embodiment of the invention, a general sample set and an extreme cross-domain attack sample set are sequentially input into a multimodal teacher model to perform forward inference operations. The probability values ​​of matching the two types of samples with various defense strategies are output respectively. The results are integrated to obtain soft labels of the probability distribution of defense strategies that carry complete attack and defense decision information, providing hierarchical supervision data for subsequent phased coarse-grained and fine-grained distillation training.

[0063] Step S203: Input the soft labels of the defense strategy probability distribution of the samples in the general sample set into the preset student model for coarse-grained rule distillation training.

[0064] Specifically, step S203 includes: Step S2031: Use a lightweight neural network to construct a student model.

[0065] In this embodiment of the invention, a lightweight neural network (such as the improved MobileNet architecture) is used to construct the student model, with the initial number of parameters controlled within 30% of that of the teacher model. The input layer is adapted to the multi-dimensional features of cross-domain power attacks (such as attack source IP, attack path, affected device type, attack intensity, etc.), and the output layer is a set of defense strategies (including strategy type, execution order, and resource allocation ratio).

[0066] Specifically, the lightweight student model network structure is initialized from scratch using an improved MobileNet architecture, with the specific initial parameters and input / output dimensions manually configured according to the characteristics of cross-domain power attack and the dimensions of defense strategies.

[0067] Specifically, the network size, number of input neurons, and number of output neurons of the student model are manually set based on the actual situation of the power business.

[0068] Step S2032: Using the general attack and defense rules within the structured knowledge graph as training constraints, input the soft labels of the probability distribution of defense strategies of the general attack and defense samples in the general sample set into the student model.

[0069] In this embodiment of the invention, general attack and defense rules within the structured knowledge graph are extracted and transformed into distillation constraints for the student model. The soft labels of the probability distribution of defense strategies obtained by the multimodal teacher model for reasoning on the general sample set are input into the pre-built lightweight student model to carry out coarse-grained rule distillation training, so that the model can master the basic defense logic of the power grid in common scenarios first.

[0070] Step S2033: Based on the KL divergence loss function, perform coarse-grained rule distillation training on the student model.

[0071] In this embodiment of the invention, the general rules in the structured knowledge graph are transformed into distillation constraints, which are then combined with soft-label supervision to train the student model. The KL divergence loss function is used to calculate the difference between the student model's output and the teacher model's soft labels. Specifically, the difference between the two outputs is quantified by calculating the relative entropy of the probability distributions of the defense strategies of the teacher and student models. Using the general rules of the structured knowledge graph as constraints, backpropagation is used to optimize the student model parameters. The KL divergence loss formula is as follows:

[0072] In the formula, The KL divergence loss function measures the difference in the probability distribution of defense strategies output by the student model and the teacher model. The probability distribution of soft labels for defense strategies output by the teacher model; Predict the probability distribution of the defense strategy output by the student model; Output the first value for the teacher model iThe probability of a defense strategy; Output the first value for the student model i The probability of a defense strategy.

[0073] By optimizing the student model parameters through backpropagation, the student model masters the basic attack and defense rules, achieving a strategy accuracy of ≥85%. The backpropagation calculation includes: Using general rules of structured knowledge graphs as distillation constraints, the KL divergence loss is minimized, and the student model is iteratively updated through backpropagation. :

[0074] In the formula, η This is the learning rate.

[0075] Step S204: Use the soft label of the probability distribution of defense strategies of samples from the extreme cross-domain attack sample set to perform fine-grained strategy distillation optimization on the trained student model.

[0076] Specifically, step S204 includes: Step S2041: Extract the temporal scene features corresponding to the extreme cross-domain attack scenario-specific samples in the extreme cross-domain attack sample set, and construct a scenario-specific loss function.

[0077] In this embodiment of the invention, more than 10,000 typical extreme cross-domain attack samples (such as cyber-physical collaborative attacks and multi-path concurrent attacks) are selected from simulation data and real cases, and the scenario characteristics (such as attack propagation speed, impact range, and device correlation) and optimal defense strategies of the samples are labeled.

[0078] For different extreme scenario types, scenario-specific distillation loss functions are designed to enhance the student model's learning of the mapping relationship between scenario features and defense strategies. For example, for time-series coupled attack scenarios, a time series attention mechanism is introduced to enable the student model to focus on learning the strategy adjustment logic corresponding to the attack propagation time sequence features.

[0079] Step S2042: Input the soft labels of the probability distribution of defense strategies corresponding to the specific samples of each extreme cross-domain attack scenario into the trained student model.

[0080] In this embodiment of the invention, the soft labels of the probability distribution of defense strategies generated by the multimodal teacher model for specific sample inference in various extreme cross-domain attack scenarios are input into the student model one by one, so as to provide accurate input data for subsequent fine-grained strategy distillation optimization combined with specific loss functions.

[0081] Step S2043: Based on the scenario-specific loss function, perform fine-grained policy distillation optimization on the trained student model according to multiple extreme attack scenarios.

[0082] In this embodiment of the invention, relying on a loss function specific to extreme cross-domain attack scenarios, and combining the soft labels of the defense strategies for the input extreme samples, the student model trained with coarse granularity is optimized with targeted fine granular strategy distillation. This corrects the strategy bias of the model in high-risk cross-domain attack scenarios and enhances the model's ability to make accurate defense decisions against complex power cross-domain attacks.

[0083] Step S205: Extract the optimal defense strategy output by the optimized student model, calculate the strategy prediction error of the execution effect corresponding to the optimal defense strategy, and backpropagate to fine-tune the optimized student model.

[0084] Specifically, step S205 includes: Step S2051: Extract the optimal defense strategy for various extreme attack scenarios from the optimized student model.

[0085] In this embodiment of the invention, the student model optimized by coarse-grained and fine-grained double-layer distillation has complete offensive and defensive decision-making capabilities. Based on the optimized and converged model parameters, it performs inference calculations on multiple extreme cross-domain attack scenarios, accurately extracts and outputs the optimal defense strategy adapted to the operating state of the power system under each attack scenario, and provides core decision-making basis for subsequent strategy effect evaluation and model iteration fine-tuning.

[0086] Step S2052: Calculate the system execution effect corresponding to each optimal defense strategy based on the attack and defense simulation data, and solve for the strategy prediction error.

[0087] In this embodiment of the invention, a power system attack and defense simulation environment is built and standardized attack and defense simulation data is retrieved. The optimal defense strategies output by the student model are substituted into the simulation environment for simulation and operation. The effectiveness of power grid security protection under different strategies is quantified and statistically analyzed. The difference is calculated by comparing with the theoretical ideal protection index, and the strategy prediction error used for model parameter tuning and correction is obtained.

[0088] Specifically, through collaborative reasoning between the teacher model and the student model, the deviation of the defense strategy output by the student model is corrected, the prediction error of the strategy execution effect (such as the defense success rate and the reduction ratio of system loss) is calculated, and the error is fed back to the student model for parameter fine-tuning, so that the accuracy of the student model strategy is improved to over 90%, and the deviation from the teacher model is ≤5%.

[0089] Step S2053: With the goal of minimizing the policy prediction error, all model parameters of the optimized student model are iteratively adjusted through the backpropagation algorithm.

[0090] In this embodiment of the invention, the strategy prediction error obtained by solving is used as the loss benchmark. With the goal of continuously reducing the error value, the backpropagation algorithm is used to propagate the error gradient layer by layer. All network parameters of the student model optimized by double distillation are iteratively adjusted to continuously correct the output deviation of the model's defense strategy and further improve the degree to which the model's decision fits the actual protection needs of the power grid.

[0091] Step S206: The fine-tuned student model is lightweighted and deployed to the power edge node. The defense strategy under each attack scenario is simulated in real time. Based on the simulation results and real-time incremental data, the multimodal teacher model and the processed student model are collaboratively optimized.

[0092] Specifically, step S206 includes: Step S2061: Perform structured pruning, feature fusion, and quantization compression on the fine-tuned student model to generate a lightweight inference model.

[0093] In this embodiment of the invention, the fine-tuned student model is subjected to lightweight compression, specifically in the following manner: (1) Parametric pruning By employing structured pruning techniques, redundant neurons and connections in the student model whose absolute weights are less than a threshold (determined through cross-validation) are removed. After pruning, the number of parameters is reduced by more than 50% compared to the initial student model.

[0094] (2) Feature fusion Multi-dimensional input features in the model can be fused (e.g., principal component analysis (PCA) can be used to extract key features) to reduce the dimensionality of input data while retaining the core information of the attack scenario and reducing the computational complexity of the model.

[0095] (3) Quantization compression The model parameters are quantized from 32-bit floating-point numbers to 8-bit integers. While ensuring that the policy accuracy remains basically unchanged, the model storage footprint is further reduced (storage is reduced by more than 75%), ultimately forming a lightweight student model (i.e., a lightweight inference model) suitable for edge deployment.

[0096] Step S2062: Deploy the lightweight inference model to the power edge node and monitor attack traffic data in real time through the power edge node.

[0097] In this embodiment of the invention, a lightweight inference model is deployed to the power edge nodes corresponding to substations and distribution stations. The power edge nodes (such as substation security gateways) monitor attack traffic in real time through an intrusion detection system (IDS).

[0098] Step S2063: Extract the attack features corresponding to the attack traffic data and input them into the lightweight inference model for deduction, and output the defense strategy.

[0099] In this embodiment of the invention, core features such as the attack source, attack type, propagation path, and affected devices of the attack traffic are extracted and transmitted to the lightweight student model. The lightweight student model quickly infers based on the input features and outputs the optimal defense strategy (including strategy execution order, target devices, and resource allocation scheme). The time taken for a single inference is ≤5 seconds, which meets the real-time response requirements.

[0100] Step S2064: Execute the defense strategy according to the simulation results through the power edge node and generate the strategy execution effect.

[0101] In this embodiment of the invention, the power edge node executes defense strategies (such as device isolation, traffic filtering, and data verification) according to the simulation results, and at the same time collects data on the effectiveness of the strategy execution (such as defense success rate, system recovery time, and resource consumption).

[0102] Step S2065: Summarize the newly added attack variant data and power grid topology change data to construct an incremental dataset.

[0103] In this embodiment of the invention, new extreme attack cases, attack variant characteristics, and system topology change data are collected periodically to construct an incremental dataset.

[0104] Step S2066: Based on the incremental dataset and the policy prediction error corresponding to the policy execution effect, the multimodal teacher model and the lightweight inference model are jointly optimized.

[0105] In this embodiment of the invention, the teacher model is incrementally trained based on the incremental dataset to update the attack and defense knowledge system; through incremental distillation technology, the new knowledge is quickly transferred to the student model without full retraining, and the update cycle is shortened to 1-2 days.

[0106] This invention addresses the core issues in existing defenses against extreme cross-domain attacks on the power sector—limited model deployment, insufficient inference efficiency, imbalanced strategy accuracy, and lagging knowledge updates—by constructing a comprehensive technical system encompassing "layered knowledge distillation, lightweight model deployment, and dynamic strategy optimization." It achieves a technological breakthrough from reliance on complex models to efficient edge defense, with specific effects manifested in the following four aspects: (1) The lightweight adaptation capability of the model has been significantly improved, breaking through the bottleneck of edge deployment. By employing stratified distillation and combinatorial optimization techniques, the model resource consumption is significantly reduced while ensuring strategy accuracy. The resulting lightweight student model effectively compresses the number of parameters, storage usage, and computing power consumption. It can be directly deployed on power edge nodes such as substation monitoring terminals and distribution network security gateways, and is compatible with low-computing-power chip devices. This completely solves the technical pain point of traditional complex intelligent models being difficult to implement in edge scenarios, providing a feasible path for local real-time defense against extreme cross-domain attacks.

[0107] (2) The efficiency of defense strategy simulation has been greatly improved, meeting the needs of real-time decision-making. Leveraging a lightweight model architecture and the efficient reuse of core knowledge through layered distillation, the speed of defense strategy derivation in extreme cross-domain attack scenarios is significantly improved. Even in complex and extreme scenarios such as multi-path concurrent attacks and cyber-physical coordinated attacks, it can still quickly output the optimal defense strategy, buying critical defense time for the power system, effectively avoiding the expansion of the attack scope and the aggravation of losses due to response delays, and fully meeting the real-time decision-making needs in extreme attack scenarios.

[0108] (3) Ensure the accuracy of defense strategies and the adaptability to different scenarios simultaneously to enhance the ability to resist extreme attacks. Through tiered training combining "coarse-grained rule distillation" and "fine-grained strategy distillation," student models fully acquire the core offensive and defensive knowledge of teacher models, resulting in simultaneous improvement in the accuracy of defense strategies and scenario adaptability. This enables precise adaptation to extreme cross-domain attack scenarios across the entire power system (transmission, distribution, upgrading, and dispatching), demonstrating stronger resilience against highly concealed and multi-faceted cross-domain attacks. It effectively compensates for the shortcomings of traditional lightweight models in terms of accuracy, ensuring the safe and stable operation of power systems under complex attack scenarios.

[0109] (4) The ability to dynamically update knowledge is continuously enhanced, adapting to attack evolution and system changes. The knowledge update mechanism built on incremental distillation technology can quickly absorb new knowledge brought about by new attack cases, attack variant characteristics, and power system topology changes without requiring full model retraining, significantly shortening the model update cycle. It can track the evolution of extreme cross-domain attack methods in real time, dynamically optimize defense strategies, and adapt to topology changes such as power system expansion and upgrades, ensuring that defense capabilities are always synchronized with the security risk situation and avoiding protection failures due to outdated strategies.

[0110] Best practice for a specific application Implementation Scenarios 1. A full-process attack and defense test range for a provincial power company, encompassing power generation, transmission, transformation, distribution, consumption, and dispatch, and an edge defense system for its 20 subordinate 220kV smart substations. This scenario needs to cope with extreme cross-domain attacks launched by national-level hacker groups (such as cyber-physical collaborative attacks spanning the power generation and transmission domain and the distribution and consumption domain, and multi-path concurrent penetration attacks). It must not only simulate attack scenarios and verify defense strategies through the attack and defense test range, but also provide local real-time defense decision support for substation edge nodes (distribution network security gateways, monitoring terminals). The core requirements of this scenario include: model adaptation to low-computing-power hardware at edge nodes, rapid response to defense strategy deduction, strategy accuracy meeting the requirements for extreme attack defense, and support for rapid model updates as attack methods evolve.

[0111] 2. Implementation prerequisites and preparations (1) Hardware environment: High-performance server clusters are deployed in the attack and defense range (for teacher model construction and training); the substation edge nodes use ARM Cortex-A72 chip devices (2GB RAM, 16GB storage) to meet the requirements of lightweight model deployment.

[0112] (2) Data foundation: Collect the topology data of equipment in the entire process of "generation, transmission, transformation, distribution, consumption and dispatch" of the provincial power system, information of the power-specific vulnerability database, core experience rules formed by structured interviews with 50 attack and defense experts, simulation case data covering various extreme cross-domain attack scenarios, and review reports and vulnerability exploitation records of real cross-domain attack events in domestic and foreign power systems in recent years.

[0113] (3) Software support: Build a knowledge graph construction platform based on graph neural networks, a deep reinforcement learning training framework, a hierarchical knowledge distillation toolset, and an edge node attack feature collection and strategy execution module, which is compatible with the interface protocols of existing power system intrusion detection systems (IDS) and security defense equipment.

[0114] 3. Detailed Implementation Process 3.1 Teacher Model Construction and Knowledge Initialization (Executed by Attack and Defense Range Server Cluster) (1) Data preprocessing operations ① Perform structured transformation on expert rules. For example, transform "when the attack source is from the external network and attempts to access the main transformer control interface, the port blocking policy should be executed first" into a logical expression: (attack source = external network) ∧ (access target = main transformer control interface) → defense policy = port blocking; ② Feature engineering was performed on the simulation case data to extract 12 core features, including attack source type, propagation path length, affected device level, and attack duration. Min-Max standardization was used to map the feature values ​​to the [0,1] interval. ③ The real attack event data is labeled with scenarios and classified according to four dimensions: "attack initiation domain - attack target domain - attack method - impact consequences", forming 8 typical extreme cross-domain attack scenario datasets.

[0115] (2) Teacher model building and training ① Attack and defense knowledge graph model: Based on GNN, the input device topology, vulnerability information, and expert rules are set to 128 nodes. It is trained for 50 rounds with a learning rate of 0.001 to realize the association reasoning between attack paths and defense strategies. ② Reinforcement learning strategy generation model: The reward function is "minimizing the system loss caused by the attack". The state space includes attack features and device operating status. The action space consists of 15 types of defense strategies (port blocking, traffic filtering, device isolation, etc.). The training iteration is 1000 rounds and the convergence threshold is set to 0.0001. ③ Model Fusion: A weighted fusion strategy is adopted, with the knowledge graph model outputting a weight of 0.4 and the reinforcement learning model outputting a weight of 0.6. After fusion, the accuracy of the teacher model's defense strategy decision is stable at over 95%.

[0116] (3) Extraction of core knowledge Three types of knowledge are extracted from the teacher model: general rule type (such as "cross-domain attacks require breaking through at least 2 domain boundary protection devices"), scenario adaptation type (such as "power transmission domain attacks prioritize defense of main transformer and scheduling server"), and strategy priority type (such as "fake data injection attack: data verification strategy priority > isolation strategy priority"). These are stored in the knowledge graph in the form of triples (subject-relationship-object) to form a structured knowledge carrier.

[0117] 3.2 Layered Knowledge Distillation Training (Executed on an attack and defense testbed server cluster, such as...) Figure 4 (As shown) (1) Lightweight student model initialization An improved MobileNet architecture is adopted, with an input layer dimension of 12 (corresponding to the number of core attack features), 3 hidden layers (with 64, 32, and 16 neurons respectively), and an output layer dimension of 15 (corresponding to the defense strategy type). The initial number of parameters is controlled at 28% of the teacher model.

[0118] (2) Coarse-grained regular distillation (training parameter settings) ① Input dataset: 100,000 attack samples corresponding to the general rules, batch size set to 64, training rounds of 30, learning rate of 0.002; ② Soft label generation: After the teacher model infers the sample, it outputs the probability distribution of defense strategies (such as strategy A probability 0.7, strategy B probability 0.2, strategy C probability 0.1), which serves as the soft label; ③Loss function: The KL divergence loss function is adopted with a weight coefficient of 0.6. Combined with the cross-entropy loss (weight coefficient of 0.4), the student model parameters are optimized. After training, the student model's basic rule mastery accuracy reaches 86%.

[0119] (3) Fine-grained strategy distillation (scenario-based optimization) ① Input dataset: 12,000 typical extreme cross-domain attack samples were selected (including complex scenarios such as cyber-physical collaborative attacks and multi-path concurrent attacks), and the data was trained in batches according to scenario type (each batch corresponds to one scenario). ②Scenario-specific loss function: For time-series-step-series coupled attack scenarios, a time-series attention weight is introduced (attack propagation time-series feature weight 0.3), and the loss function is KL divergence loss + time-series feature matching loss; ③ Collaborative correction: The teacher model and the student model infer in parallel on the same batch of samples, and calculate the policy bias (such as the difference between the student model's output policy and the teacher model's optimal policy). When the bias is greater than 5%, the teacher model is triggered to guide correction, adjust the student model parameters, and finally improve the student model's policy accuracy to over 92%.

[0120] 3.3 Lightweight Compression and Edge Deployment of Student Models (1) Model compression operation ①Structured pruning: Set a weight threshold of 0.01, remove neurons and connections with absolute weight values ​​less than the threshold, and reduce the number of parameters by 52% after pruning; ② Feature fusion: PCA is used to reduce the dimensionality of the 12-dimensional input features to 8-dimensional, retaining more than 95% of the feature information; ③ Quantization compression: TensorRT is used to quantize 32-bit floating-point numbers into 8-bit integers, reducing storage usage from 520MB in the teacher model to 108MB.

[0121] (2) Power edge node deployment process ① Model Packaging: The quantized student model is packaged into an edge device-compatible .onnx format and pushed to 25 substation edge defense terminals through an encrypted transmission channel; ② Interface adaptation: Complete the connection between the model and the attack feature collection SDK and the defense execution device API on the edge terminal, configure the feature collection period to be 10ms, and the policy execution response timeout threshold to be 1 second; ③ Deployment verification: Test the model startup time (≤3 seconds) and resource usage (CPU usage ≤20%, memory usage ≤512MB) to ensure that the edge device operation requirements are met.

[0122] 3.4 Real-time defense and dynamic updates for edge nodes (1) Real-time attack defense execution (operation of substation edge terminal) ①Feature collection: The edge terminal extracts attack features (such as attack source IP, access interface, and abnormal data features) in real time through traffic probes and device monitoring modules, with a collection frequency of 10ms / time. ② Strategy deduction: After receiving feature data, the lightweight student model quickly infers (single deduction time ≤ 4.2 seconds) and outputs the optimal defense strategy (such as "port blocking + data verification") and execution parameters (blocking ports: 502, 102; data verification threshold: error ≤ 0.5%). ③ Policy Execution: After receiving the instruction, the defense execution device (firewall, IPS) completes the configuration and takes effect within 100ms, blocking the attack path.

[0123] (2) Dynamic Model Update (Incremental Distillation) ① New knowledge collection: Edge terminals regularly upload new attack characteristics (such as attack variant port and data format characteristics) and strategy execution effect data (such as defense success rate and system recovery time). The attack and defense test range server cluster summarizes these data to form an incremental dataset. ② Incremental training of the teacher model: Based on the incremental dataset, the teacher model is fine-tuned (10 training rounds, learning rate 0.001) and the knowledge graph is updated; ③ Incremental distillation of student models: Incremental distillation parameters are pushed to edge terminals through an encrypted channel (no need for full model transmission). The edge terminals complete the model update locally (update time ≤ 5 minutes). After the update, the model's defense accuracy against new attack variants reaches over 89%.

[0124] 3.5 Simulation Verification of Attack and Defense Range In the provincial-level power "generation, transmission, transformation, distribution, consumption, and dispatch" full-process attack and defense test range, a high-fidelity extreme cross-domain attack simulation environment was built to accurately reproduce the attack methods and links commonly used by national-level hacker organizations. The simulation launched a cyber-physical collaborative attack that crosses the generation and transmission domain and the distribution and consumption domain: by injecting false load forecast data into the dispatch data network, tampering with power grid dispatch instructions, and simultaneously using electromagnetic interference equipment to physically disturb the secondary circuits of substations (such as protection devices and monitoring and control terminals), the attack lasted for 10 minutes, simulating the extreme characteristics of covert penetration of the attack path, multi-means coordinated linkage, and dynamic escalation of attack intensity.

[0125] During the verification process, the lightweight student model trained by this invention was deployed on the simulated edge node of the test range (with the same hardware configuration as the actual edge terminal of the substation). At the same time, a control group of traditional defense schemes was built (including a centralized defense scheme based on a complex cloud model and a general lightweight model defense scheme without layered knowledge distillation). Comparative verification was carried out around three core indicators: ① Defense response time: The total time from when attack characteristics are captured by the Intrusion Detection System (IDS) to when the defense strategy is generated and distributed to the execution device; ② Attack blocking success rate: The probability that the defense strategy successfully prevents the attack from breaking through the core domain boundary and avoids the core equipment (main transformer, dispatch server) from being controlled or damaged after execution; ③ System loss reduction ratio: Calculate the percentage reduction in system loss after the implementation of the defense plan by comparing the power grid load loss and equipment damage cost without defense measures.

[0126] Simulation results show that the defense response time of the present invention is ≤4.2 seconds, which can complete the strategy decision and execution in the early stage of the attack (within 3-5 seconds after the attack is launched) and quickly block the attack penetration path; the attack blocking success rate is 88%, which effectively resists the multi-dimensional damage of cyber-physical collaborative attacks; the system loss reduction ratio is 75%, which greatly reduces the losses caused by the attack, such as load shedding and equipment failure.

[0127] In contrast, traditional centralized cloud-based defense solutions suffer from long network transmission latency and model inference time, resulting in a defense response time of ≥15 seconds. Effective defense is only initiated after the attack has penetrated into the core equipment of the power domain, with an attack blocking success rate of only 62% and a system loss reduction rate of only 40%. Ordinary lightweight models without layered knowledge distillation have a response time of ≤5 seconds, but due to insufficient policy accuracy, the attack blocking success rate is only 70%, and the system loss reduction rate is only 55%. The solution of this invention is significantly superior to traditional solutions in terms of response speed, defense accuracy, and loss control, fully demonstrating its technical superiority in extreme cross-domain attack defense scenarios.

[0128] 4. Implementation Results (1) Breakthrough in edge deployment adaptability solves the problem of low computing power terminal deployment. During the trial operation, the lightweight student model ran stably on ARM Cortex-A series low-computing-power edge terminals (2GB RAM, 16GB storage) in 25 substations, without any hardware resource overload, running lag, or abnormal exits. Actual testing showed that the model's CPU utilization remained stable at 15%-20%, memory usage was controlled within 512MB, and storage usage was only 108MB, fully adapting to the hardware resource constraints of power edge nodes. Compared to the problem of traditional complex intelligent models being unable to be deployed on edge terminals due to excessive computing power requirements, this invention, through layered knowledge distillation and combinatorial optimization techniques, achieves a breakthrough in the deployment of defense models from "cloud-centralized" to "edge-localized," making real-time local defense against extreme cross-domain attacks a reality and providing a feasible technical path for power system edge security protection.

[0129] (2) Dual guarantee of defense response efficiency and strategy precision, enhancing the ability to resist extreme attacks. In simulation verification at attack and defense test ranges and actual defense trial operation at substations, the solution of this invention demonstrated highly efficient strategy inference capabilities and precise defense effects: For extreme cross-domain attacks (such as cyber-physical attacks and multi-path concurrent attacks), the entire response time from the capture of attack characteristics to the generation and execution of defense strategies is ≤4.2 seconds, significantly shorter than traditional cloud-based centralized defense solutions (response time ≥15 seconds). This allows for rapid blocking of penetration paths in the early stages of an attack, preventing the attack from spreading to core equipment such as main transformers and dispatch servers. Simultaneously, the model's defense strategy accuracy reached 88%, successfully resisting multiple extreme cross-domain attacks simulating attacks launched by state-owned hacker groups. No defense failures or business interruptions occurred due to strategy misjudgments, effectively compensating for the shortcomings of insufficient accuracy in traditional lightweight models and achieving a dual guarantee of rapid response and precise defense.

[0130] (3) The knowledge dynamic update mechanism is efficient and practical, and adapts to attack evolution and system changes. During the trial operation, incremental distillation technology was used to update the model for three new attack variants (such as cross-domain penetration attacks based on new vulnerabilities and covert attacks with dynamically switching attack paths) and five power system topology change scenarios. The entire update process did not interrupt the defense services of edge terminals, with a single terminal model update taking ≤5 minutes, significantly improving efficiency compared to traditional full retraining (update cycle ≥24 hours / terminal). The updated model accurately identified new attack variants, maintaining a defense success rate above 85%, while adapting to the defense requirements after system topology changes, without any policy lag or adaptation failures. This mechanism effectively solves the pain points of traditional models struggling to keep up with the rapid evolution of attack methods and the high cost of adaptation after system changes, ensuring that the power system's defense capabilities are always synchronized with the security risk situation, and significantly reducing the workload of maintenance personnel and the long-term operating costs of the system.

[0131] (4) Full-scenario compatibility and resource optimization, with broad engineering promotion value. This invention is fully compatible with the existing power system's technological ecosystem: Model deployment requires no replacement of substation edge terminal hardware or modification of the basic network architecture. It can directly interface with existing intrusion detection systems (IDS), firewalls, IPS, and other security devices, and is compatible with power-specific communication protocols such as IEC 61850 and DL / T 645. Deployment can be completed simply through software upgrades and parameter configuration, significantly reducing the difficulty of engineering implementation. Simultaneously, layered knowledge distillation technology enables efficient reuse of attack and defense knowledge, avoiding the waste of computing resources caused by repeated training of traditional models. Edge-localized deployment reduces the cross-network transmission of attack characteristics and policy instructions, lowering network bandwidth consumption and improving data transmission security. Furthermore, the solution is not only suitable for substation edge defense but can also be seamlessly extended to other power scenarios such as distribution substations and new energy power plants. For new businesses such as source-grid-load-storage interaction and virtual power plants, it can be quickly applied simply by updating scenario adaptation parameters, demonstrating excellent technical scalability and broad engineering promotion value.

[0132] This embodiment also provides a power cross-domain attack defense strategy deduction and optimization device based on hierarchical knowledge distillation. This device is used to implement the above embodiments and preferred embodiments, and details already described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0133] This embodiment provides a device for deducing and optimizing cross-domain power attack defense strategies based on hierarchical knowledge distillation, such as... Figure 5 As shown, it includes: Module 301 is used to construct a multimodal teacher model based on multi-source attack and defense data of the power system. The inference module 302 is used to infer the probability distribution soft labels of the corresponding defense strategy by using the multimodal teacher model to infer the samples in the general sample set and the extreme cross-domain attack sample set. Training module 303 is used to input the soft labels of the probability distribution of defense strategies of samples in the general sample set into the preset student model for coarse-grained rule distillation training. Optimization module 304 is used to perform fine-grained policy distillation optimization on the trained student model using soft labels of the probability distribution of defense strategies for samples from extreme cross-domain attack sample sets. The extraction module 305 is used to extract the optimal defense strategy output by the optimized student model, calculate the strategy prediction error of the execution effect corresponding to the optimal defense strategy, and backpropagate to fine-tune the optimized student model. The execution module 306 is used to perform lightweight processing on the fine-tuned student model and deploy it to the power edge node, perform real-time simulation of defense strategies under various attack scenarios, and perform collaborative optimization of the multimodal teacher model and the processed student model based on the simulation results and real-time incremental data.

[0134] In some alternative implementations, the construction module 301 includes: The data acquisition unit is used to collect and combine equipment topology data, vulnerability database data, expert experience rules, extreme cross-domain attack simulation case data, and power attack event review data from various aspects of the power system to generate multi-source attack and defense data. Construct teacher model units to build multimodal teacher models based on multi-source attack and defense data; Construct graph units to extract general attack and defense rules, scenario adaptation, and strategy priority knowledge from the multimodal teacher model, and build a structured knowledge graph.

[0135] In some alternative implementations, the inference module 302 includes: The acquisition unit is used to acquire a general sample set and an extreme cross-domain attack sample set and input them into the multimodal teacher model respectively; The inference unit is used to infer the probability distribution soft labels of the corresponding samples in the general sample set and the extreme cross-domain attack sample set through the multimodal teacher model, and generate the corresponding defense strategy.

[0136] In some alternative implementations, training module 303 includes: Construct a student model unit to build a student model using a lightweight neural network; The setting unit is used to set the general attack and defense rules in the structured knowledge graph as training constraints and input the soft label of the probability distribution of the defense strategy of the general attack and defense samples of the general sample set into the student model. The training unit is used to train the student model using coarse-grained rule distillation based on the KL divergence loss function.

[0137] In some alternative implementations, the optimization module 304 includes: The feature extraction unit is used to extract the temporal scene features corresponding to the extreme cross-domain attack scenario-specific samples in the extreme cross-domain attack sample set, and to construct the scene-specific loss function. The input unit is used to input the soft labels of the probability distribution of defense strategies corresponding to the specific samples of each extreme cross-domain attack scenario into the trained student model. The optimization unit is used to perform fine-grained policy distillation optimization on the trained student model based on a scenario-specific loss function and various extreme attack scenarios.

[0138] In some alternative implementations, the extraction module 305 includes: The strategy extraction unit is used to extract the optimal defense strategy for various extreme attack scenarios output by the optimized student model. The solution unit is used to calculate the system execution effect corresponding to each optimal defense strategy based on attack and defense simulation data, and to solve the strategy prediction error. The adjustment unit is used to iteratively adjust all model parameters of the optimized student model through the backpropagation algorithm with the goal of minimizing the policy prediction error.

[0139] In some alternative implementations, execution module 306 includes: The processing unit is used to perform structured pruning, feature fusion, and quantization compression on the fine-tuned student model to generate a lightweight inference model. The deployment unit is used to distribute and deploy the lightweight inference model to the power edge node, and monitor attack traffic data in real time through the power edge node; The inference unit is used to extract the attack characteristics corresponding to the attack traffic data and input them into the lightweight inference model for inference, and output the defense strategy. The execution unit is used to execute defense strategies according to the simulation results through power edge nodes and generate the strategy execution effect. The aggregation unit is used to aggregate data on newly added attack variants and power grid topology changes to build an incremental dataset. The collaborative optimization unit is used to collaboratively optimize the multimodal teacher model and the lightweight inference model based on the incremental dataset and the policy prediction error corresponding to the policy execution effect.

[0140] The power grid extreme cross-domain attack defense strategy deduction and optimization device provided in this embodiment of the invention can execute the power grid cross-domain attack defense strategy deduction and optimization method based on hierarchical knowledge distillation provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method. Further functional descriptions of the above modules and units are the same as in the corresponding embodiments described above, and will not be repeated here.

[0141] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention.

[0142] The following is a detailed reference. Figure 6 This diagram illustrates a structural schematic suitable for implementing an electronic device according to embodiments of the present invention. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 401, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 402 or a program loaded from memory 408 into random access memory (RAM) 403. The RAM 403 also stores various programs and data required for the operation of the electronic device. The processor 401, ROM 402, and RAM 403 are interconnected via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.

[0143] Typically, the following devices can be connected to I / O interface 405: input devices 406 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 407 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 408 including, for example, magnetic tapes, hard disks, etc.; and communication devices 409. Communication device 409 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0144] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 409, or installed from a memory 408, or installed from a ROM 402. When the computer program is executed by the processor 401, it performs the functions defined in the power cross-domain attack defense strategy deduction and optimization method based on hierarchical knowledge distillation according to embodiments of the present invention.

[0145] Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present invention.

[0146] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the power cross-domain attack defense strategy deduction and optimization method based on hierarchical knowledge distillation shown in the above embodiments is implemented.

[0147] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for deducing and optimizing cross-domain attack defense strategies based on hierarchical knowledge distillation, characterized in that, The method includes: A multimodal teacher model is constructed based on multi-source attack and defense data from the power system. The multimodal teacher model is used to infer the probability distribution of each sample in the general sample set and the extreme cross-domain attack sample set, and generate corresponding soft labels for the defense strategy probability distribution. The defense strategy probability distribution of the samples in the general sample set is input into a preset student model for coarse-grained rule distillation training. The defense strategy probability distribution soft labels of the samples in the extreme cross-domain attack sample set are used to perform fine-grained strategy distillation optimization on the trained student model; Extract the optimal defense strategy output by the optimized student model, calculate the strategy prediction error of the execution effect corresponding to the optimal defense strategy, and backpropagate to fine-tune the optimized student model. The fine-tuned student model is lightweighted and deployed to the power edge node. Defense strategies under various attack scenarios are simulated in real time. Based on the simulation results and real-time incremental data, the multimodal teacher model and the processed student model are collaboratively optimized.

2. The method according to claim 1, characterized in that, The construction of a multimodal teacher model based on multi-source attack and defense data of the power system includes: Collect and combine equipment topology data, vulnerability database data, expert experience rules, extreme cross-domain attack simulation case data, and power attack event review data from various aspects of the power system to generate multi-source attack and defense data. Based on the aforementioned multi-source attack and defense data, a multimodal teacher model is constructed; From the multimodal teacher model, extract general attack and defense rules, scenario adaptation, and strategy priority knowledge to construct a structured knowledge graph.

3. The method according to claim 1, characterized in that, The process of inferring from each sample in the general sample set and the extreme cross-domain attack sample set using the multimodal teacher model to generate corresponding soft labels for the probability distribution of defense strategies includes: Obtain a general sample set and an extreme cross-domain attack sample set, and input them into the multimodal teacher model respectively; The multimodal teacher model is used to infer the probability distribution soft labels of the corresponding samples in the general sample set and the extreme cross-domain attack sample set, respectively, to generate the corresponding defense strategy.

4. The method according to claim 2, characterized in that, The step of inputting the soft-labeled probability distribution of the defense strategy of the samples in the general sample set into a preset student model for coarse-grained rule distillation training includes: A student model is constructed using a lightweight neural network; Using the general attack and defense rules within the structured knowledge graph as training constraints, the soft labels of the defense strategy probability distribution of the general attack and defense samples in the general sample set are input into the student model; The student model is trained using coarse-grained rule distillation based on the KL divergence loss function.

5. The method according to claim 1, characterized in that, The fine-grained policy distillation optimization of the trained student model using soft labels of the defense strategy probability distribution of samples from the extreme cross-domain attack sample set includes: Extract the temporal scene features corresponding to the extreme cross-domain attack scenario-specific samples in the extreme cross-domain attack sample set, and construct a scenario-specific loss function; Input the soft labels of the probability distribution of defense strategies corresponding to the specific samples of each extreme cross-domain attack scenario into the trained student model; Based on the scenario-specific loss function, fine-grained policy distillation optimization is performed on the trained student model according to multiple extreme attack scenarios.

6. The method according to claim 1, characterized in that, The process of extracting the optimal defense strategy output by the optimized student model, calculating the strategy prediction error of the execution effect corresponding to the optimal defense strategy, and backpropagating to fine-tune the optimized student model includes: Extract the optimized student model and output the optimal defense strategy matching various extreme attack scenarios; The system execution effect corresponding to each optimal defense strategy is calculated based on the attack and defense simulation data, and the strategy prediction error is solved. With the goal of minimizing the policy prediction error, all model parameters of the optimized student model are iteratively adjusted using the backpropagation algorithm.

7. The method according to claim 1, characterized in that, The process involves lightweighting the fine-tuned student model and deploying it to a power edge node, performing real-time simulations of defense strategies under various attack scenarios, and collaboratively optimizing the multimodal teacher model and the processed student model based on the simulation results and real-time incremental data. This includes: The fine-tuned student model is subjected to structured pruning, feature fusion, and quantization compression to generate a lightweight inference model. The lightweight inference model is deployed to the power edge node, and the attack traffic data is monitored in real time through the power edge node. Extract the attack features corresponding to the attack traffic data and input them into the lightweight inference model for deduction, and output the defense strategy; The defense strategy is executed by the power edge node according to the simulation results, and the strategy execution effect is generated. We aggregate data on newly added attack variants and power grid topology changes to construct an incremental dataset. Based on the incremental dataset and the policy prediction error corresponding to the policy execution effect, the multimodal teacher model and the lightweight inference model are jointly optimized.

8. A device for deducing and optimizing cross-domain power attack defense strategies based on hierarchical knowledge distillation, characterized in that, The device includes: The module is used to build a multimodal teacher model based on multi-source attack and defense data of the power system; The inference module is used to infer the probability distribution soft labels of the corresponding defense strategy by using the multimodal teacher model to infer the samples in the general sample set and the extreme cross-domain attack sample set. The training module is used to input the soft labels of the defense strategy probability distribution of the samples in the general sample set into a preset student model for coarse-grained rule distillation training. The optimization module is used to perform fine-grained policy distillation optimization on the trained student model using soft labels of the probability distribution of defense strategies of the samples in the extreme cross-domain attack sample set. The extraction module is used to extract the optimal defense strategy output by the optimized student model, calculate the strategy prediction error of the execution effect corresponding to the optimal defense strategy, and backpropagate to fine-tune the optimized student model. The execution module is used to perform lightweight processing on the fine-tuned student model and deploy it to the power edge node, perform real-time simulation of defense strategies under various attack scenarios, and perform collaborative optimization of the multimodal teacher model and the processed student model based on the simulation results and real-time incremental data.

9. An electronic device, characterized in that, include: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes the computer instructions to perform the power cross-domain attack defense strategy deduction and optimization method based on hierarchical knowledge distillation as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the power cross-domain attack defense strategy deduction and optimization method based on hierarchical knowledge distillation as described in any one of claims 1 to 7.