The invention discloses a network traffic monitoring method and device. Among them, the method includes: obtaining configuration data, user configuration, the configuration data including speed rate; according to the corresponding relationship between the speed limit rate interval preset and add token period of time, the rate of acquisition and allocation of the speed limit interval corresponding to the time period, which, in the corresponding relationship. The greater the value limit rate interval corresponding to the time period of the smaller; the configuration token token bucket add time period. For the time period of access; supervise the use of the token bucket of network traffic. According to the invention, according to the speed rate of user configuration, dynamically add tokens, which solves the problem of adding time period because the token resulting from fixed speed error, thereby improving the accuracy of speed limit.
【技术实现步骤摘要】
【技术保护点】
一种网络流量监管方法,其特征在于,包括:获取用户配置的配置数据,其中,所述配置数据包括限速速率;根据预先设定的限速速率区间与添加令牌的时间周期的对应关系,获取与配置的所述限速速率所在区间对应的时间周期,其中,在所述对应关系中,值越大的限速速率区间对应的时间周期越小;将配置令牌桶添加令牌的时间周期更新为获取的所述时间周期;使用所述令牌桶对网络的流量进行监管。
【技术特征摘要】
【专利技术属性】
技术研发人员:钟秀琼,
申请(专利权)人:中兴通讯股份有限公司,
类型:发明
国别省市:94
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。