Network anomaly detection method, system, terminal and medium based on traffic prediction
By combining the time series modeling method of long-period and short-period prediction models, it solves the detection problem of long-term change trends and periodic effects in network traffic, achieves network traffic prediction with minute-level accuracy, and improves the accuracy and real-time performance of detection. .
Patent Information
- Application Number
- CN202411052297.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-08-02
AI Technical Summary
It is difficult for existing technologies to effectively handle the long-term changing trends and periodic effects of network traffic in network anomaly detection, resulting in insufficient model accuracy and high consumption of computing resources, making it impossible to achieve real-time predictions with minute-level accuracy.
By combining the time series modeling method of long-period prediction model and short-period prediction model, minute-level traffic data is obtained, data sequences of different fixed periods and consecutive minutes are extracted, and machine learning algorithms are used for weighted average processing to generate long-period and short-period Prediction model to achieve minute-level accuracy prediction of network traffic and update the model in real time.
It achieves network traffic prediction with minute-level accuracy, can detect abnormal levels of network traffic in a timely manner, reduces the randomness effect of single-point data, improves the reliability and accuracy of the prediction model, and is suitable for rolling real-time updates.
Smart Images

Figure CN118573591B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network detection technology, and more specifically, to a network anomaly detection method, system, terminal and medium based on traffic prediction. Background Art
[0002] Among the many methods of network anomaly detection, the method of judging whether the data at the current time point is abnormal based on the change trend of historical data is a very effective method, which can be used for network operation and maintenance and security operation and maintenance. This method is often called the baseline method or the time series prediction method. Its basic principle is that network traffic often has a periodic change trend. By learning from historical data, a model of the change trend can be discovered, and the actual traffic can be compared with the predicted value of the model. If the degree of deviation exceeds the acceptable range, there is reason to believe that the network at that time point is abnormal.
[0003] Network traffic has random fluctuations and long-term trends, such as traffic gradually increasing, and there are also periodic trends, such as the high and low fluctuations of traffic on the same day of the day or week are similar. This long-term trend and periodicity require that the sample size of the sampled data is relatively large when modeling, such as minute-level accuracy, 5 weeks of data, a total sample size of 50,400, and a seasonal effect period of 1440. For large sample sizes and long seasonal periods, machine learning algorithms such as time series effect decomposition or autoregressive moving average models are too inefficient to be used.
[0004] To this end, some existing technologies abandon machine learning algorithms. In order to retain the minute-level data accuracy and reduce the complexity of the time series data analysis model, basic data statistical methods are used to build models, such as using mean variance or box plot analysis methods to build models; however, the accuracy of the model is not enough. The statistical data modeling method does not decompose the random effect, change trend effect and periodic effect of the time series data, but only performs statistical analysis on the data representation, which cannot explain the internal influencing factors of the change trend of the time series data, and is particularly difficult to deal with the impact of periodic effects. In addition, some existing technologies reduce the minute-level accuracy to hour-level accuracy, reduce the sample size to 1 / 60 by reducing the time accuracy, and then use machine learning algorithms such as autoregressive moving average models to build models; although the accuracy of the algorithm is good, the accuracy of the model is not enough; the mainstream analysis accuracy of network traffic analysis is minute-level, and the prediction of data also needs to reach minute-level accuracy; in addition, for data with a longer period, such as 5 weeks and 840 sample data, the modeling time is long and the computing resources consumption is large. It is only suitable for pre-establishing models, not suitable for rolling real-time update prediction models to cope with the dynamic changes of time series data.
[0005] Therefore, how to study and design a network anomaly detection method, system, terminal and medium based on traffic prediction that can overcome the above-mentioned defects is a problem that we urgently need to solve. Summary of the invention
[0006] In order to address the deficiencies in the prior art, the purpose of the present invention is to provide a network anomaly detection method, system, terminal and medium based on traffic prediction. By using a time series modeling method that combines a long-term prediction model and a short-term prediction model of network traffic, tens of thousands of data can be reduced to dozens of data, network traffic prediction with minute-level accuracy can be achieved, and abnormal levels of network traffic can be discovered in a timely manner.
[0007] The above technical objectives of the present invention are achieved through the following technical solutions:
[0008] In a first aspect, a network anomaly detection method based on traffic prediction is provided, comprising the following steps:
[0009] Obtain minute-level traffic data in the target network;
[0010] Extract the first traffic data sequence at the same minute time in different fixed periods from the minute-level traffic data, and use the machine learning algorithm to perform long-term time series modeling on the first traffic data sequence to obtain a long-term prediction model;
[0011] Extracting a second flow data sequence of consecutive minutes from the minute-level flow data, and using a machine learning algorithm to perform short-period time series modeling on the second flow data sequence to obtain a short-period prediction model;
[0012] After predicting the network traffic at the current moment through the long-term prediction model, a first prediction value is obtained, and a first confidence space is determined by combining the first prediction value and the confidence level;
[0013] After predicting the network traffic at the current moment by using the short-term prediction model, a second prediction value is obtained, and a second confidence space is determined by combining the second prediction value and the confidence level;
[0014] The union range of the first confidence space and the second confidence space is used as the normal flow range of network flow detection, and when the actual network flow at the current moment is not within the normal flow range, a network abnormality signal is output.
[0015] Furthermore, the extraction process of the first traffic data sequence is specifically as follows:
[0016] The minute moments of the minute-level traffic data are divided into multiple fixed periods, the number of minute moments in each fixed period is the same, and each minute moment is numbered;
[0017] The flow data corresponding to the minute moments with the same number are selected from each fixed period to form a first flow data sequence.
[0018] Furthermore, the extraction process of the second traffic data sequence is specifically as follows:
[0019] Extracting the flow data corresponding to a plurality of consecutive minute moments closest to the current moment from the minute-level flow data to form a second flow data sequence;
[0020] The total duration of multiple consecutive minute moments is less than the fixed period.
[0021] Furthermore, the method also includes:
[0022] Performing weighted average processing on the first flow data sequence according to the first weight sequence, and performing long-period time series modeling based on the first flow data sequence after the weighted average processing;
[0023] And / or, weighted averaging is performed on the second flow data sequence according to the second weight sequence, and short-period time series modeling is performed based on the second flow data sequence after weighted averaging.
[0024] Furthermore, the expression for performing weighted average processing on the first flow data sequence according to the first weight sequence is specifically:
[0025] ;
[0026] in, Indicates the first flow data sequence Traffic data after weighted average processing at each minute; Indicates the first flow data sequence Traffic data before weighted average processing at each minute; Indicates the first flow data sequence The weight coefficient of each minute; is a positive integer; Indicates the first flow data sequence The weight coefficient of each minute; Represents the maximum value function.
[0027] Furthermore, the expression for performing weighted average processing on the second flow data sequence according to the second weight sequence is specifically:
[0028] ;
[0029] in, Indicates the first Traffic data after weighted average processing at each minute; Indicates the first Traffic data before weighted average processing at each minute; Indicates the first The weight coefficient of each minute; is a positive integer not less than 2; Indicates the first The weight coefficient of each minute; Represents the maximum value function.
[0030] Furthermore, the method also includes:
[0031] Set a threshold for reestablishing the network traffic baseline level;
[0032] Count the number of consecutive cycles of output network abnormal signals;
[0033] The average of the first predicted value and the second predicted value is taken as the final predicted value at the current moment;
[0034] When the number of consecutive cycles is less than the reconstruction threshold, the long-cycle prediction model and the short-cycle prediction model are updated and modeled, and the actual traffic data at the abnormal moment is replaced with the final prediction value at the corresponding moment during the update;
[0035] When the number of consecutive cycles is greater than or equal to the reconstruction threshold, the long-cycle prediction model and the short-cycle prediction model are reconstructed, and the actual traffic data corresponding to the moment exceeding the reconstruction threshold is used during the reconstruction.
[0036] In a second aspect, a network anomaly detection system based on traffic prediction is provided, which is used to implement the network anomaly detection method based on traffic prediction as described in the first aspect, including:
[0037] Traffic acquisition module, used to obtain minute-level traffic data in the target network;
[0038] The first modeling module is used to extract the first flow data sequence at the same minute time in different fixed periods from the minute-level flow data, and use the machine learning algorithm to perform long-term time series modeling on the first flow data sequence to obtain a long-term prediction model;
[0039] The second modeling module is used to extract a second flow data sequence of consecutive minutes from the minute-level flow data, and use a machine learning algorithm to perform short-term time series modeling on the second flow data sequence to obtain a short-term prediction model;
[0040] A first prediction module, used to predict the network traffic at the current moment by using a long-term prediction model to obtain a first prediction value, and determine a first confidence space by combining the first prediction value and the confidence level;
[0041] A second prediction module is used to predict the network traffic at the current moment by using a short-term prediction model to obtain a second prediction value, and determine a second confidence space by combining the second prediction value and the confidence level;
[0042] The anomaly detection module is used to use the union range of the first confidence space and the second confidence space as the normal flow range for network flow detection, and output a network anomaly signal when the actual network flow at the current moment is not within the normal flow range.
[0043] In a third aspect, a computer terminal is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the network anomaly detection method based on traffic prediction as described in the first aspect is implemented.
[0044] In a fourth aspect, a computer-readable medium is provided, on which a computer program is stored, and the computer program is executed by a processor to implement the network anomaly detection method based on traffic prediction as described in the first aspect.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] 1. The network anomaly detection method based on traffic prediction provided by the present invention reduces tens of thousands of data to dozens of data through a time series modeling method combining a long-term prediction model and a short-term prediction model of network traffic, and can achieve network traffic prediction with minute-level accuracy, and can timely discover abnormal levels of network traffic;
[0047] 2. The present invention adopts the method of weighted average of adjacent values to reduce the influence of the random effect of single time point data, and makes the time series data composed of the time point data smoother;
[0048] 3. When performing weighted average processing on the first traffic data sequence, the present invention combines the data on both sides of a single minute moment to perform weighted average processing in order to reduce the impact of a single mutation data on the network traffic trend, which can further improve the prediction reliability of the long-term prediction model;
[0049] 4. When the present invention performs weighted average processing on the second traffic data sequence, in order to reduce the impact of single mutation data on network traffic prediction, the weighted average processing is performed in combination with the historical data on one side at a single minute, which can further improve the prediction accuracy of the short-term prediction model;
[0050] 5. The present invention can detect whether the abnormal level is a network traffic abnormal value or a change in the network traffic level, and can realize real-time rolling learning modeling of long-term prediction models and short-term prediction models. The accuracy is higher than the statistical value prediction method based on empirical data, while ensuring the real-time performance of the prediction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:
[0052] Figure 1 is a flow chart of Embodiment 1 of the present invention;
[0053] Figure 2 It is a system block diagram in Example 2 of the present invention. DETAILED DESCRIPTION
[0054] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0055] Embodiment 1: A network anomaly detection method based on traffic prediction, such as Figure 1 As shown, the following steps are included:
[0056] S1: Obtain minute-level traffic data in the target network;
[0057] S2: extract the first traffic data sequence at the same minute time in different fixed periods from the minute-level traffic data, and use the machine learning algorithm to perform long-term time series modeling on the first traffic data sequence to obtain a long-term prediction model;
[0058] S3: extracting a second flow data sequence of consecutive minutes from the minute-level flow data, and using a machine learning algorithm to perform short-period time series modeling on the second flow data sequence to obtain a short-period prediction model;
[0059] S4: predicting the network traffic at the current moment by using the long-term prediction model to obtain a first prediction value, and determining a first confidence space by combining the first prediction value and the confidence level;
[0060] S5: predicting the network traffic at the current moment by using the short-term prediction model to obtain a second prediction value, and determining a second confidence space by combining the second prediction value and the confidence level;
[0061] S6: Taking the union range of the first confidence space and the second confidence space as the normal flow range for network flow detection, and outputting a network abnormality signal when the actual network flow at the current moment is not within the normal flow range.
[0062] In step S2, the extraction process of the first flow data sequence is specifically as follows: the minute moments of the minute-level flow data are divided into multiple fixed periods, the number of minute moments in each fixed period is the same, and each minute moment is numbered; the flow data corresponding to the minute moments with the same number are selected from each fixed period to form the first flow data sequence.
[0063] For example, for any one-minute time t, t∈[00:00,23:59], 35 days of t-time data are combined into a first traffic data sequence, that is, the first traffic data sequence contains 35 traffic data.
[0064] In addition, the present invention also performs weighted averaging processing on the first flow data sequence according to the first weight sequence, and performs long-period time series modeling based on the first flow data sequence after weighted averaging processing; the method of weighted averaging of adjacent values is used to reduce the influence of the random effects of single time point data, and make the time series data composed of the time point data smoother.
[0065] For the traffic data after weighted averaging, the time series effect decomposition method or the autoregressive moving average model and other machine learning algorithms are used to build models. The long-term prediction model can be generated in real time and efficiently. The minute-level time point data after weighted averaging has wide stability in the long period. The long-term prediction model can predict the long-term trend of the minute-level time point data that meets the wide stability.
[0066] As an optional implementation, the expression for performing weighted average processing on the first flow data sequence according to the first weight sequence is specifically:
[0067] ;
[0068] in, Indicates the first flow data sequence Traffic data after weighted average processing at each minute; Indicates the first flow data sequence Traffic data before weighted average processing at each minute; Indicates the first flow data sequence The weight coefficient of each minute; is a positive integer; Indicates the first flow data sequence The weight coefficient of each minute; Represents the maximum value function.
[0069] It should be noted that the weight coefficient of each minute moment in the first weight sequence may be preset, or may be dynamically adjusted in consideration of the fluctuation range of the flow data, but the weight coefficient of the intermediate moment needs to be kept at the maximum.
[0070] For example, take 5 data in total at [t-2, t+2], such as F(-2), F(-1), F(t), F(+1), and F(+2). If the weight coefficients of the 5 data are 0.1, 0.2, 0.4, 0.2, and 0.1 respectively, then the weighted average of the data involved in the modeling at time point t is: F'(t)=0.4F(t)+0.2F(t-1)+0.2F(t+1)+0.1F(t-2)+0.1F(t+2).
[0071] In step S3, the extraction process of the second flow data sequence is specifically as follows: the flow data corresponding to multiple consecutive minute moments closest to the current moment are intercepted from the minute-level flow data to form a second flow data sequence; wherein the total duration of multiple consecutive minute moments is less than the fixed period.
[0072] At the current time t, the network traffic data of the recent n-minute scale [tn-1, t] is modeled. If the current time is 9:08 and n is set to 60, 60 points in the range [8:09, 9:08] are taken and modeled using machine learning algorithms such as time series effect decomposition method or autoregressive moving average model to generate a short-term prediction model in real time and efficiently. After a network anomaly occurs, the traffic will fluctuate abnormally; however, the abnormal fluctuation is not necessarily caused by network anomalies. It may be that the network environment has changed and the network traffic level has a new trend. The short-term prediction model learns the current traffic trend in real time.
[0073] In addition, the present invention performs weighted averaging processing on the second flow data sequence according to the second weight sequence, and performs short-period time series modeling based on the second flow data sequence after the weighted averaging processing.
[0074] When performing weighted averaging processing on the second traffic data sequence, the present invention combines the historical data on one side at a single minute to perform weighted averaging processing in order to reduce the impact of single mutation data on network traffic prediction, which can further improve the prediction accuracy of the short-term prediction model.
[0075] As an optional implementation, the expression for performing weighted average processing on the second flow data sequence according to the second weight sequence is specifically:
[0076] ;
[0077] in, Indicates the first Traffic data after weighted average processing at each minute; Indicates the first Traffic data before weighted average processing at each minute; Indicates the first The weight coefficient of each minute; is a positive integer not less than 2; Indicates the first The weight coefficient of each minute; Represents the maximum value function.
[0078] For example, if t is the current time, the data at the three times [t-2, t] can be taken, and the flow data after weighted average processing is: F'' (t)=(0.4F(t)+0.2F(t-1)+0.1F(t-2)) / (0.4+0.2+0.1).
[0079] In step S4, for time t0, the actual network traffic is f0, the prediction value of the long-term prediction model for time t0 is lmp(t0), and the 95% confidence space is [lmp(t0)_low, lmp(t0)_high]. lmp(t0)_low is the lower limit of the confidence space corresponding to lmp(t0), and lmp(t0)_high is the upper limit of the confidence space.
[0080] In step S5, the prediction value of the short-term prediction model at time t0 is rmp(t0), and the 95% confidence space is [rmp(t0)_low, rmp(t0)_high]. rmp(t0)_low is the lower limit value of the confidence space corresponding to rmp(t0), and rmp(t0)_high is the upper limit value of the confidence space corresponding to rmp(t0).
[0081] In step S6, the predictions of the two models are combined, and the final prediction value p(t0) at time t0 is the average of the prediction values of the two models, that is, p(t0)=(lmp(t0)+rmp(t0)) / 2, and the confidence space c(t0) is the union of the prediction confidence spaces of the two models, that is, c(t0)=[min(lmp(t0)_low,rmp(t0)_low),max(lmp(t0)_high,rmp(t0)_high)]. If the actual network traffic f0 does not fall in the confidence space, the current traffic is considered abnormal.
[0082] The present invention can detect whether the abnormal level is a network traffic abnormal value or a change in the network traffic level, and can realize real-time rolling learning modeling of long-term prediction models and short-term prediction models. The accuracy is higher than the statistical value prediction method based on empirical data, while ensuring the real-time performance of the prediction model.
[0083] Specifically, the method includes the following steps: setting a reconstruction threshold of a network traffic baseline level; counting the number of consecutive cycles of output network abnormality signals; taking the average of the first prediction value and the second prediction value as the final prediction value at the current moment; when the number of consecutive cycles is less than the reconstruction threshold, updating the long-cycle prediction model and the short-cycle prediction model, and replacing the actual traffic data at the abnormal moment with the final prediction value at the corresponding moment when updating the model; when the number of consecutive cycles is greater than or equal to the reconstruction threshold, reconstructing the long-cycle prediction model and the short-cycle prediction model, and using the actual traffic data at the moment corresponding to the reconstruction threshold when reconstructing the model.
[0084] For example, the threshold for rebuilding the network traffic baseline level is preset to D. When the network traffic continues to be abnormal for D minutes, the network traffic baseline level is considered to have changed, and the actual value after the change should be used to participate in the model establishment. The number of cycles of continuous traffic abnormality is recorded through the traffic anomaly counter. If the traffic is abnormal at time point t0, add 1 to the counter, and then determine whether the number recorded by the counter is greater than the reconstruction threshold:
[0085] If it is less than the reconstruction threshold, it is determined that the current traffic is still abnormal. According to the predicted value p(t0), long-term modeling at time t0 and short-term modeling in the time range [t0-59, t0] are performed. When modeling in the short term, the predicted value of the model is used at the abnormal moment.
[0086] If it is greater than or equal to the threshold, it is considered that the baseline level of network traffic has changed, and the actual value after the change is used to establish the model. According to the actual traffic value f0, long-term modeling at time t0 and short-term modeling in the time range [t0-59, t0] are performed. When modeling in the short term, the actual value is used at the abnormal moment.
[0087] When the model predicts that network traffic is normal, the counter is set to zero.
[0088] Embodiment 2: A network anomaly detection system based on traffic prediction, the system is used to implement the network anomaly detection method based on traffic prediction as described in Embodiment 1, such as Figure 2 As shown, it includes a traffic acquisition module, a first modeling module, a second modeling module, a first prediction module, a second prediction module and an anomaly detection module.
[0089] Among them, the traffic acquisition module is used to obtain minute-level traffic data in the target network; the first modeling module is used to extract the first traffic data sequence at the same minute moment in different fixed periods from the minute-level traffic data at intervals, and use the machine learning algorithm to perform long-term time series modeling on the first traffic data sequence to obtain a long-term prediction model; the second modeling module is used to extract the second traffic data sequence at consecutive minute moments from the minute-level traffic data, and use the machine learning algorithm to perform short-term time series modeling on the second traffic data sequence to obtain a short-term prediction model; the first prediction module is used to predict the network traffic at the current moment through the long-term prediction model to obtain a first prediction value, and determine the first confidence space in combination with the first prediction value and the confidence; the second prediction module is used to predict the network traffic at the current moment through the short-term prediction model to obtain a second prediction value, and determine the second confidence space in combination with the second prediction value and the confidence; the anomaly detection module is used to use the union range of the first confidence space and the second confidence space as the normal traffic range for network traffic detection, and output a network anomaly signal when the actual network traffic at the current moment is not within the normal traffic range.
[0090] The present invention also describes a computer terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the network anomaly detection method based on traffic prediction as described in Example 1 is implemented.
[0091] The present invention also describes a computer-readable medium on which a computer program is stored. The computer program is executed by a processor to implement the network anomaly detection method based on traffic prediction as described in Example 1.
[0092] Working principle: The present invention reduces tens of thousands of data to dozens of data through a time series modeling method that combines a long-term prediction model and a short-term prediction model of network traffic, and can achieve network traffic prediction with minute-level accuracy, and can timely discover abnormal levels of network traffic; in addition, the present invention adopts a weighted average method of adjacent values to reduce the impact of the random effects of single-point data, and makes the time series data composed of time point data smoother; in addition, the present invention can detect whether the abnormal level is a network traffic abnormal value or a change in the network traffic level, and can realize real-time rolling learning modeling of long-term prediction models and short-term prediction models, with higher accuracy than the statistical value prediction method based on empirical data, while ensuring the real-time performance of the prediction model.
[0093] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0094] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0095] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0096] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0097] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A network anomaly detection method based on traffic prediction, characterized in that: The following steps are involved: Obtain minute-level traffic data in the target network; Extract the first traffic data sequence at the same minute time in different fixed periods from the minute-level traffic data, and use the machine learning algorithm to perform long-term time series modeling on the first traffic data sequence to obtain a long-term prediction model; Extracting a second flow data sequence of consecutive minutes from the minute-level flow data, and using a machine learning algorithm to perform short-period time series modeling on the second flow data sequence to obtain a short-period prediction model; After predicting the network traffic at the current moment through the long-term prediction model, a first prediction value is obtained, and a first confidence space is determined by combining the first prediction value and the confidence level; After predicting the network traffic at the current moment by using the short-term prediction model, a second prediction value is obtained, and a second confidence space is determined by combining the second prediction value and the confidence level; The union range of the first confidence space and the second confidence space is used as the normal flow range of network flow detection, and when the actual network flow at the current moment is not within the normal flow range, a network abnormality signal is output.
2. The network anomaly detection method based on traffic prediction according to claim 1 is characterized in that: The extraction process of the first traffic data sequence is specifically as follows: The minute moments of the minute-level traffic data are divided into multiple fixed periods, the number of minute moments in each fixed period is the same, and each minute moment is numbered; The flow data corresponding to the minute moments with the same number are selected from each fixed period to form a first flow data sequence.
3. The network anomaly detection method based on traffic prediction according to claim 1 is characterized in that: The extraction process of the second flow data sequence is specifically as follows: Extracting the flow data corresponding to a plurality of consecutive minute moments closest to the current moment from the minute-level flow data to form a second flow data sequence; The total duration of multiple consecutive minute moments is less than the fixed period.
4. The network anomaly detection method based on traffic prediction according to claim 1 is characterized in that: The method further includes: The first flow data sequence is weighted averaged according to the first weight sequence, and long-period time series modeling is performed according to the first flow data sequence after weighted average processing; the weight coefficient of each minute moment in the first weight sequence is preset, or dynamically adjusted considering the fluctuation range of the flow data, and the weight coefficient of the intermediate moment is kept as the maximum; And / or, weighted averaging is performed on the second flow data sequence according to the second weight sequence, and short-period time series modeling is performed based on the second flow data sequence after weighted averaging.
5. The network anomaly detection method based on traffic prediction according to claim 4 is characterized in that: The expression for performing weighted average processing on the first flow data sequence according to the first weight sequence is specifically: Wherein, F′(t) represents the flow data after weighted averaging at the t-th minute in the first flow data sequence; F(i) represents the flow data before weighted averaging at the i-th minute in the first flow data sequence; k i represents the weight coefficient of the i-th minute in the first flow data sequence; n is a positive integer; k t represents the weight coefficient at the t-th minute in the first traffic data sequence; max(·) represents the maximum value function.
6. The network anomaly detection method based on traffic prediction according to claim 4 is characterized in that: The expression for performing weighted average processing on the second flow data sequence according to the second weight sequence is specifically: Wherein, F″(t) represents the flow data after weighted averaging at the t-th minute in the second flow data sequence; F(j) represents the flow data before weighted averaging at the j-th minute in the second flow data sequence; K j represents the weight coefficient of the jth minute in the second flow data sequence; n is a positive integer not less than 2; K t represents the weight coefficient at the t-th minute in the second traffic data sequence; max(·) represents the maximum value function.
7. The network anomaly detection method based on traffic prediction according to claim 1 is characterized in that: The method further includes: Set a threshold for reestablishing the network traffic baseline level; Count the number of consecutive cycles of output network abnormal signals; The average of the first predicted value and the second predicted value is taken as the final predicted value at the current moment; When the number of consecutive cycles is less than the reconstruction threshold, the long-cycle prediction model and the short-cycle prediction model are updated and modeled, and the actual traffic data at the abnormal moment is replaced with the final prediction value at the corresponding moment during the update; When the number of consecutive cycles is greater than or equal to the reconstruction threshold, the long-cycle prediction model and the short-cycle prediction model are reconstructed, and the actual traffic data corresponding to the moment exceeding the reconstruction threshold is used during the reconstruction.
8. A network anomaly detection system based on traffic prediction, characterized in that: The system is used to implement the network anomaly detection method based on traffic prediction according to any one of claims 1 to 7, comprising: Traffic acquisition module, used to obtain minute-level traffic data in the target network; The first modeling module is used to extract the first flow data sequence at the same minute time in different fixed periods from the minute-level flow data, and use the machine learning algorithm to perform long-term time series modeling on the first flow data sequence to obtain a long-term prediction model; The second modeling module is used to extract a second flow data sequence of consecutive minutes from the minute-level flow data, and use a machine learning algorithm to perform short-term time series modeling on the second flow data sequence to obtain a short-term prediction model; A first prediction module, used to predict the network traffic at the current moment by using a long-term prediction model to obtain a first prediction value, and determine a first confidence space by combining the first prediction value and the confidence level; A second prediction module is used to predict the network traffic at the current moment by using a short-term prediction model to obtain a second prediction value, and determine a second confidence space by combining the second prediction value and the confidence level; The anomaly detection module is used to use the union range of the first confidence space and the second confidence space as the normal flow range for network flow detection, and output a network anomaly signal when the actual network flow at the current moment is not within the normal flow range.
9. A computer terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the network anomaly detection method based on traffic prediction as described in any one of claims 1 to 7 is implemented.
10. A computer readable medium having a computer program stored thereon, characterized in that: The computer program is executed by a processor to implement the network anomaly detection method based on traffic prediction as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method for predicting network flow and detecting abnormality
CN101651568A
Information display method and mobile terminal
CN108509037A
Long-term network traffic prediction method based on deep learning
CN113316163A
Abnormal traffic identification method and device, electronic equipment and storage medium
CN115118511A
Abnormal traffic detection method and device, server and storage medium
CN117220960A
