The content of the invention
It is a primary object of the present invention to provide a kind of network detecting method, apparatus and system, at least to solve above-mentioned ask
Topic.
According to an aspect of the invention, there is provided a kind of network detecting method, including:Devices to test receives internet and connected
What connectivity detector (PING) initiating equipment was sent carries the detection messages of default permission time delay;Devices to test according to
Allow time delay it is determined that sending the actual delay time of response message corresponding with detection messages to PING initiating equipments;
When reaching the actual delay time, Devices to test sends the response message for carrying the actual delay time to PING initiating equipments.
Preferably, Devices to test according to allow time delay it is determined that to PING initiating equipments send response message reality
Border time delay, including:A time value is randomly selected as the actual delay time between 0 and permission time delay.
Preferably, this method includes:When PING initiating equipments send detection messages to Devices to test, record sends detection
The transmission time T of message1;When PING initiating equipments receive the response message of Devices to test transmission, record receives detection report
The reception time T of text2;Calculating obtains reception time T2With sending time T1Time difference T2-1:According to time difference T2-1With reality
The difference of border time delay determines the link delay between PING initiating equipments and Devices to test.
Preferably, PING initiating equipments include:Multicast server;Devices to test includes:Multicast member equipment.
Preferably, what Devices to test reception the Internet connectivity detector (PING) initiating equipment was sent carries default
Allowing the detection messages of time delay includes:Each multicast member is set by the group between multicast server and multicast member equipment
Broadcast path and receive the detection messages that multicast server is sent.
According to another aspect of the present invention there is provided a kind of network detection means, including:Receiving module, for receive because
What special net connectivity detector (PING) initiating equipment was sent carries the detection messages of default permission time delay;First is true
Cover half block, for determining that sending module should send corresponding with detection messages to PING initiating equipments according to permission time delay
The actual delay time of response message;Sending module, for when reaching the actual delay time, sending and taking to PING initiating equipments
Response message with the actual delay time.
Preferably, the first determining module is used to randomly select a time value as reality between 0 and permission time delay
Border time delay.
In accordance with a further aspect of the present invention there is provided a kind of network detection system, including:The Internet connectivity detector
(PING) initiating equipment and Devices to test, wherein, Devices to test includes above-mentioned network detection means;PING initiating equipments be used for
Devices to test sends the detection messages for carrying default permission time delay.
Preferably, PING initiating equipments include:First logging modle, for being sent in PING initiating equipments to receiving module
During detection messages, record sends the transmission time T of detection messages1;Second logging modle, for being received in PING initiating equipments
During the response message that sending module is sent, record receives the reception time T of detection messages2;Computing module, for being initiated in PING
Equipment is received after the response message of sending module transmission, and calculating obtains reception time T2With sending time T1Time difference
T2-1;Second determining module, according to time difference T2-1Determine that PING initiating equipments are set with to be measured with the difference of actual delay time
Link delay between standby.
Preferably, PING initiating equipments include:Multicast server;Devices to test includes:Multicast member equipment, wherein, group
Broadcasting member device includes above-mentioned network detection means.
By the present invention, carrying one in the detection messages sent to Devices to test using PING initiating equipments allows to prolong
The slow time so that Devices to test randomly choosed according to the permission time delay be less than allow the actual delay time of time delay come
The response message corresponding to detection messages is sent, existing detection device is solved due to that can abandon or prolong when quantities of messages is excessive
The problem of accuracy of detection is not high caused by processing message late, and then the business burden for reducing detection device has been reached, improve inspection
Survey the effect of precision.
Embodiment
Describe the present invention in detail below with reference to accompanying drawing and in conjunction with the embodiments.It should be noted that not conflicting
In the case of, the feature in embodiment and embodiment in the application can be mutually combined.
Fig. 2 is the flow chart of network detecting method according to embodiments of the present invention, as shown in Fig. 2 this method mainly includes
Following steps (step S202- step S206):
Step S202, it is default that Devices to test receives carrying for the Internet connectivity detector (PING) initiating equipment transmission
Permission time delay detection messages;
Step S204, Devices to test is according to permission time delay it is determined that being sent to PING initiating equipments and detection messages
The actual delay time of corresponding response message;
In embodiments of the present invention, it is preferable that Devices to test can randomly select one between 0 and permission time delay
Time value is used as the actual delay time.
Step S206, when reaching the actual delay time, Devices to test sends to carry to PING initiating equipments actually to be prolonged
The response message of slow time.
In a preferred embodiment of the embodiment of the present invention, detection report is sent to Devices to test in PING initiating equipments
Wen Shi, can also record the transmission time T for sending detection messages1, and when receiving the response message of Devices to test transmission, note
Record receives the reception time T of detection messages2, then calculate and obtain reception time T2With sending time T1Time difference T2-1, most
Afterwards according to time difference T2-1Determine that the link between PING initiating equipments and Devices to test prolongs with the difference of actual delay time
When, so as to obtain the link delay between PING initiating equipments and Devices to test.
In embodiments of the present invention, it is preferable that PING initiating equipments can include:Multicast server;Devices to test can be with
Including:Multicast member equipment.That is, this method can be preferably applied in multicast network, and in multicast network, group
PING initiating equipments can be played a part of by broadcasting server, and multicast member equipment can play a part of Devices to test.
In actual applications, set can be by the multicast between multicast server and multicast member equipment for each multicast member
Path receives the detection messages that multicast server is sent.
For example, ping initiating equipments initiate ping orders, icmp echo request messages are sent, wherein, the message is taken
With a time value T0, (value represents to receive the message and needs to respond icmp echo reply equipment most multipotency
Enough the delay T0 times send icmp echo reply messages);Multicast member is received after icmp echo request messages, is obtained
Time value T0 in message, selected between 0~T0 a random number as actual delay respond icmp echo reply when
Between T1;After the delay T1 times, multicast member sends icmp echo relply messages, wherein, the message carries the time and prolonged
Slow time T1;Ping initiating equipments are by after icmp echo reply messages, when calculating two-way time, it is necessary to subtract icmp
The actual delay time T1 carried in echo reply messages.
The network detecting method provided using above-described embodiment, what Devices to test can be sent in PING initiating equipments completely
The one's own reality for being used to send the response message of response detection messages of random selection one in permissible delay time range
Decay time, so that avoiding response message concentrations sends the processing pressure to PING initiating equipments produced, makes PING
Initiating equipment no longer dropping packets or delay process message, and then improve the accuracy of detection of PING initiating equipments.
Fig. 3 is the flow chart of network detection according to the preferred embodiment of the invention, as shown in figure 3, the flow mainly includes
Following steps:
S301, multicast server sends icmp echo request messages, and message carries expectation (i.e. multicast member) and prolonged
The maximum delay time of slow response;
S302, icmp echo request are received along multicast path by each multicast member;
S303, multicast member obtains maximum delay time from the icmp echo request messages received, and 0
A random value is taken between~maximum delay time, actual delay the most sends the time of icmp echo reply messages;
S304, after the actual delay time is waited, multicast member is responded to be taken in icmp echo reply messages, message
With the time of the multicast member actual delay;
S305, multicast server is received after the icmp echo reply messages of a multicast member response, actual past
Return and subtract the actual delay time carried in message on the basis of the time, be used as multicast server to the chain between the multicast reception
Road is delayed;
S306, after multicast server receives the icmp echo reply messages that all multicast members are responded, terminates this
Secondary detection.
Fig. 4 is the structural representation of network detection means according to embodiments of the present invention, and the device is to realize above-mentioned reality
The network detecting method of example offer is applied, the device mainly includes:Receiving module 10, the first determining module 20 and sending module 30.
Wherein, receiving module 10, it is default fair for receiving carrying for the Internet connectivity detector (PING) initiating equipment transmission
Perhaps the detection messages of time delay;First determining module 20, is connected to receiving module 10, for being determined according to permission time delay
Sending module should send the actual delay time of response message corresponding with detection messages to PING initiating equipments;Sending module
30, the first determining module 20 is connected to, for when reaching the actual delay time, being sent to PING initiating equipments and carrying reality
The response message of time delay.The device can improve the precision of network detection.
In a preferred embodiment of the embodiment of the present invention, the first determining module can be also used for allowing prolonging 0
A time value is randomly selected as the actual delay time between the slow time.
Fig. 5 is the structural representation of network detection system according to embodiments of the present invention, as shown in figure 5, the system is main
Including:The Internet connectivity detector (PING) initiating equipment 1 and Devices to test 2, wherein, Devices to test 2 includes above-mentioned network
Detection means;PING initiating equipments are used to send the detection messages for carrying default permission time delay to Devices to test.Should
System can realize the delayed response of Devices to test 2 so that PING initiating equipments 1 when response message is excessive dropping packets or
Delay disposal message.
Fig. 6 is the structural representation of network detection system according to the preferred embodiment of the invention, as shown in fig. 6, the system
In PING initiating equipments can include:First logging modle 40, the second logging modle 50, computing module 60 and second determine mould
Block 70.Wherein, the first logging modle 40, for when PING initiating equipments send detection messages to receiving module, record to be sent
The transmission time T of detection messages1;Second logging modle 50, is connected to the first logging modle 40, for being connect in PING initiating equipments
When receiving the response message of sending module transmission, record receives the reception time T of detection messages2;Computing module 60, is connected to
Two logging modles 50, for after the response message that PING initiating equipments receive sending module transmission, calculating to be received
Time T2With sending time T1Time difference T2-1;Second determining module 70, is connected to computing module 60, according to time difference
T2-1The link delay between PING initiating equipments and Devices to test is determined with the difference of actual delay time.Pass through the preferred system
System, can obtain the link delay between PING initiating equipments and Devices to test.
Fig. 7 is the structural representation of network detection system according to the preferred embodiment of the invention, as shown in fig. 7, the system
Mainly include multicast server 3 and multicast member equipment 4.Wherein, multicast member equipment 4 includes above-mentioned network detection means.Should
System can realize the delayed response of multicast member equipment 4 so that multicast server 3 when response message is excessive dropping packets or
Person's delay disposal message.
The network detection means and system provided using above-described embodiment, Devices to test completely can be in PING initiating equipments
The one's own response message for being used to send response detection messages of random selection one in the permissible delay time range of transmission
Actual decay time so that avoid response message concentrations send produce the processing pressure to PING initiating equipments,
Make PING initiating equipments no longer dropping packets or delay process message, and then improve the accuracy of detection of PING initiating equipments.
As can be seen from the above description, the present invention realizes following technique effect:Devices to test completely can be
Random selection one is one's own in the permissible delay time range that PING initiating equipments are sent is used to send response detection report
The actual decay time of the response message of text, it is not necessary to lift hardware capabilities, will not also seize the chance of other Message processings, make
The detection messages produced in unit interval are reduced, so that the business burden of PING initiating equipments is alleviated, can safely, conveniently
Lift the precision of network detection.
Obviously, those skilled in the art should be understood that above-mentioned each module of the invention or each step can be with general
Computing device realize that they can be concentrated on single computing device, or be distributed in multiple computing devices and constituted
Network on, alternatively, the program code that they can be can perform with computing device be realized, it is thus possible to they are stored
Performed in the storage device by computing device, and in some cases, can be shown to be performed different from order herein
The step of going out or describe, they are either fabricated to each integrated circuit modules respectively or by multiple modules in them or
Step is fabricated to single integrated circuit module to realize.So, the present invention is not restricted to any specific hardware and software combination.
The preferred embodiments of the present invention are the foregoing is only, are not intended to limit the invention, for the skill of this area
For art personnel, the present invention can have various modifications and variations.Within the spirit and principles of the invention, that is made any repaiies
Change, equivalent substitution, improvement etc., should be included in the scope of the protection.