CN104954320B - method, device and system for establishing connection - Google Patents

method, device and system for establishing connection Download PDF

Info

Publication number
CN104954320B
CN104954320B CN201410114689.0A CN201410114689A CN104954320B CN 104954320 B CN104954320 B CN 104954320B CN 201410114689 A CN201410114689 A CN 201410114689A CN 104954320 B CN104954320 B CN 104954320B
Authority
CN
China
Prior art keywords
tested
server
time
acceleration server
client
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.)
Expired - Fee Related
Application number
CN201410114689.0A
Other languages
Chinese (zh)
Other versions
CN104954320A (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.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing 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 Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201410114689.0A priority Critical patent/CN104954320B/en
Publication of CN104954320A publication Critical patent/CN104954320A/en
Application granted granted Critical
Publication of CN104954320B publication Critical patent/CN104954320B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays

Abstract

The method comprises the steps that a service server can determine first delay time from the service server to each acceleration server to be detected, the determined first delay time is returned to a client, and after the client determines second delay time from the client to each acceleration server to be detected, the acceleration server to be detected can be selected and connected according to the first delay time from the acceleration server to be detected to the service server and the second delay time from the client to the acceleration server to be detected, so that the connection speed of the client to be connected to the service server through the acceleration server can be effectively increased.

Description

method, device and system for establishing connection
Technical Field
the present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, and a system for establishing a connection.
Background
with the rapid development of computer technology and network technology, users have made various services through networks. Generally, when a user performs a service, the user may connect to a service server through a client to obtain a service provided by the service server.
however, in practical applications, the client needs to be connected to the service server through a plurality of network nodes (such as switches, etc.), and if a load of one of the network nodes is high, the connection speed between the client and the service server is low, so in order to increase the connection speed between the client and the service server, in the prior art, when the client establishes a connection with the service server, the client generally establishes a connection with the acceleration server first, and then connects to the service server through the acceleration server to bypass the network node with the high load.
for example, when playing a game via a network, a user may first connect to an acceleration server via his client and then connect to a game server (i.e., a service server) via the acceleration server.
furthermore, a plurality of acceleration servers are usually provided between the client and the service server, and when the client establishes a connection with the acceleration servers, the client first measures the speed of each acceleration server to measure the delay time from the client to each acceleration server, and then selects an acceleration server with the smallest delay to establish a connection with the acceleration server according to the speed measurement result.
In the prior art, a method for a client to speed up a server is as follows: the method comprises the steps that a client side sends a test data packet to an acceleration server, the sending time is recorded, when a response data packet returned by the acceleration server aiming at the test data packet is received, the receiving time is recorded, and the delay time from the client side to the acceleration server is determined according to the time length from the sending time to the receiving time.
However, it can be seen from the above method for measuring the speed of the acceleration server by the client that the speed measurement result in the prior art only reflects the delay time from the client to the acceleration server, and for the acceleration server with the minimum delay, if the delay time from the acceleration server to the service server is very long, the connection speed may still be slow after the client is connected to the service server through the acceleration server.
Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a method, apparatus and system for establishing a connection, which overcome the above problems or at least partially solve the above problems, and can effectively increase the connection speed of a client connected to a service server through an acceleration server.
according to a first aspect of the invention, a method of establishing a connection is proposed, comprising:
The client sends a request message for establishing connection to the service server;
receiving the identification information of each acceleration server to be tested, which is returned by the service server according to the request message, and the first delay time from the service server to each acceleration server to be tested;
determining a second delay time from the client to the acceleration server to be tested corresponding to each identification information according to each received identification information;
And selecting an acceleration server to be tested to establish connection according to the first delay time and the second delay time, and establishing connection with the service server through the selected acceleration server to be tested.
optionally, determining a second delay time from the client itself to the acceleration server to be tested corresponding to each piece of identification information further includes:
The client sends a test data packet to the acceleration server to be tested corresponding to the received identification information, and records the sending time as a first time;
when a response data packet returned by the acceleration server to be tested aiming at the test data packet is received, recording the receiving time as a second time;
And determining a second delay time from the client to the acceleration server to be tested according to the recorded time length from the first time to the second time.
Optionally, before selecting the acceleration server to be tested to establish the connection according to each of the first delay time and the second delay time, the method further includes:
the client sends a test data packet to the service server through the acceleration server to be tested aiming at the acceleration server to be tested corresponding to each piece of received identification information, and records the sending time as a third time;
When a response data packet returned by the service server and sent by the acceleration server to be tested is received, recording the receiving time as a fourth time;
Determining the processing delay time of the acceleration server to be tested according to the recorded time length from the third moment to the fourth moment, the first delay time from the service server to the acceleration server to be tested and the second delay time from the client to the acceleration server to be tested;
selecting the acceleration server to be tested to establish the connection according to the first delay time and the second delay time further comprises:
Aiming at the acceleration server to be tested corresponding to each received identification information, determining a first product of a first delay time and a first weight, a second product of a second delay time and a second weight, and a third product of a processing delay time and a third weight, and determining a sum of the first product, the second product and the third product;
and selecting the acceleration server to be tested with the minimum sum value to establish connection.
according to a second aspect of the invention, a method of establishing a connection is proposed, comprising:
a service server receives a request message for establishing connection sent by a client;
Determining each acceleration server to be tested according to the request message;
Determining a first delay time from the service server to each acceleration server to be tested;
and sending the identification information of each acceleration server to be tested and the determined first delay time to the client, so that the client selects the acceleration server to be tested to establish connection.
Optionally, determining, according to the request message, that each acceleration server to be tested further includes:
the service server determines the geographical position of the client according to the identification information of the client carried in the request message, wherein the identification information of the client comprises an Internet Protocol (IP) address of the client;
determining the distance from each acceleration server to the client according to the pre-stored geographical position of each acceleration server and the determined geographical position of the client;
and sequentially determining the acceleration servers with the specified number as the acceleration servers to be tested according to the sequence of the determined distances from small to large.
optionally, determining the first delay time from the service server itself to each acceleration server to be tested further includes:
The service server sends a test data packet to the acceleration server to be tested and records the sending time;
recording the receiving time when receiving a response data packet returned by the acceleration server to be tested aiming at the test data packet;
and determining the first delay time from the service server to the acceleration server to be tested according to the recorded time length from the sending time to the receiving time.
Optionally, the selecting, by the client, an acceleration server to be tested to establish a connection further includes:
And the client determines second delay time from the client to each acceleration server to be tested according to the identification information of each acceleration server to be tested, selects the acceleration server to be tested to establish connection according to each first delay time and each second delay time, and establishes connection with the service server through the selected acceleration server to be tested.
according to a third aspect of the present invention, there is provided an apparatus for establishing a connection, comprising:
A sending module, configured to send a request message for establishing a connection to a service server;
the receiving module is used for receiving the identification information of each acceleration server to be tested, which is returned by the service server according to the request message, and the first delay time from the service server to each acceleration server to be tested;
the first determining module is used for determining a second delay time from the client to the acceleration server to be tested corresponding to each identification information according to each received identification information;
the selection connection module is used for selecting the acceleration server to be tested to establish connection according to the first delay time and the second delay time and establishing connection with the service server through the selected acceleration server to be tested;
further, the first determining module is specifically configured to send a test data packet to the acceleration server to be tested corresponding to the received identification information, record the sending time as a first time, record the receiving time as a second time when receiving a response data packet returned by the acceleration server to be tested for the test data packet, and determine a second delay time from the client to the acceleration server to be tested according to a time length from the recorded first time to the recorded second time;
further, the apparatus further comprises:
a second determining module, configured to, before the selective connection module selects an acceleration server to be tested to establish a connection according to each first delay time and each second delay time, send a test data packet to the service server through the acceleration server to be tested for each received acceleration server to be tested corresponding to the identification information, record a sending time as a third time, record a receiving time as a fourth time when receiving a response data packet sent back by the service server and sent by the acceleration server to be tested, and determine a processing delay time of the acceleration server to be tested according to a recorded time length from the third time to the fourth time, a first delay time from the service server to the acceleration server to be tested, and a second delay time from the device itself to the acceleration server to be tested;
The selection connection module is specifically configured to determine, for each acceleration server to be tested corresponding to the received identification information, a first product of the first delay time and the first weight, a second product of the second delay time and the second weight, and a third product of the processing delay time and the third weight, and determine a sum of the first product, the second product, and the third product; and selecting the acceleration server to be tested with the minimum sum value to establish connection.
According to a fourth aspect of the present invention, there is provided an apparatus for establishing a connection, comprising:
The receiving module is used for receiving a request message for establishing connection sent by a client;
the server determining module is used for determining each acceleration server to be tested according to the request message;
The device comprises a delay determining module, a delay determining module and a control module, wherein the delay determining module is used for determining first delay time from the device to each acceleration server to be tested;
The sending module is used for sending the identification information of each acceleration server to be tested and the determined first delay time to the client, so that the client selects the acceleration server to be tested to establish connection;
Further, the server determining module is specifically configured to determine a geographic position where the client is located according to identification information of the client carried in the request message, determine distances from the acceleration servers to the client according to the geographic positions of the acceleration servers stored in advance and the determined geographic position where the client is located, and sequentially determine a specified number of acceleration servers as acceleration servers to be tested according to a sequence of the determined distances from small to large, where the identification information of the client includes an internet protocol IP address of the client;
Further, the delay determining module is specifically configured to send a test data packet to the acceleration server to be tested, record sending time, record receiving time when a response data packet returned by the acceleration server to be tested for the test data packet is received, and determine a first delay time from the service server to the acceleration server to be tested according to a time length from the recorded sending time to the recorded receiving time.
according to a fifth aspect of the present invention, there is provided a system for establishing a connection, comprising:
The client is used for sending a request message for establishing connection to a service server, receiving identification information of each acceleration server to be detected returned by the service server and first delay time from the service server to each acceleration server to be detected, determining second delay time from the client to the acceleration server to be detected corresponding to each identification information according to each received identification information, selecting the acceleration server to be detected to establish connection according to each first delay time and each second delay time, and establishing connection with the service server through the selected acceleration server to be detected;
the system comprises a service server, a client and a server side, wherein the service server is used for receiving a request message for establishing connection sent by the client, determining each acceleration server to be tested according to the request message, determining a first delay time from the service server to each acceleration server to be tested, and sending identification information of each acceleration server to be tested and each determined first delay time to the client;
And the acceleration server to be tested is used for forwarding the data packet for the service server and the client.
According to the method for establishing the connection, the service server can determine the first delay time from the service server to each acceleration server to be detected and return the determined first delay time to the client, and after the client determines the second delay time from the client to each acceleration server to be detected, the acceleration server to be detected can be selected and the connection can be established according to the first delay time from the acceleration server to be detected to the service server and the second delay time from the client to the acceleration server to be detected, so that the connection speed of the client to be connected to the service server through the acceleration server can be effectively increased.
Drawings
various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
FIG. 1 illustrates a method for establishing a connection according to one embodiment of the present invention;
FIG. 2 is a method for determining a processing delay time of an acceleration server under test according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating an apparatus for establishing a connection according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating another apparatus for establishing a connection according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a system for establishing a connection according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
The following detailed description of embodiments of the invention refers to the accompanying drawings.
Fig. 1 is a method for establishing a connection according to an embodiment of the present invention, which may include the steps of:
s101: the client sends a request message for establishing connection to the service server.
S102: and receiving the identification information of each acceleration server to be tested, which is returned by the service server according to the request message, and the first delay time from the service server to each acceleration server to be tested.
S103: and determining a second delay time from the acceleration server to be tested corresponding to each identification information according to each received identification information.
S104: and selecting the acceleration server to be tested to establish connection according to the first delay time and the second delay time, and establishing connection with the service server through the selected acceleration server to be tested.
After receiving a request message for establishing connection sent by a client, a service server can determine each acceleration server to be tested according to the request message, determine a first delay time from the service server to each acceleration server to be tested, and send identification information of each acceleration server to be tested and each determined first delay time to the client.
as can be seen from the above, according to this embodiment, the service server may determine a first delay time from the service server to each acceleration server to be detected, and return the determined first delay time to the client, and after the client determines a second delay time from the client to each acceleration server to be detected, the client may select and establish a connection with the acceleration server to be detected according to the first delay time from the acceleration server to be detected to the service server and the second delay time from the client to the acceleration server to be detected, so that the connection speed of the client to the service server through the acceleration server may be effectively increased.
According to an embodiment of the present invention, when the client is connected to the service server through the acceleration server, the client may first directly send a request message for establishing connection to the service server, where the request message may carry identification information of the client, and the service server determines a geographic location where the client is located according to the identification information of the client carried in the request message, and determines a plurality of acceleration servers to be tested in each acceleration server, which are closer to the geographic location where the client is located. The identification information of the client may be an Internet Protocol (IP) address of the client. When the service server determines the acceleration server to be tested according to the identification information of the client, the service server may specifically determine the geographic position of the client according to the IP address of the client, determine the distance from each acceleration server to the client according to the pre-stored geographic position of each acceleration server and the determined geographic position of the client, and finally determine the designated number of acceleration servers as the acceleration servers to be tested in sequence according to the sequence of the determined distances from small to large.
the service server can pre-store the corresponding relation between the network segment of the IP address and the geographic position, and when the geographic position of the client is determined according to the IP address of the client, the geographic position corresponding to the network segment of the IP address of the client can be determined, namely the geographic position of the client.
for example, when a user plays a game via a network, a client may first directly send a request message for establishing a connection to a game server (i.e., a service server), where the request message carries an IP address of the client, and after receiving the request message, the game server may determine a geographic location where the client is located according to the IP address of the client carried in the request message. Assuming that the game server stores the geographical positions of 10 acceleration servers, namely, the acceleration servers 1 to 10, and the designated number is 5, the game server determines that the 5 acceleration servers closest to the geographical position of the client are the acceleration servers 1 to 5, and takes the acceleration servers 1 to 5 as the acceleration servers to be tested.
According to an embodiment of the present invention, the method for the service server to determine the first delay time from the service server to each acceleration server to be tested may be: the method comprises the steps that a service server sends a test datagram to an acceleration server to be tested, the sending time is recorded, when a response data packet returned by the acceleration server to be tested aiming at the test data packet is received, the receiving time is recorded, and finally the first delay time from the service server to the acceleration server to be tested is determined according to the recorded time length from the sending time to the receiving time. Specifically, the service server may use 1/2 of the recorded time length from the sending time to the receiving time as the first delay time from the service server to the acceleration server to be tested.
For example, for one acceleration server to be tested, assuming that the time length from the sending time of the service server sending the test data packet to the acceleration server to be tested to the receiving time of the response data packet returned by the acceleration server to be tested is 104ms, the service server may determine 1/2 of 104ms, that is, 52ms, as the first delay time from itself to the acceleration server to be tested.
after the service server determines the first delay time from the service server to each acceleration server to be tested, each acceleration server to be tested and the determined first delay time from the service server to each acceleration server to be tested can be sent to the client. The client can determine the second delay time from the client to each acceleration server to be tested according to the identification information of each acceleration server to be tested.
similarly, in step S103, the method for the client to determine the second delay time from the client to each acceleration server to be tested may be: the client sends a test data packet to the acceleration server to be tested corresponding to the received identification information, records the sending time as a first time, records the receiving time as a second time when receiving a response data packet returned by the acceleration server to be tested aiming at the test data packet, and determines a second delay time from the client to the acceleration server to be tested according to the recorded time length from the first time to the second time. Specifically, the client may use 1/2 of the time length from the first time to the second time as the second delay time from the client to the acceleration server to be tested.
according to an embodiment of the present invention, after determining the second delay time from the client to each acceleration server to be tested, the method for selecting the acceleration server to be tested to establish the connection according to each of the first delay time and the second delay time may be: the client determines the sum of a first delay time from the business server to the acceleration server to be tested and a second delay time from the client to the acceleration server to be tested aiming at each acceleration server to be tested, and selects the acceleration server to be tested with the minimum sum to establish connection according to the sum determined aiming at each acceleration server to be tested, so that the speed of connecting the selected acceleration server to be tested to the business server is the fastest.
For example, assume that the first delay time and the second delay time from the acceleration server 1 to 5 to be tested to the service server and the client are shown in table 1.
TABLE 1
as can be seen from table 1, the sum of the first delay time from the service server to the acceleration server 4 to be tested and the second delay time from the client to the acceleration server 4 to be tested is 47, which is the minimum sum, so that the client can select the acceleration server 4 to be tested to establish a connection and establish a connection with the service server through the acceleration server 4 to be tested.
In a practical application scenario, for both the client and the service server, after receiving a data packet sent by one of the client and the service server, the acceleration server may not only directly forward the data packet to the other, but also perform certain processing on the data packet, and then send the processed data packet to the other, so that even though the first delay time from the acceleration server to the service server and the second delay time from the acceleration server to the client are both small, if the processing delay time for the acceleration server to process the data packet is large, the connection speed for the client to connect to the service server through the acceleration server is still low.
therefore, according to an embodiment of the present invention, before the client selects the acceleration server to be tested to establish the connection according to the respective first delay time and the second delay time (i.e., before step S104), the processing delay time of each acceleration server to be tested may also be determined, and a method for determining the processing delay time of the acceleration server to be tested is shown in fig. 2 and includes: the client sends a test data packet to the service server through the acceleration server to be tested aiming at each received acceleration server to be tested corresponding to the identification information, records the sending time as a third time, records the receiving time as a fourth time when receiving a response data packet returned by the service server sent by the acceleration server to be tested, and determines the processing delay time of the acceleration server to be tested according to the recorded time length from the third time to the fourth time, the first delay time from the service server to the acceleration server to be tested and the second delay time from the client to the acceleration server to be tested.
Specifically, when the first delay time is 1/2 of the time length from the sending time of the service server sending the data packet to the acceleration server to be tested to the receiving time of the response data packet, and the second delay time is 1/2 of the time length from the first time of the client sending the data packet to the acceleration server to be tested to the second time of receiving the response data packet, the client may determine the processing delay time of the acceleration server to be tested by using a formula T-2(T1+ T2), where T is the time length from the third time of the client sending the test data packet to the service server by the acceleration server to be tested to the fourth time of receiving the response data packet returned by the service server to be tested, T1 is the first delay time, and T2 is the second delay time.
after the processing delay time of each acceleration server to be detected is determined by the client, when the acceleration server to be detected is selected to establish connection, the sum of the first product, the second product and the third product of the first delay time multiplied by the first weight, the second product of the second delay time multiplied by the second weight and the third product of the processing delay time multiplied by the third weight can be determined for each received acceleration server to be detected corresponding to the identification information, the acceleration server to be detected with the minimum sum is selected to establish connection, the acceleration server to be detected is connected to the service server through the selected acceleration server to be detected, and the selected acceleration server to be detected is the acceleration server to be detected with the highest speed and connected to the service server. The first weight, the second weight and the third weight can be set according to needs.
For example, for the acceleration servers 1 to 5 to be tested shown in table 1, after the client receives the first delay time from the service server to the five acceleration servers to be tested determined by the service server and determines the second delay time from the client to the five acceleration servers to be tested, the time length from the third time to the fourth time when the response data packet is received by the five acceleration servers to be tested respectively can be determined. The time lengths from the third time to the fourth time, which are respectively determined for the five acceleration servers to be tested, are shown in table 2.
TABLE 2
After the time length from the third time to the fourth time shown in table 2 is determined for each of the acceleration servers 1 to 5 to be measured, the processing delay time may be determined for each of the acceleration servers to be measured, and from each of the first delay time, the second delay time, and the time length from the third time to the fourth time shown in table 2, the processing delay time of the acceleration server to be measured 1 may be determined to be 130-2(52+10) to 6, the processing delay time of the acceleration server to be measured 2 may be 270-2(108+21) to 12, the processing delay time of the acceleration server to be measured 3 may be 200-2(21+51) to 56, the processing delay time of the acceleration server to be measured 4 may be 110-2(15+32) to 16, and the processing delay time of the acceleration server to be measured 5 may be 189-2(72+15) to 15.
Assuming that the preset first weight and the preset second weight are both 1, and the third weight is set to be 3, then:
for the acceleration server 1 to be tested, the sum of the first delay time multiplied by the first weight value, the second delay time multiplied by the second weight value, the processing delay time multiplied by the third weight value is determined to be 80;
for the acceleration server 2 to be tested, the sum of the first delay time multiplied by the first weight value, the second delay time multiplied by the second weight value, the processing delay time multiplied by the third weight value can be determined to be 165;
for the acceleration server 3 to be tested, the sum of the first delay time multiplied by the first weight value, the second delay time multiplied by the second weight value, the processing delay time multiplied by the third weight value can be determined to be 240;
For the acceleration server 4 to be tested, the sum of the first delay time multiplied by the first weight value, the second delay time multiplied by the second weight value, the processing delay time multiplied by the third weight value is determined to be 95;
For the acceleration server 5 to be tested, the sum of the first delay time multiplied by the first weight, the second delay time multiplied by the second weight, the processing delay time multiplied by the third weight may be determined to be 132.
therefore, if only the first delay time and the second delay time from the acceleration server to be tested to the service server and the client are considered, the client should select the acceleration server 4 to be tested to establish the connection, but if the processing delay time of the acceleration server to be tested is also considered, the determined acceleration server to be tested with the minimum sum value is the acceleration server 1 to be tested, and therefore, the client selects the acceleration server 1 to be tested to establish the connection and is connected to the service server through the acceleration server 1 to be tested.
Certainly, after the client receives the first delay time from the service server to each acceleration server to be tested sent by the service server and determines the second delay time from the client to each acceleration server to be tested, a certain number of acceleration servers to be tested can be selected in sequence according to the sequence from the small sum of the first delay time and the second delay time to the large sum, then the processing delay time of the selected acceleration servers to be tested is determined respectively, and finally the acceleration server to be tested to be connected is determined from the selected acceleration servers to be tested and is connected with the selected acceleration server to be tested according to the first delay time, the second delay time and the processing delay time of the selected acceleration server to be tested.
Still taking table 1 as an example for illustration, the acceleration servers 1-5 to be tested are sorted from small to large according to the sum of the first delay time and the second delay time into the acceleration server 4 to be tested, the acceleration server 1 to be tested, the acceleration server 3 to be tested, the acceleration server 5 to be tested, and the acceleration server 2 to be tested, so that the client can select the first 3 acceleration servers to be tested first, the method comprises the steps of selecting an acceleration server to be tested 4, an acceleration server to be tested 1 and an acceleration server to be tested 3, determining processing delay time of the three acceleration servers to be tested respectively, selecting the acceleration server to be tested to be connected from the three acceleration servers to be tested according to the first delay time, the second delay time and the processing delay time of the three acceleration servers to be tested, establishing connection with the acceleration server to be tested, and connecting the acceleration server to be tested to a service server through the acceleration server to be tested.
Based on the same inventive concept, the method for establishing connection provided by the present invention further provides a device for establishing connection and a system for establishing connection, as shown in fig. 3, fig. 4, and fig. 5.
fig. 3 is a schematic structural diagram of an apparatus for establishing a connection according to an embodiment of the present invention, including:
A sending module 301, configured to send a request message for establishing a connection to a service server;
A receiving module 302, configured to receive, by the service server, the identifier information of each acceleration server to be tested, which is returned according to the request message, and a first delay time from the service server to each acceleration server to be tested;
A first determining module 303, configured to determine, according to each received identification information, a second delay time from the client itself to the acceleration server to be tested corresponding to each identification information;
and a selecting connection module 304, configured to select an acceleration server to be tested to establish a connection according to each of the first delay time and the second delay time, and establish a connection with the service server through the selected acceleration server to be tested.
the first determining module 303 is specifically configured to send a test data packet to the acceleration server to be tested corresponding to the received identification information, record the sending time as a first time, record the receiving time as a second time when receiving a response data packet returned by the acceleration server to be tested for the test data packet, and determine a second delay time from the client to the acceleration server to be tested according to a time length from the recorded first time to the recorded second time.
The device further comprises:
a second determining module 305, configured to, before the selecting and connecting module 304 selects an acceleration server to be tested to establish a connection according to each of the first delay time and the second delay time, send a test data packet to the service server through the acceleration server to be tested for each received acceleration server to be tested corresponding to the identification information, record a sending time as a third time, record a receiving time as a fourth time when receiving a response data packet sent back by the service server and sent by the acceleration server to be tested, and determine a processing delay time of the acceleration server to be tested according to a recorded time length from the third time to the fourth time, a first delay time from the service server to the acceleration server to be tested, and a second delay time from the device itself to the acceleration server to be tested;
the selective connection module 304 is specifically configured to determine, for each acceleration server to be tested corresponding to the received identification information, a first product of the first delay time and the first weight, a second product of the second delay time and the second weight, and a third product of the processing delay time and the third weight, and determine a sum of the first product, the second product, and the third product; and selecting the acceleration server to be tested with the minimum sum value to establish connection.
The specific means for establishing a connection as shown in fig. 3 may be located in the client.
Fig. 4 is a schematic structural diagram of another apparatus for establishing a connection according to an embodiment of the present invention, including:
a receiving module 401, configured to receive a request message for establishing a connection sent by a client;
a server determining module 402, configured to determine each acceleration server to be tested according to the request message;
a delay determining module 403, configured to determine a first delay time from the apparatus itself to each acceleration server to be tested;
a sending module 404, configured to send the identification information of each acceleration server to be tested and the determined first delay time to the client, so that the client selects an acceleration server to be tested to establish a connection.
the server determining module 402 is specifically configured to determine a geographic position where the client is located according to the identification information of the client carried in the request message, determine distances from the acceleration servers to the client according to the geographic positions of the acceleration servers stored in advance and the determined geographic position where the client is located, and sequentially determine a specified number of acceleration servers as acceleration servers to be detected according to a sequence from small to large of the determined distances, where the identification information of the client includes an internet protocol IP address of the client.
The delay determining module 403 is specifically configured to send a test data packet to the acceleration server to be tested, record a sending time, record a receiving time when a response data packet returned by the acceleration server to be tested for the test data packet is received, and determine a first delay time from the service server to the acceleration server to be tested according to a time length from the recorded sending time to the recorded receiving time.
the specific means for establishing a connection as shown in fig. 4 may be located in the service server.
Fig. 5 is a schematic structural diagram of a system for establishing a connection according to an embodiment of the present invention, including:
the client 501 is configured to send a request message for establishing a connection to a service server 502, receive identification information of each acceleration server to be detected 503 and first delay time from the service server 502 to each acceleration server to be detected 503, which are returned by the service server 502, determine, according to each received identification information, second delay time from the client 501 itself to each acceleration server to be detected 503 corresponding to the identification information, select, according to each first delay time and each second delay time, the acceleration server to be detected 503 to establish a connection, and establish a connection with the service server 502 through the selected acceleration server to be detected 503;
The service server 502 is configured to receive a request message for establishing a connection sent by the client 501, determine each acceleration server 503 to be tested according to the request message, determine a first delay time from the service server 502 itself to each acceleration server 503 to be tested, and send identification information of each acceleration server 503 to be tested and each determined first delay time to the client 501;
and the acceleration server to be tested 503 is configured to forward the data packet for the service server 502 and the client 501.
According to the method for establishing the connection, the service server can determine the first delay time from the service server to each acceleration server to be detected and return the determined first delay time to the client, and after the client determines the second delay time from the client to each acceleration server to be detected, the acceleration server to be detected can be selected and the connection can be established according to the first delay time from the acceleration server to be detected to the service server and the second delay time from the client to the acceleration server to be detected, so that the connection speed of the client to be connected to the service server through the acceleration server can be effectively increased.
the algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
the various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of the apparatus for intercepting embedded information in an application according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
it should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The application is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the computer system/server include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, hand-held or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, networked personal computers, minicomputer systems, mainframe computer systems, distributed cloud computing environments that include any of the above, and the like.
the computer system/server may be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules may include routines, programs, objects, components, logic, data structures, etc. that perform particular tasks or implement particular abstract data types. The computer system/server may be practiced in distributed cloud computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules may be located in both local and remote computer system storage media including memory storage devices.

Claims (13)

1. A method of establishing a connection, comprising:
The client sends a request message for establishing connection to the service server;
Receiving the identification information of each acceleration server to be tested, which is returned by the service server according to the request message, and the first delay time from the service server to each acceleration server to be tested;
Determining a second delay time from the client to the acceleration server to be tested corresponding to each identification information according to each received identification information;
determining the processing delay time of each acceleration server to be tested; the method comprises the following steps: the method comprises the steps that a client sends a test data packet to a service server through an acceleration server to be tested aiming at each received acceleration server to be tested corresponding to identification information, the sending time is recorded as a third time, when a response data packet returned by the service server sent by the acceleration server to be tested is received, the receiving time is recorded as a fourth time, and the processing delay time of the acceleration server to be tested is determined according to the recorded time length from the third time to the fourth time, the first delay time from the service server to the acceleration server to be tested and the second delay time from the client to the acceleration server to be tested;
and selecting the acceleration server to be tested to establish connection according to the first delay time, the second delay time and the processing delay time of each acceleration server to be tested, and establishing connection with the service server through the selected acceleration server to be tested.
2. the method of claim 1, wherein determining the second delay time from the client to the acceleration server to be tested corresponding to each identification information further comprises:
the client sends a test data packet to the acceleration server to be tested corresponding to the received identification information, and records the sending time as a first time;
When a response data packet returned by the acceleration server to be tested aiming at the test data packet is received, recording the receiving time as a second time;
And determining a second delay time from the client to the acceleration server to be tested according to the recorded time length from the first time to the second time.
3. The method of claim 1, wherein selecting the acceleration server under test to establish the connection based on the respective first and second delay times and the processing delay time of the respective acceleration server under test further comprises:
aiming at the acceleration server to be tested corresponding to each received identification information, determining a first product of a first delay time and a first weight, a second product of a second delay time and a second weight, and a third product of a processing delay time and a third weight, and determining a sum of the first product, the second product and the third product;
And selecting the acceleration server to be tested with the minimum sum value to establish connection.
4. A method of establishing a connection, comprising:
a service server receives a request message for establishing connection sent by a client;
determining each acceleration server to be tested according to the request message;
Determining a first delay time from the service server to each acceleration server to be tested;
Sending the identification information of each acceleration server to be tested and the determined first delay time to the client, so that the client selects the acceleration server to be tested to establish connection;
The method further comprises the following steps: receiving a test data packet sent by the acceleration server to be tested by the client aiming at the acceleration server to be tested corresponding to each piece of received identification information, wherein the sending time is recorded as a third time by the client; returning a response data packet to the client through the acceleration server to be tested, wherein the client records the receiving time of the response data packet as a fourth time so that the client determines the processing delay time of the acceleration server to be tested according to the recorded time length from the third time to the fourth time, the first delay time from the service server to the acceleration server to be tested and the second delay time from the client to the acceleration server to be tested, which is determined according to the identification information of the acceleration server to be tested;
The method comprises the following steps that the client selects an acceleration server to be tested to establish connection specifically: and the client selects the acceleration server to be tested to establish connection according to the first delay time, the second delay time and the processing delay time of each acceleration server to be tested, and establishes connection with the service server through the selected acceleration server to be tested.
5. The method of claim 4, wherein determining each acceleration server under test according to the request message further comprises:
the service server determines the geographical position of the client according to the identification information of the client carried in the request message, wherein the identification information of the client comprises an Internet Protocol (IP) address of the client;
determining the distance from each acceleration server to the client according to the pre-stored geographical position of each acceleration server and the determined geographical position of the client;
And sequentially determining the acceleration servers with the specified number as the acceleration servers to be tested according to the sequence of the determined distances from small to large.
6. the method of claim 4, wherein determining the first delay time from the traffic server itself to each acceleration server under test further comprises:
The service server sends a test data packet to the acceleration server to be tested and records the sending time;
recording the receiving time when receiving a response data packet returned by the acceleration server to be tested aiming at the test data packet;
and determining the first delay time from the service server to the acceleration server to be tested according to the recorded time length from the sending time to the receiving time.
7. an apparatus for establishing a connection, comprising:
a sending module, configured to send a request message for establishing a connection to a service server;
the receiving module is used for receiving the identification information of each acceleration server to be tested, which is returned by the service server according to the request message, and the first delay time from the service server to each acceleration server to be tested;
the first determining module is used for determining a second delay time from the client to the acceleration server to be tested corresponding to each identification information according to each received identification information;
A second determining module, configured to send a test data packet to the service server through the acceleration server to be tested, record a sending time as a third time, record a receiving time as a fourth time when receiving a response data packet returned by the service server and sent by the acceleration server to be tested, and determine a processing delay time of the acceleration server to be tested according to a recorded time length from the third time to the fourth time, a first delay time from the service server to the acceleration server to be tested, and a second delay time from the device itself to the acceleration server to be tested;
and the selection connection module is used for selecting the acceleration server to be tested to establish connection according to the first delay time, the second delay time and the processing delay time of each acceleration server to be tested, and establishing connection with the service server through the selected acceleration server to be tested.
8. The apparatus according to claim 7, wherein the first determining module is specifically configured to send a test data packet to the acceleration server to be tested corresponding to the received identification information, record a sending time as a first time, record a receiving time as a second time when receiving a response data packet returned by the acceleration server to be tested for the test data packet, and determine a second delay time from the client to the acceleration server to be tested according to a time length from the recorded first time to the recorded second time.
9. the apparatus according to claim 7, wherein the selective connection module is specifically configured to determine, for each acceleration server to be tested corresponding to the received identification information, a sum of a first product of the first delay time and the first weight, a second product of the second delay time and the second weight, and a third product of the processing delay time and the third weight, and determine a sum of the first product, the second product, and the third product; and selecting the acceleration server to be tested with the minimum sum value to establish connection.
10. an apparatus for establishing a connection, comprising:
the receiving module is used for receiving a request message for establishing connection sent by a client;
The server determining module is used for determining each acceleration server to be tested according to the request message;
The device comprises a delay determining module, a delay determining module and a control module, wherein the delay determining module is used for determining first delay time from the device to each acceleration server to be tested;
the sending module is used for sending the identification information of each acceleration server to be tested and the determined first delay time to the client, so that the client selects the acceleration server to be tested to establish connection;
wherein the apparatus is further configured to: receiving a test data packet sent by the acceleration server to be tested by the client aiming at the acceleration server to be tested corresponding to each piece of received identification information, wherein the sending time is recorded as a third time by the client; returning a response data packet to the client through the acceleration server to be tested, wherein the client records the receiving time of the response data packet as a fourth time so that the client determines the processing delay time of the acceleration server to be tested according to the recorded time length from the third time to the fourth time, the first delay time from the service server to the acceleration server to be tested and the second delay time from the client to the acceleration server to be tested, which is determined according to the identification information of the acceleration server to be tested;
The method comprises the following steps that the client selects an acceleration server to be tested to establish connection specifically: and the client selects the acceleration server to be tested to establish connection according to the first delay time, the second delay time and the processing delay time of each acceleration server to be tested, and establishes connection with the service server through the selected acceleration server to be tested.
11. the apparatus according to claim 10, wherein the server determining module is specifically configured to determine a geographic location where the client is located according to the identification information of the client carried in the request message, determine a distance from each acceleration server to the client according to the geographic location of each acceleration server stored in advance and the determined geographic location where the client is located, and sequentially determine a specified number of acceleration servers as acceleration servers to be tested according to a descending order of the determined distances, where the identification information of the client includes an internet protocol IP address of the client.
12. the apparatus according to claim 10, wherein the delay determining module is specifically configured to send a test data packet to the acceleration server to be tested, record a sending time, record a receiving time when a response data packet returned by the acceleration server to be tested for the test data packet is received, and determine a first delay time from the service server itself to the acceleration server to be tested according to a time length from the recorded sending time to the recorded receiving time.
13. A system for establishing a connection, comprising:
the system comprises a client, a service server and a server, wherein the client is used for sending a request message for establishing connection to the service server, receiving identification information of each acceleration server to be tested returned by the service server and first delay time from the service server to each acceleration server to be tested, determining second delay time from the client to each acceleration server to be tested corresponding to the identification information according to the received identification information, and determining processing delay time of each acceleration server to be tested; selecting an acceleration server to be tested to establish connection according to the first delay time, the second delay time and the processing delay time of each acceleration server to be tested, and establishing connection with the service server through the selected acceleration server to be tested; wherein, determining the processing delay time of each acceleration server to be tested comprises: the method comprises the steps that a client sends a test data packet to a service server through an acceleration server to be tested aiming at each received acceleration server to be tested corresponding to identification information, the sending time is recorded as a third time, when a response data packet returned by the service server sent by the acceleration server to be tested is received, the receiving time is recorded as a fourth time, and the processing delay time of the acceleration server to be tested is determined according to the recorded time length from the third time to the fourth time, the first delay time from the service server to the acceleration server to be tested and the second delay time from the client to the acceleration server to be tested;
the system comprises a service server, a client and a server side, wherein the service server is used for receiving a request message for establishing connection sent by the client, determining each acceleration server to be tested according to the request message, determining a first delay time from the service server to each acceleration server to be tested, and sending identification information of each acceleration server to be tested and each determined first delay time to the client;
and the acceleration server to be tested is used for forwarding the data packet for the service server and the client.
CN201410114689.0A 2014-03-25 2014-03-25 method, device and system for establishing connection Expired - Fee Related CN104954320B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410114689.0A CN104954320B (en) 2014-03-25 2014-03-25 method, device and system for establishing connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410114689.0A CN104954320B (en) 2014-03-25 2014-03-25 method, device and system for establishing connection

Publications (2)

Publication Number Publication Date
CN104954320A CN104954320A (en) 2015-09-30
CN104954320B true CN104954320B (en) 2019-12-06

Family

ID=54168680

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410114689.0A Expired - Fee Related CN104954320B (en) 2014-03-25 2014-03-25 method, device and system for establishing connection

Country Status (1)

Country Link
CN (1) CN104954320B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017185212A1 (en) * 2016-04-25 2017-11-02 华为技术有限公司 Multicast delay diagnosis method and apparatus
CN112601176B (en) * 2020-12-07 2022-09-16 四川迅游网络科技股份有限公司 Acceleration method and system based on user terminal positioning information

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624920A (en) * 2012-03-31 2012-08-01 奇智软件(北京)有限公司 Method and device for performing access through proxy server
CN102916950A (en) * 2012-10-12 2013-02-06 苏州阔地网络科技有限公司 Method and system for transmitting streaming media
CN103117907A (en) * 2013-03-11 2013-05-22 星云融创(北京)信息技术有限公司 Network speed test method and system and method and system for selecting accelerating server
CN103634129A (en) * 2012-08-22 2014-03-12 腾讯科技(深圳)有限公司 Proxy server setting method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5034519B2 (en) * 2007-01-31 2012-09-26 富士通株式会社 Communication device, server device, and information processing system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624920A (en) * 2012-03-31 2012-08-01 奇智软件(北京)有限公司 Method and device for performing access through proxy server
CN103634129A (en) * 2012-08-22 2014-03-12 腾讯科技(深圳)有限公司 Proxy server setting method and device
CN102916950A (en) * 2012-10-12 2013-02-06 苏州阔地网络科技有限公司 Method and system for transmitting streaming media
CN103117907A (en) * 2013-03-11 2013-05-22 星云融创(北京)信息技术有限公司 Network speed test method and system and method and system for selecting accelerating server

Also Published As

Publication number Publication date
CN104954320A (en) 2015-09-30

Similar Documents

Publication Publication Date Title
CN104427005B (en) The method and system that request is accurately dispatched are realized on CDN
US20210014778A1 (en) Upf selection method and device
US8345561B2 (en) Time monitor
US20170171344A1 (en) Scheduling method and server for content delivery network service node
CN107734456B (en) Method and equipment for recommending service information
US10243917B2 (en) Method and apparatus for calculating distance in contents delivery network
US20170046743A1 (en) Identifying the Physical Location of Internet Service Providers
CN103716251A (en) Load balancing method and equipment for content distribution network
US9832614B2 (en) Method, server and terminal for information interaction
CN106453460B (en) File distribution method, device and system
CN111327647B (en) Method and device for providing service to outside by container and electronic equipment
CN109818997A (en) A kind of load-balancing method, system and storage medium
CN104468399B (en) Data transmission method and device and server
CN104796391A (en) Check-in verification method, check-in verification client, server, system and device
CN105610995A (en) Selection method of DNS server, selection device of the DNS server and terminal
CN105610958A (en) Method and device for selecting time synchronization server and intelligent terminal
CN110198332A (en) Dispatching method, device and the storage medium of content delivery network node
CN105591962B (en) A kind of detection method and device of balancing link load
CN104954320B (en) method, device and system for establishing connection
CN109561054A (en) A kind of data transmission method, controller and access device
CN110248379A (en) The performance test methods and device of base station in WLAN
US11178593B2 (en) Terminal, relay apparatus selection apparatus, communication method, relay apparatus selection method, and program
CN110972071A (en) Multi-mode positioning method, positioning server, terminal and storage medium
JP5805321B2 (en) Determining the physical location of the client
CN105100151B (en) A kind of method, apparatus and system of content distribution

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20191206

Termination date: 20210325

CF01 Termination of patent right due to non-payment of annual fee