The content of the invention
The technical problems to be solved by the invention are to provide a kind of network bandwidth measuring method to solve prior art presence
Above mentioned problem.
To achieve these goals, the invention provides a kind of network bandwidth measuring method, wherein, including:
A Precision Time Protocol is followed, with the multiple message of Precision Time Protocol server exchange;
According to the temporal information related to the plurality of message, a synchronous slave clock and the Precision Time Protocol server
One master clock;And
According to the temporal information and size information related to the plurality of message, an at least network bandwidth is calculated.
Above-mentioned network bandwidth measuring method, wherein, the foundation temporal information related to the plurality of message is believed with size
The step of ceasing, calculating an at least network bandwidth includes:
According to the temporal information and size information related to multiple reception message in the plurality of message, calculate under a network
Line frequency is wide, wherein the plurality of reception message includes at least 100 reception message.
Above-mentioned network bandwidth measuring method, wherein, the foundation temporal information related to the plurality of message is believed with size
The step of ceasing, calculating an at least network bandwidth includes:
According to the temporal information and size information related to multiple transmission message in the plurality of message, calculate on a network
Line frequency is wide, wherein the plurality of transmission message includes at least 100 transmission message.
Above-mentioned network bandwidth measuring method, wherein, this method is by the cellular base station of a femto or a passive optical fiber
Performed by network equipment.
Above-mentioned network bandwidth measuring method, wherein, in addition to:
The size of a radio-frequency emission power is adjusted according to an at least network bandwidth.
In order to which above-mentioned purpose is better achieved, present invention also offers a kind of network bandwidth measuring method, wherein, including:
A Precision Time Protocol is followed, multiple message are exchanged with a Precision Time Protocol slave unit;And
According to the temporal information and size information related to the plurality of message, an at least network bandwidth is calculated.
Above-mentioned network bandwidth measuring method, wherein, the foundation temporal information related to the plurality of message is believed with size
The step of ceasing, calculating an at least network bandwidth includes:
According to the temporal information and size information related to multiple transmission message in the plurality of message, calculate under a network
Line frequency is wide, wherein the plurality of transmission message includes at least 100 transmission message.
Above-mentioned network bandwidth measuring method, wherein, the foundation temporal information related to the plurality of message is believed with size
The step of ceasing, calculating an at least network bandwidth includes:
According to the correlation time information and size information with multiple reception message in the plurality of message, calculate on a network
Line frequency is wide, wherein the plurality of reception message includes at least 100 reception message.
Above-mentioned network bandwidth measuring method, wherein, in addition to:
According to an at least network bandwidth, the Precision Time Protocol slave unit is notified to adjust the Precision Time Protocol subordinate
The size of one radio-frequency emission power of device.
Above-mentioned network bandwidth measuring method, wherein, the Precision Time Protocol slave unit is the cellular base of a femto
Platform or a passive fibre optic network installation.
The technical effects of the invention are that:
The network bandwidth measuring method of the present invention, can immediately be calculated accurately by the exchange message of Precision Time Protocol
Network bandwidth between time protocol server and Precision Time Protocol slave unit.Consequently, it is possible to need not extraly it set up
File Transfer Protocol server transmits data.Further, since Precision Time Protocol message is received and dispatched according to regulation, therefore simply
Using existing package, it is not required to additionally take other network bandwidths, you can dynamically calculate network bandwidth.
Below in conjunction with the drawings and specific embodiments, the present invention will be described in detail, but not as a limitation of the invention.
Embodiment
The structural principle and operation principle of the present invention are described in detail below in conjunction with the accompanying drawings:
First embodiment
Fig. 1 is refer to, Fig. 1 is the schematic diagram of Precision Time Protocol slave unit, core network and world-wide web.Core net
Network 12 connects Precision Time Protocol slave unit 11 and world-wide web 13.Precision Time Protocol slave unit 11 is, for example, femto
Cellular base station (Femtocell) or passive fiber optic network(Passive Optical Network,PON)Device.Core net
Network 12 includes safe gateway (Security Gateway, SeGW) 121, Precision Time Protocol server 122 and package network
Gateway (Packet Data Node Gateway, PGW) 123.Precision Time Protocol slave unit 11 and Precision Time Protocol
Server 122 is connected to safe gateway 121, and Precision Time Protocol server 122 and safe gateway 121 are through package network
Gateway 123 is connected to world-wide web 13.Note that any " connection " described herein can be direct or indirect connection.
It is that Precision Time Protocol server exchanges with Precision Time Protocol slave unit referring to Fig. 2 and Fig. 3, Fig. 2
The schematic diagram of message, Fig. 3 are the flow chart that Precision Time Protocol slave unit performs network bandwidth measuring method.First such as step
Shown in 31, Precision Time Protocol slave unit 11 follows Precision Time Protocol (Precision Time Protocol, PTP), with
Precision Time Protocol server 122 exchanges message.Aforementioned messages are, for example, synchronous package Sync, follow package Follow_Up, prolong
Slow Request Packet Delay_Req and delay response package Delay_Resp.The message that step 31 can include shown in multiple Fig. 2 is handed over
Change.Then as shown at step 32, Precision Time Protocol slave unit 11 is according to the temporal information related to message, during synchronous subordinate
Clock (slave clock) Cs and Precision Time Protocol server 122 master clock (master clock) Cm, that is, adjusted regarding demand
Whole slave clock Cs time, with ensure slave clock Cs time can be same as or closely approximate master clock Cm when
Between.And then as shown in step 33, Precision Time Protocol slave unit 11 according to the temporal information and size information related to message,
Calculating network frequency range.
Furthermore, it is understood that for synchronous slave clock Cs and master clock Cm, Precision Time Protocol slave unit 11 with it is accurate
Time protocol server 122 exchanges synchronous package Sync, follows package Follow_Up, delay Request Packet Delay_Req and prolong
Response package Delay_Resp late.First, Precision Time Protocol server 122 sends synchronous package Sync, and essence in time t1
True time protocol slave unit 11 receives synchronous package Sync in time t2.Time protocol server 122 can also be in synchronous package
Sync, which sends followed by send, follows package Follow_Up.Synchronous package Sync and package Follow_Up is followed to may include to record
Time t1 time stab.
Then, Precision Time Protocol slave unit 11 sends delay Request Packet Delay_Req in time t3, and the time assists
Discuss server 122 and receive delay Request Packet Delay_Req in time t4.Delay Request Packet Delay_Req may include to record
Time t2 and t3 time stab.Time protocol server 122, will after time t4 receives delay Request Packet Delay_Req
Send delay response package Delay_Resp with responding to Precision Time Protocol slave unit 11.Delay response package Delay_
Resp may include the time stab for recording time t1 and t4.Precision Time Protocol slave unit 11 and Precision Time Protocol server
Between 122 by periodically exchange synchronous package Sync, follow package Follow_Up, delay Request Packet Delay_Req and
Delay response package Delay_Resp, with synchronous slave clock Cs and master clock Cm.
In addition, Precision Time Protocol slave unit 11 can according to reception message (that is, the Precision Time Protocol in message
One or more PTP message received by slave unit 11 from Precision Time Protocol server 122) temporal information and size believe
Breath, the descending frequency range of calculating network.The reception message of Precision Time Protocol slave unit 11 is, for example, synchronous package Sync, follows envelope
Wrap Follow_Up and delay response package Delay_Resp.By taking synchronous package Sync as an example, the temporal information for receiving message refers to hair
Go out synchronous package Sync time t1 and receive synchronous package Sync time t2, and the size information for receiving message refers to synchronous envelope
Wrap Sync packet size (Packet Size).Synchronous package Sync passing time DS=t2-t1.Precision Time Protocol subordinate
Size SPZ calculating network descending frequency range DBW of the device 11 according to passing time DS with synchronous package Sync.Network downstream frequency range
DBW=SPZ/DS。
In order to further improve accuracy and reduce moment package burst (packet burst) caused by erroneous judgement, can tire out
After accumulating n times efficient sampling and removing the excessive sampling of difference, then carry out network downstream frequency range DBW calculating.For example, network
Descending frequency range.Wherein, SPZ (i) represents the size of i-th of reception package for being included in calculating, and DS (i) represents to be included in calculating i-th
Reception package passing time, and N can be more than or equal to 100.
Similarly, Precision Time Protocol slave unit 11 can according to in message transmission message (that is, precise time assist
View slave unit 11 sends multiple PTP message of Precision Time Protocol server 122 to) correlation time information believe with size
Breath, the up frequency range of calculating network.The transmission message of Precision Time Protocol slave unit 11 for example refers to postpone Request Packet
Delay_Req.The temporal information of transmission message refers to the time t3 for sending delay Request Packet Delay_Req and receives delay request
Package Delay_Req time t4, and the size information for transmitting message refers to delay Request Packet Delay_Req packet size.
Postpone Request Packet Delay_Req passing time DD=t4-t3.Precision Time Protocol slave unit 11 is according to biography
Time DD is passed with postponing the Request Packet Delay_Req up frequency range UBW of size DPZ calculating networks.Network uplink frequency range UBW=
DPZ/DD.In order to further improve accuracy and reduce the erroneous judgement caused by the burst of moment package, M efficient sampling can be accumulated simultaneously
After removing the excessive sampling of difference, then carry out network uplink frequency range UBW calculating.For example, network uplink frequency range.Wherein,
DPZ (j) represents the size of j-th of transmission package for being included in calculating, and DD (j) represents the biography of j-th of transmission package for being included in calculating
Pass the time, and M can be more than or equal to 100.
After calculating up and/or descending frequency range, Precision Time Protocol slave unit 11 can be according to network bandwidth dynamically
Adjust the size of its radio-frequency emission power (radio frequency transmission power).For example, when accurate
Between a width of 4M of downlink frequency between protocol server 122 and Precision Time Protocol slave unit 11.When mobile phone 14a, mobile phone 14b,
Mobile phone 14c and mobile phone 14d surf the Net via Precision Time Protocol slave unit 11, and mobile phone 14a, mobile phone 14b, mobile phone 14c and
When descending frequency range used in mobile phone 14d is respectively 1M, because wide not abundant with downlink frequency, Precision Time Protocol slave unit 11 can
Its transmission power is accordingly reduced, to avoid surfing the Net via Precision Time Protocol slave unit 11 because other mobile phones add, institute
Caused network is jammed problem.
Second embodiment
It is the flow that Precision Time Protocol server performs network bandwidth measuring method referring to Fig. 2 and Fig. 4, Fig. 4
Figure.First as shown in step 41, Precision Time Protocol server 122 follows Precision Time Protocol, with Precision Time Protocol subordinate
Device 11 exchanges message.Step 41 is the time in order to assist Precision Time Protocol slave unit 11 to adjust its slave clock Cs,
Precision Time Protocol server 122 itself and the time for being not required to adjust its master clock Cm by step 41.Then such as step 42 institute
Show, Precision Time Protocol server 122 is according to the temporal information and size information related to message, calculating network frequency range.
Precision Time Protocol server 122 can notify Precision Time Protocol slave unit 11 to adjust it according to network bandwidth
The size of transmission power.For example, under between Precision Time Protocol server 122 and Precision Time Protocol slave unit 11
The a width of 4M of line frequency.When mobile phone 14a, mobile phone 14b, mobile phone 14c and mobile phone 14d are via on Precision Time Protocol slave unit 11
Net, and when the descending frequency range that uses of mobile phone 14a, mobile phone 14b, mobile phone 14c and mobile phone 14d is respectively 1M, Precision Time Protocol service
Device 122 can notify Precision Time Protocol slave unit 11 to reduce its transmission power, and notify to fill with Precision Time Protocol subordinate
Putting the 11 Precision Time Protocol slave units 15 closed on increases its transmission power.Consequently, it is possible to mobile phone 14e can be by being less jammed
Precision Time Protocol slave unit 15 is surfed the Net, and then provides more preferable network service quality.
Precision Time Protocol server 122 can according to transmission message (that is, the Precision Time Protocol server in message
122 send one or more PTP message of Precision Time Protocol slave unit 11 to) correlation time information and size information, meter
Calculate network downstream frequency range.Transmission message is, for example, synchronous package Sync, follows package Follow_Up and delay response package
Delay_Resp.By taking synchronous package Sync as an example, transmit message temporal information refer to the time t1 that sends synchronous package Sync and
Synchronous package Sync time t2 is received, and the size information for transmitting message refers to synchronous package Sync packet size.Synchronous envelope
Wrap Sync passing time DS=t2-t1.Precision Time Protocol server 122 is according to passing time DS with synchronous package Sync's
The descending frequency range DBW of size SPZ calculating networks.Network downstream frequency range DBW=SPZ/DS.
In order to further improve accuracy and reduce the erroneous judgement caused by the burst of moment package, P efficient sampling can be accumulated
And after removing the excessive sampling of difference, then carry out network downstream frequency range DBW calculating.Network downstream frequency range.Wherein, SPZ (k) tables
Showing the size of k-th of transmission package for being included in calculating, DS (k) represents the passing time of k-th of transmission package for being included in calculating, and
P can be more than or equal to 100.
Similarly, Precision Time Protocol server 122 can according to reception message (that is, the Precision Time Protocol in message
One or more PTP message that server 122 receives from Precision Time Protocol slave unit 11) related temporal information and size
Information, the up frequency range of calculating network.The reception message of Precision Time Protocol server 122 for example refers to postpone Request Packet
Delay_Req.The temporal information for receiving message refers to the time t3 for sending delay Request Packet Delay_Req and receives delay request
Package Delay_Req time t4, and the size information for receiving message refers to delay Request Packet Delay_Req packet size.
Postpone Request Packet Delay_Req passing time DD=t4-t3.Precision Time Protocol server 122 is according to transmission
Time DD and delay Request Packet the Delay_Req up frequency range UBW of size DPZ calculating networks.Network uplink frequency range UBW=
DPZ/DD。
In order to further improve accuracy and reduce the erroneous judgement caused by the burst of moment package, Q efficient sampling can be accumulated
And after removing the excessive sampling of difference, then carry out network uplink frequency range UBW calculating.Network uplink frequency range.Wherein, DPZ (l) tables
Showing the size of l-th of reception package for being included in calculating, DD (l) represents the passing time of l-th of reception package for being included in calculating, and
Q can be more than or equal to 100.
It is similar previously described, Precision Time Protocol server 122 can according to network bandwidth, notify Precision Time Protocol from
Belong to the size that device 11 adjusts its transmission power.
The contained network bandwidth measuring method of previous embodiment, can be immediately by the exchange message of Precision Time Protocol
Calculate the network bandwidth between Precision Time Protocol server and Precision Time Protocol slave unit.Consequently, it is possible to volume will not needed
Other places sets up File Transfer Protocol server to transmit data.Further, since Precision Time Protocol message is received and dispatched according to regulation,
Therefore previous embodiment simply uses existing package, is not required to additionally take other network bandwidths, you can dynamically calculate
Network bandwidth.
Certainly, the present invention can also have other various embodiments, ripe in the case of without departing substantially from spirit of the invention and its essence
Know those skilled in the art when can be made according to the present invention it is various it is corresponding change and deformation, but these corresponding change and become
Shape should all belong to the protection domain of appended claims of the invention.