Summary of the invention
Main purpose of the present invention is to provide a kind of network measuring method, Apparatus and system, to address the above problem at least.
According to an aspect of the present invention, provide a kind of network measuring method, having comprised: Devices to test receiving internet connectivity detector (PING) initiating equipment sends carries the default permission detection messages of time of delay; Devices to test is according to the actual delay time that allows to determine time of delay send to the PING initiating equipment response message corresponding with detection messages; When the actual delay time arrived, Devices to test sent the response message that carries the actual delay time to the PING initiating equipment.
Preferably, Devices to test comprised according to the actual delay time that allows to determine time of delay send to the PING initiating equipment response message: 0 with permission time of delay between time value of picked at random as the actual delay time.
Preferably, this method comprises: when Devices to test sent detection messages, record sent the transmitting time T of detection messages at the PING initiating equipment
1When the PING initiating equipment receives the response message of Devices to test transmission, the time of reception T of recorder detection messages
2Calculate time of reception T
2With transmitting time T
1Time difference T
2-1: according to time difference T
2-1And the difference of actual delay time is determined the link time-delay between PING initiating equipment and the Devices to test.
Preferably, the PING initiating equipment comprises: multicast server; Devices to test comprises: multicast member equipment.
Preferably, Devices to test receiving internet connectivity detector (PING) initiating equipment sends carries the detection messages of default permission time of delay and comprise: each multicast member is established the detection messages by the transmission of the multicast path receiving group server between multicast server and the multicast member equipment.
According to a further aspect in the invention, provide a kind of network measuring device, having comprised: receiver module, what be used for that receiving internet connectivity detector (PING) initiating equipment sends carries the default permission detection messages of time of delay; First determination module is used for determining that according to allowing sending module should send the actual delay time of the response message corresponding with detection messages to the PING initiating equipment time of delay; Sending module is used for when the actual delay time arrives, and sends the response message that carries the actual delay time to the PING initiating equipment.
Preferably, first determination module is used for 0 and allows between time of delay time value of picked at random as the actual delay time.
In accordance with a further aspect of the present invention, provide a kind of network measuring system, having comprised: the Internet connectivity detector (PING) initiating equipment and Devices to test, wherein, Devices to test comprises above-mentioned network measuring device; The PING initiating equipment is used for sending to Devices to test and carries the default permission detection messages of time of delay.
Preferably, the PING initiating equipment comprises: first logging modle, be used at the PING initiating equipment when receiver module sends detection messages, and record sends the transmitting time T of detection messages
1Second logging modle is used for when the PING initiating equipment receives the response message of sending module transmission the time of reception T of recorder detection messages
2Computing module is used for calculating time of reception T after the PING initiating equipment receives the response message of sending module transmission
2With transmitting time T
1Time difference T
2-1Second determination module is according to time difference T
2-1And the difference of actual delay time is determined the link time-delay between PING initiating equipment and the Devices to test.
Preferably, the PING initiating equipment comprises: multicast server; Devices to test comprises: multicast member equipment, wherein, multicast member equipment comprises above-mentioned network measuring device.
By the present invention, adopt the PING initiating equipment in the detection messages that sends to Devices to test, to carry one and allow time of delay so that Devices to test selects actual delay time less than permission time of delay to send response message corresponding to detection messages according to this permissions time of delay at random, solved existing checkout equipment owing to quantities of messages can abandon or postpone to handle the not high problem of accuracy of detection that message causes when excessive, and then reached the business burden that reduces checkout equipment, improve the effect of accuracy of detection.
Embodiment
Hereinafter will describe the present invention with reference to the accompanying drawings and in conjunction with the embodiments in detail.Need to prove that under the situation of not conflicting, embodiment and the feature among the embodiment among the application can make up mutually.
Fig. 2 is the flow chart according to the network measuring method of the embodiment of the invention, and as shown in Figure 2, this method mainly may further comprise the steps (step S202-step S206):
Step S202, Devices to test receiving internet connectivity detector (PING) initiating equipment send carries the default permission detection messages of time of delay;
Step S204, Devices to test is according to the actual delay time that allows to determine time of delay send to the PING initiating equipment response message corresponding with detection messages;
In embodiments of the present invention, preferably, Devices to test can and allow between time of delay time value of picked at random as the actual delay time 0.
Step S206, when the actual delay time arrived, Devices to test sent the response message that carries the actual delay time to the PING initiating equipment.
In a preferred implementation of the embodiment of the invention, when Devices to test sends detection messages, can also write down the transmitting time T that sends detection messages at the PING initiating equipment
1, and when receiving the response message of Devices to test transmission, the time of reception T of recorder detection messages
2, calculate time of reception T then
2With transmitting time T
1Time difference T
2-1, at last according to time difference T
2-1And the difference of actual delay time is determined the link time-delay between PING initiating equipment and the Devices to test, thereby can obtain the link time-delay between PING initiating equipment and the Devices to test.
In embodiments of the present invention, preferably, the PING initiating equipment can comprise: multicast server; Devices to test can comprise: multicast member equipment.That is to say that this method can preferably be applied in the multicast network, and in multicast network, multicast server can play the effect of PING initiating equipment, and multicast member equipment can play the effect of Devices to test.
In actual applications, each multicast member is established the detection messages that can send by the multicast path receiving group server between multicast server and the multicast member equipment.
For example, the ping initiating equipment is initiated the ping order, send icmp echo request message, wherein, this message has carried a time value T0 (equipment that this value representation receives this message and needs to respond icmp echo reply can postpone at most T0 time send icmp echo reply message); Multicast member obtains the time value T0 in the message after receiving icmp echo request message, selects a random number to respond the time T 1 of icmp echo reply as actual delay between 0~T0; Postponing T1 after the time, multicast member sends icmp echo relply message, and wherein, this message has carried time delay time T 1; After the ping initiating equipment is subjected to icmp echo reply message, when calculating two-way time, need deduct the actual delay time T 1 of carrying in the icmp echo reply message.
The network measuring method that adopts the foregoing description to provide, Devices to test can be selected in the permissible delay time range that the PING initiating equipment sends between time-delay actual time of an one's own response message that is used to send the response detection messages fully at random, thereby avoided the response message concentrations to send the processing pressure that produces to the PING initiating equipment, make PING initiating equipment no longer dropping packets or delay process message, and then improved the accuracy of detection of PING initiating equipment.
Fig. 3 is the flow chart of network measuring according to the preferred embodiment of the invention, and as shown in Figure 3, this flow process mainly may further comprise the steps:
S301, multicast server send icmp echo request message, and message has carried the maximum delay time of expectation (being multicast member) delayed response;
S302, icmp echo request is received by each multicast member along multicast path;
S303, multicast member obtains maximum delay time from the icmp echo request message that receives, and gets a random value between 0~maximum delay time, and actual delay sends the time of icmp echo reply message the most;
S304 is waiting for actual delay after the time, and multicast member is responded icmp echo reply message, has carried the time of this multicast member actual delay in the message;
S305, multicast server receive after the icmp echo reply message that a multicast member replys, and deduct the actual delay time of carrying in the message on the basis of actual two-way time, the link time-delay between receiving to this multicast as multicast server;
S306 after multicast server is received the icmp echo reply message of all multicast members responses, finishes this time detection.
Fig. 4 is the structural representation according to the network measuring device of the embodiment of the invention, the network measuring method of this device in order to realize that the foregoing description provides, and this device mainly comprises: receiver module 10, first determination module 20 and sending module 30.Wherein, receiver module 10, what be used for that receiving internet connectivity detector (PING) initiating equipment sends carries the default permission detection messages of time of delay; First determination module 20 is connected to receiver module 10, is used for determining that according to allowing sending module should send the actual delay time of the response message corresponding with detection messages to the PING initiating equipment time of delay; Sending module 30 is connected to first determination module 20, is used for when the actual delay time arrives, and sends the response message that carries the actual delay time to the PING initiating equipment.This device can improve the precision of network measuring.
In a preferred implementation of the embodiment of the invention, first determination module can also be used for 0 and allow between time of delay time value of picked at random as the actual delay time.
Fig. 5 is the structural representation according to the network measuring system of the embodiment of the invention, and as shown in Figure 5, this system mainly comprises: the Internet connectivity detector (PING) initiating equipment 1 and Devices to test 2, and wherein, Devices to test 2 comprises above-mentioned network measuring device; The PING initiating equipment is used for sending to Devices to test and carries the default permission detection messages of time of delay.This system can realize the delayed response of Devices to test 2, thereby makes PING initiating equipment 1 dropping packets or delay processing message when response message is too much.
Fig. 6 is the structural representation of network measuring system according to the preferred embodiment of the invention, and as shown in Figure 6, the PING initiating equipment in this system can comprise: first logging modle 40, second logging modle 50, computing module 60 and second determination module 70.Wherein, first logging modle 40 is used at the PING initiating equipment when receiver module sends detection messages, and record sends the transmitting time T of detection messages
1Second logging modle 50 is connected to first logging modle 40, is used for when the PING initiating equipment receives the response message of sending module transmission the time of reception T of recorder detection messages
2Computing module 60 is connected to second logging modle 50, is used for calculating time of reception T after the PING initiating equipment receives the response message of sending module transmission
2With transmitting time T
1Time difference T
2-1Second determination module 70 is connected to computing module 60, according to time difference T
2-1And the difference of actual delay time is determined the link time-delay between PING initiating equipment and the Devices to test.By this optimum decision system, can obtain the link time-delay between PING initiating equipment and the Devices to test.
Fig. 7 is the structural representation of network measuring system according to the preferred embodiment of the invention, and as shown in Figure 7, this system mainly comprises multicast server 3 and multicast member equipment 4.Wherein, multicast member equipment 4 comprises above-mentioned network measuring device.This system can realize the delayed response of multicast member equipment 4, thereby makes multicast server 3 dropping packets or delay processing message when response message is too much.
The network measuring device and the system that adopt the foregoing description to provide, Devices to test can be selected in the permissible delay time range that the PING initiating equipment sends between time-delay actual time of an one's own response message that is used to send the response detection messages fully at random, thereby avoided the response message concentrations to send the processing pressure that produces to the PING initiating equipment, make PING initiating equipment no longer dropping packets or delay process message, and then improved the accuracy of detection of PING initiating equipment.
From above description, as can be seen, the present invention has realized following technique effect: Devices to test can be selected in the permissible delay time range that the PING initiating equipment sends between time-delay actual time of an one's own response message that is used to send the response detection messages fully at random, do not need to promote hardware capabilities, can not seize the chance that other messages are handled yet, the detection messages that produces in unit interval is reduced, thereby alleviated the professional burden of PING initiating equipment, can promote the precision of network measuring safely, easily.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with the general calculation device, they can concentrate on the single calculation element, perhaps be distributed on the network that a plurality of calculation element forms, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in the storage device and carry out by calculation element, and in some cases, can carry out step shown or that describe with the order that is different from herein, perhaps they are made into each integrated circuit modules respectively, perhaps a plurality of modules in them or step are made into the single integrated circuit module and realize.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is the preferred embodiments of the present invention only, is not limited to the present invention, and for a person skilled in the art, the present invention can have various changes and variation.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.