Optimal attack and defense method based on Stackelberg game
By optimizing the defense strategy through the Stackelberg game model, the problems of static defense strategy and insufficient resource optimization in cyber-physical systems are solved, dynamic response to attacks is achieved, system security and resource utilization efficiency are improved, and system stability is ensured.
Patent Information
- Application Number
- CN202510963723.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-14
- Publication Date
- 2025-10-10
AI Technical Summary
The existing cyber-physical system defense strategies lack flexibility and dynamic adaptability, and are unable to effectively respond to attackers' ever-changing attack strategies. In addition, resource optimization is insufficient, resulting in increased system security risks and waste of resources.
An optimal attack and defense method based on Stackelberg game is adopted to construct a dynamic game model with defenders as leaders and attackers as followers. By optimizing the defense objective function and attack objective function, the defense strategy is dynamically adjusted to cope with changes in attackers, taking into account both system security and defense costs.
It enables defenders to dynamically adapt to changes in attacker strategies, improves system security, reduces remote state errors, avoids resource waste, ensures that the system can still operate stably during attacks, and improves robustness and reliability.
Smart Images

Figure CN120768615A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cyber-physical system security technology, and in particular to an optimal attack and defense method based on Stackelberg game. Background Art
[0002] Cyber-physical systems (CPSs) are complex, multidimensional systems that integrate computing, networking, and physical environments. CPSs are found in numerous automation industries involving physical systems with embedded computers and communications technologies, including aerospace, automotive, chemical production, civil infrastructure, energy, healthcare, manufacturing, new materials, and transportation. These application scenarios are closely related to everyone, and as a result, CPSs have garnered increasing attention and widespread application. Due to the importance and open connectivity of cyber-physical systems, they are vulnerable to eavesdropping and attacks, which can degrade system performance or even lead to loss of control. Attackers can eavesdrop on transmitted data packets to obtain system information and develop attack strategies, disrupting the system's normal operation.
[0003] Existing defense strategies are typically static, meaning defenders develop fixed defense measures based on known threats. This strategy lacks flexibility and dynamic adaptability, and cannot effectively respond to attackers' ever-changing attack strategies. Furthermore, existing defense strategies do not model attackers, and attackers will constantly adjust their attack methods, while defenders often find it difficult to respond optimally in real time. This increases system security risks and makes it difficult to optimize defense strategies based on attackers' actual attack behaviors, preventing them from achieving optimal defense effectiveness. Furthermore, existing defense methods are not comprehensive enough in considering defense costs and attack effect suppression, making it difficult to achieve efficient resource utilization while ensuring system security. Summary of the Invention
[0004] In view of the above analysis, an embodiment of the present invention aims to provide an optimal attack and defense method based on Stackelberg game to solve the problems of limitations of static defense strategies and insufficient resource optimization in the security protection of existing cyber-physical systems.
[0005] The purpose of the present invention is mainly achieved through the following technical solutions:
[0006] The present invention provides an optimal attack and defense method based on Stackelberg game, comprising the following steps:
[0007] The linear time-invariant cyber-physical system acts as a defender to transmit data based on the optimal defense strategy at the current moment; wherein the defense strategy includes a transmission strategy and an encryption strategy;
[0008] The defender constructs a defense objective function aiming at minimizing the remote state error covariance and the defense cost and maximizing the attack state error covariance based on the data transmission result, the defense strategy and the attack state error covariance of the linear time-invariant cyber-physical system after the optimal attack strategy of the attacker is used to attack;
[0009] A Stackelberg dynamic game model with the defender as the leader and the attacker as the follower is constructed, and strategy iteration is performed to optimize the defense objective function and the attack objective function of the attacker, so that the Stackelberg equilibrium is reached, and the optimal attack-defense strategy of the defender and the attacker at the next moment is obtained.
[0010] Further, the linear time-invariant cyber-physical system comprises a controlled object, a measurement and estimation system, a remote estimator and a controller.
[0011] The measurement and estimation system comprises a sensor and a Kalman filter, and is used to monitor the state of the controlled object and transmit a transmission data packet based on a current defense strategy through a wireless network; the sensor is used to obtain observation state data of the controlled object; and the Kalman filter is used to obtain a local state estimation and a corresponding local state error covariance of the controlled object as the transmission data packet according to the observation state data.
[0012] The remote estimator is used to receive and analyze the transmission data packet to obtain remote state estimation information; the remote state estimation information comprises a remote state estimation and a remote state error covariance.
[0013] The controller is used to generate a control instruction based on the remote state estimation information to control the controlled object.
[0014] Further, the defense objective function of the defender is:
[0015]
[0016] wherein β k represents the system expected value weight at the kth moment; α represents the weight of the remote state error covariance; P k represents the remote state error covariance at the kth moment; δ v represents the transmission energy weight; v k represents the transmission strategy at the kth moment; E v represents the energy consumed by one transmission data; P e,k represents the attack state error covariance at the kth moment; δ e represents the encryption energy weight; g kdenotes the encryption strategy at time k; E e denotes the energy consumed for one encryption; Tr(·) denotes the trace of a matrix.
[0017] Further, the remote state error covariance at time k is obtained using the following equation:
[0018]
[0019] where P k denotes the remote state error covariance at time k; denotes the steady-state value of the error covariance; P k-1 denotes the remote error state covariance at time k-1; h() denotes the recursive update function of the error covariance; v k denotes the transmission strategy at time k; γ k denotes the state of the remote state estimator receiving the transmission data packet at time k.
[0020] Further, the attack target function of the attacker is:
[0021]
[0022] where N denotes the system running time; τ e,k denotes the holding time from the last successful eavesdropping time to time k; Tr[] denotes the trace of a matrix; m k,i denotes the attack state error covariance expected weight at the i-th attack failure time; P e,i denotes the attack state error covariance at the i-th attack failure time; δ a denotes the attack energy weight; a k denotes the attack strategy at time k; E a denotes the energy consumed for one attack by the attacker.
[0023] Further, the attack state error covariance is obtained using the following equation:
[0024]
[0025] where P e,k denotes the attack state error covariance at time k; denotes the steady-state value of the error covariance; P e,k-1 denotes the attack state error covariance at time k-1; h() denotes the recursive update function of the error covariance; γ e,k denotes the eavesdropping state of the attacker at time k.
[0026] Further, the Stackelberg dynamic game model, the defender's immediate reward function at time k is:
[0027]
[0028] Further, the Stackelberg dynamic game model, the attacker's immediate reward function at k time is:
[0029]
[0030] Further, when reaching Stackelberg equilibrium, the optimal defense strategy of the defender is:
[0031]
[0032] Wherein, a k Indicate the attack strategy of the attacker at k time;η k Indicate the defense strategy of the defender at k time;A1 indicates the value range of transmission strategy;A2 indicates the value range of encryption strategy;r d,k () Indicate the defense reward function.
[0033] Further, when reaching Stackelberg equilibrium, the optimal attack strategy of the attacker is:
[0034]
[0035] Wherein, A3 indicates the value range of attack strategy;r a,k () Indicate the attack reward function.
[0036] Compared with the prior art, the present application can at least realize one of the following beneficial effects:
[0037] 1, the present application constructs Stackelberg dynamic game model to obtain the optimal attack and defense strategy form, the confrontation between the defender and the attacker is modeled as Stackelberg dynamic game model, the defender is as the leader, the attacker is as the follower, to embody the strategy interaction and the strategy order of attack and defense sides, so that the defender can dynamically adapt to the strategy change of the attacker, always in the initiative position, formulates the optimal defense strategy in advance, effectively cope with various attack means of the attacker, improve the security of system.
[0038] 2, the present application guarantees system security, reduces remote state error, and controls the defense cost, avoids the waste of resources caused by excessive defense, and the attacker needs to consider the attack cost when pursuing attack effect, so that the strategy of both sides is more reasonable.
[0039] 3、The optimal attack and defense method based on the Stackelberg game can optimize the defense strategy, and when an attack occurs, the system can quickly adjust through the optimal defense strategy, reduce the influence of the attack on the system state estimation and control instruction, and even in the case that part of the data is tampered with or interfered with, the system can still maintain stable operation, reduce the risk of system failure or performance decline caused by the attack, and improve the robustness and reliability of the system.
[0040] In the present application, the above-mentioned technical solutions can be combined with each other to realize more preferred combination solutions. Other features and advantages of the present application will be described in the subsequent specification, and some advantages will become apparent from the specification, or will be understood by implementing the present application. The purposes and other advantages of the present application can be realized and obtained from the contents specifically pointed out in the specification and the drawings. BRIEF DESCRIPTION OF DRAWINGS
[0041] The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and serve to explain the principles of the application, but are not intended to limit the scope of the application.
[0042] Figure 1 FIG. 1 is a flow diagram of an optimal attack and defense method based on a Stackelberg game according to an embodiment of the present application. DETAILED DESCRIPTION
[0043] The preferred embodiments of the present application will be specifically described below in conjunction with the drawings, wherein the drawings constitute a part of this application and are used to illustrate the principles of the embodiments of the present application, but are not intended to limit the scope of the present application.
[0044] One specific embodiment of the present application discloses an optimal attack and defense method based on a Stackelberg game, as shown in FIG. 1, which comprises the following steps S1-S3: Figure 1
[0045] Step S1, the linear time-invariant cyber-physical system as a defender transmits data based on the optimal defense strategy at the current time; wherein the defense strategy comprises a transmission strategy and an encryption strategy.
[0046] Specifically, a cyber-physical system (CPS) is a multi-dimensional complex system that integrates computation, network and physical environment, realizes real-time perception, dynamic control and information service of large-scale engineering systems through organic integration and deep cooperation of 3C (Computation, Communication, Control) technologies, and the linear time-invariant is that the output and input of the system satisfy the linear relationship and the characteristics of the system do not change with time.
[0047] More specifically, the following stochastic system mathematical model of the linear time-invariant cyber-physical system is established:
[0048] x k+1 =Ax k +ω k
[0049] y k =Cx k +υ k
[0050] in, Represents the state vector of the system at time k, including the n x Status information; Represents the measured output of the system at time k, including n observed by the sensor y System information; A represents the system matrix, which is used to represent the dynamic changes of the system state; C represents the output matrix, which is used to represent how the system state is mapped to the measurement output; Represents system noise, which is a random variable that represents the random disturbance that affects the system state at time k. Its value obeys a zero-mean Gaussian distribution, and its covariance is ∑ ω ; Represents measurement noise, which is a random variable representing the random error that affects the measurement output at time k. Its value obeys a zero-mean Gaussian distribution, and its covariance is ∑ v .
[0051] It should be noted that the random variable ω k and v k are independent of each other, the system (A, ) is controllable, that is, the system can be transferred from any initial state to any desired final state within a finite time through input, such as a control signal; at the same time, the system is observable for (A, C), that is, the state of the system can be uniquely determined within a finite time by measuring the output.
[0052] Furthermore, the linear time-invariant cyber-physical system includes a controlled object, a measurement and estimation system, a remote estimator and a controller.
[0053] The measurement and estimation system includes a sensor and a Kalman filter, which are used to monitor the state of the controlled object and send transmission data packets based on the current defense strategy through a wireless network; wherein the sensor is used to obtain the observed state data of the controlled object; the Kalman filter obtains the local state estimate of the controlled object and the corresponding local state error covariance as the transmission data packet based on the observed state data.
[0054] The remote estimator is configured to receive and parse the transmission data packet to obtain remote state estimation information, wherein the remote state estimation information comprises remote state estimation and remote state error covariance.
[0055] The controller is configured to generate a control instruction based on the remote state estimation information to control the controlled object.
[0056] Specifically, the controlled object is a physical entity in the cyber-physical system that needs to be controlled, for example, a mechanical device or a motor, and the state of the controlled object is monitored by the sensor and adjusted by the controller. The sensor included in the cyber-physical system is configured to obtain observation state data of the controlled object, and a standard Kalman filter is run to obtain local minimum state estimation information and corresponding local state error covariance The measurement and estimation system sends the local state estimation and the local state error covariance to the remote estimator as a transmission data packet through a wireless network.
[0057] Since (A, ) is controllable and (A, C) is observable, for any initial state, the Kalman filter will enter a steady state after a certain period of time, denoted as , where is the steady-state value of , and h(X) = AXA T +Σ ω is a Lyapunov operator used to update the covariance matrix of the random process to reflect the influence of system dynamics and noise; f(X) = X-XC T (CXC T +R) -1 CZ is used to calculate the posterior covariance matrix of the state in the Kalman filter to reflect the uncertainty of the system state given the observation data. When the standard Kalman filter enters a steady state at the sensor end, the state error covariance
[0058] In this embodiment, the linear time-invariant cyber-physical system performs data transmission based on the optimal defense strategy at the current time, wherein the defense strategy at time k includes the transmission strategy v k ={0, 1} (0 means no data transmission, and 1 means data transmission) and the encryption strategy g k ={0, 1} (0 means no data encryption, and 1 means data encryption).
[0059] wherein at time k, when the transmission strategy v k =1 and the encryption strategy g k= 0, the local state estimator will estimate the local state and the local state error covariance P k Directly transmitted to the remote state estimator; when the transmission strategy v k =1 and encryption policy g k = 1, the local state estimator will estimate the state and the local state error covariance P k After encryption, it is sent to the remote state estimator; when the transmission strategy v k = 0, the local state estimator will not transmit data packets to the remote state estimator.
[0060] Define the holding time from the most recent successful transmission moment to the current moment k as τ k ,Right now:
[0061] τ k =k-max 0≤l≤k {l:η l =1}
[0062] Among them, η l Is an indicator variable, indicating whether the transmission data packet is successfully received at time l. l =1, it means that the transmission data packet is successfully received at time l; if η l =0, it means that the data packet was not successfully received at time l.
[0063] In the remote state estimator, γ is used k = {0, 1} to describe the situation where the local transmission data packet is successfully transmitted to the remote state estimator, wherein if the remote state estimator receives the transmission data packet, then γ k =1; otherwise, γ k =0.
[0064] Then, based on the receiving state and transmission strategy of the remote state estimator, the following equation holds:
[0065]
[0066] Among them, when v k γ k =1, indicating that when a data packet is transmitted at time k and the remote state estimator successfully receives the transmitted data packet, τ k =0, that is, the current moment is the moment of successful transmission; when v k γ k = 0, indicating that no data packet is transmitted at time k or the transmitted data packet is not successfully received by the remote state estimator, τ k =τ k-1+1, i.e. the current time is the time when the previous time is not transmitted successfully +1.
[0067] In the process of data transmission of the linear time-invariant information physical system, an attacker launches a denial of service attack, i.e. a DoS attack, on the system, so that the transmission data packet cannot be normally sent to the remote attacker, causing the remote estimator to fail to update the state estimation information in time, thereby affecting the strategy of the controller. Therefore, when the attacker launches a DoS attack on the linear time-invariant information physical system, the probability of the remote state estimator receiving data will be greatly reduced. When the linear time-invariant information physical system is attacked by an attacker, the probability of the remote estimator receiving the transmission data packet is represented by the following formula:
[0068]
[0069] wherein γ k represents the receiving state of the remote state estimator at k time; a k represents the attack strategy at k time; v k represents the transmission strategy at k time; g k represents the encryption strategy at k time; λ a represents the preset probability of the remote state estimator successfully receiving the transmission data packet in the attack state; and ε represents the influence factor of encryption on the transmission success rate. represents the probability of γ k =1 under the given condition; and the preset threshold value can be set to 100 ms, for example.
[0070] It should be noted that when the transmission strategy v k at k time is 0, i.e. the measurement and estimation system does not transmit data, the probability of the receiving state γ k of the remote state estimator at k time being 1 is 0, that is, the receiving state γ k of the remote state estimator at k time is 0.
[0071] When the transmission strategy v k at k time is 1, i.e. the measurement and estimation system transmits data; the encryption strategy g k is 0, i.e. no data encryption is performed; and the attack strategy a k is 1, i.e. the attacker attacks, then the probability of the remote state estimator receiving the data packet is λ a , that is, the probability of the receiving state γ k of the remote state estimator at k time being 1 is λ a . For example, λ a can be set to 0.4.
[0072] When the transmission strategy v kis 1, i.e. the measurement and estimation system transmits data; the encryption strategy g k is 1, i.e. data encryption is performed during transmission; and the attack strategy a k is 1, i.e. the attacker attacks, then the probability that the remote state estimator receives the data packet is ε a , i.e. the receiving state γ k of the remote state estimator at time k is 1. a , where 0≤ε≤1, because the encryption process can introduce some additional complexity and overhead, affecting the transmission and reception of the data packet.
[0073] Otherwise, even if the linear time-invariant information-physical system is not attacked, due to network congestion and the like, there can be a situation of failure of transmission data transmission, but the probability is very small, so when the linear time-invariant information-physical system is not attacked by the attacker, the probability that the remote estimator receives the transmission data packet is represented by the following formula:
[0074]
[0075] where λ represents the preset probability of successful reception of the transmission data packet by the remote state estimator in the non-attack state.
[0076] Specifically, when the transmission strategy v k at time k is 0, i.e. the measurement and estimation system does not transmit data, the probability that the receiving state γ k of the remote state estimator at time k is 1 is 0, i.e. the receiving state γ k of the remote state estimator at time k is 0.
[0077] When the transmission strategy v k at time k is 1, i.e. the measurement and estimation system transmits data; the encryption strategy g k is 0, i.e. no data encryption is performed during transmission, then the probability that the remote state estimator receives the data packet is λ, i.e. the probability that the receiving state γ k of the remote state estimator at time k is 1 is λ, and for example, λ can be set to 0.98.
[0078] When the transmission strategy v k at time k is 1, i.e. the measurement and estimation system transmits data; the encryption strategy g k is 1, i.e. data encryption is performed during transmission, then the probability that the remote state estimator receives the data packet is ε kThe probability of =1 is ελ, where, since the encryption process may introduce some additional complexity and overhead, affecting the transmission and reception of data packets, at this time, 0≤ε≤1.
[0079] Furthermore, the data set collected by the remote estimator from the initial moment to the k moment is defined as in, represents the local state estimation sequence from the initial moment to the kth moment; γ 1:k represents the state sequence received by the remote estimator from the initial moment to the kth moment; v 1:k Represents the transmission strategy sequence from the initial time to time k; based on the data set I k , the remote estimator can obtain the remote state estimate and the corresponding remote state error covariance P k , respectively:
[0080]
[0081] Among them, when v k γ k =1, that is, when data is transmitted at time k and the remote estimator successfully receives it, the remote state estimate obtained by the remote estimator is is the local state estimate at time k Remote state error covariance P k is the steady-state value of the error covariance When v k γ k = 0, that is, no data transmission is performed at time k or the remote estimator does not receive it successfully, and the remote state estimation obtained by the remote estimator is The predicted value for the remote state estimate at time k-1 Remote state error covariance P k is the recursive value h(P k-1 ).
[0082] Furthermore, while the attacker is attacking the linear time-invariant cyber-physical system, the attacker can obtain the system's state information by stealing and decrypting data in order to more effectively attack. Therefore, the probability of the attacker successfully eavesdropping on the transmitted data packet and successfully decrypting it is obtained using the following formula:
[0083]
[0084] Among them, γ e,k Represents the eavesdropping state of the attacker at time k, when γ e,k =1, it means the attacker successfully eavesdrops on the data packet and successfully decrypts it.e,k = 0 means that the attacker does not successfully eavesdrop the data packet or does not successfully decrypt; λ e = 0 means that the attacker does not successfully eavesdrop the data packet or does not successfully decrypt; λ e = 0 means that the attacker does not successfully eavesdrop the data packet or does not successfully decrypt; λ k = 0 means that the attacker does not successfully eavesdrop the data packet or does not successfully decrypt; λ k = 0 means that the attacker does not successfully eavesdrop the data packet or does not successfully decrypt; λ
[0085] Specifically, when the transmission strategy v k = 0 at the kth moment, i.e., the measurement and estimation system does not transmit data, the probability of the eavesdropping state γ e,k = 1 of the attacker at the kth moment is 0, that is, the attacker cannot eavesdrop any data packet at the kth moment, i.e., γ e,k = 0.
[0086] Specifically, when the transmission strategy v k = 1 at the kth moment, i.e., the measurement and estimation system transmits data; the encryption strategy g k = 0, i.e., no data encryption during transmission, then the probability of the attacker eavesdropping the data packet is λ e , that is, the probability of the eavesdropping state γ e,k = 1 of the attacker at the kth moment is λ e , and λ e may be set to 0.8, for example.
[0087] Specifically, when the transmission strategy v k = 1 at the kth moment, i.e., the measurement and estimation system transmits data; the encryption strategy g k = 1, i.e., data encryption during transmission, then the probability of the attacker eavesdropping the data packet and successfully decrypting is ε e λ e , that is, the probability of the eavesdropping state γ e,k = 1 of the attacker at the kth moment is ε e λ e , and 0 ≤ ε e ≤ 1.
[0088] Further, the data set eavesdropped by the attacker from the initial moment to the kth moment is defined as wherein, represents the local state estimation sequence eavesdropped by the attacker from the initial moment to the kth moment; γ e,1:e,k represents the eavesdropping state sequence of the attacker from the initial moment to the kth moment; based on the data set I e,k , the attack state estimation and the corresponding attack state error covariance are obtained using the following formula:
[0089] Further, the data set eavesdropped by the attacker from the initial moment to the kth moment is defined as
[0090] wherein, when v k γ e,k = 1, it indicates that data transmission is performed at k time and the attacker successfully attacks, and the attack state estimation obtained by the attacker is the local state estimation at k time attack state error covariance P e,k is the steady-state value of the error covariance when v k γ e,k = 0, it indicates that no data transmission is performed at k time or the attacker does not attack successfully, and the attack state estimation obtained by the attacker is the prediction value for predicting the attack state estimation at k-1 time attack state error covariance P e,k is the recursive value h(P e,k-1 ) for recursively updating the attack state error covariance at k-1 time.
[0091] In step S2, based on the data transmission result, the defense strategy and the attack state error covariance after the attacker attacks the linear time-invariant information-physical system with the optimal attack strategy, the defender constructs a defense objective function aiming to minimize the remote state error covariance and the defense cost and maximize the attack state error covariance.
[0092] Specifically, under the optimal attack strategy of the attacker, the linear time-invariant information-physical system as the defender expects that the estimation of the system state in the remote estimator is as accurate as possible, and at the same time, the cost of the defense measure is as low as possible while achieving the defense objective, and at the same time, the attacker expects that the estimation of the system state is as inaccurate as possible.
[0093] Further, the defense objective function of the defender is:
[0094] wherein, β k represents the system expected value weight at k time, for balancing the importance of different time steps; α represents the weight of the remote state error covariance, for balancing the importance of the remote state error covariance and the attack state error covariance; P k represents the remote state error covariance at k time; δ v represents the transmission energy weight, for balancing the cost of the transmission decision; v k represents the transmission strategy at k time; E v represents the energy consumed by one transmission data; P e,k represents the attack state error covariance at k time; δ erepresents the encryption energy weight for balancing the cost of encryption decision; g k represents the encryption strategy at time k; E e represents the energy consumed by one encryption.
[0095] Specifically, by minimizing the remote state error covariance αTr[P k ], the defender expects the estimation of the system state in the remote estimator to be as accurate as possible; by minimizing the transmission cost δ v v k E v and the encryption cost δ e g k E e , the defender expects to minimize the defense cost while achieving the defense goal; by maximizing the attack state error covariance (1-α)Tr[P e,k ], the defender expects the estimation of the system state by the attacker to be as inaccurate as possible.
[0096] More specifically, the expected values of the remote state error covariance and the attack state error covariance are calculated using the following formula:
[0097]
[0098] Step S3, a Stackelberg dynamic game model is constructed with the defender as the leader and the attacker as the follower, strategy iteration is performed, the defense objective function and the attack objective function of the attacker are optimized, a Stackelberg equilibrium is reached, and the next time optimal attack and defense strategies of the defender and the attacker are obtained; wherein the attack objective function of the attacker is to maximize the attack effect and minimize the attack cost.
[0099] Specifically, the Stackelberg dynamic game model is a non-cooperative game model, in which one party (leader) acts first, and the other party (follower) makes the optimal response according to the action of the leader. In this model, the leader has the advantage of taking the initiative and can predict the response of the follower and optimize his own strategy accordingly, and chooses the strategy that is most beneficial to himself. The follower is the party that acts later, and makes the optimal response according to the strategy chosen by the leader.
[0100] Further, the attack objective function of the attacker is:
[0101]
[0102] wherein N represents the system running time; τ e,k represents the holding time from the last successful eavesdropping time to time k; Tr[] represents the trace of a matrix; m k,i represents the attack state error covariance expected weight of the i-th attack failure time; Pe,i represents the attack state error covariance at the i-th attack failure moment; δ a represents the attack energy weight; a k represents the attack strategy at the k-th moment; E a represents the energy consumed by the attacker to launch an attack.
[0103] Specifically, represents the sum of attack effects of the attacker at different time points, and the attacker expects to maximize this value to represent that the greater the interference of the attack on the system state estimation; meanwhile, the attack cost δ is minimized during the attack process a a k E a .
[0104] In the policy iteration process, the defender randomly selects an initial defense strategy, that is, whether to perform data transmission and whether to perform data encryption when performing data transmission; the attacker formulates an initial attack strategy according to the initial defense strategy of the defender, that is, whether to perform an attack; the defender updates the defense strategy at the next moment according to the initial attack strategy of the attacker; wherein at each iteration moment, the instant rewards of the defender and the attacker are calculated using the following formula respectively, and the strategy at the next moment is updated based on the instant rewards to optimize the respective objective functions:
[0105] The defender instant reward function at the k-th moment is:
[0106]
[0107] The attacker instant reward function at the k-th moment is:
[0108]
[0109] Specifically, the instant reward functions of the defender and the attacker respectively reflect the measurement of the benefits and costs of different strategies at each moment, and reflect the direct results brought by the strategy selection of the defender and the attacker at each moment.
[0110] The above iteration process is repeated until a Stackelberg equilibrium state is reached, that is, the defender and the attacker cannot obtain better results by changing their own strategies unilaterally.
[0111] Further, when the Stackelberg equilibrium is reached, the optimal defense strategy of the defender is:
[0112]
[0113] wherein a k represents the attack strategy of the attacker at the k-th moment; η krepresents the defense strategy of the defender at time k; A1 represents the value range of the transmission strategy; A2 represents the value range of the encryption strategy; r d,k () represents the defense reward function.
[0114] The optimal attack strategy corresponding to the attacker is:
[0115]
[0116] wherein A3 represents the value range of the attack strategy; r a,k () represents the attack reward function.
[0117] The defender can effectively deal with the attack of the attacker at the next time by using the optimal defense strategy, even if it is the optimal attack strategy of the attacker.
[0118] In summary, the optimal attack and defense method based on Stackelberg game of the embodiment of the application has the following beneficial effects:
[0119] 1. The optimal attack and defense strategy form is obtained by constructing a Stackelberg dynamic game model, the Stackelberg dynamic game model is used to model the confrontation relationship between the defender and the attacker, the defender is the leader and the attacker is the follower, the strategy interaction and the order of the strategies of the attack and defense parties are embodied, the defender can dynamically adapt to the strategy change of the attacker, is always in an active position, formulates the optimal defense strategy in advance, effectively deals with various attack means of the attacker, and improves the security of the system.
[0120] 2. While ensuring system security and reducing remote state error, the control of the defense cost is considered, resource waste caused by excessive defense is avoided, the attack cost needs to be considered when the attacker pursues attack effect, and the strategies of the two parties are more reasonable.
[0121] 3. By optimizing the defense strategy, the system can quickly adjust by the optimal defense strategy when the attack occurs, the influence of the attack on system state estimation and control instruction is reduced, the system can still maintain stable operation even in the case that part of the data is tampered or interfered, the risk of system failure or performance decline caused by the attack is reduced, and the robustness and reliability of the system are improved.
[0122] The above is only a preferred specific embodiment of the application, but the protection scope of the application is not limited thereto, any changes or replacements within the technical range disclosed by the application can be easily thought of by those skilled in the art, and should be covered within the protection scope of the application.
Claims
1. An optimal attack and defense method based on Stackelberg game, characterized in that: The steps include: The linear time-invariant cyber-physical system acts as a defender to transmit data based on the optimal defense strategy at the current moment; wherein the defense strategy includes a transmission strategy and an encryption strategy; Based on the data transmission result, the defense strategy, and the attack state error covariance after the attacker attacks the linear time-invariant cyber-physical system using the optimal attack strategy, the defender constructs a defense objective function with the goals of minimizing the remote state error covariance and the defense cost and maximizing the attack state error covariance; A Stackelberg dynamic game model is constructed with the defender as the leader and the attacker as the follower. Strategy iteration is performed to optimize the defense objective function and the attacker's attack objective function to achieve Stackelberg equilibrium and obtain the optimal attack and defense strategies of the defender and attacker at the next moment. The attacker's attack objective function is to maximize the attack effect and minimize the attack cost.
2. The method according to claim 1, characterized in that The linear time-invariant cyber-physical system includes a controlled object, a measurement and estimation system, a remote estimator and a controller; The measurement and estimation system includes a sensor and a Kalman filter, which are used to monitor the state of the controlled object and send a transmission data packet based on the current defense strategy via a wireless network; wherein the sensor is used to obtain observed state data of the controlled object; and the Kalman filter is used to obtain a local state estimate of the controlled object and a corresponding local state error covariance as the transmission data packet based on the observed state data; The remote estimator is configured to receive and parse the transmission data packet to obtain remote state estimation information; wherein the remote state estimation information includes a remote state estimate and a remote state error covariance; The controller is configured to generate a control instruction based on the remote state estimation information to control the controlled object.
3. The method according to claim 2, characterized in that The defender's defense objective function is: Among them, β k represents the weight of the system expected value at time k; α represents the weight of the remote state error covariance; P k represents the remote state error covariance at time k; δ v represents the transmission energy weight; v k represents the transmission strategy at time k; E v Indicates the energy consumed in transmitting data once; P e,k represents the covariance of the attack state error at time k; δ e represents the encryption energy weight; g k represents the encryption strategy at time k; E e represents the energy consumed by one encryption; Tr(·) represents the trace of the matrix.
4. The method according to claim 3, characterized in that The remote state error covariance at time k is obtained using the following formula: Among them, P k represents the remote state error covariance at time k; represents the steady-state value of the error covariance; P k-1 represents the long-range error state covariance at time k-1; h() represents the recursive update function of the error covariance; v k represents the transmission strategy at time k; γ k represents the state of the remote state estimator at time k when it receives the transmitted data packet.
5. The method according to claim 3, characterized in that: The attacker's attack target function is: Where N represents the system operation time; τ e,k represents the holding time from the most recent successful eavesdropping moment to moment k; Tr[] represents the trace of the matrix; m k,i represents the expected weight of the attack state error covariance at the moment of the i-th attack failure; P e,i represents the covariance of the attack state error at the moment of the i-th attack failure; δ a Indicates the attack energy weight; a k represents the attack strategy at time k; E a Indicates the energy consumed by the attacker to launch an attack.
6. The method according to claim 5, characterized in that The attack state error covariance is obtained using the following formula: Among them, P e,k represents the covariance of the attack state error at time k; represents the steady-state value of the error covariance; P e,k-1 represents the attack state error covariance at time k-1; h() represents the recursive update function of the error covariance; γ e,k represents the eavesdropping state of the attacker at time k.
7. The method according to claim 6, characterized in that In the Stackelberg dynamic game model, the defender's immediate reward function at time k is:
8. The method according to claim 7, characterized in that: In the Stackelberg dynamic game model, the attacker's instant reward function at time k is:
9. The method according to claim 8, characterized in that When the Stackelberg equilibrium is reached, the optimal defense strategy of the defender is: Among them, a k represents the attacker's attack strategy at time k; η k represents the defense strategy of the defender at time k; A1 represents the value range of the transmission strategy; A2 represents the value range of the encryption strategy; r d,k () represents the defense reward function.
10. The method according to claim 9, characterized in that: When the Stackelberg equilibrium is reached, the attacker's optimal attack strategy is: Among them, A3 represents the value range of the attack strategy; r a,k () represents the attack reward function.