WO2021072890A1 - 基于模型的流量异常监测方法、装置、设备及存储介质 - Google Patents

基于模型的流量异常监测方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2021072890A1
WO2021072890A1 PCT/CN2019/119298 CN2019119298W WO2021072890A1 WO 2021072890 A1 WO2021072890 A1 WO 2021072890A1 CN 2019119298 W CN2019119298 W CN 2019119298W WO 2021072890 A1 WO2021072890 A1 WO 2021072890A1
Authority
WO
WIPO (PCT)
Prior art keywords
flow
model
time
value
moving average
Prior art date
Application number
PCT/CN2019/119298
Other languages
English (en)
French (fr)
Inventor
刘玉洁
杨冬艳
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021072890A1 publication Critical patent/WO2021072890A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/142Network analysis or design using statistical or mathematical methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1425Traffic logging, e.g. anomaly detection

Definitions

  • This application relates to the field of network security, and in particular to a model-based method, device, device, and storage medium for monitoring traffic abnormalities.
  • the flow abnormality monitoring method includes the following steps:
  • a maximum likelihood function is used to calculate the model parameters of the autoregressive moving average model to obtain the function parameters of the autoregressive moving average model.
  • the corresponding autoregressive movement is established before the step of averaging the model, it also includes:
  • the model function is set to calculate the predicted value of the flow.
  • the calculating the error between the predicted value output by the model function and the actual value based on the first predicted value, the corresponding actual value in the sample data, and a preset Kalman filter algorithm includes:
  • G represents the Kalman gain matrix
  • P represents the covariance matrix
  • X represents the predicted value at the previous moment
  • t represents the time.
  • the initial expression of the autoregressive moving average model is as follows:
  • the present application also provides a model-based flow abnormality monitoring device, the flow abnormality monitoring device includes:
  • the first calculation module is configured to calculate the model parameters of the autoregressive moving average model based on the sample data and a preset autoregressive moving average model;
  • a construction module for constructing a model function corresponding to the autoregressive moving average model according to the model parameters
  • the second calculation module is configured to obtain the historical time corresponding to the sample data, and calculate the traffic forecast value corresponding to the historical time according to the model function to obtain the first forecast value;
  • the third calculation module is used to calculate the covariance matrix of the theoretical value and the actual value of the flow output by the model function based on the first predicted value, the corresponding actual value in the sample data, and a preset Kalman filter algorithm ;
  • the fourth calculation module is configured to perform flow prediction calculations on the flow value at the time to be measured through the model function to obtain the second predicted value;
  • the fifth calculation module is used to calculate the flow fluctuation range of the time to be measured according to the covariance
  • the judgment module is used to monitor the actual flow value corresponding to the time to be measured, and judge whether the actual value exceeds the flow fluctuation range;
  • the present application also provides a model-based flow abnormality monitoring device.
  • the flow abnormality monitoring device includes a memory, a processor, and a device that is stored in the memory and can run on the processor.
  • Computer-readable instructions which, when executed by the processor, implement the steps of the flow abnormality monitoring method as described in any one of the above.
  • the present application also provides a computer-readable storage medium, the computer-readable storage medium stores model-based computer-readable instructions, and the computer-readable instructions are implemented when executed by a processor.
  • This application uses traffic monitoring data as sample data, calculates the model parameters of the autoregressive moving average model according to a preset autoregressive moving average model, and then constructs the model function corresponding to the autoregressive moving average model, and then obtains the sample Data corresponding to the historical time, and calculate the traffic forecast value corresponding to the historical time according to the model function to obtain a first forecast value, and based on the first forecast value and sample data, calculate the The covariance matrix of the theoretical value and the actual value of the flow output by the model function is used to perform flow prediction calculations on the flow value at the time to be measured by the model function to obtain the second predicted value.
  • FIG. 1 is a schematic structural diagram of the operating environment of a traffic abnormality monitoring device involved in a solution according to an embodiment of the application;
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for monitoring abnormal traffic according to this application;
  • FIG. 4 is a schematic flowchart of a second embodiment of a method for monitoring abnormal traffic according to this application.
  • FIG. 5 is a schematic flowchart of a third embodiment of a method for monitoring abnormal traffic according to this application.
  • This application provides a model-based flow monitoring device.
  • FIG. 1 is a schematic structural diagram of an operating environment of a flow abnormality monitoring device involved in a solution of an embodiment of the application.
  • the abnormal traffic monitoring device includes a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005.
  • the communication bus 1002 is used to implement connection and communication between these components.
  • the user interface 1003 may include a display screen (Display) and an input unit such as a keyboard (Keyboard), and the network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as a magnetic disk memory.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
  • the memory 1005 which is a computer-readable storage medium, may include an operating system, a network communication module, a user interface module, and a computer program.
  • the operating system is a program that manages and controls abnormal flow monitoring equipment and software resources, and supports the operation of computer readable instructions and other software and/or programs.
  • the network interface 1004 is mainly used to access the network; the user interface 1003 is mainly used to detect and confirm instructions and edit instructions.
  • the processor 1001 may be used to call computer-readable instructions stored in the memory 1005, and execute the operations of the following embodiments of the method for monitoring abnormalities in traffic.
  • FIG. 2 is a schematic flowchart of a first embodiment of a method for monitoring abnormal traffic according to the present application.
  • the method for monitoring abnormal flow includes:
  • Step S10 Collect flow monitoring data as sample data, where the flow monitoring data is the amount of data transmitted on the monitoring network;
  • Network traffic prediction is to establish a network traffic prediction model based on the collected actual network traffic observation value sequence, predict future traffic data, and judge the possibility of exceeding the threshold in the future and the time of occurrence. Administrators can pay special attention to key periods and take preventive measures before the network is overloaded, thereby effectively ensuring the stability of network performance.
  • the network traffic monitoring technology is used to monitor the amount of data transmitted on the network, and the current time is monitored in real time according to the preset statistical time. If the time reaches the preset statistical time, data volume statistics and production flow monitoring data are performed. According to calculation needs, part of the data is collected from the traffic monitoring data as sample data, where the sample data is statistical data of the network traffic at different time points in a period of time. It should be noted that in order to make the calculation results of this method more accurate, monthly data, quarterly data or annual data can be collected.
  • Step S20 Calculate model parameters of the autoregressive moving average model based on the sample data and a preset autoregressive moving average model
  • Autoregressive moving average model uses the randomness of the time series to describe the relevant information of the stationary series, and thus models and predicts the changes of the time series.
  • the autoregressive moving average model includes three models, namely, the autoregressive model, the moving average model, and the autoregressive moving average model.
  • the autoregressive moving average model needs to be determined Model parameters, and the method for determining the model parameters can use the sample moment estimation method, the least square method, or the maximum likelihood function to calculate the maximum possible value of the model parameters to determine the model parameters of the autoregressive moving average model.
  • the maximum estimated value of each model parameter in the autoregressive moving average model is calculated according to the maximum likelihood function to determine the model function corresponding to the autoregressive moving average model, where the extreme
  • the expression of the large likelihood function is as follows:
  • S represents the maximum likelihood function
  • ⁇ and ⁇ 2 are the average value of the sample data and the sample covariance matrix respectively
  • W t represents the flow value at time t
  • n represents a total of n flow statistics in the sample data
  • f Represents the probability density function.
  • Step S30 construct a model function corresponding to the autoregressive moving average model according to the model parameters
  • the expression of the autoregressive moving average model is as follows:
  • W t represents the flow value at time t;
  • ⁇ 1 , ⁇ j represent model parameters;
  • ⁇ t represents the interference term between the predicted value of the flow at time t and the observed value;
  • p represents the autoregressive model function The order of;
  • q represents the moving average model function The order.
  • Step S40 Obtain the historical time corresponding to the sample data, and calculate the traffic forecast value corresponding to the historical time according to the model function to obtain a first forecast value, and the first forecast value includes each time in the historical time Click to input the theoretical value of the flow rate obtained by the model function;
  • the historical time corresponding to the sample data is obtained, the historical time is input into the model function one by one, and the theoretical flow value in the historical time is calculated to obtain the first historical time corresponding to the historical time.
  • the calculation of the first predicted value is to facilitate the later use of the Kalman filter algorithm to calculate the covariance matrix of the theoretical flow value relative to the actual flow value calculated by the model function, wherein the historical time corresponding to the sample data includes at least At one time point, multiple time points are input to the model function one by one to perform flow prediction, and the theoretical flow values at different time points are obtained, and the theoretical flow values at different time points are counted, and the first predicted value is obtained at the historical time.
  • the existing sample data is the statistical data of network data transmission every month from 2017 to 2018.
  • the theoretical traffic value of each month from 2017 to 2018 is calculated to obtain the data from 2017 to 2018.
  • Corresponding data of the theoretical flow value is the statistical data of network data transmission every month from 2017 to 2018.
  • Step S50 Based on the first predicted value, the corresponding actual value in the sample data, and the preset Kalman filter algorithm, calculate the covariance matrix of the theoretical value and the actual value of the flow output by the model function;
  • the principle of the Kalman filter algorithm is based on the state at the previous moment, the current state estimation can be recursively obtained, the current covariance estimation is obtained through the covariance recursive at the previous moment, and the Kalman is obtained through the covariance estimation and the state gain recursion. Mann gain, and then calculate the error based on actual data and estimated data.
  • the measured data is used to construct the state update equation of the Kalman filter algorithm, and through the state update equation, the covariance matrix of the theoretical value calculated by the autoregressive moving average model compared to the actual value is obtained by calculation.
  • Step S60 Perform a flow prediction calculation on the flow value at the time to be measured through the model function to obtain a second predicted value
  • Step S70 Calculate the flow fluctuation range of the time to be measured according to the covariance matrix
  • the network traffic is predicted by the autoregressive moving average model
  • the time to be measured is input
  • the predicted value of the flow of the time to be measured is calculated according to the model function of the autoregressive moving average model, and the predicted value of the flow of the time to be measured is obtained.
  • the second predicted value but as long as it is a prediction, there will be a prediction error.
  • the second prediction value is dynamically adjusted through the covariance matrix calculated by the previous Kalman filter algorithm to obtain the adjustment result.
  • the adjustment result is between the adjustment result and the second prediction value.
  • the range of time is the normal flow fluctuation range of the time to be measured.
  • Step S80 monitoring the actual flow value corresponding to the time to be measured, and judging whether the actual value is within the flow fluctuation range;
  • Step S90 If the actual value is not within the fluctuation range of the flow rate, it is determined that the flow rate at the time to be measured is abnormal.
  • the actual flow value corresponding to the time to be measured is monitored in real time, and it is judged whether the actual flow value is within the pre-predicted fluctuation range. If the actual flow value exceeds the pre-predicted flow fluctuation range, the flow rate at the time to be measured is determined Abnormalities, and then take corresponding countermeasures to ensure normal network services and high-quality user experience.
  • the model parameters of the autoregressive moving average model are calculated, and then the model function corresponding to the autoregressive moving average model is constructed, and then the The historical time corresponding to the sample data, and calculate the traffic forecast value corresponding to the historical time according to the model function to obtain the first forecast value.
  • the calculated value is calculated according to the preset Kalman filter algorithm.
  • the covariance matrix of the theoretical value and the actual value of the flow rate output by the model function is used to perform flow prediction calculations on the flow value at the time to be measured through the model function to obtain a second predicted value. According to the covariance matrix, the second predicted value is calculated.
  • FIG. 3 is a detailed flowchart of an embodiment of step S20 in FIG. 2.
  • the above step S20 includes:
  • Step S201 Arrange the sample data in chronological order to obtain a time series of the sample data
  • Step S202 Calculate the autocorrelation function and partial autocorrelation function of the time series, and establish a corresponding autoregressive moving average model based on the calculation results of the autocorrelation function and the partial autocorrelation function and preset rules;
  • Step S203 Calculate the model parameters of the autoregressive moving average model by using a maximum likelihood function to obtain the function parameters of the autoregressive moving average model.
  • the maximum likelihood function is used to calculate the unknown parameters of the matching model to determine the unknown parameters of the model, where the unknown parameters of the matching model include self
  • the model parameters of the matching model are determined, and the model function of the autoregressive moving average model is constructed according to the model framework of the autoregressive moving average model.
  • Step S2001 Detect whether the time series is a stationary series
  • Step S2002 If the time series is not a stationary series, perform difference processing on the time series to obtain a stationary series of the time series, wherein the difference processing is to calculate two adjacent times in the time series
  • the result of the difference reflects a change between discrete data.
  • an autoregressive model, a moving average model, and an autoregressive moving average model can be established. If a time series is not a stationary series, then It is impossible to establish autoregressive model, moving average model and autoregressive moving average model. At this time, it is necessary to carry out d differences on the basis of the original series. Generally, after one difference, a non-stationary series is stabilized. If after one difference If it is still non-stationary, it can be differentiated again.
  • Fig. 5 is a schematic flowchart of a third embodiment of a method for monitoring abnormal traffic according to the present application.
  • the method further includes:
  • Step S3001 Calculate the difference between the sample data and the first prediction data, and arrange the difference in chronological order to obtain a residual sequence of the first prediction data;
  • the residual is the difference between the actual value and the predicted value.
  • the model needs to be tested to check whether the constructed model is statistically significant, that is, to check whether the time series is sufficiently extracted Sample information. Calculate the difference between the sample data and the forecast data at the corresponding time, and arrange them in the order of the corresponding time to generate a sequence of differences, that is, a residual sequence.
  • Step S3002 Check whether the residual sequence is a white noise sequence
  • the model function is specifically statistically significant, so that it is used to calculate the predicted value of the flow, it is necessary to check whether the residual sequence of the model is a white noise sequence. Calculate the covariance, variance and expected value of the residual sequence. If the covariance and expectation are zero and the variance is constant, then the residual sequence is a white noise sequence.
  • Step S3003 If the residual sequence is a white noise sequence, set the model function to calculate the predicted value of the flow.
  • the residual sequence is a white noise sequence. If the residual sequence is a white noise sequence, it means that the model function has passed the test and can be used to calculate the predicted value of the flow; If the residual sequence is not a white noise sequence, the characteristics of the autocorrelation function and the partial autocorrelation function need to be renewed to establish the corresponding model.
  • FIG. 6 is a detailed flowchart of an embodiment of step S50 in FIG. 2.
  • the above step S50 includes:
  • Step S501 Based on the first predicted value and the corresponding actual value in the sample data, establish a Kalman filter state update equation corresponding to the first predicted value according to a preset Kalman filter algorithm;
  • the principle of the Kalman filter algorithm is based on the state at the previous time to recursively estimate the current state, and obtain the covariance estimate at the current time by recursing the covariance at the previous time, and recursively through the covariance estimation and state gain Get the Kalman gain, and then calculate the error based on the actual data and estimated data.
  • G represents the Kalman gain matrix
  • P represents the covariance
  • X represents the predicted value at the previous moment
  • t represents the time
  • This embodiment performs prediction based on a time series model autoregressive moving average model with high prediction accuracy, good real-time performance, and relatively low algorithm complexity, and then the Kalman filter algorithm is used to calculate the covariance matrix between the predicted value and the actual value, and The time series are corrected by the Kalman filter adjustment feature to reduce the error between the predicted value and the actual value.
  • the application also provides a flow prediction device.
  • Fig. 7 is a schematic diagram of a functional model of an embodiment of a flow abnormality monitoring device according to the present application.
  • the abnormal flow monitoring device includes:
  • the collection module 10 is configured to collect flow monitoring data as sample data, where the flow monitoring data is data for monitoring network access;
  • the first calculation module 20 is configured to calculate the model parameters of the autoregressive moving average model based on the sample data and a preset autoregressive moving average model;
  • the construction module 30 is configured to construct a model function corresponding to the autoregressive moving average model according to the model parameters;
  • the second calculation module 40 is configured to obtain the historical time corresponding to the sample data, and calculate the traffic forecast value corresponding to the historical time according to the model function to obtain a first forecast value, and the first forecast value includes the The theoretical value of the flow obtained by inputting the model function at each time point in the historical time;
  • the third calculation module 50 is configured to calculate the covariance between the theoretical value of the flow output by the model function and the actual value based on the first predicted value, the corresponding actual value in the sample data, and a preset Kalman filter algorithm matrix;
  • the fourth calculation module 60 is configured to perform flow prediction calculations on the flow value at the time to be measured through the model function to obtain a second predicted value
  • the fourth calculation module 60 uses the model function to calculate the flow rate at the time to be measured.
  • the second predicted value is obtained by the prediction calculation.
  • the fifth calculation module 70 calculates the flow fluctuation range of the time to be measured according to the covariance.
  • the judgment module 80 monitors the flow fluctuation range of the time to be measured according to the flow fluctuation range obtained by the fifth calculation module 70 in real time. Determine whether the actual value is within the flow fluctuation range, and the determining module 90 is configured to determine that the flow rate at the time to be measured is abnormal if the actual value is not within the flow fluctuation range.
  • the computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the flow abnormality monitoring method described in any one of the above embodiments are implemented,
  • the storage medium may be a non-volatile storage medium or a volatile storage medium.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Algebra (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Pure & Applied Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请涉及网络安全领域,公开了一种基于模型的流量异常监测方法,包括以下步骤:采集流量监测数据作为样本数据,构建所述自回归移动平均模型对应的模型函数;通过预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵;通过所述模型函数计算待测时间的流量值,得到第二预测值;根据所述协方差矩阵,计算待测时间的流量波动范围;监测待测时间对应的实际流量值,判断所述实际值是否在所述流量波动范围内;若所述实际值不在所述流量波动范围内,则判定待测时间流量异常。本申请还公开了一种流量异常监测装置、设备及可读存储介质。本申请实现了对流量的综合分析,更精准预测流量的波动范围,进而进行流量异常监测。

Description

基于模型的流量异常监测方法、装置、设备及存储介质
本申请要求于2019年10月18日提交中国专利局、申请号为201910991163.3、发明名称为“基于模型的流量异常监测方法、装置、设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及网络安全领域,尤其涉及一种基于模型的流量异常监测方法、装置、设备和存储介质。
背景技术
随着科技越来越发达,互联网已经深入到人们日常生活的方方面面,在对网络进行管理的过程中,网络流量对网络容量规划、网络设备设计、网络资源分配、负载均衡等等具有较强的重要性,传统方法是利用单一的时间序列模型对流量进行预测,以预测的结果作为参照对流量进行监测和趋势分析时,发明人意识到这样的预测结果只考虑了流量的时序特征,不能适应网络流量的波动、包含噪声等复杂特点,准确率不高,难以准确刻画和预测流量的正常范围。
发明内容
本申请的主要目的在于提供一种基于模型的的流量异常监测方法,旨在解决如何准确预测网络流量的正常范围,以判断实际流量是否异常的技术问题。
为实现上述目的,本申请提供的一种基于模型的流量异常监测方法,所述流量异常监测方法包括以下步骤:
采集流量监测数据作为样本数据,其中,所述流量监测数据为监测网络上传输的数据量;
基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数;
根据所述模型参数,构建所述自回归移动平均模型对应的模型函数;
获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值;
基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵;
通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值;
根据所述协方差,计算待测时间的流量波动范围;
监测待测时间对应的实际流量值,判断所述实际值是否超过所述流量波动范围;
若所述实际值超过所述流量波动范围,则确定待测时间流量异常。
可选地,所述基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数包括:
将所述样本数据按时间先后顺序排列,得到所述样本数据的时间序列;
计算所述时间序列的自相关函数和偏自相关函数,并基于所述自相关函数和所述偏自相关函数的计算结果及预置规则,建立相应的自回归移动平均模型;
采用极大似然函数计算所述自回归移动平均模型的模型参数,得到所述自回归移动平均模型的函数参数。
可选地,在所述计算所述时间序列的自相关函数和偏自相关函数,并基于所述自相关函数和所述偏自相关函数的计算结果及预置规则,建立相应的自回归移动平均模型的步骤之前,还包括:
检测所述时间序列是否为平稳序列;
若所述时间序列不为平稳序列,则对所述时间序列进行差分处理,获取所述时间序列的平稳序列,其中,所述差分处理为计算所述时间序列中相邻两个时间节点的流量差值,即W t-i=W t-W i,式中的W t、W i表示所述时间序列中相邻两个时间节点的流量值,W t-i表示相邻两个时间节点的流量差值。
可选地,在所述根据所述模型参数,构建所述自回归移动平均模型对应的模型函数的步骤之后,还包括:
计算所述样本数据与所述第一预测值的差值,并按时间先后顺序对所述差值进行排列,得到所述第一预测值的残差序列;
检验所述残差序列是否为白噪声序列;
若所述残差序列为白噪声序列,则设定所述模型函数用于计算流量的预测值。
可选地,所述基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的预测值与实际值的误差包括:
基于所述第一预测值及所述样本数据中对应的实际值,根据预置卡尔曼滤波算法建立所述第一预测值对应的卡尔曼滤波状态更新方程;
根据所述卡尔曼滤波状态更新方程,计算所述第一预测值的协方差矩阵。
可选地,所述卡尔曼滤波状态更新方程表达式如下:
X t=GX t-1,P t=GP t-1G t
式中,G表示卡尔曼增益矩阵,P表示协方差矩阵,X表示上一时刻的预测值,t表示时间。
可选地,所述自回归移动平均模型的初始表达式如下:
Figure PCTCN2019119298-appb-000001
式中,W t表示t时刻的流量实际值;γ 1、ρ j表示模型参数;α t表示t时刻流量的预测值与观测值的干扰项;p表示自回归模型函数
Figure PCTCN2019119298-appb-000002
的阶次;q表示移动平均模型函数
Figure PCTCN2019119298-appb-000003
的阶次。
进一步地,为实现上述目的,本申请还提供一种基于模型的流量异常监测装置,所述流量异常监测装置包括:
采集模块,用于采集流量监测数据作为样本数据,其中,所述流量监测数据为监测网络访问量的数据;
第一计算模块,用于基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数;
构建模块,用于根据所述模型参数,构建所述自回归移动平均模型对应的模型函数;
第二计算模块,用于获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值;
第三计算模块,用于基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵;
第四计算模块,用于通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值;
第五计算模块,用于根据所述协方差,计算待测时间的流量波动范围;
判断模块,用于监测待测时间对应的实际流量值,判断所述实际值是否超过所述流量波动范围;
确定模块,用于若所述实际值超过所述流量波动范围,则确定待测时间流量异常。
进一步地,为实现上述目的,本申请还提供一种基于模型的流量异常监测设备,所述流量异常监测设备包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述计算机可读指令被所述 处理器执行时实现如上述任一项所述的流量异常监测方法的步骤。
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有基于模型的计算机可读指令,所述计算机可读指令被处理器执行时实现如上述任一项所述的流量异常监测方法的步骤。
本申请基于流量监测数据作为样本数据,根据预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数,进而构建所述自回归移动平均模型对应的模型函数,然后获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值,基于所述第一预测值及样本数据,根据预置卡尔曼滤波算法计算所述模型函数输出的流量理论值与实际值的协方差矩阵,通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值,根据所述协方差矩阵,对所述第二预测值的波动范围进行计算,得到待测时间的流量波动范围,监测待测时间的实际流量值,若所述实际流量值不在所述流量波动范围内,则判定待测时间流量异常。通过此方法,相比传统的单一模型预测方法,在时间序列模型的基础上引入卡尔曼滤波算法对第一预测结果进行校正并更新,使模型能够自适应地实现对流量波动的预测,更精准预测流量的波动范围,进行异常流量的监测。
附图说明
图1为本申请实施例方案涉及的流量异常监测设备运行环境的结构示意图;
图2为本申请流量异常监测方法第一实施例的流程示意图;
图3为图2中步骤S20一实施例的细化流程示意图;
图4为本申请流量异常监测方法第二实施例的流程示意图;
图5为本申请流量异常监测方法第三实施例的流程示意图;
图6为图2中步骤S50一实施例的细化流程示意图;
图7为本申请流量异常监测装置一实施例的功能模型示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
具体实施方式
应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。
本申请提供一种基于模型的流量监测设备。
参照图1,图1为本申请实施例方案涉及的流量异常监测设备运行环境的结构示意图。
如图1所示,该流量异常监测设备包括:处理器1001,例如CPU,通信总线1002、用户接口1003,网络接口1004,存储器1005。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。
如图1所示,作为一种计算机可读存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及计算机程序。其中,操作系统是管理和控制流量异常监测设备和软件资源的程序,支持计算机可读指令以及其它软件和/或程序的运行。
在图1所示的流量异常监测设备的硬件结构中,网络接口1004主要用于接入网络;用户接口1003主要用于侦测确认指令和编辑指令等。而处理器1001可以用于调用存储器1005中存储的计算机可读指令,并执行以下流量异常监测方法的各实施例的操作。
基于上述流量异常监测设备硬件结构,提出本申请流量异常监测方法的各个实施例。
参照图2,图2为本申请流量异常监测方法第一实施例的流程示意图。本实施例中,所述流量异常监测方法包括:
步骤S10:采集流量监测数据作为样本数据,其中,所述流量监测数据为监测网络上传输的数据量;
面对越来越复杂的网络互联环境和不断增加的网络流量,研究人员和学着需要使用更多的资源和时间去监控、分析这些网络流量的情况,来应对网络拥挤和堵塞的突发状况,以确保网络质量良好。传统的网络管理采用的是响应式方法,即在出现告警之后解决发生的问题,这时候网络服务已经受到了影响,当收到警报时,往往没有时间来采取相应的纠正措施。网络流量预测就是根据采集的实际网络流量观测值序列,建立网络流量预测模型,对将来的流量数据进行预测,并以此判断将来超越阈值的可能性和发生时间。管理者就可以在重点时段特别关注,在网络发生过载之前采取防范措施,从而有效的保障网络性能的稳定。
本实施例中,通过网络流量监测技术监测网络上传输的数据量,并根据预置统计时间,实时监测当前时间,若时间达到预置统计时间,则进行数据 量统计,生产流量监测数据。根据计算需要,从流量监测数据中采集部分数据作为样本数据,其中,所述样本数据是一段时间内不同时间点网络上流量的统计数据。需要注意的是,为使本方法的计算结果更精确,可采集月度数据、季度数据或年度数据。
例如,从过去2015年-2018年的网络流量监测数据中采集2016年-2018年的的网络流量监测数据作为样本数据。
步骤S20:基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数;
时间序列的变动往往呈现出一定的平稳特征,自回归移动平均模型就是借助时间序列的随机性来描述平稳序列的相关信息,并由此对时间序列的变化进行建模和预测。自回归移动平均模型包括三种模型,分别是自回归模型、移动平均模型以及自回归移动平均模型,其中,当对随机的时间序列数据进行建模时,需确定所述自回归移动平均模型的模型参数,而确定模型参数的方法可以使用样本矩估计法、最小二乘法,也可以利用极大似然函数计算模型参数的最大可能值,确定所述自回归移动平均模型的模型参数。
本实施例中,通过计算样本数据的概率分布,根据极大似然函数计算自回归移动平均模型中各模型参数的最大估计值,以确定自回归移动平均模型对应的模型函数,其中,采用极大似然函数的表达式如下:
Figure PCTCN2019119298-appb-000004
式中,S表示极大似然函数,μ、σ 2分别是样本数据的平均值和样本协方差矩阵,W t表示t时刻的流量值,n表示样本数据中共有n个流量统计值,f表示概率密度函数。
步骤S30:根据所述模型参数,构建所述自回归移动平均模型对应的模型函数;
本实施例中,自回归移动平均模型的模型参数包括自回归系数γ 1、移动平均系数ρ j,基于上述步骤中计算得到的模型参数的数值,根据自回归移动平均模型对应的模型框架,构建自回归移动平均模型的模型函数,得到用于预测待测时间理论流量的模型函数。
其中,自回归移动平均模型的表达式如下:
Figure PCTCN2019119298-appb-000005
式中,W t表示t时刻的流量值;γ 1、ρ j表示模型参数;α t表示t时刻流量的预测值与观测值的干扰项;p表示自回归 模型函数
Figure PCTCN2019119298-appb-000006
的阶次;q表示移动平均模型函数
Figure PCTCN2019119298-appb-000007
的阶次。
步骤S40:获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值,所述第一预测值包括所述历史时间中各时间点输入所述模型函数得到的流量理论值;
本实施例中,基于自回归移动平均模型的模型函数,获取样本数据对应的历史时间,将历史时间逐一输入所述模型函数,进行计算历史时间上的理论流量值,得到历史时间对应的第一预测值,计算所述第一预测值是为方便后期使用卡尔曼滤波算法进行计算所述模型函数计算出来的理论流量值相对实际流量值的协方差矩阵,其中,样本数据对应的历史时间至少包括1个时间点,多个时间点逐一输入模型函数进行流量预测,得到不同时间点的流量理论值,统计不同时间点的流量理论值,得到所述历史时间的是第一预测值。
例如,已有样本数据2017年到2018年间每个月网络数据传输的统计数据,通过自回归移动平均模型函数,计算2017年到2018年间每个月的理论流量值,得到2017年到2018年间的理论流量值的对应数据。
步骤S50:基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵;
卡尔曼滤波算法的原理是基于上一时刻的状态可以递推当前时刻的状态估计,通过上一时刻的协方差递推得到当前时刻的协方差估计,通过协方差估计及状态增益递推得到卡尔曼增益,然后根据实际数据以及估计数据,计算求得误差。
本实施例中,基于样本数据对应的历史时间即等同于卡尔曼滤波算法计算所需的上一时刻的理论流量值,得到历史时间的预测值即第一预测值,以及样本数据的实际流量值即实测数据,构建卡尔曼滤波算法的状态更新方程,并通过该状态更新方程,计算求解得到以自回归移动平均模型计算得到的理论值相比实际值存在的协方差矩阵。
步骤S60:通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值;
步骤S70:根据所述协方差矩阵,计算待测时间的流量波动范围;
本实施例中,通过自回归移动平均模型对网络流量进行预测,输入待测时间,根据自回归移动平均模型的模型函数,计算待测时间的流量预测值,得到待测时间的流量预测值即第二预测值。但只要是预测就会有预测误差,为了使预测的误差达到最小,通过前面卡尔曼滤波算法计算得到的协方差矩阵,动态调整第二预测值,得到调整结果,调整结果与第二预测值之间的范 围,即是待测时间的正常流量波动范围。
步骤S80:监测待测时间对应的实际流量值,判断所述实际值是否在所述流量波动范围内;
步骤S90:若所述实际值不在所述流量波动范围内,则判定待测时间流量异常。
随着人们生活水平的不断提高,越来越多的人们使用互联网进行网络活动,网络安全问题也越来越受到人们的重视。当出现超负荷网络数据传输时,会引起网络服务的迟滞,使用户的体验感降低,因而,实时监测网络流量是否正常,是保证网络服务及用户体验的重要内容。
本实施例中,实时监测待测时间对应的实际流量值,并判断实际流量值是否在预先预测的波动范围内,若出现实际流量值超过预先预测的流量波动范围,则判定待测时间的流量异常,进而采取相应的应对措施,以保证网络服务正常及优质用户体验。
本实施例基于流量监测数据作为样本数据,根据预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数,进而构建所述自回归移动平均模型对应的模型函数,然后获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值,基于所述第一预测值及样本数据,根据预置卡尔曼滤波算法计算所述模型函数输出的流量理论值与实际值的协方差矩阵,通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值,根据所述协方差矩阵,对所述第二预测值的波动范围进行计算,得到待测时间的流量波动范围,监测待测时间的实际流量值,若所述实际流量值不在所述流量波动范围内,则判定待测时间流量异常。通过此方法,相比传统的单一模型预测方法,在时间序列模型的基础上引入卡尔曼滤波算法对第一预测结果进行校正并更新,使模型能够自适应地实现对流量波动的预测,更精准预测流量的波动范围,进行异常流量的监测。
参照图3,图3为图2中步骤S20一实施例的细化流程示意图。在本实施例中,上述步骤S20包括:
步骤S201:将所述样本数据按时间先后顺序排列,得到所述样本数据的时间序列;
步骤S202:计算所述时间序列的自相关函数和偏自相关函数,并基于所述自相关函数和所述偏自相关函数的计算结果及预置规则,建立相应的自回归移动平均模型;
本实施例中,基于流量监测数据的样本数据,按数据的时间先后进行排 序,以得到所述样本数据的时间序列,检测该时间序列是否为平稳序列,若不是平稳序列,即对该序列进行d次差分处理,直到该时间序列为平稳序列。确定该时间序列为平稳序列后,根据自回归移动平均模型的原理,计算模型的自相关函数和偏自相关函数,进而根据自相关函数和偏自相关函数的特征,对应建立自回归模型、移动平均模型和自回归移动平均模型。其中,若所述自相关函数的计算结果不为零、所述偏自相关函数的计算结果为零,则根据预置规则建立自回归模型;若所述自相关函数的计算结果为零、所述偏自相关函数的计算结果不为零,则根据预置规则建立移动平均模型;若所述自相关函数和所述偏自相关函数的计算结果均不为零,则根据预置规则建立自回归移动平均模型。
步骤S203:采用极大似然函数计算所述自回归移动平均模型的模型参数,得到所述自回归移动平均模型的函数参数。
本实施例中,确定所述时间序列的匹配模型之后,利用极大似然函数对所述匹配模型的未知参数进行计算,以确定模型的未知参数,其中,所述匹配模型的未知参数包括自回归系数、移动平均系数,确定所述匹配模型的模型参数后,根据自回归移动平均模型的模型框架,构建自回归移动平均模型的模型函数。
其中,使用极大似然函数的表达式如下:
Figure PCTCN2019119298-appb-000008
式中,S表示极大似然函数,μ、σ 2分别是样本数据的平均值和样本协方差矩阵,W t表示t时刻的流量值,n表示样本数据中共有n个流量统计值,f表示概率密度函数。
参照图4,图4为本申请流量异常监测方法第二实施例的流程示意图。本实施例中,在上述步骤S202之前,还包括:
步骤S2001:检测所述时间序列是否为平稳序列;
步骤S2002:若所述时间序列不为平稳序列,则对所述时间序列进行差分处理,获取所述时间序列的平稳序列,其中,所述差分处理为计算所述时间序列中相邻两个时间节点的流量差值,即W t-i=W t-W i,式中的W t、W i表示所述时间序列中相邻两个时间节点的流量值,W t-i表示相邻两个时间节点的流量差值。
本实施例中,差分的结果反映离散数据之间的一种变化,对于平稳的时间序列,可以建立自回归模型、移动平均模型和自回归移动平均模型,而如果一个时间序列不是平稳序列,则无法对其建立自回归模型、移动平均模型 和自回归移动平均模型,这时候需要在原序列的基础上进行d次差分,一般经过一次差分后,一个非平稳序列就平稳化了,若经过一次差分还是非平稳,则可对其再次进行差分。
需要注意的是,过多差分会导致信息损失过多,预测精度降低,可以根据实际情况选择进行d次差分,对于有明显的线性趋势序列,一次差分就可以实现平稳;有明显曲线趋势的序列,2-3次差分即可实现平稳;有固定周期的序列,需要进行步长等于周期的差分;既有线性趋势又有周期的序列,需要做一次差分提取趋势,再做步长等于周期的差分提取周期。
参照图5,图5为本申请流量异常监测方法第三实施例的流程示意图。在本实施例中,在步骤S30之后,还包括:
步骤S3001:计算所述样本数据与所述第一预测数据的差值,并按时间先后顺序对所述差值进行排列,得到所述第一预测数据的残差序列;
本实施例中,残差就是实际值与预测值之间的差,当模型参数确定后,需要对模型进行检验,检验所构建的模型是否具有统计意义,即检验是否对时间序列提取足够充分的样本信息。计算样本数据与对应时间的预测数据之间的差值,并按对应时间的先后顺序进行排列,生成差值的序列即残差序列。
步骤S3002:检验所述残差序列是否为白噪声序列;
本实施例中,确定模型函数是否具体统计意义,以至于用来计算流量的预测值,需要检验该模型的残差序列是否是白噪声序列。计算该残差序列的协方差、方差和期望值,若该协方差、期望为零,方差为常数,则该残差序列为白噪声序列。
步骤S3003:若所述残差序列为白噪声序列,则设定所述模型函数用于计算流量的预测值。
本实施例中,根据白噪声序列特征,判断残差序列是否为白噪声序列,若该残差序列是白噪声序列,则说明该模型函数通过检验,可以用来计算流量的预测值;若该残差序列不是白噪声序列,则需要重新自相关函数和偏自相关函数的特征,建立相应的模型。
参照图6,图6为图2中步骤S50一实施例的细化流程示意图。本实施例中,上述步骤S50包括:
步骤S501:基于所述第一预测值及所述样本数据中对应的实际值,根据预置卡尔曼滤波算法建立所述第一预测值对应的卡尔曼滤波状态更新方程;
步骤S502:根据所述卡尔曼滤波状态更新方程,计算所述第一预测值的协方差矩阵。
已知卡尔曼滤波算法的原理是基于上一时刻的状态可以递推当前时刻的状态估计,通过上一时刻的协方差递推得到当前时刻的协方差估计,通过协方差估计及状态增益递推得到卡尔曼增益,然后根据实际数据以及估计数据,计算求得误差。
本实施例中,基于样本数据对应的历史时间即等同于卡尔曼滤波算法计算所需的上一时刻的理论流量值,得到历史时间的预测值即第一预测值,以及样本数据的实际流量值即实测数据,构建卡尔曼滤波算法的状态更新方程,并通过该状态更新方程,计算求解得到以自回归移动平均模型计算得到的理论值相比实际值存在的协方差矩阵。其中,卡尔曼滤波状态更新方程表达式如下:
X t=GX t-1,P t=GP t-1G t
式中,G表示卡尔曼增益矩阵,P表示协方差,X表示上一时刻的预测值,t表示时间。
其次,流量的变化送多种因素的影响,为避免预测产生较大误差,组合预测是提高精准度最好的方法。本实施例基于预测准确度高、实时性好且算法复杂度比较低的时间序列模型自回归移动平均模型进行预测,而后通过卡尔曼滤波算法计算预测值与实际值之间的协方差矩阵,以及通过卡尔曼滤波调整特性对时间序列进行修正,降低预测值与实际值间的误差。
本申请还提供一种流量预测装置。
参照图7,图7为本申请流量异常监测装置一实施例的功能模型示意图。本实施例中,所述流量异常监测装置包括:
采集模块10,用于采集流量监测数据作为样本数据,其中,所述流量监测数据为监测网络访问量的数据;
第一计算模块20,用于基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数;
构建模块30,用于根据所述模型参数,构建所述自回归移动平均模型对应的模型函数;
第二计算模块40,用于获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值,所述第一预测值包括所述历史时间中各时间点输入所述模型函数得到的流量理论值;
第三计算模块50,用于基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵;
第四计算模块60,用于通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值;
第五计算模块70,用于根据所述协方差,计算待测时间的流量波动范围;
判断模块80,用于监测待测时间对应的实际流量值,判断所述实际值是否在所述流量波动范围内;
判定模块90,用于若所述实际值不在所述流量波动范围内,则判定待测时间流量异常。
本实施例中,采集模块10采集流量监测数据作为样本数据,第一计算模块20基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数,构建模块30根据所述模型参数,构建所述自回归移动平均模型对应的模型函数,第二计算模块40获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值,所述第一预测值包括所述历史时间中各时间点输入所述模型函数得到的流量理论值,第三计算模块50基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵,第四计算模块60通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值,第五计算模块70根据所述协方差,计算待测时间的流量波动范围,判断模块80根据第五计算模块70得到的流量波动范围,实时监测待测时间对应的实际流量值,判断所述实际值是否在所述流量波动范围内,判定模块90,用于若所述实际值不在所述流量波动范围内,则判定待测时间流量异常。
本申请还提供一种计算机可读存储介质。
本实施例中,所述计算机可读存储介质上存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如上述任一项实施例中所述的流量异常监测方法的步骤,其中,所述存储介质可以为非易失性存储介质,也可以为易失性存储介质。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器或者网络设备等)执行本申请各个实施例所述的方法。

Claims (20)

  1. 一种基于模型的流量异常监测方法,所述流量异常监测方法包括:
    采集流量监测数据作为样本数据,其中,所述流量监测数据为监测网络上传输的数据量;
    基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数;
    根据所述模型参数,构建所述自回归移动平均模型对应的模型函数;
    获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值;
    基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵;
    通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值;
    根据所述协方差矩阵,计算待测时间的流量波动范围;
    监测待测时间对应的实际流量值,判断所述实际值是否超过所述流量波动范围;
    若所述实际值超过所述流量波动范围,则确定待测时间流量异常。
  2. 如权利要求1所述的流量异常监测方法,所述基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数包括:
    将所述样本数据按时间先后顺序排列,得到所述样本数据的时间序列;
    计算所述时间序列的自相关函数和偏自相关函数,并基于所述自相关函数和所述偏自相关函数的计算结果及预置规则,建立相应的自回归移动平均模型;
    采用极大似然函数计算所述自回归移动平均模型的模型参数,得到所述自回归移动平均模型的函数参数。
  3. 如权利要求2所述的流量异常监测方法,在所述计算所述时间序列的自相关函数和偏自相关函数的步骤之前,还包括:
    检测所述时间序列是否为平稳序列;
    若所述时间序列不为平稳序列,则对所述时间序列进行差分处理,获取所述时间序列的平稳序列,其中,所述差分处理为计算所述时间序列中相邻两个时间节点的流量差值,即W t-i=W t-W i,式中的W t、W i表示所述时间序列中相邻两个时间节点的流量值,W t-i表示相邻两个时间节点的流量差值。
  4. 如权利要求1所述的流量异常监测方法,在所述根据所述模型参数,构建所述自回归移动平均模型对应的模型函数的步骤之后,还包括:
    计算所述样本数据与所述第一预测值的差值,并按时间先后顺序对所述差值进行排列,得到所述第一预测值的残差序列;
    检验所述残差序列是否为白噪声序列;
    若所述残差序列为白噪声序列,则设定所述模型函数用于计算流量的预测值。
  5. 如权利要求1所述的流量异常监测方法,所述基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵包括:
    基于所述第一预测值及所述样本数据中对应的实际值,根据预置卡尔曼滤波算法建立所述第一预测值对应的卡尔曼滤波状态更新方程;
    根据所述卡尔曼滤波状态更新方程,计算所述第一预测值的协方差矩阵。
  6. 如权利要求5所述的流量异常监测方法,所述卡尔曼滤波状态更新方程表达式如下:
    X t=GX t-1,P t=GP t-1G t
    其中,G表示卡尔曼增益矩阵,P表示协方差,X表示上一时刻的预测值,t表示时间。
  7. 如权利要求1所述的流量异常监测方法,所述自回归移动平均模型的表达式如下:
    Figure PCTCN2019119298-appb-100001
    其中,W t表示t时刻的流量实际值;γ 1、ρ j表示模型参数;α t表示t时刻流量的预测值与观测值的干扰项;p表示自回归模型函数
    Figure PCTCN2019119298-appb-100002
    的阶次;q表示移动平均模型函数
    Figure PCTCN2019119298-appb-100003
    的阶次。
  8. 一种基于模型的流量异常监测装置,所述流量异常监测装置包括:
    采集模块,用于采集流量监测数据作为样本数据,其中,所述流量监测数据为监测网络访问量的数据;
    第一计算模块,用于基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数;
    构建模块,用于根据所述模型参数,构建所述自回归移动平均模型对应的模型函数;
    第二计算模块,用于获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值,所述第一预测值包括所述历史时间中各时间点输入所述模型函数得到的流量理论值;
    第三计算模块,用于基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵;
    第四计算模块,用于通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值;
    第五计算模块,用于根据所述协方差,计算待测时间的流量波动范围;
    判断模块,用于监测待测时间对应的实际流量值,判断所述实际值是否在所述流量波动范围内;
    判定模块,用于若所述实际值不在所述流量波动范围内,则判定待测时间流量异常。
  9. 如权利要求8所述的流量异常监测装置,所述第一计算模块包括:
    排列单元,用于将所述样本数据按时间先后顺序排列,得到所述样本数据的时间序列;
    建立单元,用于计算所述时间序列的自相关函数和偏自相关函数,并基于所述自相关函数和所述偏自相关函数的计算结果及预置规则,建立相应的自回归移动平均模型;
    第一计算单元,用于采用极大似然函数计算所述自回归移动平均模型的模型参数,得到所述自回归移动平均模型的函数参数。
  10. 如权利要求9所述的流量异常监测装置,所述流量异常监测装置还包括:
    检测模块,用于检测所述时间序列是否为平稳序列;
    差分模块,用于若所述时间序列不为平稳序列,则对所述时间序列进行差分处理,获取所述时间序列的平稳序列,其中,所述差分处理为计算所述时间序列中相邻两个时间节点的流量差值,即W t-i=W t-W i,式中的W t、W i表示所述时间序列中相邻两个时间节点的流量值,W t-i表示相邻两个时间节点的流量差值。
  11. 如权利要求8所述的流量异常监测装置,所述流量异常监测装置还包括:
    第六计算模块,用于计算所述样本数据与所述第一预测值的差值,并按时间先后顺序对所述差值进行排列,得到所述第一预测值的残差序列;
    检验模块,用于检验所述残差序列是否为白噪声序列;
    设定模块,用于若所述残差序列为白噪声序列,则设定所述模型函数用于计算流量的预测值。
  12. 如权利要求8所述的流量异常监测装置,所述第三计算模块包括:
    建立单元,用于基于所述第一预测值及所述样本数据中对应的实际值, 根据预置卡尔曼滤波算法建立所述第一预测值对应的卡尔曼滤波状态更新方程;
    第二计算单元,用于根据所述卡尔曼滤波状态更新方程,计算所述第一预测值的协方差矩阵。
  13. 一种基于模型的流量异常监测设备,所述流量异常监测设备包括存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的计算机可读指令,所述计算机可读指令被所述处理器执行时实现如下的步骤:
    采集流量监测数据作为样本数据,其中,所述流量监测数据为监测网络上传输的数据量;
    基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数;
    根据所述模型参数,构建所述自回归移动平均模型对应的模型函数;
    获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值;
    基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵;
    通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值;
    根据所述协方差矩阵,计算待测时间的流量波动范围;
    监测待测时间对应的实际流量值,判断所述实际值是否超过所述流量波动范围;
    若所述实际值超过所述流量波动范围,则确定待测时间流量异常。
  14. 如权利要求13所述的流量异常监测设备,所述计算机可读指令被一个或多个所述处理器执行所述基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数时,执行如下步骤:
    将所述样本数据按时间先后顺序排列,得到所述样本数据的时间序列;
    计算所述时间序列的自相关函数和偏自相关函数,并基于所述自相关函数和所述偏自相关函数的计算结果及预置规则,建立相应的自回归移动平均模型;
    采用极大似然函数计算所述自回归移动平均模型的模型参数,得到所述自回归移动平均模型的函数参数。
  15. 如权利要求14所述的流量异常监测设备,所述计算机可读指令被一个或多个所述处理器执行时,使得一个或多个所述处理器还执行如下步骤:
    检测所述时间序列是否为平稳序列;
    若所述时间序列不为平稳序列,则对所述时间序列进行差分处理,获取 所述时间序列的平稳序列,其中,所述差分处理为计算所述时间序列中相邻两个时间节点的流量差值,即W t-i=W t-W i,式中的W t、W i表示所述时间序列中相邻两个时间节点的流量值,W t-i表示相邻两个时间节点的流量差值。
  16. 如权利要求13所述的流量异常监测设备,所述计算机可读指令被一个或多个所述处理器执行时,使得一个或多个所述处理器还执行如下步骤:
    计算所述样本数据与所述第一预测值的差值,并按时间先后顺序对所述差值进行排列,得到所述第一预测值的残差序列;
    检验所述残差序列是否为白噪声序列;
    若所述残差序列为白噪声序列,则设定所述模型函数用于计算流量的预测值。
  17. 如权利要求13所述的流量异常监测设备,所述计算机可读指令被一个或多个所述处理器执行所述基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵时,执行如下步骤:
    基于所述第一预测值及所述样本数据中对应的实际值,根据预置卡尔曼滤波算法建立所述第一预测值对应的卡尔曼滤波状态更新方程;
    根据所述卡尔曼滤波状态更新方程,计算所述第一预测值的协方差矩阵。
  18. 如权利要求17所述的流量异常监测设备,所述卡尔曼滤波状态更新方程表达式如下:
    X t=GX t-1,P t=GP t-1G t
    其中,G表示卡尔曼增益矩阵,P表示协方差,X表示上一时刻的预测值,t表示时间。
  19. 一种计算机可读存储介质,所述计算机可读存储介质上存储有基于模型的计算机可读指令,所述计算机可读指令被处理器执行时实现如下步骤:
    采集流量监测数据作为样本数据,其中,所述流量监测数据为监测网络上传输的数据量;
    基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数;
    根据所述模型参数,构建所述自回归移动平均模型对应的模型函数;
    获取所述样本数据对应的历史时间,并根据所述模型函数计算所述历史时间对应的流量预测值,得到第一预测值;
    基于所述第一预测值、所述样本数据中对应的实际值及预置卡尔曼滤波算法,计算所述模型函数所输出的流量理论值与实际值的协方差矩阵;
    通过所述模型函数对待测时间的流量值进行流量预测计算,得到第二预测值;
    根据所述协方差矩阵,计算待测时间的流量波动范围;
    监测待测时间对应的实际流量值,判断所述实际值是否超过所述流量波动范围;
    若所述实际值超过所述流量波动范围,则确定待测时间流量异常。
  20. 如权利要求19所述的计算机可读存储介质,所述计算机可读指令被一个或多个所述处理器执行所述基于所述样本数据和预置自回归移动平均模型,计算所述自回归移动平均模型的模型参数时,执行如下步骤:
    将所述样本数据按时间先后顺序排列,得到所述样本数据的时间序列;
    计算所述时间序列的自相关函数和偏自相关函数,并基于所述自相关函数和所述偏自相关函数的计算结果及预置规则,建立相应的自回归移动平均模型;
    采用极大似然函数计算所述自回归移动平均模型的模型参数,得到所述自回归移动平均模型的函数参数。
PCT/CN2019/119298 2019-10-18 2019-11-19 基于模型的流量异常监测方法、装置、设备及存储介质 WO2021072890A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910991163.3 2019-10-18
CN201910991163.3A CN110880984B (zh) 2019-10-18 2019-10-18 基于模型的流量异常监测方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021072890A1 true WO2021072890A1 (zh) 2021-04-22

Family

ID=69727906

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/119298 WO2021072890A1 (zh) 2019-10-18 2019-11-19 基于模型的流量异常监测方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN110880984B (zh)
WO (1) WO2021072890A1 (zh)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705076A (zh) * 2021-07-07 2021-11-26 国家能源集团新能源技术研究院有限公司 基于偏最小二乘法的风电机组齿轮箱状态监测方法及控制装置
CN113850418A (zh) * 2021-09-02 2021-12-28 支付宝(杭州)信息技术有限公司 时间序列中异常数据的检测方法和装置
CN113946795A (zh) * 2021-09-17 2022-01-18 山东大学 一种超声波飞行时间估计方法
CN114205190A (zh) * 2021-12-03 2022-03-18 中国长江三峡集团有限公司 一种用于物联网关的自主监测协调方法
CN114528934A (zh) * 2022-02-18 2022-05-24 中国平安人寿保险股份有限公司 时序数据异常检测方法、装置、设备及介质
CN115158399A (zh) * 2022-06-14 2022-10-11 通号城市轨道交通技术有限公司 时序信号异常检测方法及系统
CN115964620A (zh) * 2023-03-15 2023-04-14 阿里巴巴(中国)有限公司 数据处理方法、存储介质和电子设备
CN116628616A (zh) * 2023-07-20 2023-08-22 山东万辉新能源科技有限公司 一种大功率充电能源的数据处理方法及系统
CN116662413A (zh) * 2023-07-25 2023-08-29 成都千嘉科技股份有限公司 基于燃气用量数据拆解画像的工商用户业态变化监控方法
CN116708030A (zh) * 2023-08-04 2023-09-05 浙江大学 工业边缘计算网关及其协议流量监测方法、装置
CN116915517A (zh) * 2023-09-14 2023-10-20 厦门快快网络科技有限公司 一种云服务资源风险安全管理方法
CN117490002A (zh) * 2023-12-28 2024-02-02 成都同飞科技有限责任公司 基于流量监测数据的供水管网流量预测方法及系统
CN117668472A (zh) * 2024-02-02 2024-03-08 暨南大学 一种海岛礁环境多参量监测方法及系统
CN117875797A (zh) * 2024-03-12 2024-04-12 广东华宸建设工程质量检测有限公司 一种建设工程协同监理方法及系统
CN118010939A (zh) * 2024-04-10 2024-05-10 山东华检检测有限公司 一种智能化甲醛检测方法

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112087350B (zh) * 2020-09-17 2022-03-18 中国工商银行股份有限公司 网络接入线路的流量监控方法、装置、系统和介质
CN112148722B (zh) * 2020-10-14 2022-06-03 四川长虹电器股份有限公司 一种监测数据异常的识别及处理方法和系统
CN113157204B (zh) * 2021-01-29 2022-11-18 杭州优云软件有限公司 一种基于二阶差分法识别人工清理行为的磁盘容量预测方法
CN113433913B (zh) * 2021-07-06 2023-03-24 上海新氦类脑智能科技有限公司 系统监测模型生成及监测方法、处理器芯片以及工业系统
CN113543188B (zh) * 2021-07-22 2023-10-27 中移(杭州)信息技术有限公司 无线网络信号质量检测方法、终端设备及存储介质
CN113747487B (zh) * 2021-07-23 2024-04-02 山东师范大学 基于黎曼流形的无线基站流量异常漂移检测方法及系统
CN114593375B (zh) * 2022-03-30 2023-04-11 常州通用自来水有限公司 基于泵房能耗的二次供水小区管道漏损监测和定位方法
CN115964361B (zh) * 2022-11-14 2023-07-14 苏州浪潮智能科技有限公司 一种数据增强方法、系统、设备及计算机可读存储介质
CN115876964B (zh) * 2023-01-31 2024-01-23 北方工业大学 一种城市街区气候环境与碳排放移动监测预警方法及系统
CN116303786B (zh) * 2023-03-18 2023-10-27 上海圈讯科技股份有限公司 一种基于多维数据融合算法的区块链金融大数据管理系统

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771758A (zh) * 2008-12-31 2010-07-07 北京亿阳信通软件研究院有限公司 一种性能指标值正常波动范围的动态确定方法及其装置
CN109995562A (zh) * 2017-12-30 2019-07-09 中国移动通信集团河北有限公司 网络业务量预测方法、装置、设备及介质

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5884037A (en) * 1996-10-21 1999-03-16 International Business Machines Corporation System for allocation of network resources using an autoregressive integrated moving average method
US7346471B2 (en) * 2005-09-02 2008-03-18 Microsoft Corporation Web data outlier detection and mitigation
US7606684B1 (en) * 2005-12-08 2009-10-20 SignalDemand, Inc. Model creation tool for econometric models
US20080033991A1 (en) * 2006-08-03 2008-02-07 Jayanta Basak Prediction of future performance of a dbms
US8472328B2 (en) * 2008-07-31 2013-06-25 Riverbed Technology, Inc. Impact scoring and reducing false positives
CN101964998B (zh) * 2009-07-24 2013-09-11 北京亿阳信通科技有限公司 一种电信网络普通节日话务量的预测方法及其装置
CN102369689B (zh) * 2011-08-11 2014-05-07 华为技术有限公司 一种网络流量的长期预测方法及装置
CN102355381B (zh) * 2011-08-18 2014-03-12 网宿科技股份有限公司 自适应的差分自回归移动平均模型的流量预测方法和系统
US20140324743A1 (en) * 2013-04-30 2014-10-30 Hewlett-Packard Development Company, L.P. Autoregressive model for time-series data
CN104269055A (zh) * 2014-09-24 2015-01-07 四川省交通科学研究所 基于时间序列的高速公路交通流量预测方法
CN107070683A (zh) * 2016-12-12 2017-08-18 国网北京市电力公司 数据预测的方法和装置
CN109451522A (zh) * 2018-09-21 2019-03-08 邵阳学院 一种面向蓝牙网关的流量预测方法及装置
CN109379240B (zh) * 2018-12-25 2021-06-25 湖北亿咖通科技有限公司 车联网流量预测模型构建方法、装置和电子设备
CN110086649B (zh) * 2019-03-19 2023-06-16 深圳壹账通智能科技有限公司 异常流量的检测方法、装置、计算机设备及存储介质

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101771758A (zh) * 2008-12-31 2010-07-07 北京亿阳信通软件研究院有限公司 一种性能指标值正常波动范围的动态确定方法及其装置
CN109995562A (zh) * 2017-12-30 2019-07-09 中国移动通信集团河北有限公司 网络业务量预测方法、装置、设备及介质

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LU, XIAOFAN: "LAN Network Traffic Analysis and Research", CHINA MASTER’S THESES FULL-TEXT DATABASE, 1 April 2011 (2011-04-01), pages 1 - 52, XP055801211, [retrieved on 20210504] *
QI JINGXIANG; CHU YANJIE; HE LIANG: "Iterative Anomaly Detection Algorithm Based on Time Series Analysis", 2018 IEEE 15TH INTERNATIONAL CONFERENCE ON MOBILE AD HOC AND SENSOR SYSTEMS (MASS), IEEE, 9 October 2018 (2018-10-09), pages 548 - 552, XP033468933, DOI: 10.1109/MASS.2018.00085 *

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113705076A (zh) * 2021-07-07 2021-11-26 国家能源集团新能源技术研究院有限公司 基于偏最小二乘法的风电机组齿轮箱状态监测方法及控制装置
CN113705076B (zh) * 2021-07-07 2024-04-19 国家能源集团新能源技术研究院有限公司 基于偏最小二乘法的风电机组齿轮箱状态监测方法及控制装置
CN113850418A (zh) * 2021-09-02 2021-12-28 支付宝(杭州)信息技术有限公司 时间序列中异常数据的检测方法和装置
CN113946795A (zh) * 2021-09-17 2022-01-18 山东大学 一种超声波飞行时间估计方法
CN114205190A (zh) * 2021-12-03 2022-03-18 中国长江三峡集团有限公司 一种用于物联网关的自主监测协调方法
CN114205190B (zh) * 2021-12-03 2023-07-14 中国长江三峡集团有限公司 一种用于物联网关的自主监测协调方法
CN114528934A (zh) * 2022-02-18 2022-05-24 中国平安人寿保险股份有限公司 时序数据异常检测方法、装置、设备及介质
CN115158399B (zh) * 2022-06-14 2023-10-17 通号城市轨道交通技术有限公司 时序信号异常检测方法及系统
CN115158399A (zh) * 2022-06-14 2022-10-11 通号城市轨道交通技术有限公司 时序信号异常检测方法及系统
CN115964620A (zh) * 2023-03-15 2023-04-14 阿里巴巴(中国)有限公司 数据处理方法、存储介质和电子设备
CN115964620B (zh) * 2023-03-15 2023-12-12 阿里巴巴(中国)有限公司 数据处理方法、存储介质和电子设备
CN116628616B (zh) * 2023-07-20 2023-09-26 山东万辉新能源科技有限公司 一种大功率充电能源的数据处理方法及系统
CN116628616A (zh) * 2023-07-20 2023-08-22 山东万辉新能源科技有限公司 一种大功率充电能源的数据处理方法及系统
CN116662413A (zh) * 2023-07-25 2023-08-29 成都千嘉科技股份有限公司 基于燃气用量数据拆解画像的工商用户业态变化监控方法
CN116662413B (zh) * 2023-07-25 2023-10-27 成都千嘉科技股份有限公司 基于燃气用量数据拆解画像的工商用户业态变化监控方法
CN116708030A (zh) * 2023-08-04 2023-09-05 浙江大学 工业边缘计算网关及其协议流量监测方法、装置
CN116915517A (zh) * 2023-09-14 2023-10-20 厦门快快网络科技有限公司 一种云服务资源风险安全管理方法
CN116915517B (zh) * 2023-09-14 2023-11-24 厦门快快网络科技有限公司 一种云服务资源风险安全管理方法
CN117490002A (zh) * 2023-12-28 2024-02-02 成都同飞科技有限责任公司 基于流量监测数据的供水管网流量预测方法及系统
CN117490002B (zh) * 2023-12-28 2024-03-08 成都同飞科技有限责任公司 基于流量监测数据的供水管网流量预测方法及系统
CN117668472A (zh) * 2024-02-02 2024-03-08 暨南大学 一种海岛礁环境多参量监测方法及系统
CN117668472B (zh) * 2024-02-02 2024-04-05 暨南大学 一种海岛礁环境多参量监测方法及系统
CN117875797A (zh) * 2024-03-12 2024-04-12 广东华宸建设工程质量检测有限公司 一种建设工程协同监理方法及系统
CN118010939A (zh) * 2024-04-10 2024-05-10 山东华检检测有限公司 一种智能化甲醛检测方法

Also Published As

Publication number Publication date
CN110880984A (zh) 2020-03-13
CN110880984B (zh) 2022-12-27

Similar Documents

Publication Publication Date Title
WO2021072890A1 (zh) 基于模型的流量异常监测方法、装置、设备及存储介质
WO2020215721A1 (zh) 一种激光雷达的寿命预测方法
US6973415B1 (en) System and method for monitoring and modeling system performance
JP5459608B2 (ja) 通信網の障害原因分析システムと障害原因分析方法、及び障害原因分析用プログラム
US7082381B1 (en) Method for performance monitoring and modeling
JP5612696B2 (ja) 通信ネットワーク内のサービス品質結果の特定及びアクセスのためのネットワーク管理システム及び方法
EP2278502A1 (en) Deleting data stream overload
CN108269189B (zh) 指标数据监控方法、装置、存储介质和计算机设备
CN111314173B (zh) 监控信息异常的定位方法、装置、计算机设备及存储介质
US7197428B1 (en) Method for performance monitoring and modeling
US20100125755A1 (en) Method to identify performance and capacity bottlenecks of complex systems
US9235463B2 (en) Device and method for fault management of smart device
CN113127305A (zh) 异常检测方法及装置
US20090138238A1 (en) Sequential fixed-point quantile estimation
KR101910866B1 (ko) 컴퓨터 수행 가능한 서버 부하 모니터링 방법, 이를 수행하는 장치 및 이를 기록하는 기록매체
CN106357445B (zh) 一种用户体验监控方法及监控服务器
JP4934660B2 (ja) 通信帯域算出方法、装置、およびトラヒック管理方法
CN112565275B (zh) 一种网络安全场景的异常检测方法、装置、设备及介质
CN113821933A (zh) App流量预测方法、装置、计算机设备及存储介质
US9054995B2 (en) Method of detecting measurements in service level agreement based systems
US12001309B2 (en) Method and apparatus for predicting application service response time in communication system
CN113032227B (zh) 一种异常网元检测方法、装置、电子设备及存储介质
US9921900B1 (en) Methods and apparatus for system monitoring
US20230053568A1 (en) Method and apparatus for predicting application service response time in communication system
TWI749072B (zh) 異常訊務偵測伺服器及其異常訊務偵測方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19949051

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19949051

Country of ref document: EP

Kind code of ref document: A1