A kind of bandwidth allocation methods and device
Technical field
The present invention relates to bandwidth allocation field, more particularly to a kind of bandwidth allocation methods and device.
Background technology
At present can access band terminal device it is more and more, average family also have multiple pc and mobile phone by wired or
Wirelessly connection route device access band.Generally most of band can be taken when a device downloads file or buffered video
Width, the bandwidth meeting very little that other equipment is assigned to is so that it cannot meet normal browsing webpage or game running.
Existing solution is that can add the bandwidth restriction rule to IP address in the router to limit distinct device
Bandwidth.Bandwidth restriction rule is added to different equipment by use demands different every time and takes band to solve individual plants
It is wider than the problem of high.
The setting rule that existing addition is controlled router bandwidth is static configuration, it is necessary to which the equipment of speed limit is added one by one
Add rule.Have during new equipment access, it is necessary to which new equipment, which is added in speed limit rule, could realize control.When the equipment of access becomes
When more frequent, if user is unaffected in order to maintain certain equipment, need frequently to be added to new connection equipment one by one
In restriction rule.This pattern needs user frequently to configure, very unfriendly for the user that not quite understands collocation method, frequency
Numerous configuration can also reduce user's likability.
The content of the invention
In view of the above problems, the application describes a kind of bandwidth allocation methods, and suitable for router, methods described includes step
Suddenly:
Detection accesses the total bandwidth of the network of the router;
The flow of all devices to accessing the router detects, and obtains the traffic demand of each equipment;
According to the traffic demand of each equipment, statistics needs the equipment of high bandwidth and obtains statistics knot
Fruit;
The not speed limit list according to whether the statistical result judges to need the equipment of high bandwidth to be all present in
In;
If desired the equipment of high bandwidth all exists or is entirely absent in the not speed limit list, then basis
The total bandwidth distributes same band to the equipment for needing high bandwidth;
If desired the environment division of high bandwidth is present in the not speed limit list, then described unlimited to being not present in
In fast list and the equipment of high bandwidth is needed to carry out bandwidth limitation, and according to the total bandwidth to not speed limit described in being present in
In list and the equipment of high bandwidth is needed to distribute same band.
Preferably, also include step after the total bandwidth of the network of the detection access router:
Show the list of devices for all equipment being connected with the router;
User selects that the equipment of speed limit need not be carried out from the list of devices;
The MAC Address of the equipment selected by user is stored in the not speed limit list.
Preferably, also include step after the traffic demand of each equipment is obtained:
Detect in the router with the presence or absence of static speed limit rule;
If in the presence of not to added with described during statistics needs the equipment of high bandwidth and obtains statistical result
The equipment of static speed limit rule is counted;
If being not present, perform step counted according to the traffic demand of each equipment need high bandwidth described in set
It is standby and obtain statistical result.
Preferably, bandwidth limitation is carried out to the equipment added with the static speed limit rule.
Preferably, the not speed limit list includes the MAC Address for being connected to all equipment of the router.
Present invention also offers a kind of bandwidth allocation device, described device includes:
Total bandwidth detection unit, to detect the total bandwidth of the network of couple in router;
Selecting unit, it is connected with the total bandwidth detection unit, the MAC Address of the equipment of speed limit will need not be carried out
It is stored in not speed limit list;
Static speed limit detection unit, it is connected with the total bandwidth detection unit, static speed limit rule is added with to count
The equipment;
Flow detection unit, it is connected with the static speed limit detection unit, is needed to detect the bandwidth of all equipment
Ask;
Statistic unit, it is connected with the flow detection unit, needs the equipment of high bandwidth to count and obtain system
Count result;
Not speed limit list query unit, fast detection unit is connected before the statistic unit and the static state, uses
Whether there is the equipment being present in not speed limit list in the statistical result to detect and obtain Query Result;
Allocation unit, be connected with the not speed limit list query unit, to according to the Query Result to the equipment
Carry out bandwidth allocation.
Preferably, the selecting unit includes:
Subelement is shown, is connected with the total bandwidth detection unit, to show all institutes being connected with the router
State the list of devices of equipment;
Subelement is selected, is connected with the display subelement, speed limit need not be carried out selected by user to record
The equipment;
Storing sub-units, it is connected with the selection subelement, to by the institute that need not carry out speed limit selected by user
The MAC Address for stating equipment is stored in the not speed limit list.
Above-mentioned technical proposal has the following advantages that or beneficial effect:The present invention is recorded with equipment, automatic detection, automatically distribution
Premised on, not speed limiting device need to be only added in list, even if there are multiple new equipment connection route devices, without adding speed limit
The equipment normal use of not speed limit can preferentially be met;The present invention realizes automatic detection, Intelligent control, frequently enters without user
Row configuration;Do not conflict with original static rule, user can be according to being actually needed addition unalterable rules.
Brief description of the drawings
With reference to appended accompanying drawing, more fully to describe embodiments of the invention.However, appended accompanying drawing be merely to illustrate and
Illustrate, and be not meant to limit the scope of the invention.
Fig. 1 is a kind of flow chart one of bandwidth allocation methods of the present invention;
Fig. 2 is a kind of flowchart 2 of bandwidth allocation methods of the present invention;
Fig. 3 is a kind of flow chart 3 of bandwidth allocation methods of the present invention;
Fig. 4 is a kind of structural representation one of bandwidth allocation device of the present invention;
A kind of structural representation two of bandwidth allocation device of Fig. 5 positions present invention.
Embodiment
Bandwidth allocation methods of the present invention and device are described in detail with specific embodiment below in conjunction with the accompanying drawings.
Embodiment one
As shown in figure 1, a kind of bandwidth allocation methods, including step:
Detect the total bandwidth of network;
The flow of all devices to accessing the router is timed detection, obtains the flow of each equipment and needs
Ask;
The equipment of high bandwidth is needed according to traffic demand statistics, obtains statistical result;In the statistical result
Including the MAC Address for all devices for needing high bandwidth;
The not speed limit list according to whether the statistical result judges to need the equipment of high bandwidth to be all present in
In;
When the equipment for needing high bandwidth is all present or is entirely absent in the not speed limit list, then to this
A little equipment distribution same bands;Otherwise, bandwidth limitation is carried out to the equipment being not present in the not speed limit list, it is other
Need high bandwidth equipment distribute same band.That is, the priority phase for all devices being present in the not speed limit list
Together, when the equipment in not speed limit list needs high bandwidth, then router distributes identical bandwidth to these equipment, if not
When equipment in speed limit list and outside list needs high bandwidth simultaneously, it is necessary to preferentially the equipment in not speed limit list is distributed
Bandwidth, the equipment outside list carry out the limitation processing of bandwidth.Meanwhile bandwidth preferentially is distributed to the equipment in not speed limit list, this
A little equipment still distribute same band.
Specifically, a not speed limit list in router be present, be stored with the list and be connected to the router
The MAC Address of equipment.After router connection network, first have to judge wide-band type by WAN mouths IP, the wide-band type includes
Telecommunications, Netcom etc., then send packet to the website of testing the speed of telecommunications or Netcom and tested, to obtain total band in the broadband
It is wide.It is every to obtain, it is necessary to be timed detection to the flow for every equipment for accessing the router after router unlatching process
The traffic demand of the individual equipment.When multiple equipment be present and be required to high bandwidth, judge that these equipment whether there is in described
Not in speed limit list.When these equipment have the not speed limit list, illustrate that the priority of these equipment is identical, then now road
By device these equipment are allocated with same band processing;If these need the MAC Address for having equipment in the equipment of high bandwidth
It is not recorded in the not speed limit list, and other equipment are present in this not in speed limit list, then router is not to
The equipment being present in not speed limit list carries out bandwidth limitation processing, preferentially meets the normal use of the equipment in list.Except this
Outside, equipment of the router to being not present in the not speed limit list, acquiescence by the way of mean allocation bandwidth.
As shown in Fig. 2 in addition, also include step after the traffic demand of each equipment is obtained:
The all devices title of the router connection is shown on APP or WEB page;
The equipment that user's selection need not carry out speed limit;
The MAC Address of the equipment selected by user is stored in the not speed limit list.
Specifically, after router open function, can be shown on APP or WEB page at present with the router
The list of devices of connected all devices, and also have an option for adding not speed limit list behind each device name, when
After user selects addition one or more of which equipment, the MAC Address of these equipment can be stored in not speed limit list.Letter
For list, after router obtains total bandwidth and after open function, list of devices can be shown by APP or WEB page,
The equipment that user need not carry out speed limit by list of devices selection, the selection of user can be stored in not speed limit list.
Therefore when all devices normal operation, it becomes possible to according to being actually needed to judge whether to carry out speed limit to the equipment for user
Processing.
In addition, when user sets not speed limit list, additionally it is possible to by original mode to needing the equipment relatively fixed
Add static limitation bandwidth rule, i.e., static restriction rule.As shown in figure 3, need the equipment of high bandwidth simultaneously in statistics
Obtain statistical result also includes step afterwards:
Detect in all-router with the presence or absence of static speed limit rule;
If so, the equipment of the statistics addition static speed limit rule, and height is being needed according to traffic demand statistics
The equipment added with the static speed limit rule is not counted during the equipment of bandwidth;
Otherwise, according to the equipment that high bandwidth is needed in the statistics traffic demand statistics all devices.
User adds static speed limit rule by original mode equipment more fixed to demand, when detecting static limit
In the presence of fast rule, using the priority of static rule as highest.When inquiring the static speed limit rule of certain equipment, no longer go
The equipment is not inquired about in speed limit list.
Of the invention main to realize that router adds devices to not speed limit list, the information of recording equipment distributes bandwidth.
The total bandwidth of router meeting detection device first, when there is multiple devices connection route device, router is each by monitoring respectively
The traffic demand of equipment draw it is whether multiple all need take high bandwidth.Then these equipment are detected whether in not speed limit list, most
Band preference distributes to the equipment in not speed limit list at last.The present invention is recorded with equipment, automatic detection, it is automatic be assigned as before
Carry, not speed limiting device need to be only added in list, also can be excellent without adding speed limit even if there is multiple new equipment connection route devices
First meet the equipment normal use of not speed limit.
The present invention realizes automatic detection, Intelligent control, is frequently configured without user.Meanwhile with it is original quiet
State rule does not conflict, and user can be according to being actually needed addition unalterable rules.
Embodiment two
The bandwidth allocation methods proposed according to above-described embodiment, the present embodiment propose a kind of bandwidth allocation device.
As shown in figure 4, a kind of bandwidth allocation device, including:
Total bandwidth detection unit, to detect the total bandwidth of couple in router network;
Selecting unit, it is connected with the total bandwidth detection unit, the MAC Address of the equipment of speed limit will need not be carried out
It is stored in not speed limit list;
Static speed limit detection unit, it is connected with the total bandwidth detection unit, static speed limit rule is added with to count
Equipment;
Flow detection unit, it is connected with the static speed limit detection unit, to detect the bandwidth demand of all devices;
Statistic unit, it is connected with the flow detection unit, to count the equipment for needing high bandwidth, obtains statistics
As a result;
Not speed limit list query unit, it is connected respectively with the statistic unit and the static speed limit detection unit, uses
It is present in equipment in not speed limit list to detect in the statistical result whether to have, and obtains Query Result;
Allocation unit, be connected with the not speed limit list query unit, to according to the Query Result to the equipment
Carry out bandwidth allocation.
As shown in figure 5, wherein, the selecting unit includes:
Show subelement, be connected with the total bandwidth detection unit, on APP or WEB page display with it is described
The list of devices of the connected all equipment of router;The list of devices includes the title of all devices;
Subelement is selected, is connected with the display subelement, speed limit need not be carried out selected by user to record
The equipment;
Storing sub-units, it is connected with the selection subelement, to by the institute that need not carry out speed limit selected by user
The MAC Address for stating equipment is stored in the not speed limit list.
In the bandwidth allocation device, after router connects network, the total bandwidth detection unit passes through WAN mouths
IP judges the wide-band type of router access, then sends packet to website of testing the speed accordingly to measure the reality in the broadband
Bandwidth, i.e. total bandwidth.Router feature is simply opened, the static speed limit detection unit inquiry access router, which whether there is, to be added
Added with the equipment of static speed limit rule.If it is present the equipment is inquired about in not speed limit list query unit.Flow
The bandwidth demand and statistics of amount detection unit detection all devices need the sum of the equipment of high bandwidth, obtain statistical result.Root
According to the statistical result, not speed limit list query unit inspection does not add static speed limit rule and needs the equipment of high bandwidth to be
It is no to be present in not speed limit list, if it is present allocation unit is allocated same band processing to these equipment.
The present invention realizes automatic detection, Intelligent control, is frequently configured without user.Meanwhile with it is original quiet
State rule does not conflict, and user can be according to being actually needed addition unalterable rules.
For a person skilled in the art, after reading described above, various changes and modifications undoubtedly will be evident.
Therefore, appended claims should regard whole variations and modifications of the true intention and scope that cover the present invention as.Weighing
Any and all scope and content of equal value, are all considered as still belonging to the intent and scope of the invention in the range of sharp claim.