CN101399713B - Method for measuring proximity of network node - Google Patents

Method for measuring proximity of network node Download PDF

Info

Publication number
CN101399713B
CN101399713B CN2008101989307A CN200810198930A CN101399713B CN 101399713 B CN101399713 B CN 101399713B CN 2008101989307 A CN2008101989307 A CN 2008101989307A CN 200810198930 A CN200810198930 A CN 200810198930A CN 101399713 B CN101399713 B CN 101399713B
Authority
CN
China
Prior art keywords
round
trip delay
vector
client node
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN2008101989307A
Other languages
Chinese (zh)
Other versions
CN101399713A (en
Inventor
胡鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN2008101989307A priority Critical patent/CN101399713B/en
Publication of CN101399713A publication Critical patent/CN101399713A/en
Application granted granted Critical
Publication of CN101399713B publication Critical patent/CN101399713B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method used for measuring the proximity of network nodes, which comprises the steps as follows: 1) nodes of client ends send logging request to servers in the server list at the same time; wherein, the server list of all client end nodes is provided with at least one identical server address; 2) the nodes of the client ends gain the network position vector according to the logging response information returned by the server; 3) according to a similarity arithmetic and the network position vector, the proximity of at least two client end nodes is calculated. The method directly reuses the logging response information after the client end nodes log in the server and gains the network position vector and measures the proximity of the network nodes according to the similarity arithmetic, without adding additional equipment or installing new protocol or sending additional network testing packets; the method has the advantages of simple updating and convenient generalization and lightens the burdens of the system equipment and the network loads.

Description

The method of Measurement Network node adjacency
[technical field]
The present invention relates to the Internet communication technology field, relate in particular to a kind of method of Measurement Network node adjacency.
[background technology]
Adjacency information between the network node has important significance for the network application of internet.Because communication delay all has bigger influence to the whole time of implementation and the efficient of network operation in wide area network, therefore in many application of internet, if can measure the network distance between the main frame in advance, just can improve the network transmission performance of application program significantly.For example, for instant communicating system, the third party node all comparatively contiguous with communicating pair can be used as the transit node of the transfer of data of communicating pair, thereby provide quality higher gangway for transhipment.For file-sharing/download class network application, the node of selecting comparatively to be close to download user helps improving downloading rate as kind of a child node.And use for the P2P Streaming Media, obtain stream medium data from adjacent node and can guarantee high-quality more, more smooth broadcast.Generally speaking, the adjacency of each node has great importance in the Measurement Network.
At present, general coordinate Network Based is measured the network distance between the node, the method of measurement of coordinate Network Based is a kind of method of measurement of estimating the network distance between the node by a spot of end-to-end measurement, its basic ideas are to be an Euclidean space with network modelling, and suitably define its coordinate system and distance function.For any network node, can it be mapped on the point of Euclidean space according to a spot of measurement result, thereby, just can estimate the distance between these two points according to the coordinate of any two points.Based on the method for coordinate is to become a geometrical model with the internet is abstract, represents main frame in the internet so only to need each end host to keep a coordinate with point in geometric space.Distance between main frame can directly draw by Coordinate Calculation.Obviously, the method based on coordinate is very effective for a large amount of positional information of expression.
(Global Network Positioning GNP) is exactly a kind of measuring system of coordinate Network Based in the global network location.The method of distance generally comprises following steps between this systematic survey node: at first select a part of main frame (general 5 to 20) and be made as terrestrial reference (Iandmark) node, and the coordinate Calculation of these nodes is come out as the reference point of other node; Himself distance between these terrestrial reference nodes of other node measurement calculates self relative coordinate then, the relative coordinate of two nodes is compared, thereby obtain distance between these two nodes.
But the distance between the mode measured node of employing global network location has following weak point:
1, this mode needs extra equipment send extra test pack, with test node to the distance between the terrestrial reference node.Utilize extra equipment to send the burden that a large amount of test packs can increase the weight of these equipment, influence the service behaviour of itself.And the each side that the extra test pack that sends need participate in measuring need be equipped with extra agreement, makes each side all support to measure agreement, thereby has increased system complexity.In addition, the extra test pack that sends has also increased the weight of the load of network greatly.
2, its coordinate Calculation of this mode is comparatively complicated, there is bigger computing cost, and the layout close association of its accuracy and terrestrial reference node, measurement result is subjected to the influence of terrestrial reference node bigger, and the accurate terrestrial reference node of connection and reasonable arrangement needs the more highly difficult network planning, so the stability of its measurement result and reliability are relatively poor.In addition, because the coordinate of terrestrial reference node itself need calculate by measurement, and other node coordinates also need to pass through to the measurement of terrestrial reference node and calculate, therefore network fluctuation can produce twice influence to measurement result, therefore measurement result is subjected to the influence of network fluctuation bigger, the network slight fluctuations may produce distinct coordinate result, thereby the point-to-point transmission network distance is estimated that the error that causes is also bigger, has further reduced the stability and the reliability of measurement result.
[summary of the invention]
The method that the purpose of this invention is to provide a kind of Measurement Network node adjacency, this method simply are convenient to implement, and can reliablely and stablely obtain measurement result comparatively accurately.
For achieving the above object, the present invention proposes following technical scheme:
A kind of method of Measurement Network node adjacency may further comprise the steps:
1), the server of client node in server list send logging request simultaneously, is provided with at least one identical server address in the server list of wherein said each client node;
2), client node obtains the network site vector according to the login echo message that described server returns, described network site vector comprises access probability vector and/or round-trip delay vector;
3), adopt similarity algorithm according to the adjacency between at least two client nodes of described network site vector calculating.
Wherein, described network site vector is the access probability vector, described step 2) specifically comprise process:
Client node is behind the login echo message that the described server of reception returns, and record returns the successful server address data of login at first;
The probability that inserts each server according to the described client node of server address data statistics of historical record is respectively x1, x2......xN, and wherein each xi sum is 1;
Obtain the access probability vector X of client node according to following formula:
X=(x1,x2,...,xN)。
Wherein, described step 3) specifically comprises process:
Adopt similarity algorithm to calculate the cosine value or the sine value of the access probability vector angle of two client nodes according to described access probability vector.
Preferably, described step 3) specifically comprises process:
Adopt the cosine similarity algorithm to calculate the cosine value dist of the access probability vector angle of two client nodes according to described access probability vector x:
dist X ( A , B ) = | Xa → · Xb → | | Xa → | | Xb → | = Σ i x a i x b i Σ i x a i 2 Σ i x b i 2
Wherein, dist x(A, the B) cosine value of access probability vector angle between expression client node A, the B,
Figure 118003DEST_PATH_GSB00000386934400012
Figure 897741DEST_PATH_GSB00000386934400013
The access probability vector of representing client node A, B respectively, xa i(i=1,2..., N) and xb i(i=1,2... N) are respectively the probability of client node A, B access server.
Wherein, described network site vector is the round-trip delay vector, described step 2) specifically comprise process:
Client node is behind the login echo message that reception server returns, and record is when the round-trip delay data of time all the server address data returned and login corresponding with service device;
Be respectively t1, t2......tN according to the server address data of described record and the round-trip delay of the described client node reception server of corresponding round-trip delay data computation echo message;
The round-trip delay vector T that obtains client node according to following formula is:
T=(t1 -1,t2 -1,...,tN -1)。
Wherein, the process of described calculating round-trip delay specifically comprises:
Get described round-trip delay of working as the round-trip delay data of time server address data of record and login corresponding with service device as client node reception server echo message.
Wherein, after the round-trip delay process of all server address that return of described record and correspondence, also further comprise:
The round-trip delay data that to work as time the server address data of record and login corresponding with service device and the server address data of historical record and the mean value of logining the round-trip delay data of corresponding with service device compare, if both differ above set point, then get described round-trip delay of working as the round-trip delay data of time server address data of record and login corresponding with service device as client node reception server echo message.
Wherein, after the described round-trip delay vector process that obtains client node, also further comprise:
The round-trip delay vector that described round-trip delay vector and mean value according to the round-trip delay vector data of historical record are obtained compares, if both differ above set point, then get the described round-trip delay vector that recomputates client node when time record data.
Wherein, the process of described calculating round-trip delay specifically comprises:
From the round-trip delay data of the server address data of described historical record and login corresponding with service device, get twice with the mean value of identifying recording layer round-trip delay as described client node reception server echo message.
Wherein, described step 3) specifically comprises process:
Adopt similarity algorithm to calculate the cosine value or the sine value of the round-trip delay vector angle of two client nodes according to described round-trip delay vector.
Preferably, described step 3) specifically comprises process:
Adopt the cosine similarity algorithm to calculate the cosine value dist of the round-trip delay vector angle of two client nodes according to described round-trip delay vector T:
dist T ( A , B ) = | Ta → · Tb → | | Ta → | | Tb → | = Σ i ( t a i t b i ) - 1 Σ i ta i - 2 Σ i t b i - 2
Wherein, dist T(A, the B) cosine value of round-trip delay vector angle between expression client node A, the B,
Figure 107322DEST_PATH_GSB00000386934400032
Figure 929785DEST_PATH_GSB00000386934400033
The round-trip delay vector of representing client node A, B respectively, ta i(i=1,2 ..., N) and tb i(i=1,2 ..., N) be respectively the round-trip delay of client node A, B reception server Si echo message.
Wherein, described step 3) specifically comprises process:
Each client node sends to other client node with the self networks position vector, receives the network site vector of other client node simultaneously;
Each client node calculates adjacency between itself and other client node according to similarity algorithm.
Preferably, send the network site vector by the gossip agreement between the described client node.
Wherein, described step 3) specifically comprises process:
Each client node is reported to server or super node with the network site vector;
Described server or super node are according to the adjacency between at least two client nodes of similarity algorithm calculating.
As can be seen from the above technical solutions, direct this existing network operation of multiplexing client node logon server of the present invention, obtain corresponding data from login the echo message, obtain the network site vector then, can measure adjacency between network node according to similarity algorithm again.The present invention does not need extra equipment, does not need to install new agreement, does not need to send extra network test bag yet.Both had the advantage that upgrading is simple, be convenient to promote, alleviated the burden of system equipment and offered load again.
As can be seen from the above technical solutions, direct this existing network operation of multiplexing client node logon server of the present invention, obtain corresponding data from login the echo message, obtain the network site vector then, can measure adjacency between network node according to similarity algorithm again.The present invention does not need extra equipment, does not need to install new agreement, does not need to send extra network test bag yet.Both had the advantage that upgrading is simple, be convenient to promote, alleviated the burden of system equipment and offered load again.
[description of drawings]
Fig. 1 is the basic flow sheet of the inventive method.
[embodiment]
Below in conjunction with specific embodiment and Figure of description technical scheme of the present invention is described in detail.
The invention provides a kind of method of Measurement Network node adjacency, as shown in Figure 1, this method mainly may further comprise the steps:
Step S101, the client node server in server list sends logging request simultaneously, is provided with at least one identical server address in the server list of wherein said each client node.
Step S102, client node obtain the network site vector according to the login echo message that described server returns.
Step S103, employing similarity algorithm are according to the adjacency between at least two client nodes of described network site vector calculating.
For step S101, client node is generally with the form access server of distributed login, and distributed login mode can satisfy better that userbase expands rapidly, mass users inserts the demand to network.In distributed login system, distributing sets up a plurality of logon servers, and single client node only needs to login successfully to any logon server wherein and gets final product.Client node can explicit input user ID and associated cryptographic, carries out strict authentication before the access network, can receive on the server by after the authentication; Client node can also implicit expression generate a computer identity, and signs in to associated server with this.
Parallel login mode is a kind of in the distributed login.In parallel login mode, the server list that the client node basis obtains in advance, the logon server request of a plurality of clauses and subclauses login in tabulation simultaneously, first successful respond of returning will be adopted by client node.
In the present invention, the general mode that adopts parallel login, detailed process is as follows:
Client node is according to the server list that obtains in advance, and a plurality of logon servers send logging request simultaneously in tabulation, are provided with at least one identical server address in the server list of wherein said each client node.
In the present invention, if the logon server set pointed of certain two network node is not occured simultaneously, the result of calculation that then adopts similarity algorithm is 0, can't accurately measure the network distance between these two client nodes.There is common factor in reference logon server set in order to ensure each client node, can set at least one identical server address in the server list of each client node.Certainly, if the server address that is provided with in the server list of each client node is identical, promptly the logon server of setting in its server list is in full accord, and then the accuracy of its measurement is just higher.In preferred embodiment, server address is a server ip address.
For step S102, the login echo message that each client node returns according to logon server obtains the round-trip delay data of server address data and login corresponding with service device, and obtaining the network site vector of self with this, described network site vector comprises access probability vector and round trip delay time vector.
At first, client node sends logging request to a plurality of logon servers, after receiving the login echo message, except the echo message that writes down original normal recordings, client node also extension record the round-trip delay data of server address data and login corresponding with service device:
The final server address that inserts of this session promptly returns the successful server address of login at first;
The round-trip delay (RTT) of login corresponding with service device.Because it is closely related that each server log that client node receives in the real network is responded with self network condition, therefore above data can be to a certain extent as the measurement of customer end node network.
This organizational security of client node is held the interior historical record of a period of time of round-trip delay and access server address, uses these statisticss when subsequent calculations customer end node network position, thereby reduces the error that the single sample brings, and improves overall accuracy.
After the recording process, the network vector that server address that the client node basis is obtained and round-trip delay calculate this client node, network vector generally comprises access probability vector and round-trip delay vector.
For the bigger network of delay variation amplitude, the accuracy of client node time delay information is lower, and the measurement result accuracy that adopts the round-trip delay vector to calculate adjacency also reduces, and therefore can preferentially adopt the access probability vector for this network.
Other network ordinary priority adopts the round-trip delay vector that the adjacency between the client node is measured.
For step S103, generally can adopt similarity algorithm to obtain cosine value or sine value between the network site vector of two client nodes in the present invention, measure network distance between two client nodes by the size of cosine value or sine value.
The present invention adopts the adjacency between the similarity algorithm computing node, computational process is simple, and the present invention only pays close attention to the relative position between network node, do not need to be provided with reference node, therefore arrange not additionally, accurately or selection location-server resource that the stability and the reliability of measurement result are higher.Further, the present invention calculates according to historical record or the data in this login echo message, network fluctuation to influence of measurement error for once so a little less than the influence relatively that causes of network fluctuation, has further improved the stability and the reliability of measurement result.
Embodiment one
Present embodiment is to adopt network site vector---the access probability vector of client node based on access probability in step S102, and its detailed process is as follows:
At first, client node is when the login echo message that reception server returns, and record returns the successful server address data of login at first; Insert the probability of each server then in conjunction with the described client node of server address data statistics of historical record.Client node calculates number of times that obtains a certain server address and the ratio that obtains Servers-all address sum, obtains the probability that it inserts this server, in like manner can obtain the probability that it inserts other server.
This organizational security of client node is held the historical record of server address in a period of time, uses these statisticss when subsequent calculations customer end node network position, thereby reduces the error that the single sample brings, and improves overall accuracy.The historical record that adopts is many more, and the accuracy of measurement result is just high more.
The server that client node in the server list is logined is designated as Si at last, each server is respectively S1, S2......SN, the probability xi of client node access server Si is respectively x1, x2......xN, obviously, each xi sum is 1, and the access probability vector X that obtains client node according to following formula is:
X=(x1,x2,...,xN)。
Because client node can sign in to the server that success is at first responded automatically under the actual environment, therefore X can represent annexation between client node and each logon server on the whole here, if client node is almost always logined to certain station server Si, then corresponding element xi is bigger, other elements are all comparatively near 0, therefore though vector X can intuitively reflect the logon server that network is comparatively contiguous, can't embody the otherness with other server spacings, its granularity is thicker relatively.
Embodiment two
Present embodiment is to adopt network site vector---the round-trip delay vector of client node based on access delay in step S102, and its detailed process is as follows:
At first, client node is when the login echo message that reception server returns, and record is when the round-trip delay data of time all the server address data returned and login corresponding with service device; Can learn that by server address this which server has returned message, further also can learn the round trip delay time of these these servers.
Then, get described round-trip delay of working as the round-trip delay data of time server address data of record and login corresponding with service device as client node reception server echo message.
The server that client node in the server list is logined is designated as Si, each server is respectively S1, S2......SN, the round-trip delay ti of client node reception server Si echo message is respectively t1, t2......tN, and the round-trip delay vector T that obtains client node according to following formula is:
T=(t1 -1,t2 -1,...,tN -1)。
Because the element definition of vector T be the inverse of each time delay, does not receive the response if certain logon server returns always, then corresponding ti value is ∞, and if time delay big more (far away more) with corresponding logon server network spacing, the vector element ti of correspondence -1Just more little, otherwise, if more little (near more) of time delay then corresponding vector element ti with corresponding logon server network spacing -1Just big more, demonstrate fully otherness with other server spacings.From this definition as can be seen, round-trip delay vector T has been contained the real network time delay of each logon server, and more accurately reflects the network location information of client node than access probability vector X.
Embodiment three
Present embodiment also is to adopt network site vector---the round-trip delay vector of client node based on access delay in step S102, different with embodiment two is, adopting the round-trip delay data of working as time server address data of record and login corresponding with service device to carry out vector among the embodiment two calculates, and adopt the mean value of the round-trip delay data of the server address data of historical record and login corresponding with service device to calculate in the present embodiment, its detailed process is as follows:
At first, client node is when the login echo message that reception server returns, and record is when the round-trip delay data of time all the server address data returned and login corresponding with service device; Can learn that by server address this which server has returned message, further also can learn the round trip delay time of these these servers.
From the round-trip delay data of the server address data of historical record and login corresponding with service device, get twice with the mean value of identifying recording layer round-trip delay as described client node reception server echo message.
This organizational security of client node is held the historical record of round-trip delay in a period of time, uses these statisticss when subsequent calculations customer end node network position, thereby reduces the error that the single sample brings, and improves overall accuracy.The historical record that adopts is many more, and the accuracy of measurement result is just high more.
Each server that client node in the server list is logined is remembered respectively and is made S1, S2......SN, the round-trip delay ti of client node reception server Si echo message (i=1,2 ..., N), the round-trip delay vector T that obtains client node according to following formula is:
T=(t1 -1,t2 -1,...,tN -1)。
Because the element definition of vector T be the inverse of each time delay, does not receive the response if certain logon server returns always, then corresponding ti value is ∞, and if time delay big more (far away more) with corresponding logon server network spacing, the vector element ti of correspondence -1Just more little, otherwise, if more little (near more) of time delay then corresponding vector element ti with corresponding logon server network spacing -1Just big more, demonstrate fully otherness with other server spacings.From this definition as can be seen, round-trip delay vector T has been contained the real network time delay of each logon server, and more accurately reflects the network location information of client node than access probability vector X.
Embodiment four
On the basis of embodiment two, this enforcement is also after the round-trip delay process of all server address that return of record and correspondence, the round-trip delay data that to work as time the server address data of record and login corresponding with service device and the server address data of historical record and the mean value of logining the round-trip delay data of corresponding with service device compare, if both differ above set point, then get the round-trip delay of described round-trip delay data when time server address data of record and login corresponding with service device, and do not get the mean value of the round-trip delay data of the server address data of historical record and login corresponding with service device as client node reception server echo message.
The meaning of Chu Liing is like this, if the subscriber computer access way takes place than cataclysm, when for example carrying notebook computer and going on business, the measurement situation of front and back may be far different, and then the accuracy that should measure reduces.At this moment, should preferentially adopt the round-trip delay data of working as time server address data of login and login corresponding with service device to measure, to guarantee the accuracy of measurement result.
Embodiment five
On the basis of embodiment two, this enforcement is also after calculating the round-trip delay vector process of client node, the round-trip delay vector that described round-trip delay vector and mean value according to the round-trip delay vector data of historical record are obtained compares, if both differ above set point, then get the described time record data of working as and recomputate the round-trip delay vector of client node, and do not get the mean value of historical record data.
The advantage of present embodiment and embodiment four are similar, and difference is: comparison procedure is promptly judged after the receiving record data among the embodiment four, and present embodiment is to compare process after calculating the network site vector.
Embodiment six
In the present invention, can adopt similarity algorithm to calculate the cosine value of access probability vector angle of two client nodes or sine value according to described access probability vector to measure two network distances between the client node.
In embodiment one, by writing down the server address data that the client node logon server returns, obtained each client node access probability vector, present embodiment is on the basis of embodiment one, adopt the cosine similarity algorithm that the access probability vector of the client node that obtains among the embodiment one is carried out the cosine similarity and calculate, to measure two network distances between the client node.Certainly, without departing from the inventive concept of the premise, adopt other similarity algorithm to calculate, also should belong to protection scope of the present invention.
With client node A, B is example, and its detailed process is as follows:
Adopt the cosine similarity algorithm to calculate the cosine value dist of the access probability vector angle of two client nodes according to the access probability vector x:
dist X ( A , B ) = | Xa → · Xb → | | Xa → | | Xb → | = Σ i x a i x b i Σ i x a i 2 Σ i x b i 2
Wherein, dist x(A, the B) cosine value of access probability vector angle between expression client node A, the B,
Figure G2008101989307D0012094045QIETU
The access probability vector of representing client node A, B respectively, xa iAnd xb iBe respectively client node A, B access server Si probability (i=1,2 ..., N).
Consider two client node A and B, A based on the network site vector of access probability be Xa=(xa1, xa2 ..., xaN).Similarly, the pairing vector Xb of B follow same definition: Xb=(xb1, xb2 ..., xbN).
The geometric meaning of cosine similarity is the cosine value of two vector angles, so its codomain is interval [0,1].According to its mathematical characteristic, if some elements of vector relatively large (all elements all is non-negative), then it is just comparatively remarkable with the contribution of the cosine similarity of other vector to calculating it.Therefore, for the estimation of this coarseness of X, if identical numbering element all big (probability that both sign in to certain server is all bigger) in two vectors, then its cosine similarity is also bigger.
The vector representation of the defined two class granularities of the present invention can both be represented the network coordinate of node roughly, and comparatively accurately estimate the network distance of point-to-point transmission: the cosine similarity is big, two meshed network close together then, otherwise, the cosine similarity is little, and two meshed networks distance is far away.
Embodiment seven
In the present invention, can adopt similarity algorithm to calculate the cosine value of round-trip delay vector angle of two client nodes or sine value according to described access probability vector to measure two network distances between the client node.
In embodiment two, three, four, five, by record client node logon server server address data of returning and the round-trip delay data of logining the corresponding with service device, obtained the round-trip delay vector of each client node, present embodiment is on the basis of embodiment two, three, four, five, adopt the cosine similarity algorithm that the round-trip delay vector of the client node that obtains in the foregoing description is calculated the cosine similarity and calculate, to measure two network distances between the client node.Certainly, without departing from the inventive concept of the premise, adopt other similarity algorithm to calculate, also should belong to protection scope of the present invention.
With client node A, B is example, and its detailed process is as follows:
Adopt the cosine similarity algorithm to calculate the cosine value dist of the round-trip delay vector angle of two client nodes according to the round-trip delay vector T:
dist T ( A , B ) = | Ta → · Tb → | | Ta → | | Tb → | = Σ i ( t a i t b i ) - 1 Σ i t a i - 2 Σ i t b i - 2
Wherein, dist T(A, the B) cosine value of round-trip delay vector angle between expression client node A, the B,
Figure DEST_PATH_G200810198930701D00042
The round-trip delay vector of representing client node A, B respectively, ta iAnd tb iBe respectively client node A, B reception server Si echo message round-trip delay (i=1,2 ..., N).
Consider two client node A and B, A based on the network site vector of access delay be Ta=(ta1, ta2 ..., taN).Similarly, the pairing vector Tb of B follow same definition: Tb=(tb1, tb2 ..., tbN).
The geometric meaning of cosine similarity is the cosine value of two vector angles, so its codomain is interval [0,1].According to its mathematical characteristic, if some elements of vector relatively large (all elements all is non-negative), then it is just comparatively remarkable with the contribution of the cosine similarity of other vector to calculating it.Therefore, for this fine-grained estimation of T, if all (both are less to the delay of certain server greatly for identical numbering element in two vectors, this moment is according to the triangle inequality principle of accuracy network delay higher and commonly used: consider three some A, B and C, any 2 distances less than thirdly with they 2 apart from sum, therefore, if distance A B and AC are very little, infer that then the BC distance is also less.
The vector representation of the defined two class granularities of the present invention can both be represented the network coordinate of node roughly, and comparatively accurately estimate the network distance of point-to-point transmission: the cosine similarity is big, two meshed network close together then, otherwise, the cosine similarity is little, and two meshed networks distance is far away.Embodiment eight
On the basis of above-mentioned all embodiment, present embodiment comprises process after step S102:
Each client node sends to other client node with the self networks position vector, receives the network site vector of other client node simultaneously; Each client node calculates adjacency between itself and other client node according to similarity algorithm.
Can pass through mode proliferation network position vectors such as gossip agreement between the client node, thereby single client node can be collected the network site vector of other all client nodes.The gossip agreement is a kind of distributed protocol, and distributing information in the p2p system is with good expansibility and stronger robustness.
In the present embodiment, similarity computational process is finished in client node, and this client node can preferentially be selected the higher client node of adjacency according to measurement result in follow-up network application.
Embodiment nine
On the basis of above-mentioned all embodiment, present embodiment comprises process after step S102:
Each client node is reported to server or super node with the network site vector; Described server or super node are according to the adjacency between at least two client nodes of similarity algorithm calculating.
In the present embodiment, similarity computational process is finished at server or superclient end node.All client nodes can all be reported to network vector information server or superclient end node to carry out unified management, when contiguous or transit node are selected, network distance matrix between server or the super node computing client end node as one of judge index, is paid the utmost attention to comparatively contiguous node with it.In addition, server can also be used for adjacency information the network clustering of node and hive off
Need to prove, in the present invention, the process of the round-trip delay data of record server address data or login corresponding with service device is not limited only to carry out record by client node, also can be after client node receives the login echo message, upload to superclient end node or server, carry out record by client node.
Below technical solution of the present invention is illustrated, is beneficial to the understanding of technical solution of the present invention:
When client node A log-in instant communication instrument, attempt 5 servers (S1 is to S5) at every turn.Client node A sends logging request to these 5 servers simultaneously, when receiving the login response, the round-trip delay data of client node extension record server address data and login corresponding with service device, in conjunction with historical data and according to the definition of above-mentioned network site vector, obtaining its access probability vector XA based on access probability is (0.7,0.1,0.2,0,0), the round-trip delay vector TA based on return time delay is (10 -1, 30 -1, 20 -1, 60 -1, 200 -1), each component unit of vector TA is a millisecond here -1
Equally, when client node B log-in instant communication instrument, the each trial sends logging request to 5 servers (S1 is to S5).Client node B sends logging request to these 5 servers simultaneously, when receiving the login response, the round-trip delay data of client node extension record server address data and login corresponding with service device, in conjunction with historical data and according to the definition of above-mentioned network site vector, obtaining its access probability vector XB based on access probability is (0.2,0.3,0.2,0.2,0.1), be (30 based on the round-trip delay vector TB of return time delay -1, 20 -1, 40 -1, 50 -1, 90 -1), each component unit of vector TB is a millisecond here -1
When client node C log-in instant communication instrument, the each trial sends logging request to 5 servers (S1 is to S5).Client node C sends logging request to these 5 servers simultaneously, when receiving the login response, the round-trip delay data of client node extension record server address data and login corresponding with service device, in conjunction with historical data and according to the definition of above-mentioned network site vector, obtaining its access probability vector XC based on access probability is (0.5,0.2,0.2,0,0.1), the round-trip delay vector TC based on return time delay is (20 -1, 30 -1, 40 -1, 200 -1, 60 -1), each component unit of vector TC is a millisecond here -1
Suppose that related object (centralized servers, perhaps certain client node) obtains X and the T vector value of A, B, C.It is nearer to need to compare both whose distance A of B, C.
Calculate according to formula:
dist X ( A , B ) = | Xa → · Xb → | | Xa → | | Xb → | = Σ i x a i x b i Σ i x a i 2 Σ i x b i 2
dist X ( A , C ) = | Xa → · Xc → | | Xa → | | Xc → | = Σ i x a i x c i Σ i x a i 2 Σ i x c i 2
dist T ( A , B ) = | Ta → · Tb → | | Ta → | | Tb → | = Σ i ( t a i t b i ) - 1 Σ i t a i - 2 Σ i t b i - 2
dist T ( A , C ) = | Ta → · Tc → | | Ta → | | Tc → | = Σ i ( t a i t c i ) - 1 Σ i t a i - 2 Σ i t c i - 2
Obtain distx (A, B)=0.6093, distx (A, C)=0.9569; DistT (A, B)=0.8128, distT (A, C)=0.9464.This shows, adjacency under two kinds of situations between client node A, the C is bigger than the adjacency between client node A, the B, the network distance of this explanation client node A and client node C is nearer, and client node A is relative far away with the network distance of client node B, thereby client node A is follow-up when selecting contiguous client node to carry out related service, should preferentially select client node C.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.

Claims (14)

1. the method for a Measurement Network node adjacency is characterized in that, may further comprise the steps:
1), the server of client node in server list send logging request simultaneously, is provided with at least one identical server address in the server list of wherein said each client node;
2), client node obtains the network site vector according to the login echo message that described server returns;
3), adopt similarity algorithm according to the adjacency between at least two client nodes of described network site vector calculating.
2. the method for Measurement Network node adjacency according to claim 1 is characterized in that, described network site vector is the access probability vector, described step 2) specifically comprise process:
Client node is behind the login echo message that the described server of reception returns, and record returns the successful server address data of login at first;
The probability that inserts each server according to the described client node of server address data statistics of historical record is respectively x1, x2......xN, and wherein each xi sum is 1;
Obtain the access probability vector X of client node according to following formula:
X=(x1,x2,...,xN)。
3. the method for Measurement Network node adjacency according to claim 2 is characterized in that, described step 3) specifically comprises process:
Adopt similarity algorithm to calculate the cosine value or the sine value of the access probability vector angle of two client nodes according to described access probability vector.
4. the method for Measurement Network node adjacency according to claim 2 is characterized in that, described step 3) specifically comprises process:
Adopt the cosine similarity algorithm to calculate the cosine value dist of the access probability vector angle of two client nodes according to described access probability vector x:
Figure RE-FSB00000386934300011
Wherein, dist x(A, the B) cosine value of access probability vector angle between expression client node A, the B,
Figure RE-FSB00000386934300012
Figure RE-FSB00000386934300021
The access probability vector of representing client node A, B respectively, xa i(i=1,2..., N) and xb i(i=1,2... N) are respectively the probability of client node A, B access server.
5. the method for Measurement Network node adjacency according to claim 1 is characterized in that, described network site vector is the round-trip delay vector, described step 2) specifically comprise process:
Client node is behind the login echo message that reception server returns, and record is when the round-trip delay data of time all the server address data returned and login corresponding with service device;
Be respectively t1, t2......tN according to the server address data of described record and the round-trip delay of the described client node reception server of corresponding round-trip delay data computation echo message;
The round-trip delay vector T that obtains client node according to following formula is:
T=(t1 -1,t2 -1,...,tN -1)。
6. the method for Measurement Network node adjacency according to claim 5 is characterized in that, the process of described calculating round-trip delay specifically comprises:
Get described round-trip delay of working as the round-trip delay data of time server address data of record and login corresponding with service device as client node reception server echo message.
7. the method for Measurement Network node adjacency according to claim 6 is characterized in that, after the round-trip delay process of all server address that return of described record and correspondence, also further comprises:
The round-trip delay data that to work as time the server address data of record and login corresponding with service device and the server address data of historical record and the mean value of logining the round-trip delay data of corresponding with service device compare, if both differ above set point, then get described round-trip delay of working as the round-trip delay data of time server address data of record and login corresponding with service device as client node reception server echo message.
8. the method for Measurement Network node adjacency according to claim 6 is characterized in that, after the described round-trip delay vector process that obtains client node, also further comprises:
The round-trip delay vector that described round-trip delay vector and mean value according to the round-trip delay vector data of historical record are obtained compares, if both differ above set point, then get the described round-trip delay vector that recomputates client node when time record data.
9. the method for Measurement Network node adjacency according to claim 5 is characterized in that, the process of described calculating round-trip delay specifically comprises:
From the round-trip delay data of the server address data of described historical record and login corresponding with service device, get twice with the mean value of identifying recording layer round-trip delay as described client node reception server echo message.
10. the method for Measurement Network node adjacency according to claim 5 is characterized in that, described step 3) specifically comprises process:
Adopt similarity algorithm to calculate the cosine value or the sine value of the round-trip delay vector angle of two client nodes according to described round-trip delay vector.
11. the method for Measurement Network node adjacency according to claim 5 is characterized in that, described step 3) specifically comprises process:
Adopt the cosine similarity algorithm to calculate the cosine value distT of the round-trip delay vector angle of two client nodes according to described round-trip delay vector:
Figure RE-F200810198930701C00021
Wherein, dist T(A, the B) cosine value of round-trip delay vector angle between expression client node A, the B,
Figure RE-F200810198930701C00022
The round-trip delay vector of representing client node A, B respectively, ta i(i=1,2 ..., N) and tb i(i=1,2 ..., N) be respectively the round-trip delay of client node A, B reception server Si echo message.
12. the method according to each described Measurement Network node adjacency in the claim 1 to 11 is characterized in that described step 3) specifically comprises process:
Each client node sends to other client node with the self networks position vector, receives the network site vector of other client node simultaneously;
Each client node calculates adjacency between itself and other client node according to similarity algorithm.
13. the method for Measurement Network node adjacency according to claim 12 is characterized in that, sends the network site vector by the gossip agreement between the described client node.
14. the method according to each described Measurement Network node adjacency in the claim 1 to 11 is characterized in that described step 3) specifically comprises process:
Each client node is reported to server or super node with the network site vector;
Described server or super node are according to the adjacency between at least two client nodes of similarity algorithm calculating.
CN2008101989307A 2008-09-28 2008-09-28 Method for measuring proximity of network node Active CN101399713B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2008101989307A CN101399713B (en) 2008-09-28 2008-09-28 Method for measuring proximity of network node

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101989307A CN101399713B (en) 2008-09-28 2008-09-28 Method for measuring proximity of network node

Publications (2)

Publication Number Publication Date
CN101399713A CN101399713A (en) 2009-04-01
CN101399713B true CN101399713B (en) 2011-04-20

Family

ID=40517987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101989307A Active CN101399713B (en) 2008-09-28 2008-09-28 Method for measuring proximity of network node

Country Status (1)

Country Link
CN (1) CN101399713B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024091B (en) * 2011-09-26 2016-05-25 阿里巴巴集团控股有限公司 Obtain method and the device of networking client actual physical address
CN103701846B (en) * 2013-09-18 2016-09-28 南京邮电大学 The peer-to-peer network resource search optimization method estimated based on node proximity
CN106487547B (en) * 2015-08-26 2019-06-21 中国移动通信集团公司 A kind of method and device for assessing network performance index variation tendency
WO2017035789A1 (en) * 2015-09-01 2017-03-09 深圳好视网络科技有限公司 Data transmission method and system
CN110572813A (en) * 2018-05-19 2019-12-13 北京融信数联科技有限公司 mobile phone user behavior similarity analysis method based on mobile big data
CN110445652A (en) * 2019-08-08 2019-11-12 北京众享比特科技有限公司 Network distance prediction method, apparatus, end host and medium
CN113127826B (en) * 2021-04-27 2023-05-23 富途网络科技(深圳)有限公司 Verification method and related device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1320001A (en) * 2000-02-03 2001-10-31 数码通电讯有限公司 Positioning system
US20060018625A1 (en) * 2004-07-20 2006-01-26 Johnson Carolynn R User defined default recording mode rules
WO2007014176A1 (en) * 2005-07-25 2007-02-01 Qualcomm Incorporated Method and apparatus for locating a wireless local area network in a wide area network
CN1988550A (en) * 2005-12-21 2007-06-27 中国科学院电子学研究所 Distributing realizing method for radio sensor network no-anchor point location

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1320001A (en) * 2000-02-03 2001-10-31 数码通电讯有限公司 Positioning system
US20060018625A1 (en) * 2004-07-20 2006-01-26 Johnson Carolynn R User defined default recording mode rules
WO2007014176A1 (en) * 2005-07-25 2007-02-01 Qualcomm Incorporated Method and apparatus for locating a wireless local area network in a wide area network
CN1988550A (en) * 2005-12-21 2007-06-27 中国科学院电子学研究所 Distributing realizing method for radio sensor network no-anchor point location

Also Published As

Publication number Publication date
CN101399713A (en) 2009-04-01

Similar Documents

Publication Publication Date Title
CN101399713B (en) Method for measuring proximity of network node
CN112132447B (en) Block chain-based algorithm for evaluating and guaranteeing trust of computing power network
US11490299B2 (en) Distributed processing for determining network paths
Zhang et al. A domain partition-based trust model for unreliable clouds
CN104995870B (en) Multiple target server arrangement determines method and apparatus
Wang et al. Crowdsensing-based consensus incident report for road traffic acquisition
Alsboui et al. Enabling distributed intelligence for the Internet of Things with IOTA and mobile agents
US20190149424A1 (en) Continuous monitoring for performance evaluation of service interfaces
CN103067297B (en) A kind of dynamic load balancing method based on resource consumption prediction and device
EP2409242B1 (en) Network status detection
Patsakis et al. Interoperable privacy-aware e-participation within smart cities
CN102609610B (en) Mobile computing device sensor is used to generate the map of personal air
CN103119535A (en) Systems and methods for apportioning power consumption
CN113033082A (en) Decentralized federated learning framework based on heterogeneous computational power perception and modeling method
CN110322578A (en) A kind of Work attendance method and device
TW201140335A (en) Fine-grained location determination of networked computers
CN102006234A (en) Method and device for optimizing P2P (Peer-to-Peer) network flow
Baier et al. MapCorrect: Automatic correction and validation of road maps using public sensing
CN105119751A (en) Service evaluation and selection method based on environment real-time perceiving
CN103218295B (en) The method of testing of ESB message handling ability and system
CN113283778A (en) Layered convergence federated learning method based on security evaluation
Lohitha et al. Integrated publish/subscribe and push-pull method for cloud based IoT framework for real time data processing
CN103209102A (en) Web quality of service distributed measurement system and method
Ullah et al. Smart grid block-chain (BC) conceptual framework: Bi-directional models for renewable energy district and utility
CN105812204B (en) A kind of recurrence name server online recognition method based on Connected degree estimation

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20180913

Address after: 100089 Beijing Haidian District Zhichun Road 49 No. 3 West 309

Patentee after: Tencent cloud computing (Beijing) limited liability company

Address before: 518044 East 403 room, Sai Ge science and Technology Park, Futian District Zhenxing Road, Shenzhen, Guangdong, China, 2

Patentee before: Tencent Technology (Shenzhen) Co., Ltd.