Security control method of networked switching system based on encryption and decryption switching Q learning replay attack detection

By identifying and analyzing replay attacks based on the detection method of adding close Q-learning, the problem of judgment of the network switching system in the face of replay attacks is solved, and the security control and stability of the system are improved.

CN118759931AActive Publication Date: 2024-10-11DALIAN MARITIME UNIVERSITY

Patent Information

Application Number
CN202410860014.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-11
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

It is difficult for the existing network switching system to accurately determine whether it is under attack when faced with a replay attack, resulting in inaccurate system status analysis, increasing the difficulty of system stability, and failing to effectively defend against asynchronous switching behavior caused by replay attacks.

Method used

A detection method based on Q-learning is used to construct the switching system model and controller model, and the event triggering mechanism and replay attack detection mechanism are designed. The Q-learning algorithm is used for encryption and decryption processing, and the estimated values ​​of the state and modal signals are calculated. and residual norm to determine the detection results of replay attacks, and construct security controller equations and switching rules based on the detection results to achieve system security control.

Benefits of technology

Dynamically identify and analyze replay attacks, reduce asynchronous duration, improve system security control accuracy and stability, and ensure the security of the switching system under replay attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118759931A_ABST
    Figure CN118759931A_ABST
Patent Text Reader

Abstract

The invention discloses a security control method for a networked switching system based on encryption and decryption switching Q learning replay attack detection, and the method comprises the steps: constructing a switching system model and a controller model, and obtaining a state signal and a modal signal; constructing an event triggering mechanism based on replay attack detection, wherein the event triggering mechanism comprises an error detection condition, a modal matching condition and an attack detection condition; constructing a replay attack detection mechanism based on switching Q learning according to a Q learning algorithm, processing a modal signal and a state signal of a subsystem at a triggering moment by using an event triggering mechanism and the replay attack detection mechanism to obtain a state estimation value, a modal estimation value and a state estimation residual norm, and determining an attack detection result; substituting the state estimation value and the modal estimation value into a controller model to obtain an equation of a safety controller, a simultaneous safety controller, a switching system model, a state estimator and a modal estimator to obtain an equation of a closed-loop system; according to the method, a switching rule based on replay attack detection is constructed, a switching behavior of a closed-loop system under the replay attack is analyzed according to a replay attack detection result, and a judgment condition for safety and stability of the system is obtained. And a safety control judgment condition for ensuring that the switching system is under the replay attack is given, so that the safety control of the switching system is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of switching system security control, and in particular to a security control method for a networked switching system based on encryption and decryption switching Q learning replay attack detection. Background Art

[0002] As modern control systems gradually develop towards networking, the complexity of industrial system models is also increasing. In order to meet the changing working environment and improve operational flexibility, many systems in practical applications begin to show multimodal characteristics. At the same time, the demand for remote spatial distribution and low-cost control is also growing, requiring remote monitoring and control through the network. Faced with complex industrial production environments, networked switching systems and their safety control issues have become current research hotspots.

[0003] As a typical network attack, replay attack can record legitimate data packets in the system and resend them at a later time. Since the replayed data is highly similar to the system data, replay attack is more likely to successfully bypass the detection of attack detection mechanism. For replay attack detection mechanism, common designs include adding watermark mechanism, designing encryption / decryption function and reinforcement learning detection method, but these methods mainly focus on designing detection mechanism to determine whether the state signal is attacked. In fact, the switching signal of the switching system will also be captured and replayed by replay attack when it is transmitted through the network, that is, the switching system will be attacked by both the system state signal and the switching signal being replayed, resulting in complex and multiple continuous asynchronous switching of the system. This switching behavior is not only difficult to analyze, but also greatly increases the difficulty of system stability. Under this replay attack, due to the sharing of state data of each subsystem of the switching system, the energy flow between the unactivated subsystems will also affect the safety control of the switching system. Summary of the invention

[0004] The present invention provides a security control method for a networked switching system based on encryption and decryption switching Q learning replay attack detection, so as to overcome the technical problem that the existing network switching system cannot accurately determine whether it is subjected to a replay attack and cannot accurately analyze the system status to perform security control.

[0005] In order to achieve the above object, the technical solution of the present invention is:

[0006] A security control method for a networked switching system based on encryption and decryption switching Q-learning replay attack detection, comprising:

[0007] S1: Construct the switching system model and controller model to obtain the state signal and modal signal;

[0008] S2: construct an event trigger mechanism based on replay attack detection, wherein the event trigger mechanism includes an error detection condition, a modal matching condition and an attack detection condition; use the event trigger mechanism to process the state signal and the modal signal to obtain the subsystem modal signal and the state signal at the triggering moment;

[0009] S3: constructing a replay attack detection mechanism based on switching Q learning according to the Q learning algorithm, wherein the replay attack detection mechanism is used to encrypt and decrypt the subsystem state signal, and calculate the estimated value and state estimation residual norm of the subsystem modal signal and state signal after encryption and decryption, and use the event triggering mechanism and the replay attack detection mechanism to process the subsystem modal signal and state signal at the triggering moment, obtain the state estimation value, modal estimation value and state estimation residual norm, and determine the detection result of the replay attack;

[0010] S4: Substituting the state estimation value and the modal estimation value into the controller model to obtain a safety controller equation, and combining the safety controller equation, the switching system model, the state estimator and the modal estimator equation of the replay attack detection mechanism to obtain a closed-loop system equation;

[0011] S5: Construct a switching rule based on replay attack detection, wherein the switching rule is used to analyze the switching behavior of the closed-loop system under the replay attack according to the replay attack detection result, obtain the judgment condition of system security and stability, and perform security control on the closed-loop system.

[0012] Furthermore, S1 constructs a switching system model and a controller model to obtain state signals and modal signals, including:

[0013] S11, construct a switching system model, as shown in formula (1),

[0014]

[0015] in, is the state vector, control input, system output and external disturbance of the switching system; is the switching signal, A σ , B σ , C σ , D σ is a given constant matrix;

[0016] S12, construct the controller model, as shown in formula (2),

[0017] u(t)=K φ x(t) (2)

[0018] Among them, φ=φ(t), φ(t)∈L is the modal signal of the controller, K φis the controller gain.

[0019] Further, S2 constructs an event trigger mechanism based on replay attack detection, the event trigger mechanism includes error detection conditions, modal matching conditions and attack detection conditions; uses the event trigger mechanism to process the state signal and modal signal to obtain the subsystem modal signal and state signal at the triggering moment, including:

[0020] S21. Construct an event trigger mechanism based on replay attack detection, as shown in formula (3):

[0021]

[0022] Among them, the initial triggering time t1h=l0, α(g r,m h) represents the time interval when the data at the m-1th sampling time after the rth trigger arrives at the controller end The attack detection results obtained above are They represent error detection conditions, mode matching conditions, and attack detection conditions respectively;

[0023] S22, construct error detection conditions, as shown in formula (4),

[0024]

[0025] in, represents the sampling time g r,m The parameter matrix at h is and is the weight matrix to be designed, ε r (t) = x(g r,m h)-x(t r h), g r,m h=t r h+mh is the rth triggering time t r The mth sampling time after h, δ σ >0 is the trigger threshold; x(t r h) indicates the subsystem status signal at the triggering moment; ε r (t) represents the triggering time t r The error between the state of h and the state at the mth sampling moment thereafter;

[0026] S23, constructing the modal matching condition, as shown in formula (5),

[0027]

[0028] Among them, σ(g r,m h) represents the rth triggering time t r The modal signal at the mth sampling time after h, then tr The modal signal at time h is σ(t r h);

[0029] S24, construct attack detection conditions, as shown in formula (6),

[0030]

[0031] Further, the replay attack detection mechanism includes encryption measures, decryption measures, state estimation measures, modal estimation measures and a switching Q learning method based on Q learning;

[0032] The encryption measure is used to encrypt the subsystem state signal at the triggering moment to obtain an encrypted state signal, and obtain the encrypted state signal and modal signal under the replay attack according to the encrypted state signal, and obtain the actual modal signal according to the encrypted modal signal;

[0033] The encryption measure is used to encrypt the subsystem state signal at the triggering moment to obtain an encrypted state signal, and obtain the encrypted state signal and modal signal under the replay attack according to the encrypted state signal, and obtain the actual switching signal according to the encrypted modal signal and the event triggering mechanism;

[0034] The decryption measure is used to decrypt the encrypted state signal under the replay attack, and obtain the actual system state signal according to the decrypted system signal and the event trigger mechanism;

[0035] The state estimation measure is implemented by a state estimator, which is used to calculate the state estimation value of the system state signal in the switching system under the actual switching signal;

[0036] The modal estimation measure is implemented by a modal estimator, which is used to calculate the modal estimation value of the modal signal in the switching system under the actual switching signal;

[0037] The Q-learning-based switching Q-learning method is used for the difference between the actual system state signal and the state estimation value, that is, the state estimation residual norm, and the replay attack detection result is determined according to the state estimation residual norm and the modal estimation value.

[0038] Further, the event trigger mechanism and the replay attack detection mechanism are used to process the subsystem modal signal and state signal at the triggering moment to obtain a state estimation value and a modal estimation value, including:

[0039] S31, the encryption measure is as shown in formula (7),

[0040] x c (t r h)=x(t rh)+c(t r h) (7)

[0041] Among them, c(t r h) is a time-varying encryption function generated by a random seed, x c (t r h) represents the encrypted state signal, x(t r h) represents the triggering time t before encryption r The system state at h;

[0042] The encrypted state signal and the switching signal, i.e., the modal signal σ(t r h) Rewrite it as formula (8) under the influence of replay attack,

[0043]

[0044] Where α(t) represents the detection result of replay attack detection;

[0045] S32, the decryption measure is as shown in formula (9),

[0046]

[0047] in, Represents the decrypted system status signal, d(t r h) is a decryption key generated by the random seed, and the energy limit of the time-varying encryption function and the decryption key satisfies the condition is a given constant matrix;

[0048] Under the action of the event trigger mechanism based on replay attack detection and the encryption and decryption measures, the actual switching signal and the actual state signal of the switching system are shown in formulas (10) and (11),

[0049]

[0050] Among them, η r (t) = tg r,m h, represents the piecewise lag function; ε r (t) represents the triggering time t r The error between the state of h and the state of the mth sampling moment; ε p (t) represents the error between the state at time p and the state at the mth sampling time thereafter;

[0051] S33, the state estimator, as shown in formula (12),

[0052]

[0053] in, is the state estimate of the switching system under the actual switching signal x(t), L φ(t) is the observer gain, φ=φ(t), φ(t)∈L, which represents the modal estimate of the switching system under the actual switching signal; A φ(t) , B φ(t) , D φ(t) is the system parameter matrix of the φ(t)th state estimator;

[0054] S34, the modal estimator, as shown in formula (13),

[0055]

[0056] in, represents the estimated state partition corresponding to the i-th state estimator,

[0057] yes of the border, and

[0058] Furthermore, the switching Q learning method based on Q learning includes a switching Q table training phase and an attack detection phase:

[0059] S35, switch Q table training phase:

[0060] Construct a five-tuple (A, S, γ f ,π f ,k)’s Markov decision process trains the Q table and updates the Q value, where f∈F={0,1,…,F} is the number of training times;

[0061] is a set of environment variables, where φ f (g r,m h) is the r,mth learning interval Φ in the fth round of training r,m The upper modal estimator estimates the subsystem mode, is the residual norm of the state estimate at the rth,mth step in the fth round of training It is the fth round of training

[0062] Action Set Indicates that the detector is based on environment variables Detection alarm value, when a1 = 0, it means that no replay attack is detected, and a2 = 1, it means that a replay attack is detected;

[0063] Reward function γ f(r,m) indicates the environment variables at the r,mth step in the fth round of training In action After the reward,

[0064] Strategy Indicates that in the fth round of training, the environment variables in the rth and mth steps are Execute an action The probability of; the discount parameter k∈[0,1] indicates the degree of attention to long-term rewards;

[0065] S351, initialization of the f-th round of training Step r, m Environment variables Based on strategy Select Action As shown in formula (14),

[0066]

[0067] The environment variables in steps r and m By performing actions Convert to the environment variable in step r,m+1 According to the reward function γ f (r,m) calculation execution action The reward obtained after is as shown in formula (15):

[0068]

[0069] S352, update the Q value according to the reward function and the value of the f-1th round of training, as shown in formula (16),

[0070]

[0071] in, is the environment variable-action pair during the fth round of training The corresponding Q value after the f-1th round of training, Environment variables for round f training The Q table value corresponding to the optimal action after the f-1th round of training, α f =0.1·(2+arctan(f-α * )) is the learning step size, α * is the learning constant, where the initial value of the Q table is r∈N + ,m∈N;

[0072] S353, for the environment variables of step r,m+1 Repeat the process of S351-S352 to obtain the corresponding Q value until the system stops running and the fth round of training ends;

[0073] S354, repeat steps S351-S353, perform the next round of training until f=F, the training is completed, and a data set containing all environment variable-action pairs is returned. The complete switching Q table of;

[0074] S36, in the attack detection phase, the corresponding optimal action is selected in the complete switching Q table

[0075] S361. Determine environmental variables according to the modal estimation value and the state estimation residual norm in the complete switching Q table:

[0076] Let r = 1, m = 0, when t∈Φ r,m , observe the current environmental variables and the current modal estimates;

[0077] S362: Select the optimal action corresponding to the current environment variable in the complete switching Q table

[0078] S363: Output the attack detection result, as shown in formula (17):

[0079] α(t)=a r,m , t∈Φ r,m (17).

[0080] Further, S4 substitutes the state estimation value and the modal estimation value into the controller model to obtain a safety controller equation, and combines the safety controller equation, the switching system model, the state estimator and the modal estimator equation of the replay attack detection mechanism to obtain a closed-loop system equation, including:

[0081] Substituting the state estimation value and the modal estimation value into the controller model, a safety controller is obtained, as shown in formula (18):

[0082]

[0083] φ=φ(t), φ(t)∈L, represents the modal estimation value obtained according to the modal estimator;

[0084] The safety controller equation, the modal estimator equation, the state estimator equation and the switching system equation are combined to obtain a closed-loop system equation, as shown in formula (19):

[0085]

[0086] in,

[0087] Closed-loop system extended state vector Expanded system matrix

[0088] A φ(t) , B φ(t) , D φ(t) is the system parameter matrix of the φth state estimator, φ(t) represents the modal estimate obtained by the modal estimator; the system parameter matrix System parameter matrix Expanded perturbation matrix Expanded output matrix System parameter matrix System parameter matrix Initial state vector Initial moment Subsystem and Controller Modes

[0089] Further, S5 constructs a switching rule based on replay attack detection, wherein the switching rule is used to analyze the switching behavior of the closed-loop system under the replay attack according to the replay attack detection result, obtain the judgment condition of system security and stability, and perform security control on the closed-loop system, including:

[0090] S51, construct a switching rule based on replay attack detection, as shown in formula (20),

[0091]

[0092] The initial value of the switching rule is State partition of the i-th subsystem D i The border and

[0093] S52. Analyze the replay attack results according to the switching rules and the event trigger mechanism, determine the operating status of the subsystem mode and the controller mode under the replay attack, obtain the judgment conditions for the safety and stability of the system, and use the judgment conditions to perform security control on the switching system.

[0094] The present invention establishes a switching Q-learning attack detection mechanism including a time-varying encryption / decryption function, dynamically changes the encryption method of the system state signal, amplifies the estimated residual value generated by the state estimator under the replay attack, and accurately analyzes whether to perform a replay attack; by designing an event trigger mechanism based on replay attack detection, the attack detection result is introduced into each trigger condition, the duration of asynchrony caused by the replay attack is shortened, and a switching rule based on replay attack detection is designed to keep the current activated subsystem mode unchanged or switch to the subsystem mode that meets the state switching condition, thereby alleviating the continuous asynchrony between the subsystem and the subcontroller caused by the replay attack. Finally, according to the event trigger mechanism and the switching rule, a safety control scheme for the switching system under the replay attack is constructed. Based on the attack detection result and taking into account the sharing of state data of each subsystem of the switching system, a safety control judgment condition for ensuring the safety of the switching system under the replay attack is given, thereby realizing the safety control of the switching system. BRIEF DESCRIPTION OF THE DRAWINGS

[0095] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0096] Figure 1 A method flow chart of a security control method for a networked switching system based on encryption and decryption switching Q learning replay attack detection of the present invention;

[0097] Figure 2 The switching system structure block diagram of the present invention;

[0098] Figure 3 4 diagrams showing the switching signals in the closed-loop system of the present invention;

[0099] Figure 4 A diagram showing a topological structure of a switching system according to an embodiment of the present invention;

[0100] Figure 5 A trajectory curve diagram on the X-axis and Y-axis of an embodiment of the present invention;

[0101] Figure 6 A state estimation residual variation diagram of an embodiment of the present invention with and without an encryption and decryption module;

[0102] Figure 7 An event trigger interval diagram with / without replay attack detection in an embodiment of the present invention;

[0103] Figure 8 To invent an embodiment with a switching signal and asynchronous duration diagram for replay attack detection;

[0104] Fig. 9 A switching signal and asynchronous duration diagram without replay attack detection in an embodiment of the present invention;

[0105] Fig.10 This is a diagram of the X-axis tracking and positioning error of multiple unmanned ships in one embodiment of the present invention;

[0106] Fig.11 A Y-axis tracking and positioning error diagram of multiple unmanned ships in one embodiment of the present invention;

[0107] Fig.12 This is a diagram of heading angle tracking and positioning errors of multiple unmanned ships in one embodiment of the present invention. DETAILED DESCRIPTION

[0108] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0109] This embodiment provides a security control method for a networked switching system based on encryption and decryption switching Q learning replay attack detection, such as Figure 1 As shown, including:

[0110] S1: Construct the switching system model and controller model to obtain the state signal and modal signal;

[0111] S2: construct an event trigger mechanism based on replay attack detection, wherein the event trigger mechanism includes an error detection condition, a modal matching condition and an attack detection condition; use the event trigger mechanism to process the state signal and the modal signal to obtain the subsystem modal signal and the state signal at the triggering moment;

[0112] S3: constructing a replay attack detection mechanism based on switching Q learning according to the Q learning algorithm, wherein the replay attack detection mechanism is used to encrypt and decrypt the subsystem state signal, and calculate the estimated value and state estimation residual norm of the subsystem modal signal and state signal after encryption and decryption, and use the event triggering mechanism and the replay attack detection mechanism to process the subsystem modal signal and state signal at the triggering moment, obtain the state estimation value, modal estimation value and state estimation residual norm, and determine the detection result of the replay attack;

[0113] S4: Substituting the state estimation value and the modal estimation value into the controller model to obtain a safety controller equation, and combining the safety controller equation, the switching system model, the state estimator and the modal estimator equation of the replay attack detection mechanism to obtain a closed-loop system equation;

[0114] S5: Construct a switching rule based on replay attack detection, wherein the switching rule is used to analyze the switching behavior of the closed-loop system under the replay attack according to the replay attack detection result, obtain the judgment condition of system security and stability, and perform security control on the closed-loop system.

[0115] Specifically, first, a switching system model and a controller model are constructed to obtain state signals and modal signals, and the initial switching system and controller models are constructed to prepare for the subsequent steps; secondly, an event trigger mechanism based on replay attack detection is constructed, and the event trigger mechanism includes error detection conditions, modal matching conditions and attack detection conditions; the state signal and modal signal are processed using the event trigger mechanism to obtain the subsystem modal signal and state signal at the triggering moment, and the attack detection result is added to each triggering condition to optimize the data update time, which can reduce the asynchronous duration; a replay attack detection mechanism based on switching Q learning is constructed according to the Q learning algorithm, and the replay attack detection mechanism is used to encrypt and decrypt the subsystem state signal, and calculate the estimated value and state estimation residual norm of the subsystem modal signal and state signal after encryption and decryption, and the event trigger mechanism and the replay attack detection mechanism are used to process the subsystem modal signal and state signal at the triggering moment. , obtain the state estimation value, modal estimation value and state estimation residual norm, determine the detection result of the replay attack, and the attack detection mechanism based on switching Q learning can obtain the optimal evaluation threshold to more intelligently judge whether the replay attack occurs, thereby reducing false alarms and improving the reliability of safety control; substitute the state estimation value and the modal estimation value into the controller model to obtain the safety controller equation, and jointly combine the safety controller equation, the switching system model, the state estimator and the modal estimator equation of the replay attack detection mechanism to obtain the closed-loop system equation, which can cooperate with the attack detection algorithm, effectively defend against replay attacks, and reduce false alarms caused by the normal switching of the system itself; finally, construct a switching rule based on replay attack detection. The switching rule can determine whether the current state signal and the switching signal are historical signals of the replay attack replay based on the replay attack detection result, and judge whether it is necessary to switch the subsystem at present to ensure the stability of the system.

[0116] A switching system block diagram of this embodiment is as follows Figure 2 As shown,

[0117] In a specific embodiment, the scheme for constructing a switching system model and a controller model to obtain a state signal and a modal signal is:

[0118] S11. Construct a switching system model, as shown in formula (21):

[0119]

[0120] in, is the state vector, control input, system output and external disturbance of the switching system; is the switching signal, A σ , B σ , C σ , D σ is a given constant matrix;

[0121] S12, construct the controller model, as shown in formula (22),

[0122] u(t)=K φ x(t) (22)

[0123] Among them, φ=φ(t), φ(t)∈L is the modal signal of the controller, K φ is the controller gain.

[0124] This solution builds the initial switching system and controller model to prepare for the subsequent steps.

[0125] In a specific embodiment, an event trigger mechanism based on replay attack detection is constructed, the event trigger mechanism includes an error detection condition, a modal matching condition and an attack detection condition, and the scheme of using the event trigger mechanism to process the state signal and the modal signal to obtain the subsystem modal signal and the state signal at the triggering moment is:

[0126] S21. Construct an event trigger mechanism based on replay attack detection, as shown in formula (23):

[0127]

[0128] Among them, the initial triggering time t1h=l0, α(g r,m h) represents the time interval when the data at the m-1th sampling time after the rth trigger of the attack detection mechanism arrives at the controller end The attack detection results obtained above are They represent error detection conditions, mode matching conditions, and attack detection conditions respectively;

[0129] S22, construct error detection conditions, as shown in formula (24),

[0130]

[0131] in, represents the sampling time g r,m The parameter matrix at h is and is the weight matrix to be designed, ε r (t) = x(g r,m h)-x(t r h), g r,m h=t r h+mh is the rth triggering time t r The mth sampling time after h, δ σ >0 is the trigger threshold; x(t r h) indicates the subsystem status signal at the triggering moment; ε r (t) represents the triggering time t r The error between the state of h and the state at the mth sampling moment thereafter;

[0132] S23, constructing the modal matching condition, as shown in formula (25),

[0133]

[0134] Among them, σ(g r,m h) represents the rth triggering time t r The modal signal at the mth sampling time after h, then t r The modal signal at time h is σ(t r h);

[0135] S24, construct attack detection conditions, as shown in formula (26),

[0136]

[0137] This scheme constructs an event trigger mechanism based on replay attack detection. The attack detection results are added to each trigger condition to optimize the data update time, which can reduce the asynchronous duration. Specifically, in the error detection condition, the update time of the correct data is optimized according to whether x(t) and σ(t) are historical data packets replayed by the replay attack; in the modal matching condition, according to whether x(t) is replayed, the trigger is arranged in time after the subsystem switching time to shorten the asynchronous duration caused by the subsystem switching; in the attack detection condition, the trigger is arranged in time after the replay attack ends to alleviate the asynchronous duration caused by the replay attack. On the other hand, in the trigger weight matrix of the error detection condition and Add the dissipative parameter matrix Y σ , which realizes the regulation of external data transmission according to the internal energy changes of the system.

[0138] In a specific embodiment, a replay attack detection mechanism based on switching Q learning is constructed according to a Q learning algorithm, and the subsystem modal signal and state signal at the triggering moment are processed using the event triggering mechanism and the replay attack detection mechanism to obtain a state estimation value, a modal estimation value, and a state estimation residual norm. The scheme for determining the detection result of the replay attack is:

[0139] S31. Construct a replay attack detection mechanism based on switching Q learning, wherein the replay attack detection mechanism includes encryption measures, decryption measures, state estimation measures, modal estimation measures, and a switching Q learning method based on Q learning:

[0140] S32, the encryption measure is used to encrypt the subsystem status signal at the triggering moment to obtain an encrypted status signal, as shown in formula (27),

[0141] x c (t r h)=x(t r h)+c(t r h) (27)

[0142] Among them, c(t r h) is a time-varying encryption function generated by a random seed, x c (t r h) represents the encrypted state signal, x(t r h) represents the triggering time t before encryption r The system state at h;

[0143] The encrypted state signal and the switching signal, i.e., the modal signal σ(t r h) Rewrite it as formula (28) under the influence of replay attack,

[0144]

[0145] Where α(t) represents the detection result of the replay attack detection to be solved;

[0146] S33, the decryption measure is used to decrypt the encrypted signal to obtain a decrypted transmission signal, as shown in formula (29),

[0147]

[0148] in, Represents the decrypted system status signal, d(t r h) is a decryption key generated by the random seed, and the energy limit of the time-varying encryption function and the decryption key satisfies the condition is a given constant matrix;

[0149] Due to the transmission delay of the communication network, the data x transmitted at the trigger time c (t r h) and σ(t r h) After passing through the network, When the sub-controller is reached, in Indicates the transmission delay of the rth trigger data, so the holding interval of the signal Can be divided into where Φ r,m represents the subinterval, as shown in formula (30),

[0150]

[0151] represents the maximum number of subintervals, the piecewise lag function η r (t) = tg r,m h satisfies the condition

[0152] Under the action of the event trigger mechanism based on replay attack detection and the encryption and decryption measures, the actual switching signal and the actual state signal of the switching system are shown in formulas (31) and (32),

[0153]

[0154] Among them, η r (t) = tg r,m h, represents the piecewise lag function; ε r (t) represents the triggering time t r The error between the state of h and the state of the mth sampling moment; ε p (t) represents the error between the state at time p and the state at the mth sampling time thereafter;

[0155] S34, the state estimation measure is implemented by a state estimator, which is used to calculate the state estimation value of the system state signal of the switching system under the actual switching signal, as shown in formula (33),

[0156]

[0157] in, is the state estimate of the switching system under the actual switching signal x(t), L φ(t) is the observer gain, φ=φ(t), φ(t)∈L, which represents the modal estimate of the switching system under the actual switching signal; A φ(t) , B φ(t) , Dφ(t) is the system parameter matrix of the φ(t)th state estimator;

[0158] S35, the modal estimation measure is implemented by a modal estimator, which is used to calculate the modal estimation value of the modal signal in the switching system under the actual switching signal, as shown in formula (34),

[0159]

[0160] in, represents the estimated state partition corresponding to the i-th state estimator,

[0161] yes of the border, and

[0162] This scheme builds a replay attack detection mechanism based on switched Q-learning. It dynamically changes the encryption method of the system state signal through the encryption / decryption function, amplifies the estimated residual value generated by the state estimator under the replay attack, and thus distinguishes the replay attack from the normal switching behavior. When there is no replay attack, the original transmission signal is restored from the encrypted information for normal use of the system.

[0163] In a specific embodiment, the Q-learning-based switching Q-learning method is used to calculate the difference between the state estimation value and the original transmission signal, that is, the state estimation residual norm, and determine the detection result of the replay attack according to the state estimation residual norm and the modal estimation value, including a Q table training stage and an attack detection stage:

[0164] S36, switch Q table training phase:

[0165] Construct a five-tuple (A, S, γ f ,π f ,k)’s Markov decision process trains the Q table and updates the Q value, where f∈F={0,1,…,F} is the number of training times;

[0166] is a set of environment variables, where φ f (g r,m h) is the r,mth learning interval Φ in the fth round of training r,m The upper modal estimator estimates the subsystem mode, is the residual norm of the state estimate at the rth,mth step in the fth round of training It is the fth round of training In order to reduce the computational complexity, Divide into K mutually exclusive intervals according to the value size [θk ,[θ k+1 ),k∈K, where [θ k For a given real number sequence θ0=0<θ1<…<θ k <∞, so the environment variable in the r,mth step is expressed as

[0167] Action Set Indicates that the detector is based on environment variables Detection alarm value, when a1 = 0, it means that no replay attack is detected, and a2 = 1, it means that a replay attack is detected;

[0168] Reward function γ f (r,m) indicates the environment variables at the r,mth step in the fth round of training In action After the reward,

[0169] Strategy Indicates that in the fth round of training, the environment variables in the rth and mth steps are Execute an action The probability of; the discount parameter k∈[0,1] indicates the degree of attention to long-term rewards;

[0170] S361, round f training: initialization action Step r, m Environment variables Based on strategy Select Action As shown in formula (35),

[0171]

[0172] Specifically, generate a random number c∈[0,1] if So

[0173] The environment variables in steps r and m By performing actions Convert to the environment variable in step r,m+1 According to the reward function γ f (r,m) calculation execution action The reward obtained after , as shown in formula (36),

[0174]

[0175] Among them, c1, c2 are positive constants, α f For known attack situations in training;

[0176] S362, update the Q value according to the reward function and the value of the f-1th round of training, as shown in formula (37),

[0177]

[0178] in, is the environment variable-action pair during the fth round of training The corresponding Q value after the f-1th round of training, Environment variables for round f training The Q table value corresponding to the optimal action after the f-1th round of training, α f =0.1·(2+arctan(f-α * )) is the learning step size, α * is the learning constant, where the initial value of the Q table is r∈N + ,m∈N;

[0179] S363, for the environment variables of step r,m+1 Repeat the process of S S361-S362 to obtain the corresponding Q value until the system stops running and the fth round of training ends;

[0180] S364, repeat steps S361-S363, perform the next round of training until f=F, the training is completed, and a data set containing all environment variable-action pairs is returned. The complete switching Q table of;

[0181] S37, in the attack detection phase, the corresponding optimal action is selected in the complete switching Q table

[0182] S371. Determine environmental variables according to the modal estimation value and the state estimation residual norm in the complete switching Q table:

[0183] Let r = 1, m = 0, when t∈Φ r,m , observe the current environmental variables and the current modal estimates;

[0184] S372: Select the optimal action corresponding to the current environment variable in the complete switching Q table

[0185] S373: Output the attack detection result, as shown in formula (38).

[0186] α(t)=a r,m , t∈Φ r,m (38).

[0187] This embodiment constructs a switching Q-learning algorithm for detecting replay attacks. Compared with the common method of setting a fixed evaluation threshold to detect attacks in switching systems, the attack detection mechanism based on switching Q-learning can obtain the optimal evaluation threshold to more intelligently determine whether a replay attack has occurred or the system is undergoing normal switching, thereby reducing false alarms and improving the reliability of security control.

[0188] In a specific embodiment, the state estimation value and the modal estimation value are substituted into the controller model to obtain a safety controller equation, and the safety controller equation, the switching system model, the state estimator and the modal estimator equation of the replay attack detection mechanism are combined to obtain a closed-loop system equation:

[0189] Substituting the state estimation value and the modal estimation value into the controller model, the safety controller equation is obtained, as shown in formula (39):

[0190]

[0191] φ=φ(t), φ(t)∈L, represents the modal estimation value obtained according to the modal estimator;

[0192] The safety controller equation, the modal estimator equation, the state estimator equation and the switching system equation are combined to obtain a closed-loop system equation, as shown in formula (40),

[0193]

[0194] Among them, the closed-loop system extended state vector Expanded system matrix

[0195] A φ(t) , B φ(t) , D φ(t) is the system parameter matrix of the φth state estimator, φ(t) represents the modal estimate obtained by the modal estimator; the system parameter matrix System parameter matrix Expanded perturbation matrix Expanded output matrix System parameter matrix System parameter matrix Initial state vector Initial moment Subsystem and Controller Modes

[0196] This solution builds a closed-loop system, including a state estimator and a modal estimator, which can cooperate with the attack detection algorithm to effectively defend against replay attacks and reduce false alarms caused by the normal switching of the system itself.

[0197] In a specific embodiment, a switching rule based on replay attack detection is constructed. The switching rule is used to analyze the switching behavior of the closed-loop system under the replay attack according to the replay attack detection result, and obtain the judgment condition of the system security and stability. The scheme for security control of the closed-loop system is:

[0198] S51, construct a switching rule based on replay attack detection, as shown in formula (41),

[0199]

[0200] The initial value of the switching rule is State partition of the i-th subsystem D i The border and

[0201] S52: Analyze the replay attack result according to the switching rule and the event trigger mechanism, determine the operating state of the subsystem mode and the controller mode under the replay attack, obtain the judgment condition of system security and stability, and use the judgment condition to perform security control on the switching system:

[0202] In order to analyze the switching behavior, it is assumed that the jth and ith subsystems are in adjacent switching intervals [l q-1 ,l q ) and [l q ,l q+1 ) is activated. Due to the influence of the attack, the normal state signal and modal signal are tampered with by the attack and converted into historical data M. Depending on whether the attack covers the subsystem Or sub-controller switching time And the replay attack does not record or records at least one switching behavior, any [l q ,l q+1 The changes of the modal signal (σ, φ) in the interval can be divided into the following Figure 3 The four cases shown in :

[0203] In this embodiment, the switching network is affected by a random replay attack. The probability of the attack follows the Bernoulli distribution α(t)∈{0,1}. When α(t)=1, the historical data is recorded before the attack replays. When α(t)=0, the data is transmitted normally. Assume that the upper limit of the data packet that the attacker can record is The stored data is described as The pth replay attack must also meet the following assumptions about the number of attacks:

[0204] Assumption 1 (Number of attacks): There exists w p ≥0 and τ p ≥h, so that in For the interval The number of occurrences of internal replay attacks;

[0205] Supply rate and cross supply rate definitions:

[0206] If at t∈[l q ,l q+1 ), there is σ(t) = i, and there exists a positive energy storage function Supply rate Π ii (y,w) and the cross-supply rate Π ij (χ,y,w,t), So that formulas (42) and (43) hold true,

[0207]

[0208] for exist So that formula (44) holds true,

[0209]

[0210] Then when the control input u(t) = 0, the switching sequence The switching system under is dissipative, where

[0211] Π ii (t) = w T (t)Q i w(t)+2w T (t)U i y(t)+y T (t)Y i y(t),

[0212] Π ij (t) = a ij [w T (t)Q i w(t)+2w T (t)U i y(t)+y T (t)Y i y(t)]+w T (t)Q ij w(t),

[0213] εij (t) = x T (t)F ij χ(t),

[0214] a ij >0 is a given scalar, Q ij >0,F ij >0,Q i ,U i ,Y i is a matrix of appropriate dimension;

[0215] Theorem 1: Under Assumption 1, for a given positive constant h, η , and a ij >0, parameter and i≠j, The closed-loop system is asymptotically stable under the encryption / decryption switching based Q-learning attack detection mechanism if the following conditions hold

[0216] (1) Existence Matrix S 0 >0, R 0 >0, Q ij >0,F ik >0, against matrix M 1 , M 2 and a matrix of appropriate dimension Satisfying formulas (45), (46) and (47),

[0217]

[0218] in It is composed of the following block matrices:

[0219]

[0220]

[0221] In the formula

[0222]

[0223] (2) There exists an indefinite matrix of appropriate dimension Satisfying formulas (48), (49) and (50),

[0224]

[0225] in It is composed of the following block matrices:

[0226]

[0227] Proof: To achieve the control objective, we need to prove that the closed-loop system is asymptotically stable. First, we select a candidate Lyapunov function, as shown in formula (51),

[0228]

[0229] in,

[0230]

[0231] Calculate the time derivative of formula (51) along the closed-loop system and take the mathematical expectation to obtain

[0232]

[0233] right Applying Jensen integral inequality, Park's lemma and formula (46) to the integral term in , we can obtain formulas (52) and (53).

[0234]

[0235] in,

[0236] Will and Substituting into formula (41), we get the inequality,

[0237]

[0238] Substituting the inequality and equations (52) and (53) into According to formula (45) and (46), we get formula (54):

[0239]

[0240] According to the following cases, the subsystem mode σ and controller mode φ of AD analysis change, and discuss the formula (51) in any interval [l q ,l q+1 ) within the

[0241] Case A: In the interval On, (σ,φ)=(i,j), in the interval On, (σ,φ)=(i,i), in the interval On the other hand, (σ,φ)=(i,φ p ), in the interval On, (σ,φ)=(i,i), in the interval Above, (σ,φ)=(i,i);

[0242] Combining the modal estimator formula (34), the switching rule formula (41) and the formula (48), it can be deduced that in case A, formula (51) is q ,l q+1 ) is shown in formula (55),

[0243]

[0244] Case B: In the interval On, (σ,φ)=(i,j), in the interval On the other hand, (σ,φ)=(i,φ p ), in the interval Above, (σ,φ)=(i,i);

[0245] Combining the modal estimator formula (34), the switching rule formula (41) and the formula (48), it can be deduced that in case B, formula (51) is The evolution of is shown in formula (56),

[0246]

[0247] Case C: In the interval On, (σ,φ)=(i,j), in the interval On, (σ,φ)=(i,i), in the interval superior, In the interval Above, (σ,φ)=(i,i);

[0248] Combining the modal estimator formula (34), the switching rule formula (41) and the formula (48), it can be deduced that in case C, formula (51) is q ,l q+1 ) is shown in formula (57),

[0249]

[0250] Case D: In the interval On, (σ,φ)=(i,j), in the interval superior, In the interval Upper(σ,φ)=(i,i);

[0251] Combining the modal estimator formula (34), the switching rule formula (41) and the formula (48), it can be deduced that in case D, formula (51) isq ,l q+1 ) is shown in formula (58),

[0252]

[0253] Therefore, formula (48) gives and For case AD, formula (51) is q ,l q+1 ) can be summarized as formula (59):

[0254]

[0255] Discussing subsystem switching points The changes of formula (51) before and after:

[0256] Under the switching rule based on attack detection, we get formula (60):

[0257]

[0258] Discuss V(t) and Derivation of the relationship:

[0259] According to formula (49) and formula (59) and (60), we can get formula (61):

[0260]

[0261] In formula (61), Move to the left, due to F ik ≥0, we can get formula (62),

[0262]

[0263] That is, formulas (42) and (43) hold. On the other hand, according to formula (47) and Q ij >0, we can get formula (63),

[0264] Π ik (t)<0 (63)

[0265] That is, formula (44) holds, so the closed-loop system satisfies the dissipative property of Theorem 1;

[0266] Prove the asymptotic stability of the closed-loop system:

[0267] When w(t) = 0, substitute formula (62) into formula (58) to obtain formula (64),

[0268]

[0269] Control objectives were achieved;

[0270] For formula (45) in Theorem 1 and formula (48) Linearize the nonlinear terms of:

[0271] Theorem 2: Under Assumption 1, for a given positive constant h, η , w and a ij >0, parameter and i≠j, If formulas (46), (47), (49) and (50) in Theorem 1 hold, and there exists a matrix S 0 >0, R 0 >0, Q ij >0,F ik > 0, k∈{i,j}, Against Matrix M 1 , M 2 with a matrix of appropriate dimension Satisfying formulas (65) and (66),

[0272]

[0273] Then the closed-loop system is asymptotically stable, where in formula (65) It is composed of the following matrix:

[0274]

[0275] In formula (66) It is composed of the following block matrices:

[0276]

[0277] The other block matrices in are zero matrices of appropriate dimensions;

[0278] Proof: First, multiply the left and right sides of formula (45) by the matrix and its transpose, where The matrix consists of 10×10 blocks.

[0279]

[0280] Multiply the left and right sides of formula (48) by the matrix and its transpose, where The resulting matrix is ​​composed of 7x7 blocks. Applying Schur's complement lemma, we get -[4R] -1 <4w 2 R-2wI,-[4(1-α)R] -1 <4w 2 (1-α)R-2wI,-[4αR] -1 <4w 2 αR-2wI, thus and It is equivalent to formula (45) and (48); with the help of Schur's complement lemma, formula (45) and (48) can be obtained from formula (65) and (66).

[0281] This scheme constructs a switching rule based on replay attack detection. Based on the replay attack detection result, it can keep the currently activated subsystem mode unchanged or switch to the subsystem mode that meets the state switching conditions according to whether the current state signal and the switching signal are historical signals replayed by the replay attack, thereby alleviating the continuous asynchrony between the subsystem and the subcontroller caused by the replay attack, judging whether the subsystem needs to be switched at present, and ensuring the stability of the system; the supply rate Π ii (y,w) and the cross-supply rate Π ij (χ, y, w, t) not only describes the energy exchange between each subsystem and the external input, but also reflects the impact of activated and inactivated subsystems on the overall energy exchange of the switching system. The attack energy is regarded as a special external input, and the energy of the attack is constructed by analyzing the situation AD. The changes in the internal energy of the switching system under replay attacks are used to reveal the relationship between the internal energy and external input of the switching system, and the impact of replay attacks on the overall stability of the switching system is described. Safety conditions are constructed to ensure that the system operates under the conditions and to achieve safety control under replay attacks.

[0282] Take the unmanned ship as an example for simulation:

[0283] The effectiveness of the method is verified by using a case study of dynamic positioning control of multiple surface unmanned ships. The dynamics of the unmanned ship can be expressed as formula (67):

[0284]

[0285] in and Indicates the X-axis position and Y-axis position of the nth ship. represents the heading angle of the ship, n∈{1,2,3}, represents the vertical speed, represents the sway velocity, represents the yaw angular velocity. n is the control input, M n , Π n and for

[0286]

[0287] Where m n , x n,g and I n,z They represent the mass of the nth ship, the center of gravity on the X-axis and the moment of inertia in the heading direction, is the additional mass in the longitudinal direction, and represents the additional mass in the sway direction, is the additional moment of inertia in heading direction, and is the linear damping coefficient;

[0288] Unmanned ship 1 is the leader and is responsible for receiving positioning information. Unmanned ships 2 and 3 are follower ships and maintain collaborative tracking and positioning by receiving relative position information from unmanned ship 1.

[0289] Specifically, let the state of the nth unmanned ship be The dynamic positioning goal of the unmanned ship in formula (67) is to adjust the position and heading of the ship so that where ι n represents the expected formation vector, is a single desired positioning point, ρ n is the preset scalar;

[0290] The relevant parameters of the unmanned ship are:

[0291]

[0292] The initial states of the three unmanned ships are Other parameters are shown in Table 1.

[0293] Table 1 Parameters of the three unmanned ships

[0294]

[0295] Figure 4This is the switching system topology in the simulation verification of the safety control method. Since the communication channel of unmanned ship No. 1 is limited, it can only communicate with one follower ship at a time, and follower ships No. 2 and No. 3 cannot communicate directly. Specifically, when unmanned ship No. 1 only sends information to unmanned ship No. 2, it is topology 1, such as Figure 4 On the other hand, when unmanned ship 1 only sends information to unmanned ship 3, it is topology 2, as shown in Figure 4 As shown on the right, since only one follower ship can receive information at a time, the other follower ship that is not communicating may deviate from the queue, so each topology is unstable when running alone. In order to ensure that the unmanned ship can achieve collaborative tracking and positioning, it is necessary to switch between the two topologies;

[0296] based on Figure 4 The change of the topological structure in the three-ship cooperative positioning problem can be modeled as a switching system with two unstable subsystems, as shown in formula (68):

[0297]

[0298] in In the formula K n is the controller gain to be designed, is the communication topology matrix, ρ∈{1,2}, and the other coefficient matrices are as follows

[0299]

[0300] Then the control objective of formula (67) is transformed into the stabilization problem of formula (68);

[0301] Select a replay attack that satisfies Assumption 1: The input parameters of the algorithm are: discount parameter κ = 0.42, number of training times F = 50, action set A = = {0, 1}, exploration constant β * =3, learning constant α * =5, c1=10, c2=5 in the reward function; state estimation residual norm partition parameters: θ0=0, θ1=0.02, θ2=0.04, θ3=0.06, θ4=0.08, θ5=0.1, θ6=0.2, θ7=0.3, θ8=0.4, θ9=1; encryption / decryption function is designed as c(t)=0.05arctan(t+μ c ), d(t) = 0.05arctan(t + μ d ), μ c ,μ d The random numbers are generated by the same random seed; the training data are the subsystem modes generated when the system is running. and the residual norm of the state estimate Choose h = 0.01, η =0.003, δ1=δ2=0.1,a 12 =a 21 =0.2, n 12 =-1, w = 0.9, solving Theorem 2, we can get the controller gains of the three ships,

[0302]

[0303] In this embodiment, the position, i.e., the state, of the unmanned ship is as follows: Figure 5-Figure 12 As shown,

[0304] Figure 5 It shows that three unmanned ships have arrived at the desired positioning points;

[0305] Figure 6 The changes in the norm of the state estimation residual error when the encryption / decryption module is set and not set are compared. Specifically, the switching Q learning method for detecting replay attacks, that is, the encryption module and the decryption module are introduced into the switching Q learning algorithm, the state residual is divided into {θ0,…,θ9}, and 50 rounds of training are performed; the process of replay attack detection without setting the encryption / decryption module is consistent with the switching Q learning algorithm. The comparison results are shown in Figure 2. Figure 6 As shown, it can be seen that the encryption / decryption process can effectively amplify the residual norm value of the state estimation in the attack shadow area, making the replay attack easier to detect, verifying the effectiveness of the encryption / decryption module.

[0306] Figure 7 The event triggering times with / without replay attack detection and the asynchronous duration after the switch point and the end of the attack are compared with Table 2. Specifically, the event triggering mechanism based on attack detection introduces the attack detection result α(t) in each triggering condition; the remaining triggering conditions of the multi-condition event triggering mechanism without introducing the attack detection result are consistent with the event triggering mechanism;

[0307] Table 2 Event triggering times and asynchronous duration with / without replay attack detection (T=60s)

[0308] Event trigger mechanism Trigger times The duration of the asynchrony between the switch point and the end of the attack Event triggering mechanism based on attack detection 103 2.89s No event trigger mechanism for attack detection 139 4.17s

[0309] The results are shown in Table 2 and Figure 7 As shown in the second column of Table 2, Figure 7 It can be seen that the event trigger mechanism introducing α(t) can avoid the triggering of erroneous data and increase the trigger interval; from the third column of Table 2, it can be seen that the event trigger mechanism based on attack detection can effectively reduce the asynchronous duration between the switching point and the end of the attack.

[0310] Figure 8 and Fig. 9Compare the asynchronous duration and the number of consecutive asynchronous switching under the switching rules with and without replay attack detection. Specifically, the switching rule based on replay attack detection introduces the attack detection result α(t); except for not introducing α(t), the switching rules without attack detection have the same switching conditions as the fantasy rule. It can be seen that under the same replay attack, the switching rule with α(t) effectively shortens the asynchronous time caused by the replay attack and effectively avoids the 6 consecutive asynchronous switching in the switching rule without attack detection.

[0311] Fig.10 , Fig.11 and Fig.12 Comparing the tracking and positioning errors of the multi-unmanned ship on the X-axis, Y-axis and heading angle considering the cross-supply rate of the inactivated subsystem and without introducing dissipation, it can be seen that considering the cross-supply rate of the inactivated subsystem makes the system have better convergence speed and stability.

[0312] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A security control method for a networked switching system based on encryption and decryption switching Q learning replay attack detection, characterized in that: include: S1: Construct the switching system model and controller model to obtain the state signal and modal signal; S2: construct an event trigger mechanism based on replay attack detection, wherein the event trigger mechanism includes an error detection condition, a modal matching condition and an attack detection condition; use the event trigger mechanism to process the state signal and the modal signal to obtain the subsystem modal signal and the state signal at the triggering moment; S3: constructing a replay attack detection mechanism based on switching Q learning according to the Q learning algorithm, wherein the replay attack detection mechanism is used to encrypt and decrypt the subsystem state signal, and calculate the estimated value and state estimation residual norm of the subsystem modal signal and state signal after encryption and decryption, and use the event triggering mechanism and the replay attack detection mechanism to process the subsystem modal signal and state signal at the triggering moment, obtain the state estimation value, modal estimation value and state estimation residual norm, and determine the detection result of the replay attack; S4: Substituting the state estimation value and the modal estimation value into the controller model to obtain a safety controller equation, and combining the safety controller equation, the switching system model, the state estimator and the modal estimator equation of the replay attack detection mechanism to obtain a closed-loop system equation; S5: Construct a switching rule based on replay attack detection, wherein the switching rule is used to analyze the switching behavior of the closed-loop system under the replay attack according to the replay attack detection result, obtain the judgment condition of system security and stability, and perform security control on the closed-loop system.

2. The security control method for a networked switching system based on encryption and decryption switching Q learning replay attack detection according to claim 1 is characterized in that: S1 builds the switching system model and controller model to obtain state signals and modal signals, including: S11, construct a switching system model, as shown in formula (1), in, is the state vector, control input, system output and external disturbance of the switching system; is the switching signal, A σ , B σ , C σ , D σ is a given constant matrix; S12, construct the controller model, as shown in formula (2), u(t)=K φ x(t) (2) Among them, φ=φ(t), φ(t)∈L is the modal signal of the controller, K φ is the controller gain.

3. The security control method of a networked switching system based on encryption and decryption switching Q learning replay attack detection according to claim 1 is characterized in that: S2 constructs an event triggering mechanism based on replay attack detection, wherein the event triggering mechanism includes an error detection condition, a modal matching condition, and an attack detection condition; Using the event trigger mechanism to process the state signal and the modal signal to obtain the subsystem modal signal and the state signal at the triggering moment, including: S21. Construct an event trigger mechanism based on replay attack detection, as shown in formula (3): Among them, the initial triggering time t1h=l0, α(g r,m h) represents the time interval when the data at the m-1th sampling time after the rth trigger arrives at the controller end The attack detection results obtained above are They represent error detection conditions, mode matching conditions, and attack detection conditions respectively; S22, construct error detection conditions, as shown in formula (4), in, represents the sampling time g r,m The parameter matrix at h is and is the weight matrix to be designed, ε r (t) = x(g r,m h)-x(t r h), g r,m h=t r h+mh is the rth triggering time t r The mth sampling time after h, δ σ >0 is the trigger threshold; x(t r h) indicates the subsystem status signal at the triggering moment; ε r (t) represents the triggering time t r The error between the state of h and the state at the mth sampling moment thereafter; S23, constructing the modal matching condition, as shown in formula (5), Among them, σ(g r,m h) represents the rth triggering time t r The modal signal at the mth sampling time after h, then t r The modal signal at time h is σ(t r h); S24, construct attack detection conditions, as shown in formula (6), 4. The security control method for a networked switching system based on encryption and decryption switching Q learning replay attack detection according to claim 1 is characterized in that: The replay attack detection mechanism includes encryption measures, decryption measures, state estimation measures, modal estimation measures and a switching Q learning method based on Q learning; The encryption measure is used to encrypt the subsystem state signal at the triggering moment to obtain an encrypted state signal, and obtain the encrypted state signal and modal signal under the replay attack according to the encrypted state signal, and obtain the actual switching signal according to the encrypted modal signal and the event triggering mechanism; The decryption measure is used to decrypt the encrypted state signal under the replay attack, and obtain the actual system state signal according to the decrypted system signal and the event trigger mechanism; The state estimation measure is implemented by a state estimator, which is used to calculate the state estimation value of the system state signal in the switching system under the actual switching signal; The modal estimation measure is implemented by a modal estimator, which is used to calculate the modal estimation value of the modal signal in the switching system under the actual switching signal; The Q-learning-based switching Q-learning method is used for the difference between the actual system state signal and the state estimation value, that is, the state estimation residual norm, and the replay attack detection result is determined according to the state estimation residual norm and the modal estimation value.

5. The security control method for a networked switching system based on encryption / decryption switching Q-learning replay attack detection according to claim 4 is characterized in that: Using the event trigger mechanism and the replay attack detection mechanism to process the subsystem modal signal and state signal at the triggering moment to obtain a state estimation value and a modal estimation value, including: S31, the encryption measure is as shown in formula (7), x c (t r h)=x(t r h)+c(t r h) (7) Among them, c(t r h) is a time-varying encryption function generated by a random seed, x c (t r h) represents the encrypted state signal, x(t r h) represents the triggering time t before encryption r The system state at h; The encrypted state signal and the switching signal, i.e., the modal signal σ(t r h) Rewrite it as formula (8) under the influence of replay attack, Where α(t) represents the detection result of the replay attack detection to be solved; S32, the decryption measure is as shown in formula (9), in, Represents the decrypted system status signal, d(t r h) is a decryption key generated by the random seed, and the energy limit of the time-varying encryption function and the decryption key satisfies the condition is a given constant matrix; Under the action of the event trigger mechanism based on replay attack detection and the encryption and decryption measures, the actual switching signal and the actual system state signal of the switching system are as shown in formulas (10) and (11), Among them, η r (t) = tg r,m h, represents the piecewise lag function; ε r (t) represents the triggering time t r The error between the state of h and the state of the mth sampling moment thereafter; ε p (t) represents the error between the state at time p and the state at the mth sampling time thereafter; S33, the state estimator, as shown in formula (12), in, is the state estimate of the switching system under the actual switching signal x(t), L φ(t) is the observer gain, φ=φ(t), φ(t)∈L, which represents the modal estimate of the switching system under the actual switching signal; A φ(t) , B φ(t) , D φ(t) is the system parameter matrix of the φ(t)th state estimator; S34, the modal estimator, as shown in formula (13), in, represents the estimated state partition corresponding to the i-th state estimator, yes of the border, and 6. The security control method for a networked switching system based on encryption / decryption switching Q-learning replay attack detection according to claim 4 is characterized in that: The switching Q learning method based on Q learning includes a switching Q table training phase and an attack detection phase: S35, switch Q table training phase: Construct a five-tuple (A, S, γ f ,π f ,k)’s Markov decision process trains the Q table and updates the Q value, where f∈F={0,1,…,F} is the number of training times; is a set of environment variables, where φ f (g r, m h) is the r,mth learning interval Φ in the fth round of training r,m The upper modal estimator estimates the subsystem mode, is the residual norm of the state estimate at the r,mth step in the fth round of training It is the fth round of training Action Set Indicates that the detector is based on environment variables Detection alarm value, when a1 = 0, it means that no replay attack is detected, and a2 = 1, it means that a replay attack is detected; Reward function γ f (r,m) indicates the environment variables at the r,mth step in the fth round of training In action After the reward, Strategy Indicates that in the fth round of training, the environment variables in the rth and mth steps are Execute an action The probability of; the discount parameter k∈[0,1] indicates the degree of attention to long-term rewards; S351, initialization of the f-th round of training Step r, m Environment variables Based on strategy Select Action As shown in formula (14), The environment variables in steps r and m By performing actions Convert to the environment variable in step r,m+1 According to the reward function γ f (r,m) calculation execution action The reward obtained after is as shown in formula (15): S352: Update the Q value according to the reward function and the value of the f-1th round of training, as shown in formula (16): in, is the environment variable-action pair during the fth round of training The corresponding Q value after the f-1th round of training, Environment variables for round f training The Q table value corresponding to the optimal action after the f-1th round of training, α f =0.1·(2+arctan(f-α * )) is the learning step size, α * is the learning constant, where the initial value of the Q table is S353, for the environment variables of step r,m+1 Repeat the process of S351-S352 to obtain the corresponding Q value until the system stops running and the fth round of training ends; S354, repeat steps S351-S353, perform the next round of training until f=F, the training is completed, and a data set containing all environment variable-action pairs is returned. The complete switching Q table of; S36, in the attack detection phase, the corresponding optimal action is selected in the complete switching Q table S361. Determine environmental variables according to the modal estimation value and the state estimation residual norm in the complete switching Q table: Let r = 1, m = 0, when t∈Φ r,m , observe the current environmental variables and the current modal estimates; S362: Select the optimal action corresponding to the current environment variable in the complete switching Q table S363: Output the attack detection result, as shown in formula (17): α(t)=a r,m ,t∈Φ r,m (17)。 7. The security control method for a networked switching system based on encryption and decryption switching Q learning replay attack detection according to claim 1 is characterized in that: S4 substitutes the state estimation value and the modal estimation value into the controller model to obtain a safety controller equation, and combines the safety controller equation, the switching system model, the state estimator and the modal estimator equation of the replay attack detection mechanism to obtain a closed-loop system equation, including: Substituting the state estimation value and the modal estimation value into the controller model, a safety controller equation is obtained, as shown in formula (18): φ=φ(t), φ(t)∈L, represents the modal estimation value obtained according to the modal estimator; The safety controller equation, the modal estimator equation, the state estimator equation and the switching system equation are combined to obtain a closed-loop system equation, as shown in formula (19): in, Closed-loop system extended state vector Expanded system matrix D φ(t) is the system parameter matrix of the φth state estimator, φ(t) represents the modal estimate obtained by the modal estimator; the system parameter matrix System parameter matrix Expanded perturbation matrix Extended output matrix [D σ D σ ], system parameter matrix System parameter matrix Initial state vector Initial moment Subsystem and Controller Modes 8. The security control method for a networked switching system based on encryption / decryption switching Q-learning replay attack detection according to claim 1 is characterized in that: S6 constructs a switching rule based on replay attack detection, inputs the replay attack detection result into the event trigger mechanism and the switching rule, analyzes the switching behavior under the replay attack, obtains the judgment condition of system security and stability, and performs security control on the switching system, including: S51, construct a switching rule based on replay attack detection, as shown in formula (20), D i The border and S52. Analyze the replay attack results according to the switching rules and the event trigger mechanism, determine the operating status of the subsystem mode and the controller mode under the replay attack, obtain the judgment conditions for the safety and stability of the system, and use the judgment conditions to perform security control on the switching system.

Citation Information

Patent Citations

  • Output adjusting method of switching networked flight control system based on alternating event triggering

    CN110298144A

  • Active decoy type intelligent anti-interference method

    CN113420495A

  • T-S fuzzy system adaptive event triggering state estimation method under random network attack

    CN113741198A

  • Anti-DoS attack image encryption method based on complex network event trigger synchronization control

    CN113885333A

  • APT attack defense method based on deep reinforcement learning

    CN116232707A

Cited By

  • Switching system active safety control method and device based on Stackelberg game

    CN119966648A

  • Switching type safety control method and device for wind turbine generator set under replay attack

    CN120315338A

  • A switching type security control method and device for wind turbines under replay attacks

    CN120315338B