A network anomaly warning method combining generalized network temperature and deep learning
By combining generalized network temperature and deep learning technology, defining the network congestion state and using Bi-GRU and Stacking models, the problem of insufficient real-time and interpretability of network abnormal warning in the existing technology is solved, and high-precision network attacks are achieved Early warning.
Patent Information
- Application Number
- CN202210748100.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-06-29
AI Technical Summary
The existing network abnormality warning technology cannot meet the problems of high real-time, strong interpretability and high warning accuracy at the same time.
Using a method of combining generalized network temperature with deep learning, the generalized network temperature and specific heat capacity are calculated by defining the network congestion state, and combining Bi-GRU model and Stacking model to construct a network attack probability function to realize real-time prediction and early warning of network traffic characteristics. .
It improves the real-time and interpretability of network abnormal warnings, enhances the warning accuracy, and can identify network attacks more accurately and intuitively, reducing false alarm rates.
Smart Images

Figure CN115150146B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network security technology, and in particular to a network anomaly early warning method combining generalized network temperature and deep learning. Background Art
[0002] In recent years, the number of network access devices and traffic have increased exponentially. Manufacturing, finance, medical care, transportation and other fields have also achieved deep information integration based on the network. However, the resulting security incidents have also increased dramatically. Whether the network is "safe and reliable" has become the primary concern of users. Intrusion detection technology is committed to discovering abnormal behaviors that are occurring in the network, while early warning technology is committed to discovering abnormal behaviors that are about to occur in the network with a high probability. The ultimate goal of network security technology is to prevent problems before they occur, and intrusion detection technology is relatively mature. At this time, the boundaries of network security should be extended on its basis. The research on network anomaly early warning methods is highly consistent with the development direction of network security technology.
[0003] Network anomaly warning and related technologies are a key link in the network security system. In recent years, scholars have conducted extensive research on network anomaly warning methods. There are three types of network anomaly warning methods: 1) multi-step attack prediction based on knowledge reasoning and intent recognition; 2) network security situation prediction based on extrapolation of mathematical model calculations; 3) prediction of network traffic characteristics based on machine learning methods and thus achieve warning.
[0004] In the first type of early warning technology, the object of modeling is the alarm information fed back by the intrusion detection system (IDS). This type of technology equates the alarm frequency with the attack probability and infers the most likely next action of the attacker; or uses the alarm information to abstract each step of the DDOS attack into a hidden state, thereby realizing multi-step attack prediction. In the second type of early warning technology, the object of modeling is the network security situation obtained by abstraction. The network security situation abstraction methods include hierarchical analysis method, coarse-grained method or building a network security situation assessment indicator system. Commonly used prediction methods include gray prediction method, moving average method, neural network, etc. In the third type of early warning technology, the object of modeling is the numerical value of network traffic characteristics. This type of method obtains spatiotemporal characteristics through deep learning methods. Commonly used deep learning methods include CNN neural network, RNN neural network, LSTM neural network, etc.
[0005] However, the above three types of warning methods each have some limitations and problems, such as: 1) Relying on knowledge reasoning and intent recognition for multi-step attack prediction can describe the attack steps, but building the attack graph and selecting the reasoning process takes a lot of time and has poor real-time performance; 2) Extrapolating the network security situation can improve the accuracy but cannot describe the state of the network, resulting in poor interpretability; 3) The alarm information of the intrusion detection system itself has a certain false alarm rate, and the error will further accumulate in the model, resulting in a decrease in the alarm rate. Summary of the invention
[0006] In view of the limitations of the above-mentioned warning methods, the present invention provides a network anomaly warning method that combines generalized network temperature with deep learning to solve the problem that existing network anomaly warning technologies cannot simultaneously meet the requirements of high real-time performance, strong interpretability and high warning accuracy.
[0007] To achieve the above purpose, the specific technical solution of the present invention is as follows: A network anomaly early warning method combining generalized network temperature and deep learning, comprising the following steps:
[0008] 1) Define network congestion status, which includes: S0, S1, S2, and S3; S0 corresponds to a normal state, S1 corresponds to a light congestion state, S2 corresponds to a moderate congestion state, and S3 corresponds to a heavy congestion state;
[0009] 2) Use tool software to obtain the numerical value of network flow characteristics, which include: the number of links |E|, the number of data packets k, the change of Shannon entropy ΔH, the total length of data packets per unit time ∑L, and the change of the average packet length of a single data packet per unit time ΔP L ;
[0010] 3) Calculate the generalized network temperature PL_GNT, the calculation formula is as follows:
[0011]
[0012] 4) Calculate the network specific heat capacity NHC, the calculation formula is as follows:
[0013]
[0014] Where ΔT G represents the change of PL_GNT, Δk represents the change of data packets per unit time;
[0015] 5) Initially divide the network congestion state S;
[0016] 6) Define the threshold range of NHC as: in, is the mean value of NHC, and the calculation formula is as follows:
[0017]
[0018] σ is the variance of NHC, calculated as follows:
[0019]
[0020] Among them, i represents the maximum number of data, j∈[1,i];
[0021] 7) Secondary division of congestion status;
[0022] 8) Predict network feature values and network congestion status;
[0023] 9) Construct network attack probability function P Attack (t), the formula is as follows:
[0024] P Attack (t) = P State (t)+P Average (t,timestamp)
[0025] Among them, P State (t) is the attack probability mapped to the congestion state at the current moment, P Average (t,timestamp) is the average attack probability in a given time period;
[0026] 10) Connect the Bi-GRU model and the Stacking model to predict and calculate m network feature values and corresponding congestion states;
[0027] 11) Carry out network attack warning, where the warning condition is: when the traffic at a certain moment meets P State (t)≥2 and P Attack When (t)≥80%, it is considered that a network attack has occurred at that moment and an alarm is issued to the user.
[0028] Furthermore, in the above step 4), Δk and ΔT G The calculation method is as follows:
[0029] 4.1) Construct sliding windows S1 and S2, with an initial length of i1=1 for S1 and i2=1 for S2, and start sliding from time t=1;
[0030] 4.2) Calculate the mean of PL_GNT in the S1 window at time t With variance The mean value of the number of packets k in the S2 window With variance
[0031] The mean of PL_GNT in the S1 window The calculation formula is as follows:
[0032]
[0033] Variance of PL_GNT within the S1 window The calculation formula is as follows:
[0034]
[0035] The mean value of the number of packets k in the S2 window The calculation formula is as follows:
[0036]
[0037] The variance of the number of packets k in the S2 window The calculation formula is as follows:
[0038]
[0039] 4.3) Calculate ΔT at time t G with Δk, ΔT G The calculation formula is as follows:
[0040]
[0041] The calculation formula of Δk is as follows:
[0042]
[0043] 4.4) Adjust the length i1 of the sliding window S1. The adjustment method is as follows:
[0044]
[0045] 4.5) Adjust the length i2 of the sliding window S2. The adjustment method is as follows:
[0046]
[0047] 4.6) When t<=t max When t=t+1, go to step 4.2), otherwise go to step 5).
[0048] Furthermore, the method for initially dividing the network congestion state S in the above step 5) is: using the open source K-means algorithm to cluster the numerical distribution of PL_GNT into four categories from low to high, corresponding to the four network congestion states S0 to S3 respectively.
[0049] Furthermore, the method of performing secondary division of the congestion state in step 7) is as follows: when NHC i When the threshold is exceeded and the value changes downward, the congestion state is downgraded by one level S=S k-1If S = S0 at this time, the congestion state does not need to be lowered; when NHC i When the threshold is exceeded and the traffic flow jumps upward, the congestion status is raised by one level S=S k+1 If S = S3 at this time, the congestion state does not need to be adjusted upward; when NHC i When the traffic is within the threshold range, the congestion state remains unchanged, S = S k .
[0050] Furthermore, the above step 8) predicting the network characteristic value and the network congestion state includes the following steps:
[0051] 8.1) Manually screen m network features through feature selection;
[0052] 8.2) Select the open source Bi-GRU model, input the time series information of the data learning features, and output the numerical prediction results of the network feature group;
[0053] 8.3) Construct a Stacking model to learn the spatial information of features and describe the mapping relationship between the network feature group value and the network congestion state from the perspective of the model. Six-fold cross entropy validation is used during model construction.
[0054] Compared with the prior art, the present invention improves real-time performance by directly numerically modeling traffic characteristics; uses a new network feature PL_GNT to divide and analyze the state of network congestion caused by DDoS attacks, thereby improving interpretability; uses a deep learning model and constructs an attack probability function, thereby improving warning accuracy and achieving abnormal warning more accurately and intuitively. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 It is a flow chart of the network anomaly warning method based on generalized network temperature and deep learning. DETAILED DESCRIPTION
[0056] The present invention will be described in detail below in conjunction with the various embodiments shown in the accompanying drawings, but these embodiments do not limit the present invention. Structural, methodological, or functional changes made by ordinary technicians in the field based on these embodiments are all included in the protection scope of the present invention.
[0057] like Figure 1 As shown, the network anomaly early warning method based on generalized network temperature and deep learning of the present invention includes the following steps:
[0058] 1) Define the network congestion state. Refer to GB / T 20984-2007 Network Information Security Assessment Specification, and analogize the classification method of network security state to define network congestion as four states: S0 to S3. S0 to S3 correspond to normal state, light congestion state, moderate congestion state, and heavy congestion state, respectively. When the network state is in congestion state S3, it is considered that a DDoS attack has occurred and the network is severely congested.
[0059] 2) Use the tool software to obtain the numerical value of network flow characteristics and input them into the algorithm. The network flow characteristics include: the number of links |E|, the number of data packets k, the change of Shannon entropy ΔH, the total length of data packets per unit time ∑L, and the change of the average packet length of a single data packet per unit time ΔP L In a specific embodiment of the present invention, the tool software is IDS, Wireshark and other software.
[0060] 3) Calculate the generalized network temperature PL_GNT, the calculation formula is as follows:
[0061]
[0062] 4) Calculate the network specific heat capacity NHC, the calculation formula is as follows:
[0063]
[0064] Where ΔT G represents the change in PL_GNT, and Δk represents the change in data packets per unit time.
[0065] As a preferred embodiment of the present invention, Δk and ΔT G The calculation method is as follows:
[0066] 4.1) Construct sliding windows S1 and S2, with an initial length of i1=1 for S1 and i2=1 for S2, and start sliding from time t=1;
[0067] 4.2) Calculate the mean of PL_GNT in the S1 window at time t With variance The mean value of the number of packets k in the S2 window With variance
[0068] The mean of PL_GNT in the S1 window The calculation formula is as follows:
[0069]
[0070] Variance of PL_GNT within the S1 window The calculation formula is as follows:
[0071]
[0072] The mean value of the number of packets k in the S2 window The calculation formula is as follows:
[0073]
[0074] The variance of the number of packets k in the S2 window The calculation formula is as follows:
[0075]
[0076] 4.3) Calculate ΔT at time t G with Δk, ΔT G The calculation formula is as follows:
[0077]
[0078] The calculation formula of Δk is as follows:
[0079]
[0080] 4.4) Adjust the length i1 of the sliding window S1. The adjustment method is as follows:
[0081]
[0082] 4.5) Adjust the length i2 of the sliding window S2. The adjustment method is as follows:
[0083]
[0084] 4.6) When t<=t max When t=t+1, go to step 4.2), otherwise go to step 5).
[0085] 5) Initially divide the network congestion state S and divide the four defined network congestion states into states.
[0086] As a preferred embodiment of the present invention, the open source K-means method is selected to cluster the numerical distribution of PL_GNT, and the number of categories corresponds to the number of states. In the clustering process, the values of PL_GNT are clustered into four categories from low to high, corresponding to the four network congestion states S0 to S3, and the preliminary division results are obtained.
[0087] 6) Define the threshold range of NHC as: in, is the mean value of NHC, and the calculation formula is as follows:
[0088]
[0089] σ is the variance of NHC, calculated as follows:
[0090]
[0091] Among them, i represents the maximum number of data, j∈[1,i];
[0092] 7) When NHC i When the threshold is exceeded and the value changes downward, the congestion state is downgraded by one level S=S k-1 If S = S0 at this time, the congestion state does not need to be lowered; when NHC i When the threshold is exceeded and the traffic flow jumps upward, the congestion status is raised by one level S=S k+1 If S = S3 at this time, the congestion state does not need to be adjusted upward; when NHC i When the traffic is within the threshold range, the congestion state remains unchanged, S = S k .
[0093] 8) Predicting network characteristic values and network congestion status. As a preferred embodiment of the present invention, the following steps are included:
[0094] 8.1) Manually screen m network features through feature selection. In the specific embodiment of the present invention, 8 network features are selected: Bwd_Packet_Length_Std, Flow_Duration, PL_GNT, Init_Win_Bytes_Forward, Idle_Mean, Packet_Length_Mean, Subflow_Fwd_Bytes, Shannon_Entropy.
[0095] (8.2) Select the open source Bi-GRU model, input the temporal information of the data learning features, and output the numerical prediction results of the network feature group.
[0096] (8.3) A stacking model is constructed to learn the spatial information of features and describe the mapping relationship between the network feature group values and the network congestion status from the perspective of the model. Six-fold cross entropy validation is used during model construction.
[0097] As a preferred embodiment of the present invention, constructing the Stacking model in step (8.3) includes the following steps:
[0098] (8.3.1) Random forest, LightGBM and deep neural network (DNN) were selected as base learners, and multivariate linear ridge regression model was used as meta-learner;
[0099] (8.3.2) During the training process of each base learner, the 6-fold cross-entropy validation method was used to construct new training sets and test sets.
[0100] (8.3.3) In the 6-fold cross entropy validation, the original training set is divided into 6 sub-datasets of equal number, each of which is independent and cannot overlap.
[0101] (8.3.4) For a single base learner, 5 sub-datasets are used as sub-training sets and the remaining one is used as a sub-test set to model them separately. Each sub-model can output the prediction results of 1 / 6 of the original training set through the sub-test set. The 6 groups are concatenated in sequence to obtain the new training set constructed by the first base learner.
[0102] (8.3.5) In the process of establishing the above six sub-models, each sub-model predicts the original test set respectively, and finally six groups of prediction results can be obtained. The average of the six groups of results is taken to obtain the new test set constructed by the first base learner.
[0103] (8.3.6) Use the second base learner and repeat steps (8.3.1) to (8.3.5). After completion, all new training sets and test sets are obtained.
[0104] (8.3.7) The newly constructed training set and test set are input into the second layer to establish a meta-learner model. After the training is completed, the congestion status results predicted by the model are output.
[0105] (9) Constructing the network attack probability function P Attack (t), which consists of two parts, and the formula is as follows:
[0106] P Attack (t) = P State (t)+P Average (t,timestamp)
[0107] Among them, P State (t) is the attack probability mapped to the congestion state at the current moment, P Average (t, timestamp) is the average attack probability in a given time period.
[0108] P State (t) Congestion states S0-S3 are mapped to attack probability values N0-N3, respectively, where State represents the congestion state at the current moment; in a specific embodiment of the present invention, the values of N0-N3 are 0, 0.1, 0.3, and 0.5, and the calculation formula is as follows:
[0109]
[0110] P Average(t, timestamp) takes a time period with a step length of timestamp, and calculates the average attack probability in the time period to obtain the average attack probability. In the specific embodiment of the present invention, the timestamp value is 10, and its calculation formula is as follows:
[0111]
[0112] When a sustained attack occurs, P Average The peak value of (t, timestamp) is 0.5, P State The peak value of (t) is also 0.5, and the sum of the two is 1.
[0113] (10) The Bi-GRU model is connected to the Stacking model to predict the eight network feature values and the corresponding congestion status and calculate the attack probability.
[0114] (11) Design a combination of conditions based on the attack probability function and congestion status to implement the early warning function. State (t)≥2 and P Attack When (t)≥80%, it is considered that a network attack has occurred at that moment and an alarm is issued to the user.
Claims
1. A network anomaly warning method combining generalized network temperature and deep learning, characterized in that: The steps include: 1) Define network congestion status, which includes: S0, S1, S2, and S3; S0 corresponds to a normal state, S1 corresponds to a light congestion state, S2 corresponds to a moderate congestion state, and S3 corresponds to a heavy congestion state; 2) Use tool software to obtain the numerical value of network flow characteristics, which include: the number of links |E|, the number of data packets k, the change of Shannon entropy ΔH, the total length of data packets per unit time ∑L, and the change of the average packet length of a single data packet per unit time ΔP L ; 3) Calculate the generalized network temperature PL_GNT, the calculation formula is as follows: 4) Calculate the network specific heat capacity NHC, the calculation formula is as follows: Where ΔT G represents the change of PL_GNT, Δk represents the change of data packets per unit time; 5) Initially divide the network congestion state S; The method of initially dividing the network congestion state S in step 5) is: using the open source K-means algorithm to cluster the numerical distribution of PL_GNT into four categories from low to high, corresponding to the four network congestion states S0 to S3 respectively; 6) Define the threshold range of NHC as: is the mean value of NHC, and the calculation formula is as follows: σ is the variance of NHC, and its calculation formula is as follows: Among them, i represents the maximum number of data, j∈[1,i]; 7) Secondary division of congestion status; The method of performing secondary division of the congestion state in step 7) is: when NHC i When the threshold is exceeded and the value changes downward, the congestion state is downgraded by one level S=S k-1 If S = S0 at this time, the congestion state does not need to be lowered; when NHC i When the threshold is exceeded and the traffic flow jumps upward, the congestion status is raised by one level S=S k+1 If S = S3 at this time, the congestion state does not need to be adjusted upward; when NHC i When the traffic is within the threshold range, the congestion state remains unchanged, S = S k ; 8) Predict network feature values and network congestion status; 9) Construct network attack probability function P Attack (t), the formula is as follows: P Attack (t)=P State (t)+P Average (t,timestamp) P State (t) is the attack probability mapped to the congestion state at the current moment, P Average (t,timestamp) is the average attack probability in a given time period; 10) Connect the Bi-GRU model and the Stacking model to predict and calculate m network feature values and corresponding congestion states; 11) Perform network attack warning, the network attack warning condition is: when the traffic at a certain moment meets P State (t)≥2 and P Attack When (t) ≥ 80%, it is considered that a network attack has occurred at that moment and an alarm is issued to the user.
2. The network anomaly early warning method combining generalized network temperature and deep learning as claimed in claim 1 is characterized in that: In step 4), Δk and ΔT G The calculation method is as follows: 4.1) Construct sliding windows S1 and S2, with an initial length of i1=1 for S1 and i2=1 for S2, and start sliding from time t=1; 4.2) Calculate the mean of PL_GNT in the S1 window at time t With variance The mean value of the number of packets k in the S2 window With variance Among them, the mean value of PL_GNT in the S1 window The calculation formula is as follows: Variance of PL_GNT within the S1 window The calculation formula is as follows: The mean value of the number of packets k in the S2 window The calculation formula is as follows: The variance of the number of packets k in the S2 window The calculation formula is as follows: 4.3) Calculate ΔT at time t G and Δk, where ΔT G The calculation formula is as follows: The calculation formula of Δk is as follows: 4.4) Adjust the length i1 of the sliding window S1. The adjustment method is as follows: 4.5) Adjust the length i2 of the sliding window S2. The adjustment method is as follows: 4.6) When t<=t max When t=t+1, go to step 4.2), otherwise go to step 5).
3. The network anomaly early warning method combining generalized network temperature and deep learning as claimed in claim 1 is characterized in that: The step 8) predicting network characteristic values and network congestion status comprises the following steps: 8.1) Manually screen m network features through feature selection; 8.2) Select the open source Bi-GRU model, input the time series information of the data learning features, and output the numerical prediction results of the network feature group; 8.3) A Stacking model is constructed to learn the spatial information of features, and the mapping relationship between the network feature group values and the network congestion status is described from the perspective of the model. Six-fold cross entropy validation is used during the model construction process.
