Network path optimization method, equipment and network system
Technical field
The present invention relates to internet, applications field, be specifically related to a kind of network path optimization method,
Equipment and network system.
Background technology
The developing rapidly the most non-its and can mention in the same breath at the beginning of establishment of the Internet, either enterprise, also
It is that common netizen has higher requirement to network speed.And heterogeneous networks (such as telecommunications and connection
Logical) between need to interconnect.During interconnecting, current network enter
Another network, it is contemplated that network self exists the problem of network jitter or fault, and peak traffic
Time there is the situations such as network busy, all may cause the appearance of network congestion.
The reason causing network congestion is varied, such as: there is loop in network and causes network speed
Slack-off, broadcast storm that network device hardware fault causes and cause network speed slack-off, in network certain
Individual port forms bottleneck and causes network speed slack-off etc..
Under the most changeable network condition, how to provide the user with a stable access
Process, this problem not yet has been resolved.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide one to overcome the problems referred to above or extremely
Partially solve the network system of the problems referred to above, node server, RTT monitor server and
Corresponding network path optimization method.
According to one aspect of the present invention, it is provided that the node server in a kind of network system,
It is applied to the network path to being connected to source station server from client be optimized, including: RTT
Statistic unit, is suitable to the RTT value adding up each client to this node server;RTT sends
Unit, is suitable to send the RTT value added up.
Optionally, described network system includes source station server and multiple node server, wherein
Described source station server is by coming to each client in content distribution to multiple node servers
Content is provided, and each client obtains content via described node server.
Optionally, described RTT value is connected for setting up TCP/IP in client with node server
Time, send confirmation signal of shaking hands from node server and shake hands really from client to described to receiving
Recognize the time interval value of the confirmation signal that signal sends.
Optionally, described client is multiple clients being distributed in different geographic regions.
According to a further aspect in the invention, it is provided that a kind of RTT monitor server, including RTT
Receive unit, be suitable to receive the RTT value that multiple node server sends;RTT computing unit,
Be suitable to each client, be calculated the node serve that RTT value is minimum for this client
Device.
Optionally, above-mentioned RTT monitor server also includes: network congestion assessment unit, is suitable to
Judge that a client is connected to node server according to the route being associated with this client
Whether RTT value exceedes threshold value;Route change unit, is suitable to assess unit in described network congestion
Determine that this client is connected to the RTT value of node server when exceeding threshold value, amendment and this client
The route that end is associated, in order to this client is connected to RTT value minimum for this client
Node server.
Optionally, the DNS that described route change unit is associated with this client by amendment comes
The route that amendment is associated with this client.
According to a further aspect in the invention, it is provided that a kind of method that network path optimizes, application
In the network path being connected to source station server via node server from client is carried out excellent
Change, including:
Receive the RTT from client to this node server added up by each node server
Value;
For each client, it is calculated node clothes minimum for RTT for this client
Business device;
Judge that a client is connected to node server according to the route being associated with this client
RTT value whether exceed threshold value;
As exceeded threshold value, the route that amendment is associated with this client, in order to this client connects
To with this client for RTT value minimum node server.
Optionally, the described route being associated with client specifies what this client should be connected
Node server.
Optionally, described RTT value is connected for setting up TCP/IP in client with node server
Time, send confirmation signal of shaking hands from node server and shake hands really from client to described to receiving
Recognize signal and send the time interval value of confirmation signal.
Optionally, described client is multiple clients being distributed in different geographic regions.
In embodiments of the present invention, it is possible to use RTT statistic unit counts each client and arrives
The RTT value of this node server, and then calculating RTT value can be utilized to select network optimum road
Footpath.Relative to the network congestion situation mentioned in prior art, the embodiment of the present invention is by calculating
RTT value diagnosis automatically, it is possible to select optimal path rapidly and accurately, it is to avoid on unstable road
Carry out network access on footpath, it is ensured that stablizing of access process network, improve Consumer's Experience.
Described above is only the general introduction of technical solution of the present invention, in order to better understand this
Bright technological means, and can be practiced according to the content of description, and in order to allow the present invention
Above and other objects, features and advantages can become apparent, below especially exemplified by the present invention's
Detailed description of the invention.
Accompanying drawing explanation
By reading the detailed description of hereafter preferred implementation, various other advantage and benefit
Those of ordinary skill in the art be will be clear from understanding.Accompanying drawing is only used for illustrating and is preferable to carry out
The purpose of mode, and it is not considered as limitation of the present invention.And in whole accompanying drawing, use
Identical reference marks represents identical parts.In the accompanying drawings:
Fig. 1 shows the structural representation of network system according to an embodiment of the invention;
Fig. 2 shows the process of the method that network path optimizes according to an embodiment of the invention
Flow chart;
Fig. 3 shows the handling process of RTT value calculating method according to an embodiment of the invention
Figure;
Fig. 4 shows that the system structure of network path optimization according to an embodiment of the invention is shown
It is intended to;
Fig. 5 shows the detail flowchart that network path optimizes according to an embodiment of the invention.
Detailed description of the invention
Provided herein algorithm and display not with any certain computer, virtual system or other
Equipment is intrinsic relevant.Various general-purpose systems can also be used together with based on teaching in this.Root
According to above description, construct the structure required by this kind of system and be apparent from.Additionally, this
Invention is also not for any certain programmed language.It is understood that, it is possible to use various programming languages
Realize the content of invention described herein, and the description above language-specific done be for
Disclose the preferred forms of the present invention.
In content distributing network (Content Delivery Network, hereinafter referred to as CDN),
The method currently mainly used is to realize improving network congestion this purpose by mirror image.Concrete,
CDN passes through mirror image, the web site contents of cache user, improves access speed.But at CDN
When caching expired, it is impossible to continue the web site contents of cache user, user source station is needed to ask phase
Answer content, if network jitter occurs the most suddenly, still there will be the resistance of network speed shakiness even network
The problem of plug.
For solving above-mentioned technical problem, the embodiment of the present invention provides a kind of network system.Fig. 1 shows
Go out the structural representation of network system according to an embodiment of the invention.As it is shown in figure 1,
Network system at least includes source station server 110, multiple node server 120, come and go time
Prolong (Round-Trip Time, hereinafter referred to as RTT) monitoring server 130 and client
140.The quantity of Fig. 1 interior joint server 120 is shown as 3, is merely cited for multiple, real
In the application of border, the particular number of node server 120 is probably any integer value, according to specifically
Situation sets.In each node server 120, framework is similar, does not repeats at this.
Now introduce the connection between each device in network system or the function of composition and each several part to close
System.First, source station server 110 couples, by content respectively with multiple node servers 120
It is distributed to multiple node server 120.RTT statistic unit 121 in node server 120
Add up each client RRT value to this node server, and then by node server 120
RTT transmitting element 122 send the RTT value added up.
Need being specifically defined of RTT value is described herein.In embodiments of the present invention, RTT value
Calculation as follows: set up transmission in client 140 with any one node server 120
Control protocol/internet protocol (Transmission Control Protocol/Internet
Protocol, hereinafter referred to as TCP/IP) connect time, send from this node server 120 and shake hands
Confirmation signal, to receiving from client 140 confirmation signal that confirmation signal of shaking hands sends
Time interval value.In network system shown in Fig. 1, source station server 110 is by dividing content
It is dealt in multiple node server 120, by multiple node servers 120 to each client 140
Content is provided.Accordingly, at opposite side, each client 140 is via node server 120
Obtain content.Meanwhile, wherein, each client 140 can be multiple being distributed in differently
The client in reason region, is not required to be confined to a certain appointment or identical geographic area.
From the foregoing, in embodiments of the present invention, it is possible to use RTT statistic unit 121 is united
Count out each the client 140 RTT value to corresponding node server 120, and then can be in order to
Network optimal path is selected with calculating RTT value.Relative to the network congestion mentioned in prior art
Situation, the embodiment of the present invention is by calculating the diagnosis automatically of RTT value, it is possible to choose rapidly and accurately
Go out optimal path, it is to avoid on unstable path, carry out network access, it is ensured that access process network
Stablize, improve Consumer's Experience.
Secondly, in the network system shown in Fig. 1, RTT monitor server 130 and each node
Server 120 is coupled.RRT monitoring server 130 utilizes the RTT of self to receive unit
The RTT value that 131 receiving node servers 120 send.After receiving above-mentioned RTT value, then by
RTT computing unit 134 calculates the minima in all RTT values returned, and i.e. obtains
The node server that RTT value is minimum for this client 140.Meanwhile, client 140
The RTT value that acquiescence connection machine room is returned is sent to the net in RTT monitor server 130
Network blocks up and assesses unit 132.The RTT value received is commented by network congestion assessment unit 132
Estimate, carry out different process according to assessment result difference.If network congestion assessment unit 132
The assessment result gone out is that the RTT value of assessment exceedes predetermined threshold value, then trigger route change unit
133, its amendment it is associated route to choose optimal network path with this client 140.
Specifically, network congestion assessment unit 132 assesses network system is given tacit consent to and client
Whether the RTT value that 140 machine rooms setting up connection are returned exceedes predetermined threshold value, if it exceeds in advance
If threshold value, then trigger route change unit 133, if not less than predetermined threshold value, then be continuing with working as
Front route.Assess current RRT value at network congestion assessment unit 132 and exceed the feelings of predetermined threshold value
Under condition, route change unit 133 revises the route being associated with this client 140, in order to should
Client 140 is connected to the node server that relative RTT value is less, it is, of course, preferable to, it is
It is connected to the node server that RTT value is minimum.
In a preferred embodiment, route change unit 133 perform route change this
Before operation, sending inquiry request to RTT computing unit 134, inquiry is for this client 140
For the node server of current RTT value minimum.RTT computing unit 134 receives inquiry
After request, return response message to route change unit 133, wherein carry existing customer
The information of the node server that RTT value is minimum for end 140.Route change unit 133 basis
The result that RTT computing unit 134 returns, the DNS that amendment is associated with this client 140
Revise the route being associated with this client 140.
In embodiments of the present invention, each server is independent, does not depend on the most mentioned
Network system.The RTT value that transmission can independently be come by node server is added up and is sent
Process, the RTT value received independently can be received, calculates by RTT monitor server,
Judge whether exceed predetermined threshold value and search the process of RTT minima.
The network system provided based on the most each preferred embodiment and each server, based on same
Inventive concept, embodiments provides a kind of network path optimization method, for from visitor
The network path that family end is connected to source station server via node server is optimized.Fig. 2 shows
Go out the process chart of network path optimization method according to an embodiment of the invention.See
Fig. 2, the method comprising the steps of S202 are to step S208.
In flow process shown in Fig. 2, step S202 is first carried out, receives by each node server
The RTT value from client to this node server of statistics.Step S202 is able to receive that
The quantity of RTT value depends on the quantity of client and the quantity of node server.
For each client, owing to the quantity of node server is multiple, therefore, it is corresponding
RTT value be multiple.When RTT value is multiple, perform step S204, for each
Client, in the RTT value that step S202 receives, is calculated for this client
The node server that RTT value is minimum.
Further, each client is judged the need of change route.That is, step is performed
Rapid S206 a, it is judged that client is connected to node clothes according to the route being associated with this client
Whether the RTT value of business device exceedes threshold value.The route being wherein associated with client specifies this client
The node server that end should connect.Subsequent operation is performed according to judged result, if judged result
Being yes, trigger step S208, if judged result is no, then flow process terminates.When RTT value surpasses
When crossing threshold value, perform step S208, now revise the route being associated with this client, in order to
This client is connected to the node server that RTT value is minimum for this client, and flow process terminates.
What deserves to be explained is, the calculation of RTT value is by the embodiment of the present invention: for client
End sets up TCP/IP when being connected with node server, sends, from node server, confirmation signal of shaking hands
To receiving from the client time interval to the confirmation signal that confirmation signal of shaking hands sends.Fig. 3
Show the process chart of RTT value calculating method according to an embodiment of the invention.Its tool
Body computational methods are: TCP shakes hands and second time through three-way handshake, RTT Data-Statistics third time
Duration between shaking hands.Seeing Fig. 3, the method comprising the steps of S302 is to step S306.
In flow process shown in Fig. 3, step S302 is first carried out, when client and node server
When setting up TCP/IP connection, i.e. in the t0 moment, client sends synchronizing sequence numbering
(Synchronize Sequence Numbers, hereinafter referred to as SYN) bag arrives node server,
And enter SYN_SEND(SEND, and send) state, wait that node server confirms, this
For shaking hands for the first time.Seeing Fig. 3 to understand, shaking hands for the first time is spaced apart t1-t0.
After end of shaking hands for the first time, perform step S304, when node server receives SYN bag
(i.e. t1 moment), it is necessary to confirming the SYN of client, node server oneself also sends one simultaneously
Individual SYN bag, i.e. SYN+ACK(Acknowledgement, confirm) bag, now node
Server is put into SYN_RECV(Receive, receives) state, this is second handshake.
Seeing Fig. 3 to understand, second handshake is spaced apart t2-t1 with shaking hands for the first time.
Finally, when client receives the SYN+ACK bag (i.e. t3 moment) of node server,
Perform step S306, i.e. client and send confirmation bag ACK to node server.When from client
The confirmation bag ACK of end is sent, and client and node server enter ESTABLISHED
(successful connection) state (i.e. t3 moment), this shakes hands for third time.See Fig. 3 to understand,
Third time is shaken hands and second handshake is spaced apart t3-t2.After third time has been shaken hands, according to upper
The calculation of literary composition can calculate RTT value, i.e. third time and shake hands and between second handshake
Time interval.
After third time shakes hands end, client and node server enter data transfer phase,
Client is to node server request content, accordingly, node server by content distribution to visitor
Family end.Seeing Fig. 3, mention in step S308, after the t3 moment, client is to node serve
Device sends data (DATA).And in step S310, node server received in the t4 moment
DATA, between the moment of t4-t5, returns data validation (DATA ACK) message to client
End.
Network path optimization method and device for the embodiment of the present invention being provided illustrate more clear
Chu is clearer, is now described with specific embodiment.
Embodiment one
In this example, concrete applied environment is the situation that the user of multiple provinces and cities carries out network access.
For convenience of describing, the above-mentioned network system shown in Fig. 1 will increase a control centre.Control
Center has and only one, for carrying out the ruuning situation of network system each several part and entirety
Monitoring.
In this example, the flow process of network path optimization method is as follows:
Step 1, statistics RTT postpone;
Wherein, the main body of statistics can be each client, each client report after adding up voluntarily
To control centre, it is also possible to be that control centre directly adds up, it is also possible to be to be entered by node server
Control centre is reported to after row statistics.
Step 2, monitored results is reported control centre;
Step 3, control centre calculate each node visit relatively according to monitored results, assessment
Slow provinces and cities;
Wherein, the most relatively slow is to compare with predetermined threshold, i.e. control centre can root
Predetermined threshold whether is exceeded to determine the access speed in each province and city according to the value of certain predetermined route
Degree is the slowest, and then is confirmed whether to be modified corresponding route.
Step 4, for accessing relatively slow provinces and cities, calculate the minimum node of RTT for it;
Step 5, control centre control amendment DNS(Domain Name System, domain name solution
Analysis system) resolve, this node is resolved to the minimum node of RTT.
Node optimum in step 5 is to be resolved to the minimum node of RTT, if under special circumstances,
Node minimum for RTT can not provide access service, such as, this node hardware fault, or
Machine maintenance or other states, now can be resolved to RTT little node, by that analogy.
It should be noted that the node that in the present embodiment, each step relates to is node server above
Abbreviation.
Fig. 4 shows of the system structure of network path optimization according to embodiments of the present invention
Exemplary plot.As shown in Figure 4, user is Guangdong user 410, and acquiescence is assigned to node 1.
When blocking up occurs in network, be equivalent to source station server above according to user source station 440() send out
The data sent, the node obtaining the RTT value that calculates minimum is node 2 430, then revise DNS
Resolve, Guangdong user 410 is resolved to node 2 430.
Embodiment two
The present embodiment, as a example by the user user as Hunan Province, describes the method that network path optimizes in detail.
The present embodiment depends on the network system shown in Fig. 1 and realizes.
Fig. 5 shows a kind of method that network path optimizes
Detail flowchart.Seeing Fig. 5, the method at least includes that step S502 is to step S520.
In the present embodiment, Hunan Province's user's default allocation is to Beijing machine room.Now perform step
S502, sets up TCP/IP at the client of Hunan Province user and the node server of Beijing machine room
During connection, calculate and send confirmation signal of shaking hands from node server to receiving from client pair
The time interval value of the confirmation signal that confirmation signal of shaking hands sends, i.e. RTT value.
Subsequently, perform step S504, utilize the RTT statistic unit in node server to add up
The RTT value corresponding with Hunan user that the various places machine room that source station server sends returns.Node
The multiple RTT values received are added up by the RTT statistic unit in server, subsequently, and will
Statistical result sends the RTT transmitting element to node server.In step S506, node
In RTT transmitting element forwarding step S504 in server, RTT statistic unit statistics is all
RTT value.Accordingly, in step S508, the RTT in RTT monitor server connect
Receive unit and receive the RTT value that multiple node servers send, in the embodiment of the present invention: Hunan
User visit Shanghai machine room RTT is 85ms, and Hunan user accesses Beijing machine room RTT and is
800ms。
Receive after Hunan user and various places machine room set up and be connected in RTT monitor server
After RTT value, perform step S510, utilize the RTT in RTT monitor server to calculate single
Unit is calculated the node server that RTT value is minimum for the subscription client of Hunan.Need
Illustrating, in the present embodiment, RTT minimum node is relative to for client being exactly its optimum
Node.Such as, the Hunan user's visit Shanghai machine in step S510 confirms the embodiment of the present invention
Room RTT be 80ms be the minima in all RTT values, then Hunan user builds with Shanghai machine room
Vertical path is just for the network optimal path of required selection.
Subsequently, in step S512, network congestion assessment unit is associated according to this client
Router-level topology current, whether the RTT time delay of Hunan user and Beijing machine room exceedes pre-sets
Threshold value, if it is not, perform step S514, if then perform step S516.
If step S514 RTT value is not above predetermined threshold value, confirm that now path has been the most
Good path, route need not change, process ends.
If step S516 RTT value exceedes the threshold value pre-set, then need to utilize route more
Change unit and revise the route being associated with this client, in order to this client is connected to this client
The node server that for end, RTT value is minimum.In this step, route change unit is to RTT
Computing unit sends inquiry request, the node that inquiry RTT is minimum.
Upon execution, receive that route change unit sends in step S516 looks into step S518
After asking request, the node server of RTT value minimum that RTT computing unit will calculate
Data are sent to route change unit.Such as, confirm through step S510, for Hunan user
For, the RTT between Hunan user and Shanghai machine room is minimum, and therefore, RTT computing unit will
RTT value 80ms that minimum RTT value returns for Shanghai machine room is sent to route change unit.
Route change unit performs step after receiving the minimum RTT value that RTT computing unit sends
Rapid S520.Concrete, route change unit is by revising the DNS being associated with this client
Revise the route being associated with this client, the road that amendment is associated with Hunan subscription client
By so that this client is connected to the node server that RTT value is minimum for this client.Extremely
This, it is achieved network path optimization, flow process terminates.
It should be noted that the node that in the present embodiment, each step relates to is node server above
Abbreviation.
Have employed said method and equipment, the embodiment of the present invention can bring following beneficial effect:
In embodiments of the present invention, it is possible to use RTT statistic unit counts each client and arrives
The RTT value of this node server, and then calculating RTT value can be utilized to select network optimum road
Footpath.Relative to the network congestion situation mentioned in prior art, the embodiment of the present invention is by calculating
RTT value diagnosis automatically, it is possible to select optimal path rapidly and accurately, it is to avoid on unstable road
Carry out network access on footpath, it is ensured that stablizing of access process network, improve Consumer's Experience.
Further, the RTT value calculated in the embodiment of the present invention is the time interval shaken hands for twice,
Can ensure that the accuracy that response time between the server and client side of source station is calculated.It addition,
Client in the embodiment of the present invention is multiple clients being distributed in different geographic regions, permissible
Ensure can choose optimal path at any time for any one location user, it is not limited to a certain or certain
Client in several appointment regions, widely applicable.
In description mentioned herein, illustrate a large amount of detail.But, it is possible to reason
Solving, embodiments of the invention can be put into practice in the case of not having these details.At some
In example, it is not shown specifically known method, structure and technology, in order to not fuzzy to this theory
The understanding of bright book.
Similarly, it will be appreciated that in order to simplify the disclosure and help to understand in each inventive aspect
One or more, above in the description of the exemplary embodiment of the present invention, the present invention's
Each feature is grouped together in single embodiment, figure or descriptions thereof sometimes.So
And, should not be construed to reflect an intention that the most required for protection by the method for the disclosure
Invention requires than the more feature of feature being expressly recited in each claim.More precisely
Ground says, as the following claims reflect as, inventive aspect be less than above public affairs
All features of the single embodiment opened.Therefore, it then follows claims of detailed description of the invention
Thus being expressly incorporated in this detailed description of the invention, the most each claim itself is as this
Bright independent embodiment.
Those skilled in the art are appreciated that can be to the module in the equipment in embodiment
Adaptively change and they be arranged on different from this embodiment one or more
In equipment.Module in embodiment or unit or assembly can be combined into a module or unit
Or assembly, and multiple submodule or subelement or sub-component can be put them in addition.Remove
Outside at least some in such feature and/or process or unit excludes each other, permissible
Use any combination to public in this specification (including adjoint claim, summary and accompanying drawing)
All features of opening and the disclosedest any method or all processes of equipment or unit are entered
Row combination.Unless expressly stated otherwise, this specification (includes adjoint claim, summary
With accompanying drawing) disclosed in each feature can by provide identical, equivalent or the replacement of similar purpose
Feature replaces.
Although additionally, it will be appreciated by those of skill in the art that embodiments more described herein
Including some feature included in other embodiments rather than further feature, but different enforcement
The combination of the feature of example means to be within the scope of the present invention and formed different enforcement
Example.Such as, in the following claims, embodiment required for protection one of arbitrarily
Can mode use in any combination.
The all parts embodiment of the present invention can realize with hardware, or with at one or many
The software module run on individual processor realizes, or realizes with combinations thereof.This area
It will be appreciated by the skilled person that microprocessor or digital signal processor can be used in practice
(DSP) realize some in the device that network path according to embodiments of the present invention optimizes or
The some or all functions of the whole parts of person.The present invention is also implemented as performing here
Part or all equipment of described method or device program (such as, computer
Program and computer program).The program of such present invention of realization can be stored in calculating
On machine computer-readable recording medium, or can be to have the form of one or more signal.Such signal
Can download from internet website and obtain, or provide on carrier signal, or with any
Other forms provide.
The present invention will be described rather than carries out the present invention to it should be noted above-described embodiment
Limit, and those skilled in the art without departing from the scope of the appended claims may be used
Design alternative embodiment.In the claims, any reference between bracket should not will be located in
Symbol construction becomes limitations on claims.Word " comprises " not exclude the presence of and is not listed in right
Element in requirement or step.Word "a" or "an" before being positioned at element is not excluded for
There is multiple such element.The present invention can be by means of the hardware including some different elements
And realize by means of properly programmed computer.If listing the unit right of equipment for drying
In requirement, several in these devices can be specifically to be embodied by same hardware branch.
Word first, second and third use do not indicate that any order.Can be by these words
It is construed to title.