Summary of the invention
The method that the purpose of this invention is to provide the real-time integrated testability of a kind of network system, adopt the method for the invention under network operation state, to carry out in real time, it is simple to have detection method, network test coverage rate height, test result can reaction test be the time of day of network channel, the advantage that testing cost is low.
Technical scheme of the present invention is: the method for the real-time integrated testability of network system, described network system comprise system of inspection center and client terminal loopback responding system, and described detection method has following steps;
1) system of test center's server operation test center, system of described test center comprises test originating end, test receiving terminal and statistical analysis end, receiving terminal operation client terminal loopback responding system;
2) network address of the client application terminal equipment that can test from the real-time or non real-time acquisition all or part of network of system of test center, and the network channel information corresponding with the network address that can test client application terminal equipment;
3) system of test center sends the test pack that series number increases progressively by the network address of customer terminal equipment to part or all terminals, each test pack all comprises transmitting time and sends sequence number, the series of tests bag that test center sends is sent to each single terminal end of tested network, and described series of tests bag is sent in the client terminal system by network channel;
4) the client terminal system returns the system to test center with this test pack by network channel immediately after receiving test pack;
5) system of test center is behind the test pack of receiving the passback of client terminal system, the recorder time is also extracted transmitting time and sequence number from test pack, test pack to all passbacks carries out following cycle detection: the calculating of delay package, shake bag, whether the test pack that detects all passbacks again is normal bag, if then record the centring system database; If improper bag then is provided with expectation bag, detect successively according to the order of late bag, duplicate packages, out of order bag, packet loss, gained detects data and promptly generates single client terminal Back ground Information, records the centring system database;
6) system of Institute of Analysis draws the state of network channel in the test period with all the client terminal test datas in the database.
Normal bag sequence number+1 of the described expectation bag of step 5) sequence number=receive.
The determination methods of the described normal bag of step 5) is, when receiving that bag sequence number 〉=expectation bag sequence number is, then is judged as this test pack and normally wraps, and improper bag is meant the test pack beyond the normal bag.
The computational methods of the described time-delay of step 5): test pack time-system of test center that system of time-delay=test center receives the client terminal passback sends the time of test pack.
The computational methods of the described shake of step 5): the absolute value of the time-delay of the time-delay-last test pack of shake=back one test pack.
The determination methods of the described repetition of step 5): 1) system of test center sets up and has received the interval range that sends the test pack sequence number, it is the duplicate packages scope, described duplicate packages scope comprises a plurality of intervals, and there is the sequence number of the follow-on test bag that the system of test center receives in each interval; 2) sequence number of the test pack in the judgement duplicate packages scope, what the repetition sequence number was arranged is duplicate packages then, otherwise is not.
The described late determination methods of step 5): 1) blanking time of the transmission test pack of system of setting test center and the lagged time of test pack, blanking time by sending test pack, the lagged time with test pack was converted to late bag threshold value, whether divided late bag with described late bag threshold value; 2) deduct this late bag threshold value with current expectation bag sequence number, obtain the late boundary quantity of wrapping, tested bag sequence number then is late bag less than this late bag boundary quantity.
The described out of order determination methods of step 5): the system of test center is received in all test packs, removes normal bag, duplicate packages, late bag, and remaining bag all is out of order bag
The computational methods of the described packet loss of step 5) are: the packet loss quantity=quantity of giving out a contract for a project-normally wrap quantity-duplicate packages quantity-late bag quantity-out of order bag quantity.
In the method for the invention when the test pack of client terminal system passback is whenever received by the system of test center, promptly begin to carry out the described detection of step 5), as: the test pack of receiving Bale No. 1, promptly the test pack to Bale No. 1 carries out the described detection of step 5), if normal bag then records the centring system database; Receive the test pack of Bale No. 2, promptly the test pack to Bale No. 1-2 carries out the described detection of step 5), if normal bag then records the centring system database; Receive the test pack of Bale No. n, promptly the test pack to Bale No. 1-n carries out the described detection of step 5), if normal bag, then record the centring system database, if improper bag is arranged, then need to judge whether to be duplicate packages, late bag, out of order bag, packet loss etc., and judged result is recorded the centring system database.And so forth, detect end until all test packs to the passback of client terminal system, the system of Institute of Analysis draws the state of network channel in the test period with all the client terminal test datas in the database again.
Method of testing of the present invention can whole day in time be obtained network operation state in 24 hours reliably in the network operation, test running status that therefore can the real-time analysis network to obtaining big data quantity.Its test result levels off to the truth of network more, can reduce testing cost greatly, drives the network optimization with the test result that more trends towards true operational network accurately, increases the utilization ratio of network and improves network running quality.The present invention is according to practical situations, all or part of above concrete test data in will testing, and weighting is integrated and is obtained.The quantitative target of reflection overall network state helps layman or professional's directly monitoring network integrality.
Method of testing of the present invention can be when the network operation or operation, also can when inoperative or operation, carry out, communicate by letter with the client application terminal of extracting through network analysis (a small amount of or in enormous quantities) by the system of test center, carry out loopback test, test result combines the state-of-the-art thermometrically method of present industry and takes into full account the characteristic of network, can measure and monitor network from the angle that the whole network covers and end-to-end QoS guarantees.Adopt the inventive method can high efficiency, the actual conditions of highly reliable grasp network, for the network management personnel optimizes network, locating network fault and the scientific basis of quantification is provided for network adjustment upgrading etc.
Method of testing of the present invention can be applied to communicate by letter, the test of the network integral body in field such as electric power.
The term that the present invention relates to is as follows:
Time-delay:Be meant the used time of transmission in transmission medium, promptly enter network to the time its deviated from network since start of heading.
Produce reason: the intrinsic time delay of physical media, link-speeds delay, exchange and route delay, queueing delay, jumping figure or the like.Influence: network delay is big more, and service efficiency is low, and the stand-by period was long when terminal client was brought into use service.
Shake: be meant the intensity of variation of packetization delay, i.e. the absolute value of the difference of the forwarding time delay of adjacent two frames of sequence delivery, perseverance be on the occasion of.
Produce reason: network route changing, network equipment instability or the like.Influence: shake greatly more, network is unstable more, and the unimpeded degree of network is low, particularly influences bigger to multimedia services such as voice and videos.
Late:Be meant the bag that surpasses late threshold value when packet delay.
Produce reason: network route changing, the unstable situation of the network equipment are more abominable or the like.Influence: unimpeded being subjected to of network greatly influences, as: can't the voice and video communication.
Repeat:Same bag is received more than twice or twice.
Produce reason: network routing device fault or the like.Influence: network is unimpeded influenced, as: voice echo or the like.
Out of order: the order that is meant the packet of packet arrival receiving terminal is chaotic.
Produce reason: network route changing, network equipment instability or the like.Influence: the unimpeded considerable influence that is subjected to of network, as: voice fuzzy, Video service are paused more.
Packet loss:Be meant in the network transmission process and lose, the bag that receiving terminal can't be received.
Produce reason: network self problem, routing iinformation mistake, network congestion or the like.Influence: network unimpeded influenced (as: usually go offline, network speed slower or the like).
The present invention is described further below in conjunction with accompanying drawing.
Specific embodiments
Referring to Fig. 1 and Fig. 2, the method of the real-time integrated testability of network system, its network system comprises system of inspection center and client terminal loopback responding system, wherein the system of inspection center can (comprise netting twine, optical fiber, coaxial line for server system, wired or wireless channel, route, the base station) etc., client terminal can be PC, mobile phone, other smart machine or the like, and described detection method has following steps;
1) system of test center's server operation test center, in the described test center server system of test center is set, system of described test center comprises test originating end, test receiving terminal and statistical analysis end, receiving terminal operation client terminal loopback responding system, client terminal are provided with end ring and echo and answer system;
2) network address of the client application terminal equipment that can test from the real-time or non real-time acquisition all or part of network of system of test center, as: IP, IPv6, terminal address of self-defined network or the like, and the network channel information corresponding with the network address that can test client application terminal equipment, comprise individual channel and common channel information;
3) system of test center sends the test pack that series number increases progressively by the network address of customer terminal equipment to part or all terminals, each test pack all comprises transmitting time and sends sequence number, the series of tests bag that test center sends is sent to each single terminal end of tested network, described single terminal end sequence number increases progressively and is sequence number=last sequence number+1, and described series of tests bag is sent in the client terminal system by network channel; The test pack blanking time that sends, test pack length etc. are according to user's actual demand setting.
4) the client terminal system returns the system to test center with the series of tests bag of receiving by network channel immediately one by one after receiving the series of tests bag;
5) system of test center is behind the test pack of receiving the passback of client terminal system, the recorder time is also extracted transmitting time and sequence number from test pack, test pack to all passbacks carries out following cycle detection: the calculating of time-delay, shake, again by comparing with the expectation bag, whether the test pack that detects passback is normal bag, if then record the centring system database; If improper bag detects successively according to the order of late bag, duplicate packages, out of order bag, packet loss, gained detects data and promptly generates single client terminal Back ground Information, records the centring system database.Normal bag+1 that described expectation is wrapped=received.Normally the determination methods of bag is, when receiving that bag sequence number 〉=expectation bag sequence number is, then is judged as this test pack and normally wraps, and improper bag is meant the test pack beyond the normal bag.
The test pack of passback is carried out the calculating of delay package:
The computational methods of time-delay: system of time-delay=test center receives the time of test pack time-system of the test center transmission test pack of client terminal passback.
After the test pack calculating of delaying time with passback, the calculating of shaking again:
The computational methods of described shake: the absolute value of the time-delay of the time-delay-last test pack of shake=back one test pack.
After the test pack calculating of shaking with passback, the judgement of normally wrapping:
The determination methods of described normal bag: the current bag of receiving bag sequence number 〉=current expectation bag sequence number
If current test pack is improper bag (the order-checking bag beyond the normal bag of making a comment or criticism), carry out the judgement of duplicate packages again:
Referring to Fig. 3 and Fig. 4, the determination methods of described duplicate packages is: 1) system of test center sets up and has received the interval range that sends the test pack sequence number, i.e. duplicate packages scope (needs according to the client are set in test center).Described duplicate packages scope comprises a plurality of intervals, each interval sequence number of representing the follow-on test bag that the system of test center is received.The sequence number of the follow-on test bag of receiving can be not according to sequence arrangement, but must be continuous, otherwise will set up one or several new duplicate packages scope intervals; 2) whether the sequence number of judging the test pack receive in the duplicate packages scope, if in this scope, has sequence number to repeat, and then is duplicate packages; If not in the duplicate packages scope, then set up one or several new duplicate packages scope intervals, if it is interval adjacent with existing duplicate packages scope interval to set up new duplicate packages scope, then new duplicate packages scope interval merges to existing duplicate packages scope interval, if it is non-conterminous, then set up one or several new duplicate packages scope intervals, repeat in the duplicate packages determination methods 1 again) judgement.
Usually the interval number of duplicate packages scope is many more, and the result is accurate more, but committed memory is big more, and the computing that consumes CPU is many more; The interval number of duplicate packages scope is few more, and the result is inaccurate more, but committed memory is more little, and the computing that consumes CPU is few more.Therefore, in the practical application,, can increase or reduce interval quantity, to obtain the optimal proportion of algorithm coverage and resource consumption according to the system resource situation of reality.Adopt the method that keeps the nearest several intervals of duplicate packages scope,, adjust accordingly according to resource (CPU speed, memory size) situation with the interval number of duplicate packages scope.
If current bag is duplicate packages, then this moment this test point the duplicate packages rate=duplicate packages number/sum of giving out a contract for a project.
After improper bag being carried out the judgement of duplicate packages, not duplicate packages, the judgement of the bag of then being late if ought up till now wrap:
Referring to Fig. 5, calculate with late bag threshold value, can avoid parallel delay to bring a large amount of late bag phenomenons, make test result reaction network situation more accurately.Late bag threshold value=late bag threshold time/transmissions blanking time, the threshold time of wherein being late is provided with according to client's needs.Described late determination methods: 1) set to send the blanking time of test pack and the lagged time of test pack, the blanking time by sending test pack, the lagged time with test pack was converted to late bag threshold value, whether divided late bag with described late bag threshold value; 2) deduct late bag threshold value with current expectation bag sequence number, obtain a late boundary number that wraps, the sequence number of tested bag then is late bag less than late bag boundary quantity.
If current bag is late bag, then this moment this test point late bag rate=late bag quantity/sum of giving out a contract for a project.
Improper bag is late after the judgement of bag, if current be not late bag, then carry out the judgement of out of order bag:
Receive bag if not normal bag (receiving bag sequence number 〉=expectation bag sequence number), duplicate packages, late bag, then this bag is out of order bag.
If current bag is out of order bag, then out of order bag number adds 1, and then can calculate the out of order bag rate=out of order bag number/number of giving out a contract for a project of this test point this moment.
At last to improper bag being carried out the calculating of packet loss:
The computational methods of described packet loss are: the packet loss quantity=quantity of giving out a contract for a project-normally wrap quantity-duplicate packages quantity-late bag quantity-out of order bag quantity
Can calculate the packet loss=number of dropped packets/number of giving out a contract for a project of this test point this moment.
Calculate packet loss quantity by the jump situation of receiving the bag sequence number, and when receiving non-expectation bag sequence number, the packet loss quantity of calculating is done correction, thereby obtain " current " number of dropped packets." current " number of dropped packets is done sliding window filtering get minimum value, the situation of avoiding number of dropped packets to diminish to a certain extent.
6) system of Institute of Analysis draws the state of network channel in the test period with all the client terminal test datas in the database.By obtaining single-point client state, phase-split network running status and failure judgement point position after the test to all clients.
Inspection center detects data with gained and promptly generates single client terminal Back ground Information, records the centring system database, repeats above-mentioned detection step, and inspection center all records the centring system database with all clients' of gained detection terminal-based information.
The client sets the corresponding problem limit value at each test index, surpasses the problem limit value of setting as the test result of single-spot testing index, illustrates that then this client device has problems to the network in the middle of the system of test center.For example, the limit value that the client is provided with time-delay is 1000, when the test time-delay is that 1200(is greater than 1000) time, the expression network has problem)
Test data is carried out statistical computation, get rid of interfering data (interfering data is set in test center according to client's needs), obtain network integrated testability result, if on same test path 100 applications client are arranged, test result has only 2 problem is arranged, can predicate case, get rid of network problem.
By to the path analysis of system of test center to client, decision problem point position.When the problem limit value of finding to have the target test to surpass and setting or failure when (refer to send test pack and do not return test center), the state of the test by relatively having common path (referring to no problem path) is got rid of orientation problem point position piecemeal.For example: be initiated to path G from path A and test, first path is A → B → C → F, and second path is A → B → C → D → G, after tested, first path is normally promptly normal, and second path is unusual, then A → B → C is normal common path, and problem can navigate on C → D → G path.
Pass through said method, can calculate situations such as the duplicate packages rate of the improper bag of network in running, late bag rate, out of order bag rate, packet loss, provide the quantitative target of the overall network state of operation, be convenient to network management personnel's monitoring network integrality intuitively, as whether needing to optimize network, locating network fault and be foundation such as network adjustment upgrading is with the utilization ratio that increases network with improve network running quality.
Embodiment 1
Late bag threshold value is set: 5
It is as follows to send order-checking bag sequence number sequence: (transmission)
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
What client terminal passback was received by the system of test center receives the bag sequence number sequence:
2,3,5,4,6,10,7,8,9,11,12,13,14,1,11,15,25,16,17,18,19,20,21
If transmitting time is as follows
Bale No. 2 transmitting times: 1000000 microseconds
Bale No. 2 is accepted the time: 1002000 microseconds
Bale No. 3 transmitting times: 1005000 microseconds
Bale No. 3 is accepted the time: 1009000 microseconds
Analyze:
The technology of time-delay and shake:
Bale No. 2 time-delays: Bale No. 2 is accepted time (1002000) – Bale No. 2 transmitting times (1000000)=2000 microseconds
Bale No. 3 time-delays: Bale No. 3 is accepted time (1009000) – Bale No. 3 transmitting times (1005000)=4000 microseconds
Bale No. 3 shakes: Bale No. 3 time-delay (4000)-Bale No.s 2 time-delay (2000)=2000 microseconds
The judgement of duplicate packages, late bag, out of order bag, packet loss sum:
Duplicate packages
What client terminal passback was received by the system of test center receives in the bag sequence number sequence 2,3,5,4,6,10,7,8,9,11,12,13,14,1,11,15 sequence number is continuous, therefore duplicate packages scope interval 1 is the test pack of Bale No. 1-15, and 2 Bale No.s that have in this interval are 11 test packs, so the test pack of Bale No. 11 is a duplicate packages; The test pack of the sequence number 25 that is right after is not adjacent with duplicate packages scope interval 1, so the test pack of Bale No. 25 is duplicate packages scope interval 2, this interval digital number that not have repetition; The sequence number 16,17,18,19,20,21 that is right after is continuous and adjacent with duplicate packages scope interval 1, interval 1 fusion 16,17,18,19,20,21 of duplicate packages scope this moment, and duplicate packages scope interval 1 becomes the test pack of Bale No. 1-21, and this interval does not have digital number of repetition.
So what client terminal passback was received by the system of test center receives in the bag sequence number sequence duplicate packages sum: 1 (test pack of Bale No. 11).
Late bag:
It is 5 that present embodiment is provided with late bag threshold value, the system of test center is received the judgement that the bag sequence number is late successively and is wrapped of receiving of client terminal passback with late bag threshold value, with Bale No. 13 is example, the bag of Bale No. 13 fronts is that sequence number is 12 test pack, and the desired value of the test pack of Bale No. 13 is 12+1=13, deducts late bag threshold value with current desired value, obtain late bag boundary quantity=13-5=8, because 8〉13, therefore, Bale No. is that 13 test pack is not late bag;
When judging Bale No. 1, because the Bale No. numeral of Bale No. 1 front is 14, so the desired value of Bale No. 1 is 14+1=15, current late bag boundary quantity 15-5=10, because 1<10, therefore, Bale No. is that 1 test pack is late bag; In like manner Bale No. 16,17,18,19,20 is late bag.
So receiving in the bag sequence number sequence of client terminal passback, late bag sum: 6 (test packs of Bale No. 1 are received by the system of test center, the test pack of Bale No. 16, the test pack of Bale No. 17, the test pack of Bale No. 18, the test pack of Bale No. 19, the test pack of Bale No. 20).
Out of order bag:
Out of order bag is for removing normal bag (Bale No. is 2,3,5,6,10,12,13,14,15 test pack), duplicate packages (Bale No. is 11 test pack), late bag (Bale No. is 1,16,17,18,19,20 test pack).
So receiving in the bag sequence number sequence of client terminal passback, out of order bag sum: 5 (Bale No. is 4 test pack, and Bale No. is 7 test pack, and Bale No. is 8 test pack, and Bale No. is 9 test pack, and Bale No. is 21 test pack) are received by the system of test center.
Packet loss:
Packet loss=all giving out a contract for a project (Bale No. is the test pack of 1-25)-normal bag (Bale No. is 2,3,5,6,10, the test pack of 12-15)-duplicate packages (test pack of Bale No. 11)-late bag (test pack of Bale No. 1,16-20)-out of order bag (Bale No. is 4,7,8,9,21 test pack).
So what client terminal passback was received by the system of test center receives in the bag sequence number sequence packet loss sum: 3 (Bale No. is 22 test pack, and Bale No. is 23 test pack, and Bale No. is 24 test pack).
The system of Institute of Analysis draws the state of network channel in the test period with all the client terminal test datas in the database.By obtaining single-point client state, phase-split network running status and failure judgement point position after the test to all clients.In the improper bag of present embodiment, duplicate packages rate=1/25=4%, late bag rate=6/25=24%, out of order bag rate=5/25=20%, packet loss=3/25=12% is if the client is provided with late bag rate and out of order bag rate〉20% o'clock, need be optimized processing to network, then the network user can adjust maintenances such as upgrading or elimination fault to network by above-mentioned method of testing.