A game theory-based defense method for microgrid cyber-physical systems
Through a game theory method, a malicious code attack model and cost function of the microgrid information physics system was established, and an intelligent evolution algorithm was used to find the Nash equilibrium strategy combination, which solved the problem of total loss of malicious code attacks on the microgrid and realized the system's Effective defense and minimize losses.
Patent Information
- Application Number
- CN202111454900.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2041-12-01
AI Technical Summary
When the microgrid information physics system is attacked by malicious code with propagation characteristics, the load data is tampered with, resulting in unbalanced supply and demand, endangering the normal operation of the system. The existing technology has failed to effectively minimize the total loss of this attack on the microgrid.
Using game theory-based defense methods, we establish the propagation model and effect model of malicious code attacks through propagation dynamics modeling, Markov theory and probability theory, combine power system architecture and scheduling algorithms to calculate the cost function of attack and defense, and use The intelligent evolution algorithm finds the Nash equilibrium strategy combination and obtains the best killing strategy to minimize losses.
The load network state changes over time is accurately portrayed, and the game model of both offense and defense is established. The effectiveness of the model is verified through simulation experiments, minimizing microgrid losses under malicious code attacks.
Smart Images

Figure CN114139156B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for defending a microgrid cyber-physical system against malicious code attacks, and in particular to a method for defending a microgrid cyber-physical system based on game theory. Background Art
[0002] The cyber-physical system of microgrids has many security vulnerabilities and is vulnerable to cyber attacks. In order to reduce the total loss caused by malicious code attacks to microgrids (defenders), effective killing strategies can be obtained by using convex optimization theory, game theory, intelligent evolutionary algorithms, etc. However, current research has not yet paid attention to the impact of malicious code attacks with propagation characteristics on microgrids and how to minimize the total loss of such attacks on microgrids. Summary of the invention
[0003] The present invention mainly targets the scenario where the microgrid cyber-physical system is attacked by malicious code with propagation characteristics, the load data is tampered, resulting in an imbalance in the supply and demand of the microgrid, and endangering the normal operation of the microgrid. The present invention provides a microgrid cyber-physical system defense method based on game theory. The method is based on the historical data collected by the smart grid. By obtaining a reasonable malicious code detection and killing strategy, the total loss of the microgrid when the microgrid cyber-physical system is attacked by such attacks can be minimized.
[0004] The purpose of the present invention is achieved through the following technical solutions
[0005] The present invention comprises the following steps:
[0006] Step 1: Use propagation dynamics modeling methods, Markov theory, and probability theory to establish a propagation model and effect model of malicious code attacks based on microgrid cyber-physical systems;
[0007] Step 2: Based on the propagation model and effect model, combined with the power system architecture and dispatch algorithm, the impact of malicious code attacks on the operation of the microgrid is obtained;
[0008] Step 3: Construct the cost function of malicious code attack and the cost function of detecting and killing malicious code;
[0009] Step 4: According to the cost function of the malicious code attack and the cost function of detecting and killing the malicious code, the cost of the malicious code attack and the cost of detecting and killing the malicious code are calculated;
[0010] Step 5: Based on the impact of malicious code attacks on microgrid operation, the cost of malicious code attacks, and the cost of detecting and killing malicious code, a calculation method for the attacker's net profit and the defender's total loss is proposed;
[0011] Step 6: By analyzing the historical data of the microgrid cyber-physical system, the probability distribution of malicious code attacks on each load node in the microgrid cyber-physical system is obtained and used as the network state of the microgrid cyber-physical system at the initial moment of the game;
[0012] Step 7: Based on the network state of the microgrid cyber-physical system at the initial moment of the game, using the propagation model and effect model of malicious code attacks, the cost function of malicious code attacks and the cost function of detecting and killing malicious code attacks, the calculation method of the attacker's net profit and the defender's total loss, and then according to the definition of the Nash equilibrium point, the potential Nash equilibrium strategy combination in the attack-detection strategy combination is obtained through the intelligent evolutionary algorithm, and the detection strategy in the potential Nash equilibrium strategy combination is used as the optimal detection strategy of the microgrid cyber-physical system to realize the defense of the microgrid cyber-physical system against malicious code attacks.
[0013] The formula of the propagation model in step 1 is:
[0014]
[0015] Among them, I i,t is the probability that load node i is under attack at time t, a ij is the adjacency coefficient between load node i and load node j in the load node communication network. If load node i and load node j have a communication channel, then a ij =1, otherwise a ij =0; N load is the total number of load nodes, β j,t represents the attack intensity of the attacker on load node j at time t, γ i,t represents the malicious code detection and killing strength of the defender on load node i at time t, and T represents the total duration of malicious code attack and defense;
[0016] The formula of the effect model is:
[0017] M i,t =O i,t +k i,t ·O i,t
[0018] Among them, O i,t is the load data of load node i at time t without attack, M i,t is the load data of load node i after being modified at time t, k i,t is the attack effect of malicious code attack on load node i at time t, k i,t >0.
[0019] The calculation formula for the impact of malicious code attacks on microgrid operation in step 2 is as follows:
[0020] Loss exp (β,γ)=w1*Loss eco (β,γ)+w2*Loss vol (β,γ)+w3*Loss pf (β,γ)
[0021]
[0022]
[0023]
[0024] Among them, β represents the attacker's attack strategy, β={β1,...,β T}, β t represents the attacker’s attack strategy at time t, β t ={β 1,t ,...,β N,t}, β i,t represents the attacker's attack intensity on load node i at time t, β i represents the lower limit of the attack intensity on load node i, represents the upper limit of the attack intensity on load node i; γ represents the defender’s killing strategy, γ={γ1,...,γ T}, γ t represents the defensive strategy of the defender at time t, γ t ={γ 1,t ,...,γ N,t}, γ i,t represents the malicious code detection and killing intensity of the defender on the load node i at time t, γ i Represents the lower limit of the malicious code detection and killing strength for load node i, represents the upper limit of the malicious code detection strength for load node i. The attacker's attack strategy β and the defender's detection strategy γ constitute the attack detection strategy combination. Loss exp (β,γ) represents the impact of malicious code attacks on the operation of the microgrid under the attack detection strategy combination (β,γ), and Loss eco (β,γ) represents the impact of malicious code attacks on the power generation cost of microgrids under the attack detection strategy combination (β,γ), w1 is the weight coefficient of the power generation cost of microgrids; Loss vol (β,γ) represents the impact of malicious code attack on microgrid voltage under the attack detection strategy combination (β,γ), w2 is the microgrid voltage weight coefficient; Loss pf(β,γ) represents the impact of malicious code attack on the microgrid power flow under the attack detection strategy combination (β,γ), w3 is the microgrid power flow weight coefficient; i,t is the load data of load node i at time t without attack, M i,t is the load data of load node i after being modified at time t, N load is the total number of load nodes, T represents the total duration of malicious code attack and defense; F() is the power generation cost function, vol o,j Represents the original voltage of load node j, vol M,j Represents the voltage of load node j after being attacked, pf o,q represents the original power flow of branch q, pf M,q represents the flow after branch q is attacked, N bus is the total number of nodes, N branch is the total number of branches, ΩLoad is the set of load nodes, ΩBus is the set of nodes, and ΩBranch is the set of branches.
[0025] The calculation formulas for the cost of malicious code attack and the cost of detecting and killing malicious code in step 4 are as follows:
[0026]
[0027]
[0028] Among them, Cost attack (β,γ) represents the cost of malicious code attack under the attack and killing strategy combination (β,γ), Cost defense (β,γ) represents the cost of attack detection and killing malicious code under the attack detection and killing strategy combination (β,γ), ξ(β i,t ) represents the cost of malicious code attack on load node i at time t, ω(γ i,t ) represents the cost of detecting and killing malicious code attacks at load node i at time t, ΩLoad is the set of load nodes, N load is the total number of load nodes, and T represents the total duration of malicious code attack and defense.
[0029] The formula for calculating the attacker's net profit and the defender's total loss in step 5 is as follows:
[0030] J attack (β,γ)=Loss exp (β,γ)-Cost attack (β,γ)
[0031] J defense (β,γ)=Loss exp (β,γ)+Costdefense (β,γ)
[0032] Among them, J attack (β,γ) represents the attacker’s net profit under the attack and kill strategy combination (β,γ), J defense (β,γ) represents the total loss of the defender under the attack and killing strategy combination (β,γ), Cost attack (β,γ) represents the cost of malicious code attack under the attack and killing strategy combination (β,γ), Cost defense (β,γ) represents the cost of detecting and killing malicious code attacks under the attack detection and killing strategy combination (β,γ), and Loss exp (β,γ) represents the impact of malicious code attacks on the operation of the microgrid under the attack detection and killing strategy combination (β,γ).
[0033] The historical data of the microgrid cyber-physical system in step 6 includes load data, the attacker's intrusion means, attack target, attack duration, and attack behavior.
[0034] The potential Nash equilibrium strategy combination in step 7 includes a potential Nash equilibrium attack strategy and a potential Nash equilibrium detection and killing strategy; when the defender adheres to the potential Nash equilibrium detection and killing strategy, the attacker adopts the potential Nash equilibrium attack strategy to maximize its own net profit; when the attacker adheres to the potential Nash equilibrium attack strategy, the defender adopts the potential Nash equilibrium detection and killing strategy to minimize its own total loss.
[0035] The beneficial effects of the present invention are:
[0036] 1. For the first time, a propagation model and an effect model were established for malicious code attacks on microgrid cyber-physical systems, accurately describing how the load network status changes over time;
[0037] 2. Based on effect 1, a game model of the attacker and the defender is established, and through a large number of simulation experiments, an example of the attack and defense effect is given (voltage situation diagram);
[0038] 3. The effectiveness of the game model was verified by comparing it with the random attack / killing strategy. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a flow chart of the microgrid cyber-physical system defense method based on game theory of the present invention;
[0040] Figure 2 It is the load node status (whether it is attacked) transition diagram;
[0041] Figure 3 It is the microgrid architecture design diagram used in the experiment of the present invention;
[0042] Figure 4 It is the voltage amplitude diagram under normal operation of the microgrid;
[0043] Figure 5 It is the voltage amplitude diagram when the microgrid is attacked by malicious code;
[0044] Figure 6 It is the voltage amplitude diagram of the microgrid under the potential Nash equilibrium strategy combination;
[0045] Figure 7 It is a comparison chart of the net benefits obtained by the attacker using the potential Nash equilibrium attack strategy and the random attack strategy (the defender uses the potential Nash equilibrium killing strategy);
[0046] Figure 8 This is a comparison chart of the impact of malicious code attacks on power grid operations caused by the defender using a potential Nash equilibrium detection and killing strategy and a random detection and killing strategy (the attacker uses a potential Nash equilibrium attack strategy). DETAILED DESCRIPTION
[0047] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0048] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0049] like Figure 1 As shown, the present invention comprises the following steps:
[0050] Step 1: Use the propagation dynamics modeling method, Markov theory and probability theory to establish the propagation model and effect model of malicious code attacks based on the microgrid cyber-physical system; its propagation model is as follows Figure 2 shown.
[0051] The formula for the propagation model in step 1 is:
[0052]
[0053] Among them, I i,t is the probability that load node i is under attack at time t, S i,t is the probability that load node i is in a normal state at time t. i,t +I i,t =1, we can make (1-I i,t) represents the probability that the load node i is in a normal state at time t, so the probability vector I of the load node in the attacked state at time t is t =(I 1,t ,...,I N,t ) can represent the state of the entire load network, a ij is the adjacency coefficient between load node i and load node j in the load node communication network. If load node i and load node j have a communication channel, then a ij =1, otherwise a ij =0; A = (a ij ) NxN , A represents the adjacency matrix of the microgrid cyber-physical system, N load is the total number of load nodes, β j,t represents the attack intensity of the attacker on load node j at time t, γ i,t It represents the malicious code detection and killing strength of the defender on the load node i at time t, and T represents the total duration of malicious code attack and defense. The malicious code attack is the attacker, and the microgrid cyber-physical system is the defender.
[0054] The formula for the effect model is:
[0055] M i,t =O i,t +k i,t ·O i,t
[0056] Among them, O i,t is the load data of load node i at time t without attack, M i,t is the load data of load node i after being modified (i.e. attacked) at time t, k i,t is the attack effect of malicious code attack on load node i at time t, k i,t >0 Given k i,t The values of i and time t at different load nodes may be different. This effect model can describe any attack effect and is universal.
[0057] Step 2: Based on the propagation model and effect model, combined with the power system architecture and dispatch algorithm, the impact of malicious code attacks on the operation of the microgrid is obtained; the power system architecture of this embodiment is as follows Figure 3 shown.
[0058] The impact of malicious code attacks on the operation of the microgrid in step 2 (the present invention will be Loss exp The calculation formula of (β,γ) is regarded as the expected return of the attacker) is as follows:
[0059] Loss exp (β,γ)=w1*Loss eco(β,γ)+w2*Loss vol (β,γ)+w3*Loss pf (β,γ)
[0060]
[0061]
[0062]
[0063] Among them, β represents the attacker's attack strategy, β={β1,...,β T}, β t represents the attacker’s attack strategy at time t, β t ={β 1,t ,...,β N,t}, β i,t represents the attacker's attack intensity on load node i at time t, β i represents the lower limit of the attack intensity on load node i, represents the upper limit of the attack intensity on load node i; γ represents the defender’s killing strategy, γ={γ1,...,γ T}, γ t represents the defensive strategy of the defender at time t, γ t ={γ 1,t ,...,γ N,t}, γ i,t represents the malicious code detection and killing intensity of the defender on the load node i at time t, γ i Represents the lower limit of the malicious code detection and killing strength for load node i, represents the upper limit of the malicious code detection strength for load node i. The attacker's attack strategy β and the defender's detection strategy γ constitute the attack detection strategy combination. Loss exp (β,γ) represents the impact of malicious code attacks on the operation of the microgrid under the attack detection strategy combination (β,γ), and Loss eco (β,γ) represents the impact of malicious code attacks on the power generation cost of microgrids under the attack detection strategy combination (β,γ), w1 is the weight coefficient of the power generation cost of microgrids; Loss vol (β,γ) represents the impact of malicious code attack on microgrid voltage under the attack detection strategy combination (β,γ), w2 is the microgrid voltage weight coefficient; Loss pf(β,γ) represents the impact of malicious code attack on microgrid power flow under the attack detection strategy combination (β,γ), w3 is the microgrid power flow weight coefficient; F() is the power generation cost function, vol o,j represents the original voltage of load node j (voltage without attack), vol M,j Represents the voltage of load node j after being attacked, pf o,q represents the original power flow of branch q (power flow without attack), pf M,q represents the flow after branch q is attacked, N bus is the total number of nodes, N branch is the total number of branches, ΩLoad is the set of load nodes, ΩBus is the set of nodes. Load node is a special node that carries load, and ΩBranch is the set of branches.
[0064] Step 3: Fit or directly construct the cost function of malicious code attacks and the cost function of detecting and killing malicious code through machine learning and other methods;
[0065] Step 4: According to the cost function of the malicious code attack and the cost function of detecting and killing the malicious code, the cost of the malicious code attack and the cost of detecting and killing the malicious code are calculated;
[0066] The calculation formulas for the cost of malicious code attack and the cost of detecting and killing malicious code in step 4 are as follows:
[0067]
[0068]
[0069] Among them, Cost attack (β,γ) represents the cost of malicious code attack under the attack and killing strategy combination (β,γ), Cost defense (β,γ) represents the cost of attack detection and killing malicious code under the attack detection and killing strategy combination (β,γ), ξ(β i,t ) represents the cost of malicious code attack on load node i at time t, ω(γ i,t ) represents the cost of detecting and killing malicious code attacks at load node i at time t.
[0070] Step 5: According to the impact of malicious code attacks on the operation of the microgrid, the cost of malicious code attacks, and the cost of detecting and killing malicious code, a calculation method for the attacker's net profit and the defender's (microgrid) total loss is obtained, that is, a game theory model of the attacker and the defender is established;
[0071] The formula for calculating the attacker's net profit and the defender's (microgrid) total loss in step 5 is as follows:
[0072] Jattack (β,γ)=Loss exp (β,γ)-Cost attack (β,γ)
[0073] J defense (β,γ)=Loss exp (β,γ)+Cost defense (β,γ)
[0074] Among them, J attack (β,γ) represents the attacker’s net profit under the attack and kill strategy combination (β,γ), J defense (β,γ) represents the total loss of the defender under the attack and kill strategy combination (β,γ), which is represented by J attack From the expression, we can see that the attacker’s net profit J attack Equal to the actual impact of malicious code attacks on microgrid operations minus the cost of malicious code attacks. attack , by J defense From the expression, we can see that the total loss of the defender is J defense Equal to the actual impact of malicious code attacks on microgrid operation Loss exp Plus the cost of detecting and killing malicious code defense .
[0075] Step 6: By analyzing the historical data of the microgrid cyber-physical system, the probability distribution of malicious code attacks on each load node in the microgrid cyber-physical system is obtained by using distribution fitting, SVR or neural network methods and used as the network state of the microgrid cyber-physical system at the initial moment of the game;
[0076] The historical data of the microgrid cyber-physical system in step 6 includes load data, the attacker’s intrusion means, attack target, attack duration, and attack behavior;
[0077] Step 7: Based on the network state of the microgrid cyber-physical system at the initial moment of the game, using the propagation model and effect model of malicious code attacks, the cost function of malicious code attacks and the cost function of detecting and killing malicious code attacks, the calculation method of the attacker's net profit and the defender's total loss, and then according to the definition of the Nash equilibrium point, the potential Nash equilibrium strategy combination in the attack-detection strategy combination is obtained through the intelligent evolutionary algorithm, and the detection strategy in the potential Nash equilibrium strategy combination is used as the optimal detection strategy of the microgrid cyber-physical system to realize the defense of the microgrid cyber-physical system against malicious code attacks.
[0078] The potential Nash equilibrium strategy combination in step 7 (β * ,γ *) includes potential Nash equilibrium attack strategy and potential Nash equilibrium detection strategy; when the defender adheres to the potential Nash equilibrium detection strategy, the attacker adopts the potential Nash equilibrium attack strategy to maximize its own net profit; when the attacker adheres to the potential Nash equilibrium attack strategy, the defender adopts the potential Nash equilibrium detection strategy to minimize its total loss, that is, it satisfies J at the same time A (β * ,γ * )≥J A (β,γ * ) and J D (β * ,γ * )≤J D (β * ,γ),.
[0079] Simulation experiment
[0080] The simulation experiment parameters are set as follows: C1=(0.01,...,0.01),k=0.5, β =0.2, γ =0.6, N load =8, T=48.
[0081] In this simulation experiment, the voltage amplitude diagram under normal operation of the microgrid is as follows: Figure 4 As shown in Figure 1, it can be seen that under normal circumstances, the voltage amplitude does not exceed the critical value. However, the voltage amplitude diagram when the microgrid is attacked by malicious code is as follows: Figure 5 As shown, the black part indicates that the voltage amplitude exceeds the limit.
[0082] like Figure 6 As shown, it can be seen that under the potential Nash equilibrium strategy combination, the voltage amplitude does not cross the boundary, indicating that the operation of the microgrid has returned to normal, which also verifies the effectiveness of the present invention from the side.
[0083] like Figure 7 As shown in the figure, β * The corresponding points represent the net benefits obtained by the attacker using the potential Nash equilibrium attack strategy. arrive The corresponding points represent the net benefits obtained by the attacker using the random attack strategy. It can be seen that when the defender adopts the potential Nash equilibrium killing strategy, the attacker can only maximize the net benefits by adopting the potential Nash equilibrium attack strategy, which is consistent with J attack (β * ,γ * )≥J attack (β,γ * ).
[0084] like Figure 8 As shown in the figure, γ * The corresponding points represent the total losses caused to the grid operation by malicious code attacks caused by the defender’s use of potential Nash equilibrium defense strategies. arrive The corresponding points represent the total losses caused by malicious code attacks to the power grid operation caused by the defender's random defense strategy. It can be seen that when the attacker adopts the potential Nash equilibrium attack strategy, the defender can only minimize the total losses caused by malicious code attacks to the power grid operation by adopting the potential Nash equilibrium killing strategy, which is consistent with J defense (β * ,γ * )≤J defense (β * ,γ), the experimental results also verify the effectiveness of the present invention from the side.
[0085] The above is only a preferred embodiment of the present invention. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Any technician familiar with the art can make many possible changes and modifications to the technical solution of the present invention by using the above disclosed methods and technical contents without departing from the scope of the technical solution of the present invention, or modify it into an equivalent embodiment of equivalent changes. Therefore, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of protection of the technical solution of the present invention.
Claims
1. A microgrid cyber-physical system defense method based on game theory, characterized in that: The following steps are involved: Step 1: Use propagation dynamics modeling methods, Markov theory, and probability theory to establish a propagation model and effect model of malicious code attacks based on microgrid cyber-physical systems; Step 2: Based on the propagation model and effect model, combined with the power system architecture and dispatch algorithm, the impact of malicious code attacks on the operation of the microgrid is obtained; Step 3: Construct the cost function of malicious code attack and the cost function of detecting and killing malicious code; Step 4: According to the cost function of the malicious code attack and the cost function of detecting and killing the malicious code, the cost of the malicious code attack and the cost of detecting and killing the malicious code are calculated; Step 5: Based on the impact of malicious code attacks on microgrid operation, the cost of malicious code attacks, and the cost of detecting and killing malicious code, a calculation method for the attacker's net profit and the defender's total loss is proposed; Step 6: By analyzing the historical data of the microgrid cyber-physical system, the probability distribution of malicious code attacks on each load node in the microgrid cyber-physical system is obtained and used as the network state of the microgrid cyber-physical system at the initial moment of the game; Step 7: Based on the network state of the microgrid cyber-physical system at the initial moment of the game, using the propagation model and effect model of malicious code attacks, the cost function of malicious code attacks and the cost function of detecting and killing malicious code attacks, the calculation method of the attacker's net profit and the defender's total loss, and then according to the definition of the Nash equilibrium point, the potential Nash equilibrium strategy combination in the attack-detection strategy combination is obtained through the intelligent evolutionary algorithm, and the detection strategy in the potential Nash equilibrium strategy combination is used as the optimal detection strategy of the microgrid cyber-physical system to realize the defense of the microgrid cyber-physical system against malicious code attacks.
2. A microgrid cyber-physical system defense method based on game theory according to claim 1, characterized in that: The formula of the propagation model in step 1 is: Among them, I i,t is the probability that load node i is under attack at time t, a ij is the adjacency coefficient between load node i and load node j in the load node communication network. If load node i and load node j have a communication channel, then a ij =1, otherwise a ij =0; N load is the total number of load nodes, β j,t represents the attack intensity of the attacker on load node j at time t, γ i,t represents the malicious code detection and killing strength of the defender on load node i at time t, and T represents the total duration of malicious code attack and defense; The formula of the effect model is: M i,t =O i,t +k i,t ·About i,t Among them, O i,t is the load data of load node i at time t without attack, M i,t is the load data of load node i after being modified at time t, k i,t is the attack effect of malicious code attack on load node i at time t, k i,t >0.
3. The microgrid cyber-physical system defense method based on game theory according to claim 1 is characterized in that: The calculation formula for the impact of malicious code attacks on microgrid operation in step 2 is as follows: Loss exp (b,c)=w1*Loss eco (b,c)+w2*Loss vol (b,c)+w3*Loss pf (b,c) Among them, β represents the attacker's attack strategy, β={β1,...,β T }, β t represents the attacker’s attack strategy at time t, β t ={β 1,t ,...,β N,t }, β i,t represents the attacker's attack intensity on load node i at time t, β i represents the lower limit of the attack intensity on load node i, represents the upper limit of the attack intensity on load node i; γ represents the defender’s killing strategy, γ={γ1,...,γ T }, γ t represents the defensive strategy of the defender at time t, γ t ={γ 1,t ,...,γ N,t }, γ i,t represents the malicious code detection and killing intensity of the defender on the load node i at time t, γ i Represents the lower limit of the malicious code detection and killing strength for load node i, represents the upper limit of the malicious code detection strength for load node i. The attacker's attack strategy β and the defender's detection strategy γ constitute the attack detection strategy combination. Loss exp (β,γ) represents the impact of malicious code attacks on the operation of the microgrid under the attack detection strategy combination (β,γ), and Loss eco (β,γ) represents the impact of malicious code attacks on the power generation cost of microgrids under the attack detection strategy combination (β,γ), w1 is the weight coefficient of the power generation cost of microgrids; Loss vol (β,γ) represents the impact of malicious code attack on microgrid voltage under the attack detection strategy combination (β,γ), w2 is the microgrid voltage weight coefficient; Loss pf (β,γ) represents the impact of malicious code attack on the microgrid power flow under the attack detection strategy combination (β,γ), w3 is the microgrid power flow weight coefficient; i,t is the load data of load node i at time t without attack, M i,t is the load data of load node i after being modified at time t, N load is the total number of load nodes, T represents the total duration of malicious code attack and defense; F() is the power generation cost function, vol o,j Represents the original voltage of load node j, vol M,j Represents the voltage of load node j after being attacked, pf o,q represents the original power flow of branch q, pf M,q represents the flow after branch q is attacked, N bus is the total number of nodes, N branch is the total number of branches, ΩLoad is the set of load nodes, ΩBus is the set of nodes, and ΩBranch is the set of branches.
4. The microgrid cyber-physical system defense method based on game theory according to claim 1 is characterized in that: The calculation formulas for the cost of malicious code attack and the cost of detecting and killing malicious code in step 4 are as follows: Among them, Cost attack (β,γ) represents the cost of malicious code attack under the attack and killing strategy combination (β,γ), Cost defense (β,γ) represents the cost of attack detection and killing malicious code under the attack detection and killing strategy combination (β,γ), ξ(β i,t ) represents the cost of malicious code attack on load node i at time t, ω(γ i,t ) represents the cost of detecting and killing malicious code attacks at load node i at time t, ΩLoad is the set of load nodes, N load is the total number of load nodes, and T represents the total duration of malicious code attack and defense.
5. The microgrid cyber-physical system defense method based on game theory according to claim 1 is characterized in that: The formula for calculating the attacker's net profit and the defender's total loss in step 5 is as follows: J attack (b,c)=Loss exp (b,c)-Cost attack (b,c) J defense (b,c)=Loss exp (b,c)+Cost defense (b,c) Among them, J attack (β,γ) represents the attacker’s net profit under the attack and kill strategy combination (β,γ), J defense (β,γ) represents the total loss of the defender under the attack and killing strategy combination (β,γ), Cost attack (β,γ) represents the cost of malicious code attack under the attack and killing strategy combination (β,γ), Cost defense (β,γ) represents the cost of detecting and killing malicious code attacks under the attack detection and killing strategy combination (β,γ), and Loss exp (β,γ) represents the impact of malicious code attacks on the operation of the microgrid under the attack detection and killing strategy combination (β,γ).
6. The microgrid cyber-physical system defense method based on game theory according to claim 1 is characterized in that: The historical data of the microgrid cyber-physical system in step 6 includes load data, the attacker's intrusion means, attack target, attack duration, and attack behavior.
7. The microgrid cyber-physical system defense method based on game theory according to claim 1 is characterized in that: The potential Nash equilibrium strategy combination in step 7 includes a potential Nash equilibrium attack strategy and a potential Nash equilibrium detection and killing strategy; when the defender adheres to the potential Nash equilibrium detection and killing strategy, the attacker adopts the potential Nash equilibrium attack strategy to maximize its own net profit; when the attacker adheres to the potential Nash equilibrium attack strategy, the defender adopts the potential Nash equilibrium detection and killing strategy to minimize its own total loss.
