A honeypot trapping resource deployment method and system
By establishing the LSSVM honeypot resource load prediction model and optimization algorithm, the problem of Kubernetes' insufficient perception of resource load fluctuations in the power system is solved, efficient scheduling and stability of honeypot resources are achieved, and the network security of the power system is ensured.
Patent Information
- Application Number
- CN202410890538.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-07-04
AI Technical Summary
When Kubernetes faces resource load fluctuations in the power system, its perception granularity and accuracy are insufficient, leading to waste of honeypot resources and competition risks. Existing scheduling strategies fail to fully solve the problem of load fluctuation characteristics.
Establish an LSSVM honeypot resource load prediction model, using a weighted combination kernel function and a spectral optimization algorithm based on clustering and adaptive mutation operators to optimize the regularization parameters and kernel weights in the model, dynamically capture load fluctuations, and evaluate nodes and honeypots compatibility between them to achieve resource scheduling.
It improves the accuracy and speed of honeypot resource load prediction, avoids resource overlimit and competition risks, and ensures honeypot stability and power system network security.
Smart Images

Figure CN118484310B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power network security, and in particular to a method and system for deploying honeypot trapping resources. Background Art
[0002] With the rapid development of information technology and the improvement of intelligence level, the normal operation of the power system is crucial to the stability and reliability of power supply security. Cyber attacks can cause power system blackouts and cause immeasurable losses to society. The use of efficient honeypot technology is the focus of research on protecting power system network security.
[0003] Honeypot technology is responsible for luring attackers to attack and protecting other infrastructure from harm. With the increase in the types and number of honeypots, the management of honeypots has become very complicated. With the increasing number and types of honeypots that need to be managed, it has become very complicated to manually manage each honeypot. Using Kubernetes to deploy honeypots has become an efficient and convenient means. The automation function of Kubernetes can quickly deploy, expand and manage honeypots. However, when facing resource load fluctuations, Kubernetes has limitations in the granularity and accuracy of load perception. It often leads to resource waste and increases the risk of resource overload and competition, resulting in reduced performance and stability of honeypots. Many scholars have proposed many new scheduling strategies for application deployment in Kubernetes, but these strategies cannot fully solve the load fluctuation characteristics of honeypots in deployment arrangements, and often lead to problems of honeypot resource competition and overload. Summary of the invention
[0004] In order to overcome the shortcomings of the existing technology, the present invention provides a honeypot trapping resource deployment method and system. In view of the obvious resource load fluctuation problem of honeypots in power systems when they are attacked by external attacks, an LSSVM honeypot resource load prediction model is established to predict the resource consumption of honeypots and dynamically capture load fluctuations. In order to cope with complex and diverse network attacks, a weighted combination kernel function is used to improve the accuracy of the LSSVM regression model. A spectral optimization algorithm based on clustering and adaptive mutation operators is used to optimize the regularization parameters, Gaussian kernel function parameters and kernel weights in the LSSVM honeypot resource load prediction model to improve the prediction accuracy and speed of the model. Finally, the real-time status and future status trend of the nodes to be deployed and the honeypot load predicted by the optimized LSSVM honeypot resource load prediction model are used to evaluate the compatibility between the nodes and the honeypots, and complete the honeypot trapping resource scheduling and deployment of the power system.
[0005] In order to achieve the above object, the present invention provides the following technical solution: a method for deploying honeypot trapping resources, comprising the following steps:
[0006] Step 1: Deploy honeypot resources in the power system, collect data on CPU resource consumption, memory resource consumption, and the time of each resource consumption during honeypot operation, and collect N groups of training samples Data, as the training set for the LSSVM honeypot resource load prediction model, represents a series of time points, Indicates CPU or memory resource usage and normalizes the collected data.
[0007] Step 2: Initialize the parameters of the spectral optimization algorithm based on clustering and adaptive mutation operators and the LSSVM honeypot resource load prediction model: Set the population size , maximum number of iterations , convergence error , the number of subpopulation divisions , explore the probability factor , probability compensation , determine the direction vector of the initial light , the normal direction vector of the internal and external refracted light and , the normal direction vector of the internal reflection ray ; Set the regularization parameters of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights Value range, create a three-dimensional matrix X = [ c , s , oh ] As the position of the light.
[0008] Step 3: Establish the LSSVM honeypot resource load prediction model by learning the training samples: , represents the training resource load prediction model, represents the input data of the training sample, represents the output data of the training sample, represents the fitness value of the function, represents the combined kernel function.
[0009] Step 4: Use the test sample as The predicted value of the test sample is obtained in each round of iteration. , Represents the test resource load prediction model, Represents the input value of the test sample, and then calculates the fitness value of each round of iterative light.
[0010] Step 5: Use the spectral optimization algorithm based on clustering and adaptive mutation operators to optimize the regularization parameters in the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights , judge whether the convergence conditions are met or whether the maximum number of iterations is reached. If the end conditions of the spectral optimization algorithm based on clustering and adaptive mutation operators are not met, continue to iterate; if the end conditions of the spectral optimization algorithm based on clustering and adaptive mutation operators are met, input the regularization parameter of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights , complete the optimization of the LSSVM honeypot resource load prediction model.
[0011] Step 6: Use the optimized LSSVM honeypot resource load prediction model to predict the real-time status and future status trend of the nodes to be deployed and the honeypot load, divide the node evaluation method into a low-load node evaluation method and a high-load node evaluation method, and use these two evaluation methods to evaluate the compatibility between nodes and honeypots in the power system, and finally generate a reasonable honeypot resource deployment plan to dispatch the honeypot to a node with high compatibility.
[0012] Furthermore, step one specifically includes:
[0013] For the original training set Perform normalization processing, normalization processing method:
[0014] (1),
[0015] In the formula, is the deviation value, and are the maximum and minimum values in the original data sequence.
[0016] Furthermore, step three specifically includes: the LSSVM honeypot resource load prediction model is expressed as:
[0017] Map the input space to the feature space using a nonlinear function ,The form of the LSSVM honeypot resource load prediction model is as follows:
[0018] (2),
[0019] In the formula, is a nonlinear mapping function; is the weight vector value; express The transpose of is the bias term;
[0020] Based on the principle of high-dimensional space transformation and structured risk minimization, the resource consumption evaluation problem is transformed into a constrained optimization problem. The constrained optimization problem is as follows:
[0021] (3),
[0022] In the formula, represents the objective function, is a regularization parameter used to determine the trade-off between the complexity and accuracy of the LSSVM honeypot resource load prediction model. represents the input sample, Expression The constraints of Represents the regression error between the actual value and the predicted value of the output;
[0023] Construct the corresponding Lagrangian function , solve the constrained optimization problem and simplify the nonlinear problem through KKT optimization conditions;
[0024] The kernel function is used to reduce the complexity of high-dimensional space calculations, and a weighted combination kernel function is used to deal with complex and diverse network attacks in the power system. The polynomial kernel function and the Gaussian kernel function are weighted to take into account the advantages of different kernel functions. The weighted combination kernel function is as follows:
[0025] (6),
[0026] In the formula, represents the Gaussian kernel function; k poly ( x , x k ) = [ ( x ⋅ x k ) + 1 ] d represents the polynomial kernel function, and represents the input sample, represents the order of the polynomial; represents the kernel weight parameter, Yes Control The constant of the upper bound;
[0027] Through the optimization of the weighted combination kernel function, the LSSVM honeypot resource load prediction model is finally expressed as:
[0028] (7),
[0029] In the formula, represents the Lagrange multiplier of the model; Represents the bias term.
[0030] Furthermore, step four specifically includes:
[0031] The test sample As the input of the model, the predicted value of the test sample is obtained in each round of iteration , and then calculate the fitness value of each round of iteration light:
[0032] (8),
[0033] In the formula, represents the evaluation function; Indicates the number of training samples collected; Represents real resource usage data; Represents the resource usage data predicted by the LSSVM honeypot resource load prediction model.
[0034] Furthermore, step five specifically includes: optimizing the regularization parameters in the LSSVM honeypot resource load prediction model using a spectral optimization algorithm based on clustering and adaptive mutation operators , Gaussian kernel function parameters and kernel weights , the optimization process is as follows:
[0035] Clustering-based subpopulation division: The initial population is divided into subpopulations, select the one with the best fitness value Lines are drawn, and the distance matrix is constructed with the positions of these lines as cluster centers, and the individuals closest to the cluster centers are divided into a subpopulation:
[0036] (9),
[0037] In the formula, Indicates the best Lines and The distance matrix between the rays; Indicates the size of the population; represents the best A ray of light; The first A ray of light; , Indicates rounding up; D indicates dimension;
[0038] The direction of the rainbow spectrum, when the light hits the droplet, the direction vector of the incident light is calculated for each subpopulation; when the incident light enters the droplet, the light will undergo internal refraction, internal reflection, and external refraction; generate new color rays: exploration mechanism, after calculating the direction of the incident light, the light will execute the exploration mechanism to search the entire solution space; color ray scattering: development mechanism, the development mechanism scatters the light in the direction of the best solution so far, the current solution, and the solution randomly selected from the current population, merges the subpopulations, scatters the light around the current solution, and uses the area around it to obtain better results, so that the current solution moves in the direction of the best solution so far;
[0039] Adaptive mutation operator, the light chooses to mutate with a larger step size or a smaller step size according to its fitness value. When the fitness value of the light is lower than the average fitness value of the population, it mutates with a larger step size and performs a global search; when the fitness value of the light is higher than the average fitness value of the population, it mutates with a smaller step size and performs a local search; the adaptive mutation operator is as follows:
[0040] (19),
[0041] (20),
[0042] In the formula, Indicates The position of the ray at the iteration, Indicates the position of the light after mutation; Indicates the fitness value of light; and Respectively represent the upper and lower bounds of the variable; Indicates the maximum number of iterations; Represents a random number between 0 and 1. Represents an individual fitness level.
[0043] Furthermore, step six specifically includes: using the optimized LSSVM honeypot resource load prediction model to predict the real-time status and future status trend of the nodes to be deployed and the honeypot load:
[0044] Through the optimized LSSVM honeypot resource load prediction model, the honeypot The CPU and memory resource consumption prediction models are and ,The scheduler deploys honeypot resources through the load consumption prediction; the compatibility of the honeypot to be scheduled and the node depends on the situation of the node, which can be divided into two cases: low-load node evaluation method and high-load node evaluation method;
[0045] Low-load node evaluation method:
[0046] For low-load nodes, the scheduler only needs to ensure the compatibility of the honeypot and the node; this overall scheduling decision method fully utilizes the CPU and memory resources of each node; for each node with different loads The scheduler will calculate the remaining CPU resources of each load node and remaining memory resources , determine the remaining resource characteristics of each node ; According to the operation time period of the honeypot ,Resource characteristics of honeypot , calculated as follows:
[0047] (twenty one),
[0048] (twenty two),
[0049] In the formula, Indicates the start time of the honeypot operation. Indicates the end time of the honeypot operation;
[0050] According to the resource characteristics of the node and the resource characteristics of the honeypot, the compatibility of resources between the node and the honeypot is calculated. :
[0051] (twenty three),
[0052] In the formula, Indicates the compatibility of resources between nodes and honeypots, The smaller the value, the higher the resource compatibility between the node and the honeypot. Deploy the honeypot on the node with the lowest value;
[0053] High-load node evaluation method:
[0054] For high-load nodes, the scheduler focuses on how to deploy honeypot resources to appropriate nodes, minimize the probability of newly deployed honeypots and honeypots already deployed on the nodes consuming resources at the same time, and minimize the risk of resource competition when resources are limited;
[0055] For each high-load node , the scheduler will call the resource prediction model , and retrieve the load interval between CPU and memory ; Calculate the total time interval of all nodes , calculate the honeypot at the node CPU load aggregation function on , calculate the aggregate function of memory load :
[0056] (twenty four),
[0057] (25),
[0058] (26),
[0059] In the formula, Indicates the number of honeypots; and Honeypot The predicted value of CPU resource usage and the predicted value of memory resource usage;
[0060] exist At this moment, the CPU load change rate of the deployed honeypot , Memory load change rate and the CPU load change rate of the honeypot waiting to be deployed , Memory load change rate , calculate and deploy honeypot After that, at the node Complementary index of the new load function and :
[0061] α C ( p , i ) = ∫ T p st T p ed [ y C i ' ( t ) + F Cp ' ( t ) ] (27),
[0062] α M ( p , i ) = ∫ T p st T p ed [ y M i ' ( t ) + F Mp ' ( t ) ] (28),
[0063] In the formula, when the complementary index is close to 0, it means that in the time period [ T st , T ed ] In the scheme, the increase of CPU load resources will be compensated by the decrease of memory load resources, or the increase of memory load resources will be compensated by the decrease of CPU load resources. The scheduler looks for the node with the smallest complementary index, and the honeypot will be scheduled to the node with high resource compatibility.
[0064] A honeypot trapping resource deployment system, comprising a preprocessing module, an initialization module, a model building module, a model testing module, a model optimization module, and a honeypot resource deployment module;
[0065] Preprocessing module: used to deploy honeypot resources in the power system, collect data on CPU resource consumption, memory resource consumption and the time of each resource consumption during honeypot operation, and collect N groups of training samples , as the training set of LSSVM honeypot resource load prediction model, represents a series of time points, Indicates CPU or memory resource usage and normalizes the collected data;
[0066] Initialization module: used to initialize the parameters of the spectral optimization algorithm based on clustering and adaptive mutation operators and the LSSVM honeypot resource load prediction model: set the population size , maximum number of iterations , convergence error , the number of subpopulation divisions , explore the probability factor , probability compensation , determine the direction vector of the initial light , the normal direction vector of the internal and external refracted light and , the normal direction vector of the internal reflection ray ; Set the regularization parameters of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights Value range, create a three-dimensional matrix X = [ c , s , oh ] as the position of light;
[0067] Model building module: used to build the LSSVM honeypot resource load prediction model by learning the training samples: , represents the training resource load prediction model, represents the input data of the training sample, represents the output data of the training sample, represents the fitness value of the function, represents the combined kernel function;
[0068] Model testing module: used to take test samples as The predicted value of the test sample is obtained in each round of iteration. , Represents the test resource load prediction model, Represents the input value of the test sample, and then calculates the fitness value of each round of iterative light;
[0069] Model optimization module: Optimize the regularization parameters in the LSSVM honeypot resource load prediction model using a spectral optimization algorithm based on clustering and adaptive mutation operators , Gaussian kernel function parameters and kernel weights , judge whether the convergence conditions are met or whether the maximum number of iterations is reached. If the end conditions of the spectral optimization algorithm based on clustering and adaptive mutation operators are not met, continue to iterate; if the end conditions of the spectral optimization algorithm based on clustering and adaptive mutation operators are met, input the regularization parameter of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights , complete the optimization of LSSVM honeypot resource load prediction model;
[0070] Honeypot resource deployment module: The optimized LSSVM honeypot resource load prediction model is used to predict the real-time status and future status trend of the nodes to be deployed and the honeypot load, and the node evaluation method is divided into a low-load node evaluation method and a high-load node evaluation method. These two evaluation methods are used to evaluate the compatibility between nodes and honeypots in the power system, and finally a reasonable honeypot resource deployment plan is generated to dispatch the honeypot to the node with high compatibility.
[0071] The beneficial effects of the present invention are:
[0072] The present invention designs a weighted combination kernel function to improve the accuracy of the LSSVM regression model when facing different types of network attacks. A spectral optimization algorithm based on clustering and adaptive mutation operators is proposed, which can ensure that the light is evenly distributed in the search space during the search process, prevent the light aggregation phenomenon, enhance the ability of the algorithm to explore the global optimal solution, and ultimately improve the accuracy and speed of the LSSVM honeypot resource load prediction model. Using the optimized LSSVM honeypot resource load prediction model, the honeypot resource consumption status can be accurately predicted and load fluctuations can be dynamically captured. The real-time status and future status trend of the nodes to be deployed and the honeypot load predicted by the optimized LSSVM honeypot resource load prediction model can avoid the risk of excessive resource use and competition to the greatest extent, make more reasonable use of resources and ensure the stability of the honeypot, thereby ensuring the network security of the power system. BRIEF DESCRIPTION OF THE DRAWINGS
[0073] Figure 1 It is a structural schematic diagram of the present invention;
[0074] Figure 2 This is a flow chart of the present invention for the deployment of honeypot resources in the power system. DETAILED DESCRIPTION
[0075] The present invention will be further described below in conjunction with the accompanying drawings.
[0076] Example 1: In order to overcome the limitations of Kubernetes in terms of load perception granularity and accuracy when facing resource load fluctuations, this example combines Figure 1 The honeypot resource deployment structure diagram shown in Figure 2 The honeypot resource deployment flow chart shown in the figure provides a honeypot trapping resource deployment method, which specifically includes the following steps:
[0077] Step 1: Deploy honeypot resources in the power system, collect data on CPU resource consumption, memory resource consumption, and the time of each resource consumption during honeypot operation, and collect N sets of training samples Data, as the training set for the LSSVM honeypot resource load prediction model, represents a series of time points, Indicates the CPU or memory resource usage. The collected data is normalized to reduce the impact of the original data instability on the prediction results. The normalization method is:
[0078] (1),
[0079] In the formula, is the deviation value, which is 0.085. and are the maximum and minimum values in the original data sequence.
[0080] Step 2: Initialize the parameters of the clustering and adaptive mutation operator based spectral optimization algorithm (CALSO) and the LSSVM honeypot resource load prediction model: Set the population size , maximum number of iterations , convergence error , the number of subpopulation divisions , explore the probability factor , probability compensation , determine the direction vector of the initial light , the normal direction vector of the internal and external refracted light and , the normal direction vector of the internal reflection ray ; Set the regularization parameters of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights Value range, create a three-dimensional matrix X = [ c , s , oh ] As the position of the light.
[0081] Step 3: Establish the LSSVM honeypot resource load prediction model by learning the training samples: , represents the training resource load prediction model, represents the input data of the training sample, represents the output data of the training sample, represents the fitness value of the function, represents the combined kernel function.
[0082] Map the input space to the feature space using a nonlinear function ,The form of the LSSVM honeypot resource load prediction model is as follows:
[0083] (2),
[0084] In the formula, is a nonlinear mapping function; is the weight vector value; express The transpose of is the bias term.
[0085] Based on the principle of high-dimensional space transformation and structured risk minimization, the resource consumption evaluation problem is converted into an optimization problem, which can be transformed into the following constrained optimization problem:
[0086] (3),
[0087] In the formula, represents the objective function, is a regularization parameter used to determine the trade-off between the complexity and accuracy of the LSSVM honeypot resource load prediction model. represents the input sample, Expression The constraints of Represents the regression error between the actual and predicted values of the output.
[0088] To solve the above constrained optimization problem, the corresponding Lagrangian function is constructed :
[0089] L ( oh l , b , e , a ) = J ( oh l , e ) − ∑ k = 1 N a k [ oh l T f ( x ) + b + e k − y k ] (4),
[0090] In the formula, is the Lagrange multiplier.
[0091] Optimize conditional orders through KKT , , , , by eliminating and , these four nonlinear problems are simplified to:
[0092] [ 0 E T E Oh+ 1 c E ] [ b a ] = [ 0 y ] (5),
[0093] In the formula, a = [ a 1 , a 2 ,..., a k ] T , y = [ y 1 , y 2 ,..., y k ] T , represents the predicted value, E = [ 1 , 1 ,..., 1 ] T , is the identity matrix, , is the kernel function matrix, .
[0094] The kernel function is used to reduce the complexity of high-dimensional space calculations, and the weighted combination kernel function is used to deal with complex and diverse network attacks in the power system. The polynomial kernel function and the Gaussian kernel function are weighted to take into account the advantages of different kernel functions, so that the resource consumption prediction model can be based on Quickly predict the honeypot resource usage, the weighted combination kernel function is as follows:
[0095] (6),
[0096] In the formula, represents the Gaussian kernel function; k poly ( x , x k ) = [ ( x ⋅ x k ) + 1 ] d represents the polynomial kernel function, and represents the input sample, represents the order of the polynomial; represents the kernel weight parameter, Yes Control The upper bound constant is taken as 100.
[0097] Through the optimization of the weighted combination kernel function, the LSSVM honeypot resource load prediction model is finally expressed as:
[0098] (7),
[0099] In the formula, represents the Lagrange multiplier of the model, represents the bias term, which is determined by formula (5).
[0100] Step 4: Use the test sample as The predicted value of the test sample is obtained in each round of iteration. , Represents the test resource load prediction model, Represents the input value of the test sample, and then calculates the fitness value of each round of iterative light.
[0101] The test sample As the input of the model, the predicted value of the test sample is obtained in each round of iteration , and then calculate the fitness function value of each round of iterative light:
[0102] (8),
[0103] In the formula, represents the evaluation function; Indicates the number of training samples collected; Represents real resource usage data; Represents the resource usage data predicted by the LSSVM honeypot resource load prediction model.
[0104] Step 5: Use the spectral optimization algorithm based on clustering and adaptive mutation operator (CALSO) to optimize the regularization parameters in the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights , judge whether the convergence condition is met or whether the maximum number of iterations is reached. If the end condition of the spectral optimization algorithm based on clustering and adaptive mutation operators (CALSO) is not met, continue to iterate; if the end condition of the spectral optimization algorithm based on clustering and adaptive mutation operators (CALSO) is met, input the regularization parameter of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights , complete the optimization of the LSSVM honeypot resource load prediction model.
[0105] In order to shorten the regularization parameter in the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights The specific optimization process of CALSO is as follows:
[0106] Clustering-based subpopulation division: The initial population is divided into subpopulations, select the one with the best fitness value The distance matrix is constructed with the positions of these rays as cluster centers, and the individuals closest to the cluster center are divided into a sub-population. This ensures the dispersion of the population during the search process and prevents the population from falling into a local optimum.
[0107] (9),
[0108] In the formula, Indicates the best Lines and The distance matrix between the rays; Indicates the size of the population; represents the best A ray of light; The first A ray of light; , Indicates rounding up; D indicates dimension.
[0109] The direction of the rainbow spectrum, when the light hits the droplet, the direction vector of the incident light for each subpopulation is calculated as follows:
[0110] (10),
[0111] (11),
[0112] In the formula, is the incident light, For the current overall solution The average value of Represents light location; express The norm of .
[0113] When incident light enters a droplet, the light will be refracted internally , internal reflection and external refraction , their direction vectors are expressed as follows:
[0114] x L 1 ⃗ = 1 k r [ x L 0 ⃗ − x nA ⃗ ( x nA ⃗ ⋅ x L 0 ⃗ )] − x nA ⃗ | 1 − 1 ( k r ) 2 + 1 ( k r ) 2 ( x nA ⃗ ⋅ x L 0 ⃗ ) | 1 2 (12),
[0115] (13),
[0116] x L 3 ⃗ = k r [ x L 2 ⃗ − x nC ⃗ ( x nC ⃗ ⋅ x L 2 ⃗ )] − x nC ⃗ | 1 − ( k r ) 2 + ( k r ) 2 ( x nC ⃗ ⋅ x L 2 ⃗ ) | 1 2 (14),
[0117] In the formula, represents the refractive index, , the refractive index of ultraviolet light , the refractive index of infrared light , RV 1 ∈ [ 0 , 1 ] ; It is in The unit direction vector of the solution randomly selected from the current population at the iteration; It is in The unit direction vector of the current solution at iteration; is the unit direction vector of the global optimal solution with history.
[0118] Generate new colored rays: exploration mechanism. After calculating the direction of the incident light, the light will execute the exploration mechanism to search the entire solution space, according to the probability value randomly generated between 0 and 1. To calculate the candidate solutions for each subpopulation, represents the exploration probability of light, when When , the individual searches under the guidance of the inner refraction light, the outer refraction light and any two individuals; when When , individuals search under the guidance of internal reflection light, external refraction light and any two individuals in the population. The current solution is brought to a farther area in the search space to find a better solution. The new candidate solution will be calculated as:
[0119] (15),
[0120] in, is the newly generated candidate solution, For iteration The current candidate solution at the time. r1, r2, r3, r4 are four solutions randomly selected from the current population. , and is a vector of random numbers generated between [0,1]. . Adaptive control factor ; is a normally distributed random number vector with mean 0 and standard deviation 1; It is the inverse incomplete function of the corresponding value of a; , is the current iteration number, is the maximum number of iterations.
[0121] Color ray scattering: Exploitation mechanism, which helps to scatter light in the direction of the best solution so far, the current solution, and a randomly selected solution from the current population. The subpopulations are merged to scatter light around the current solution, using the area around it to get better results, moving the current solution in the direction of the best solution so far. The mathematical model of scattering around the current solution is as follows:
[0122] when When using the predefined probability An additional step of 1 is performed to update the ray's position for the first stage of scattering:
[0123] (16),
[0124] when When , based on the current best solution and the current solution, the second stage scattering is performed according to formula (17) to update the position of the light:
[0125] (17),
[0126] In other cases, a solution is randomly selected from the population and the current solution is used to perform the last stage of scattering according to equation (18) to complete the position update of the light:
[0127] (18),
[0128] in, It is the best solution so far; , , is a solution randomly selected from the population. , , , , , and is a random number between 0 and 1. same Same meaning; the distance of the current light from the best light so far ,in , and Represent the fitness values of the current solution, the best solution so far, and the worst solution respectively.
[0129] Adaptive mutation operator, the light chooses to mutate with a larger step size or a smaller step size according to its fitness value. When the fitness value of the light is lower than the average fitness value of the population, it mutates with a larger step size and performs a global search; when the fitness value of the light is higher than the average fitness value of the population, it mutates with a smaller step size and performs a local search; the adaptive mutation operator is as follows:
[0130] (19),
[0131] (20),
[0132] In the formula, Indicates The position of the ray at the iteration, Indicates the position of the light after mutation; Indicates the fitness value of light; and Respectively represent the upper and lower bounds of the variable; Indicates the maximum number of iterations; Represents a random number between 0 and 1. Represents an individual fitness level.
[0133] Step 6: Use the optimized LSSVM honeypot resource load prediction model to predict the real-time status and future status trend of the nodes to be deployed and the honeypot load, divide the node evaluation method into a low-load node evaluation method and a high-load node evaluation method, and use these two evaluation methods to evaluate the compatibility between nodes and honeypots in the power system, and finally generate a reasonable honeypot resource deployment plan to dispatch the honeypot to a node with high compatibility.
[0134] Through the optimized LSSVM honeypot resource load prediction model, the honeypot The CPU and memory resource consumption prediction models are and ,The scheduler can deploy honeypot resources by predicting the load consumption. By accurately predicting resource consumption, the possibility of resource overload and competition can be avoided to the greatest extent, ensuring that the honeypot can run stably. The compatibility of the honeypot to be scheduled with the node needs to be determined according to the situation of the node, which can be divided into two situations: low-load node evaluation method and high-load node evaluation method.
[0135] Low-load node evaluation method:
[0136] The resource overflow and competition risks of low-load nodes are low. At this time, the scheduler only needs to ensure the compatibility of the honeypot and the node. This overall scheduling decision method can fully utilize the CPU and memory resources of each node and effectively avoid resource waste. The scheduler will calculate the remaining CPU resources of each load node and remaining memory resources , determine the remaining resource characteristics of each node ; According to the operation time period of the honeypot ,Resource characteristics of honeypot , calculated as follows:
[0137] (twenty one),
[0138] (twenty two),
[0139] In the formula, Indicates the start time of the honeypot operation. Indicates the end time of the honeypot operation.
[0140] According to the resource characteristics of the node and the resource characteristics of the honeypot, the compatibility of resources between the node and the honeypot is calculated. :
[0141] (twenty three),
[0142] In the formula, Indicates the compatibility of resources between nodes and honeypots, The smaller the value, the higher the resource compatibility between the node and the honeypot. The honeypot is deployed on the node with the lowest value.
[0143] High-load node evaluation method:
[0144] As more and more honeypots are deployed on nodes and more and more resources are occupied, the load level continues to increase. At this time, deploying more honeypots means that the volatility of the load will become more complex and the risk of resource competition will be higher. Therefore, for high-load nodes, the scheduler needs to focus on how to deploy honeypot resources to appropriate nodes, minimize the probability of newly deployed honeypots and honeypots already deployed on the node consuming resources at the same time, and minimize the risk of resource competition when resources are limited.
[0145] For each high-load node , the scheduler will call the resource prediction model , and retrieve the load interval between CPU and memory . Calculate the total time interval of all nodes , calculate the honeypot at the node CPU load aggregation function on , the aggregate function of memory load can be calculated similarly :
[0146] (twenty four),
[0147] (25),
[0148] (26),
[0149] In the formula, Indicates the number of honeypots; and Honeypot The predicted value of CPU resource usage and the predicted value of memory resource usage;
[0150] exist At this moment, the CPU load change rate of the deployed honeypot , Memory load change rate and the CPU load change rate of the honeypot waiting to be deployed , Memory load change rate , calculate and deploy honeypot After that, at the node Complementary index of the new load function and :
[0151] α C ( p , i ) = ∫ T p st T p ed [ y C i ' ( t ) + F Cp ' ( t ) ] (27),
[0152] α M ( p , i ) = ∫ T p st T p ed [ y M i ' ( t ) + F Mp ' ( t ) ] (28),
[0153] In the formula, when the complementary index is close to 0, it means that in the time period [ T st , T ed ] In the scheme, the increase of CPU load resources will be compensated by the decrease of memory load resources, or the increase of memory load resources will be compensated by the decrease of CPU load resources. The scheduler looks for the node with the smallest complementary index, and the honeypot will be scheduled to the node with high resource compatibility.
[0154] according to Figure 2 ,By collecting the honeypot resource consumption in the power system as the training set of the LSSVM honeypot resource load prediction model, the CALSO algorithm is used to optimize the model parameters to improve the prediction accuracy and speed of the node and honeypot resources when the prediction model faces dynamic changes in load. The real-time status and future status trend of the nodes and honeypot loads to be deployed are predicted by the optimized LSSVM honeypot resource load prediction model. The node evaluation method is divided into a low-load node evaluation method and a high-load node evaluation method. According to different types of load nodes, different evaluation methods are used to evaluate the compatibility between nodes and honeypots. Finally, the honeypot will be scheduled to the node with high resource compatibility through the scheduler.
[0155] Embodiment 2: This embodiment provides a honeypot trapping resource deployment system, including a preprocessing module, an initialization module, a model building module, a model testing module, a model optimization module, and a honeypot resource deployment module;
[0156] Preprocessing module: used to deploy honeypot resources in the power system, collect data on CPU resource consumption, memory resource consumption and the time of each resource consumption during honeypot operation, and collect N groups of training samples , as the training set of LSSVM honeypot resource load prediction model, represents a series of time points, Indicates CPU or memory resource usage and normalizes the collected data;
[0157] Initialization module: used to initialize the parameters of the spectral optimization algorithm based on clustering and adaptive mutation operators and the LSSVM honeypot resource load prediction model: set the population size , maximum number of iterations , convergence error , the number of subpopulation divisions , explore the probability factor , probability compensation , determine the direction vector of the initial light , the normal direction vector of the internal and external refracted light and , the normal direction vector of the internal reflection ray ; Set the regularization parameters of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights Value range, create a three-dimensional matrix X = [ c , s , oh ] as the position of light;
[0158] Model building module: used to build the LSSVM honeypot resource load prediction model by learning the training samples: , represents the training resource load prediction model, represents the input data of the training sample, represents the output data of the training sample, represents the fitness value of the function, represents the combined kernel function;
[0159] Model testing module: used to take test samples as The predicted value of the test sample is obtained in each round of iteration. , Represents the test resource load prediction model, Represents the input value of the test sample, and then calculates the fitness value of each round of iterative light;
[0160] Model optimization module: Optimize the regularization parameters in the LSSVM honeypot resource load prediction model using a spectral optimization algorithm based on clustering and adaptive mutation operators , Gaussian kernel function parameters and kernel weights , judge whether the convergence conditions are met or whether the maximum number of iterations is reached. If the end conditions of the spectral optimization algorithm based on clustering and adaptive mutation operators are not met, continue to iterate; if the end conditions of the spectral optimization algorithm based on clustering and adaptive mutation operators are met, input the regularization parameter of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights , complete the optimization of LSSVM honeypot resource load prediction model;
[0161] Honeypot resource deployment module: The optimized LSSVM honeypot resource load prediction model is used to predict the real-time status and future status trend of the nodes to be deployed and the honeypot load, and the node evaluation method is divided into a low-load node evaluation method and a high-load node evaluation method. These two evaluation methods are used to evaluate the compatibility between nodes and honeypots in the power system, and finally a reasonable honeypot resource deployment plan is generated to dispatch the honeypot to the node with high compatibility.
[0162] The above only expresses the preferred embodiments of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that for ordinary technicians in this field, several modifications, improvements and substitutions can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be based on the attached claims.
Claims
1. A honeypot trapping resource deployment method, characterized in that: The following steps are involved: Step 1: Deploy honeypot resources in the power system, collect data on CPU resource consumption, memory resource consumption, and the time of each resource consumption during honeypot operation, and collect N sets of training samples , as the training set of LSSVM honeypot resource load prediction model, represents a series of time points, Indicates CPU or memory resource usage and normalizes the collected data; Step 2: Initialize the parameters of the spectral optimization algorithm based on clustering and adaptive mutation operators and the LSSVM honeypot resource load prediction model: Set the population size , maximum number of iterations , convergence error , the number of subpopulation divisions , explore the probability factor , probability compensation , determine the direction vector of the initial light , the normal direction vector of the internal and external refracted light and , the normal direction vector of the internal reflection ray ; Setting the regularization parameters of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights Value range, create a three-dimensional matrix as the position of light; Step 3: Establish the LSSVM honeypot resource load prediction model by learning the training samples: , represents the training resource load prediction model, represents the input data of the training sample, represents the output data of the training sample, represents the fitness value of the function, represents the combined kernel function; Step 4: Use the test sample as The predicted value of the test sample is obtained in each round of iteration. , Represents the test resource load prediction model, Represents the input value of the test sample, and then calculates the fitness value of each round of iterative light; Step 5: Use the spectral optimization algorithm based on clustering and adaptive mutation operators to optimize the regularization parameters in the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights , judge whether the convergence conditions are met or whether the maximum number of iterations is reached. If the end conditions of the spectral optimization algorithm based on clustering and adaptive mutation operators are not met, continue to iterate; if the end conditions of the spectral optimization algorithm based on clustering and adaptive mutation operators are met, input the regularization parameter of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights , complete the optimization of LSSVM honeypot resource load prediction model; Step 6: Use the optimized LSSVM honeypot resource load prediction model to predict the real-time status and future status trend of the nodes to be deployed and the honeypot load, divide the node evaluation method into a low-load node evaluation method and a high-load node evaluation method, and use these two evaluation methods to evaluate the compatibility between nodes and honeypots in the power system, and finally generate a reasonable honeypot resource deployment plan to dispatch the honeypot to a node with high compatibility.
2. A honeypot trapping resource deployment method according to claim 1, characterized in that: Step 1 specifically includes: For the original training set Perform normalization processing, normalization processing method: (1), In the formula, is the deviation value, and are the maximum and minimum values in the original data sequence.
3. A honeypot trapping resource deployment method according to claim 1, characterized in that: Step three specifically includes: The LSSVM honeypot resource load prediction model is expressed as: Map the input space to the feature space using a nonlinear function ,The form of LSSVM honeypot resource load prediction model is as follows: (2), In the formula, is a nonlinear mapping function; is the weight vector value; express The transpose of is the bias term; Based on the principle of high-dimensional space transformation and structured risk minimization, the resource consumption evaluation problem is transformed into a constrained optimization problem. The constrained optimization problem is as follows: (3), In the formula, represents the objective function, is a regularization parameter used to determine the trade-off between the complexity and accuracy of the LSSVM honeypot resource load prediction model. represents the input sample, Expression The constraints of Represents the regression error between the actual value and the predicted value of the output; Construct the corresponding Lagrangian function , solve the constrained optimization problem and simplify the nonlinear problem through KKT optimization conditions; The kernel function is used to reduce the complexity of high-dimensional space calculations, and a weighted combination kernel function is used to deal with complex and diverse network attacks in the power system. The polynomial kernel function and the Gaussian kernel function are weighted to take into account the advantages of different kernel functions. The weighted combination kernel function is as follows: (6), In the formula, represents the Gaussian kernel function; represents the polynomial kernel function, and represents the input sample, represents the order of the polynomial; represents the kernel weight parameter, Yes Control The constant of the upper bound; Through the optimization of the weighted combination kernel function, the LSSVM honeypot resource load prediction model is finally expressed as: (7), In the formula, represents the Lagrange multiplier of the model; Represents the bias term.
4. A honeypot trapping resource deployment method according to claim 1, characterized in that: Step 4 specifically includes: The test sample As the input of the model, the predicted value of the test sample is obtained in each round of iteration , and then calculate the fitness value of each round of iteration light: (8), In the formula, represents the evaluation function; Indicates the number of training samples collected; Represents real resource usage data; Represents the resource usage data predicted by the LSSVM honeypot resource load prediction model.
5. A honeypot trapping resource deployment method according to claim 1, characterized in that: Step 5 specifically includes: using a spectral optimization algorithm based on clustering and adaptive mutation operators to optimize the regularization parameters in the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights , the optimization process is as follows: Clustering-based subpopulation division: The initial population is divided into subpopulations, select the one with the best fitness value Lines are drawn, and the distance matrix is constructed with the positions of these lines as cluster centers, and the individuals closest to the cluster centers are divided into a subpopulation: (9), In the formula, Indicates the best Lines and The distance matrix between the rays; Indicates the size of the population; represents the best A ray of light; The first A ray of light; , Indicates rounding up; D indicates dimension; The direction of the rainbow spectrum, when the light hits the droplet, the direction vector of the incident light is calculated for each subpopulation; when the incident light enters the droplet, the light will undergo internal refraction, internal reflection, and external refraction; generate new color rays: exploration mechanism, after calculating the direction of the incident light, the light will execute the exploration mechanism to search the entire solution space; color ray scattering: development mechanism, the development mechanism scatters the light in the direction of the best solution so far, the current solution, and the solution randomly selected from the current population, merges the subpopulations, scatters the light around the current solution, and uses the area around it to obtain better results, so that the current solution moves in the direction of the best solution so far; Adaptive mutation operator, the light chooses to mutate with a larger step size or a smaller step size according to its fitness value. When the fitness value of the light is lower than the average fitness value of the population, it mutates with a larger step size and performs a global search; when the fitness value of the light is higher than the average fitness value of the population, it mutates with a smaller step size and performs a local search; the adaptive mutation operator is as follows: (19), (20), In the formula, Indicates The position of the ray at the iteration, Indicates the position of the light after mutation; Indicates the fitness value of light; and Respectively represent the upper and lower bounds of the variable; Indicates the maximum number of iterations; Represents a random number between 0 and 1. Represents an individual fitness level.
6. A honeypot trapping resource deployment method according to claim 1 or 3, characterized in that: Step 6 specifically includes: using the optimized LSSVM honeypot resource load prediction model to predict the real-time status and future status trend of the nodes to be deployed and the honeypot load: Through the optimized LSSVM honeypot resource load prediction model, the honeypot The CPU and memory resource consumption prediction models are and ,The scheduler deploys honeypot resources through the load consumption prediction; the compatibility of the honeypot to be scheduled and the node depends on the situation of the node, which can be divided into two cases: low-load node evaluation method and high-load node evaluation method; Low-load node evaluation method: For low-load nodes, the scheduler only needs to ensure the compatibility of the honeypot and the node; this overall scheduling decision method fully utilizes the CPU and memory resources of each node; for each node with different loads The scheduler will calculate the remaining CPU resources of each load node and remaining memory resources , determine the remaining resource characteristics of each node ; According to the operation time period of the honeypot ,Resource characteristics of honeypot , calculated as follows: (21), (22), In the formula, Indicates the start time of the honeypot operation. Indicates the end time of the honeypot operation; According to the resource characteristics of the node and the resource characteristics of the honeypot, the compatibility of resources between the node and the honeypot is calculated. : (23), In the formula, Indicates the compatibility of resources between nodes and honeypots, The smaller the value, the higher the resource compatibility between the node and the honeypot. Deploy the honeypot on the node with the lowest value; High-load node evaluation method: For high-load nodes, the scheduler focuses on how to deploy honeypot resources to appropriate nodes, minimize the probability of newly deployed honeypots and honeypots already deployed on the nodes consuming resources at the same time, and minimize the risk of resource competition when resources are limited; For each high-load node , the scheduler will call the resource prediction model , and retrieve the load interval between CPU and memory ; Calculate the total time interval of all nodes , calculate the honeypot at the node CPU load aggregation function on , calculate the aggregate function of memory load : (24), (25), (26), In the formula, Indicates the number of honeypots; and Honeypot The predicted value of CPU resource usage and the predicted value of memory resource usage; exist At this moment, the CPU load change rate of the deployed honeypot , Memory load change rate and the CPU load change rate of the honeypot waiting to be deployed , Memory load change rate , calculate and deploy honeypot After that, at the node Complementary index of the new load function and : (27), (28), In the formula, when the complementary index is close to 0, it means that in the time period In the scheme, the increase of CPU load resources will be compensated by the decrease of memory load resources, or the increase of memory load resources will be compensated by the decrease of CPU load resources. The scheduler looks for the node with the smallest complementary index, and the honeypot will be scheduled to the node with high resource compatibility.
7. A honeypot trapping resource deployment system, used to implement the honeypot trapping resource deployment method according to any one of claims 1 to 6, characterized in that: It includes preprocessing module, initialization module, model building module, model testing module, model optimization module and honeypot resource deployment module; Preprocessing module: used to deploy honeypot resources in the power system, collect data on CPU resource consumption, memory resource consumption and the time of each resource consumption during honeypot operation, and collect N groups of training samples , as the training set of LSSVM honeypot resource load prediction model, represents a series of time points, Indicates CPU or memory resource usage and normalizes the collected data; Initialization module: used to initialize the parameters of the spectral optimization algorithm based on clustering and adaptive mutation operators and the LSSVM honeypot resource load prediction model: set the population size , maximum number of iterations , convergence error , the number of subpopulation divisions , explore the probability factor , probability compensation , determine the direction vector of the initial light , the normal direction vector of the internal and external refracted light and , the normal direction vector of the internal reflection ray ; Set the regularization parameters of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights Value range, create a three-dimensional matrix as the position of light; Model building module: used to build the LSSVM honeypot resource load prediction model by learning the training samples: , represents the training resource load prediction model, represents the input data of the training sample, represents the output data of the training sample, represents the fitness value of the function, represents the combined kernel function; Model testing module: used to take test samples as The predicted value of the test sample is obtained in each round of iteration. , Represents the test resource load prediction model, Represents the input value of the test sample, and then calculates the fitness value of each round of iterative light; Model optimization module: Optimize the regularization parameters in the LSSVM honeypot resource load prediction model using a spectral optimization algorithm based on clustering and adaptive mutation operators , Gaussian kernel function parameters and kernel weights , judge whether the convergence conditions are met or whether the maximum number of iterations is reached. If the end conditions of the spectral optimization algorithm based on clustering and adaptive mutation operators are not met, continue to iterate; if the end conditions of the spectral optimization algorithm based on clustering and adaptive mutation operators are met, input the regularization parameter of the LSSVM honeypot resource load prediction model , Gaussian kernel function parameters and kernel weights , complete the optimization of LSSVM honeypot resource load prediction model; Honeypot resource deployment module: The optimized LSSVM honeypot resource load prediction model is used to predict the real-time status and future status trend of the nodes to be deployed and the honeypot load, and the node evaluation method is divided into a low-load node evaluation method and a high-load node evaluation method. These two evaluation methods are used to evaluate the compatibility between nodes and honeypots in the power system, and finally a reasonable honeypot resource deployment plan is generated to dispatch the honeypot to the node with high compatibility.
