WO2013067870A1 - Method for traversing the translator server and the corresponding server, terminal, system - Google Patents

Method for traversing the translator server and the corresponding server, terminal, system Download PDF

Info

Publication number
WO2013067870A1
WO2013067870A1 PCT/CN2012/082125 CN2012082125W WO2013067870A1 WO 2013067870 A1 WO2013067870 A1 WO 2013067870A1 CN 2012082125 W CN2012082125 W CN 2012082125W WO 2013067870 A1 WO2013067870 A1 WO 2013067870A1
Authority
WO
WIPO (PCT)
Prior art keywords
relay
address
server
relay address
address information
Prior art date
Application number
PCT/CN2012/082125
Other languages
French (fr)
Chinese (zh)
Inventor
李刚
乐利锋
彭晋
马啸
Original Assignee
中国移动通信集团公司
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
Priority claimed from CN201110356744.3A external-priority patent/CN103108054B/en
Application filed by 中国移动通信集团公司 filed Critical 中国移动通信集团公司
Publication of WO2013067870A1 publication Critical patent/WO2013067870A1/en

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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • H04L61/2575NAT traversal using address mapping retrieval, e.g. simple traversal of user datagram protocol through session traversal utilities for NAT [STUN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/256NAT traversal
    • H04L61/2589NAT traversal over a relay server, e.g. traversal using relay for network address translation [TURN]

Definitions

  • the present application relates to the field of communications, and in particular, to a method for traversing a relay server, a corresponding server, a terminal, and a system. Background technique
  • the current network mainly uses STUN (Simple Traversal of User Datagram Protocol through Network Address Translators; NAT UDP Simple Traversal;) and TURN (Traversal Using Relay NAT; NAT through NAT) to complete NAT.
  • STUN Simple Traversal of User Datagram Protocol through Network Address Translators
  • TURN Traversal Using Relay NAT; NAT through NAT
  • the principle of STUN is to inform the terminal of its public network address, mainly dealing with the first three types of NAT.
  • TURN uses symmetric means to complete symmetric NAT traversal, and can also be used for the first three types of NAT traversal.
  • ICE Interactive Connectivity Establishment
  • the working principle of ICE is as follows:
  • firewalls are often deployed, which may result in indirect communication between clients.
  • firewalls only allow specific protocols (HTTP), specific ports, and so on.
  • HTTP HyperText Transfer Protocol
  • the address can be collected through the ICE protocol, and then the address connectivity detection is performed, and the transit connection is performed through a transit node.
  • An embodiment of the present application discloses a method for traversing a relay server, including: the calling end and the called end respectively obtain respective private network addresses and public network address information;
  • the calling terminal acquires relay address information to establish a connection with the called terminal through the relay address.
  • a TURN server including:
  • a communication terminal including:
  • Processing module acquiring private network address and public network address information of the communication terminal and the communication terminal of the opposite party;
  • the determining module determines whether the connection is possible according to the obtained address information
  • the processing module establishes a connection with the counterpart communication terminal; If the judgment result is no, the processing module acquires a relay address.
  • Another embodiment of the present application also discloses a communication system, including:
  • the calling end and the called end respectively obtain the public network address information of the private network address, and determine whether the connection is possible according to the obtained address information. If the judgment result is yes, the connection is established according to the obtained address information, if the judgment result is If not, the calling terminal obtains relay address information from the server; the server returns the relay address to the calling terminal.
  • the calling end collects the relay address when the private network address and the public network address of the calling end and the called end cannot be connected, and the server can select the optimal relay address and/or medium. Following the address sorting list, so that the calling end establishes a connection with the called end.
  • FIG. 1 shows a method 1000 of traversing a relay server according to an embodiment of the present application
  • FIG. 2 shows a step S130 in the method 1000 shown in FIG. 1;
  • FIG. 3 shows a signaling flow diagram of a method 1000 of traversing a relay server in accordance with an embodiment of the present application
  • FIG. 4 illustrates a server 30 in accordance with one embodiment of the present application
  • FIG. 1 illustrates a method 1000 of traversing a relay server in accordance with an embodiment of the present application.
  • the calling end and the called end respectively obtain respective private network addresses and public network address information.
  • the calling end and the called end perform connectivity detection according to the obtained address information. If the communication is possible, the calling end and the called end establish a connection by using the obtained private network address and public network address information in step S140. If the communication cannot be performed, in step S130, the calling terminal acquires relay candidate information. Then, in step S140, the calling end and the called end establish a connection by using the relay address information.
  • the calling terminal first obtains its private network address and public network address information, for example, the calling end sends a request message to the STUN/TURN server, and then the STUN/TURN server sends the request message to the STUN/TURN server.
  • the calling end returns its public network address; the calling end sorts the obtained address and sends its private network address and public network address information (for example, through sip signaling or other server forwarding) to the called end; the called end receives After obtaining the address information sent by the calling end, the private network address and the public network address information are also obtained.
  • the called end sends a request message to the STUN/TURN server, and then the STUN/TURN server returns its public network address to the called end.
  • the called end sorts the obtained addresses and sends its private network address and public network address information (for example, through sip signaling or other server forwarding) to the calling end. In this way, both the calling end and the called end obtain the private network address and public network address information of both parties.
  • step S120 the calling end and the called end perform address pairing on the private network address and the public network address of both parties, and perform connectivity detection. If the connectivity detection succeeds, the calling end and the called end establish a connection by using the private network address or the public network address of both parties in step S140.
  • step S130 the calling terminal obtains the relay address information to establish a connection with the called terminal through the relay address.
  • FIG. 2 shows a step S130 in the method 1000 shown in Figure 1.
  • the calling terminal sends a relay address obtaining request message to the server (hereinafter referred to as the management server), wherein the management server may be a TURN server, and other storages may be stored therein.
  • the management server may be a TURN server, and other storages may be stored therein.
  • the relay address obtaining request message may include a public network address of the calling end and the called end.
  • the management server selects the optimal relay address. For example, the management server receives the relay address acquisition request message and selects an optimal relay address according to the public network address of the calling end and the called end included therein.
  • the management server may select the optimal relay address and/or obtain a relay address sorted list in a static manner, i.e., perform IP address matching to determine an optimal relay address and/or a relay address sorted list.
  • the management server can query the public IP address pool to query the location of the IP address and the name of the ISP, so that a transit node that is closer to both the calling and the called parties can be statically selected.
  • the management server may dynamically select an optimal relay address and/or obtain a relay address sorting list, that is, detect each relay server and the master according to the obtained public network address information of the calling end and the called end.
  • the delay and/or packet loss rate of the communication between the called end and the called end, and then can also be The load information of each relay server is compared to determine an optimal relay address and/or relay address sorting list.
  • the management server may perform dynamic communication detection between the candidate multiple transit nodes (R1, R2, and R3) one by one with the calling end (A) and the called end (B), for example, testing and counting for a period of time.
  • step S1303 the calling end sends the optimal relay address and/or relay address sorting list to the called end to establish a connection.
  • the connection detection may be performed first, and then the connection is established.
  • the management server can sort each relay server to obtain an ordered list and return the sorted list to the calling end.
  • the calling end sends the allocation sequence table to the called end. Then, the calling end and the called end perform a connectivity test according to the allocation sequence table to establish a connection.
  • FIG. 3 illustrates a signaling flow diagram of a method 1000 of traversing a relay server in accordance with an embodiment of the present application.
  • the management server in the method employs a dynamic manner to select an optimal relay address and/or Obtaining a relay address sorting list, that is, detecting a delay and/or a packet loss rate of communication between each relay server and the calling end and the called end according to the obtained public network address information of the calling end and the called end, and then also The load information of each relay server is compared to determine an optimal relay address and/or relay address sorting list.
  • the calling end sends a relay address collection request message to the management server; then the management server acquires the public network address of the calling end and the called end contained in the request message, and sends a test to the managed relay server in response to the request message.
  • Each relay server communicates with the calling end and the called end in response to the test message to obtain information such as TTL (Time To Live), and then returns the obtained TTL information to the management server;
  • TTL Time To Live
  • the information such as the TTL returned by each relay server is sorted by each relay server, and then the optimal relay address (the address of the optimal relay server) and/or the sorted list of the relay server are returned to the calling party;
  • the terminal sends the received optimal relay address and/or relay address sorted list to the called end; the calling end and the called end perform connectivity test according to the optimal relay address and/or the sorted list to establish a connection.
  • the address collection is divided into two, first, the client only collects the private network.
  • the address and public network address information are then detected for connectivity; only when the connectivity detection fails, the calling end sends a request message to the management server to collect the relay address.
  • the management server only performs signaling interaction, manages multiple TURN servers for media relay, and selects an optimal relay address according to the public network address information of the calling end and the called end and then returns to the calling end. This can select the optimal relay address from multiple relay addresses to improve QoS.
  • the management server 30 can also include a comparison module 32.
  • the comparing module 32 compares the quality of connectivity of each relay server with the terminal according to the relay address acquisition request message to determine an optimal relay address and/or a relay address sorting list.
  • the control module 31 is further configured to return an optimal relay address and/or a relay address sorting list to the terminal.
  • the relay address obtaining request message includes public network address information of the calling end and the called end.
  • the comparison module 32 may select the optimal relay address in a static manner and/or obtain a relay address sorted list, ie, perform IP address matching to determine an optimal relay address and/or a relay address sorted list.
  • the comparison module 32 can query the location of the IP address and the name of the ISP by querying the public IP address database, so that a transit node that is closer to both the calling party and the called party can be statically selected.
  • the comparing module 32 may dynamically select an optimal relay address and/or obtain a relay address sorting list, that is, detect each relay server according to the obtained public network address information of the calling end and the called end. The delay and/or packet loss rate of the communication between the calling end and the called end may then be compared to the load information of each relay server to determine an optimal relay address and/or a relay address sorting list.
  • the comparison module 32 can perform dynamic communication detection between the candidate plurality of transit nodes (R1, R2, and R3) one by one with the calling end (A) and the called end (B), for example, can test and count for a period of time.
  • the delay and packet loss rate for example, A-R1-B, A-R2-B, and A-R3-B are detected separately, and then the transit node with smaller delay and lower packet loss rate is selected as the media. Excellent transit node.
  • the control module 31 sorts the obtained optimal relay address (ie, the address of the optimal transit node) and/or the relay address. Sent to the calling party.
  • the server only performs signaling interaction, manages multiple TURN servers for media relay, and selects an optimal relay address according to the public network address information of the calling end and the called end, and then returns to the calling party.
  • a communication terminal 40 of one embodiment is applied. As shown in FIG. 5, the communication terminal 40 includes a processing module 41 and a determination module 42.
  • the processing module 41 obtains the private network address and the public network address information of the communication terminal and the counterpart communication terminal.
  • the judging module 42 judges whether or not it is possible to communicate based on the acquired address information. If the determination result of the determination module 42 is YES, the processing module 41 establishes a connection with the counterpart communication terminal; if the determination result of the determination module 42 is negative, the processing module 41 acquires the relay address.
  • the processing module 41 of the communication terminal 40 first acquires the private network address and public network address information of the communication terminal 40, for example, sends a request message to the STUN/TURN server, and then receives the public network address returned by the STUN/TURN server.
  • the processing module 41 also sorts the obtained addresses and transmits the obtained private network address and public network address information (for example, by sip signaling or other server forwarding) to the counterpart communication terminal.
  • the processing module 41 also receives the private network address and the public network address information of the counterpart communication terminal returned by the counterpart communication terminal.
  • the judging module 42 performs address matching on the private network address and the public network address of the communication terminals of both parties, and determines whether it is possible to communicate.
  • the processing module 41 is further configured to establish a connection with the counterpart communication terminal by using the private network address or the public network address of the two parties when the connectivity detection succeeds, and acquire the relay address information when the connectivity detection fails, to establish the relay address with the counterpart communication terminal. connection.
  • the processing module 41 is further configured to send a relay address acquisition request message to the server when the connectivity detection fails, where the relay address acquisition request message may include the communication interruption 40 and the public network address of the counterpart communication terminal.
  • the processing module 41 is further configured to receive an optimal relay address returned by the server, and send an optimal relay address and/or a relay address sorting list to the counterpart communication terminal to establish a connection.
  • the determining module 42 is further configured to perform an application for the optimal relay address and/or the relay address sorting list.
  • the embodiment further relates to a corresponding communication system.
  • the system can include a calling end, a called end, and a STUN/TURN server.
  • the calling end and the called end respectively obtain respective private network addresses and public network address information, and perform connectivity detection according to the obtained address information. If the connection is possible, the calling end and the called end establish a connection by using the obtained private network address and public network address information. Such as If the communication cannot be made, the calling end obtains the relay candidate information, and then establishes a connection with the called end by using the relay address information.
  • the calling end obtains its private network address and public network address information.
  • the calling party sends a request message to the STUN/TURN server.
  • the STUN/TURN server returns its public network address to the calling end; the calling end sorts the obtained address and sends its private network address and public network address information (for example, through sip signaling or other server forwarding) to the called end.
  • the called end After receiving the address information sent by the calling end, the called end also obtains its own private network address and public network address information. For example, the called end sends a request message to the STUN/TURN server, and the STUN/TURN server returns to the called end.
  • the called end sorts the obtained addresses and sends its private network address and public network address information (for example, through sip signaling or other servers) to the calling end. In this way, both the calling end and the called end obtain the private network address and public network address information of both parties.
  • the management server may select the optimal relay address and/or obtain a relay address sorted list in a static manner, i.e., perform IP address matching to determine an optimal relay address and/or a relay address sorted list.
  • the management server can query the public IP address pool to query the location of the IP address and the name of the ISP, so that a transit node that is closer to both the calling and the called parties can be statically selected.
  • the management server may dynamically select an optimal relay address and/or obtain a relay address sorting list, that is, according to the obtained public network address information of the calling end and the called end. Measure the delay and/or packet loss rate of each relay server to communicate with the calling and called terminals, and then compare the load information of each relay server to determine the optimal relay address and/or relay address. Sort the list. For example, the management server may perform dynamic communication detection between the candidate multiple transit nodes (R1, R2, and R3) one by one with the calling end (A) and the called end (B), for example, testing and counting for a period of time.
  • R1, R2, and R3 the candidate multiple transit nodes
  • Delay and packet loss rate for example, A-R1-B, A-R2-B, and A-R3-B are detected separately, and then the transit node with smaller delay and lower packet loss rate is selected as the media optimal. Transfer node.
  • the management server then sends the selected optimal relay address (ie, the address of the optimal transit node) and/or the relay address sorted list to the calling end.
  • the management server can sort each relay server to obtain an ordered list and return the sorted list to the calling end.
  • the calling end sends the allocation sequence table to the called end. Then, the calling end and the called end perform a connectivity test according to the allocation sequence table to establish a connection.
  • the management server adopts a dynamic manner to select an optimal relay address and/or obtain a relay address sorting list. That is, the management server detects the delay and/or packet loss rate of communication between each relay server and the calling end and the called end according to the obtained public network address information of the calling end and the called end, and then can also access each relay server. The load information is compared to determine an optimal relay address and/or relay address sorted list. First, the calling terminal sends a relay address collection request message to the management server; then the management server acquires the public network address of the calling end and the called end contained in the request message, and sends a test to the managed relay server in response to the request message.
  • Each relay server communicates with the calling end and the called end in response to the test message to obtain information such as TTL (Time To Live), and then returns the obtained TTL information to the management server;
  • the information such as the TTL returned by each relay server is sorted by each relay server, and then the optimal relay address (the address of the optimal relay server) and/or the sorted list of the relay server are returned to the calling party;
  • the terminal sends the received optimal relay address and/or relay address sorted list to the called end; the calling end and the called end perform connectivity test according to the optimal relay address and/or the sorted list to establish a connection.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

Disclosed are a method for traversing the translator server and the corresponding server, terminal, system. The method comprises: the calling terminal and the called terminal obtain the information of the private network address and public network address separately; judging whether it is connected according to the obtained address information; if yes, establishing the connection according to the obtained address information; otherwise, the calling terminal obtains the relay address information and establishes the connection with the called terminal through the obtained relay address. Also disclosed are the corresponding server, terminal and system. The present application can obtain the relay address when the calling terminal and the called terminal couldn't connect with each other through the private network address and public network address, and also can choose the optimized relay address.

Description

穿越中转服务器的方法以及相应的服务器、 终端和系统 技术领域  Method of traversing a transit server and corresponding server, terminal and system
本申请涉及通信领域, 尤其涉及一种穿越中转服务器的方法、 相应的服 务器、 终端和系统。 背景技术  The present application relates to the field of communications, and in particular, to a method for traversing a relay server, a corresponding server, a terminal, and a system. Background technique
为了解决 IP地址日渐不足的问题, RFC1918为私有和内部使用的网络留 出了 3个 IP地址段 (A类、 B类和 C类地址范围各一段), 在此范围内的地 址将不被 Internet主干路由。 使用私有 IP地址的用户将无法访问 Internet。 这 就需要使用网络地址转换 NAT( Network Address Translation)。利用 NAT转换 功能可以更有效地利用 IP地址资源, 进而解决 IP地址短缺的问题。 在将私 有 IP转换为公有 IP的过程中, 通常由防火墙或路由器担任 IP转换的功能。  In order to solve the problem of insufficient IP addresses, RFC1918 leaves three IP address segments for each private and internal network (one segment of Class A, Class B, and Class C address ranges). Addresses within this range will not be Internet. Backbone routing. Users with private IP addresses will not be able to access the Internet. This requires the use of Network Address Translation (NAT). The NAT conversion function can make more efficient use of IP address resources, thereby solving the problem of shortage of IP addresses. In the process of converting private IP to public IP, the function of IP conversion is usually performed by a firewall or router.
目前主要有以下四种的 NAT类型: Full Cone NAT (完全圆锥型 NAT); Restricted Cone NAT (地址限制圆锥型 NAT); Port Restricted Cone NAT (端口限 制圆锥型 NAT) ; 以及 Symmetric NAT (对称型 NAT)。  There are currently four main types of NAT: Full Cone NAT; Restricted Cone NAT; Port Restricted Cone NAT; and Symmetric NAT (Symmetric NAT) ).
现网中主要使用 STUN ( Simple Traversal of User Datagram Protocol through Network Address Translators; NAT 的 UDP 简单穿越; ) 禾口 TURN (Traversal Using Relay NAT;通过 Relay方式穿越 NAT)的方式完成 NAT穿 越。其中 STUN的原理是告知终端其公网地址,主要应对前三种类型的 NAT。 而 TURN是用中继的方式完成对称型 NAT穿越,同时也可以用于前三种类型 NAT穿越。 当今还有一禾中技术 ICE (Interactive Connectivity Establishment; 交 互式连接建立), 其综合运用 STUN、 TURN或 SDP协议。 ICE的工作原理 如下:  The current network mainly uses STUN (Simple Traversal of User Datagram Protocol through Network Address Translators; NAT UDP Simple Traversal;) and TURN (Traversal Using Relay NAT; NAT through NAT) to complete NAT. The principle of STUN is to inform the terminal of its public network address, mainly dealing with the first three types of NAT. TURN uses symmetric means to complete symmetric NAT traversal, and can also be used for the first three types of NAT traversal. There is also an ICE (Interactive Connectivity Establishment), which uses STUN, TURN or SDP protocols. The working principle of ICE is as follows:
首先主叫端会收集地址信息, 包括它的私网地址、 公网地址以及 TURN 服务器分配给它的中继地址。 然后将这些收集到的地址进行优先级排序 (一 般来说私网地址优先级最高, 公网地址其次, 最后是中继地址), 并通过 sip 信令将这些地址信息发送给被叫端。 被叫端接收到主叫端发送的地址信息后 也进行地址信息收集,并对收集到的地址进行优先级排序,再用 sip信令的方 式发送给主叫端。 接下来双方会将所得到的地址 (此时主叫端和被叫端都获 得了双方收集到的私网地址、 公网地址以及中继地址) 进行地址配对, 并对 这些地址对进行连通性检测, 最后在连通成功的地址中选出一对当作双方媒 体通信的地址。 First, the calling end collects address information, including its private network address, public network address, and the relay address assigned to it by the TURN server. The collected addresses are then prioritized (generally, the private network address has the highest priority, the public network address is followed by the last, and finally the relay address), and the address information is sent to the called end through sip signaling. After receiving the address information sent by the calling end, the called end also collects the address information, prioritizes the collected addresses, and uses the sip signaling side. Is sent to the calling party. Next, the two parties will address the obtained address (at this time, both the calling end and the called end obtain the private network address, public network address and relay address collected by both parties), and perform connectivity on these address pairs. Detect, and finally select a pair of addresses that are used as media communication for both parties in the address that is successfully connected.
另外, 在实际的网络中由于会经常部署防火墙所以会导致客户端之间不 能直接连通, 例如防火墙只允许特定的协议 (HTTP)、 特定的端口等。 这样 可以通过 ICE协议进行地址收集, 然后进行地址连通检测, 通过一个中转节 点进行穿越连通。  In addition, in actual networks, firewalls are often deployed, which may result in indirect communication between clients. For example, firewalls only allow specific protocols (HTTP), specific ports, and so on. In this way, the address can be collected through the ICE protocol, and then the address connectivity detection is performed, and the transit connection is performed through a transit node.
通过 ICE协议进行地址收集的过程中, 可以收集私网地址、 公网地址和 中继地址等。 其中对于中继地址的收集可能不是唯一的, 可能来自同一个 TURN服务器的不同端口, 或者来自不同的 TURN服务器。这样在进行连通 性检测的时候, 可能会需要大部分时间对这些中继地址进行检测, 而且, 很 可能所选的中继地址不是最优的。 发明内容  During the address collection process through the ICE protocol, you can collect private network addresses, public network addresses, and relay addresses. The collection of relay addresses may not be unique, may come from different ports of the same TURN server, or from different TURN servers. In this way, when performing connectivity detection, it may take most of the time to detect these relay addresses, and it is likely that the selected relay address is not optimal. Summary of the invention
本申请的一个实施方式公开一种穿越中转服务器的方法, 包括: 主叫端与被叫端分别获取各自的私网地址和公网地址信息;  An embodiment of the present application discloses a method for traversing a relay server, including: the calling end and the called end respectively obtain respective private network addresses and public network address information;
根据所获取的地址信息判断是否能够连通;  Whether it is possible to connect according to the obtained address information;
如果判断结果为是, 则根据所获取的地址信息建立连接; 以及  If the result of the determination is yes, a connection is established according to the acquired address information;
如果判断结果为否, 所述主叫端获取中继地址信息以通过所述中继地址 与所述被叫端建立连接。  If the judgment result is no, the calling terminal acquires relay address information to establish a connection with the called terminal through the relay address.
本申请的一个实施方式公开一种 TURN服务器, 包括:  One embodiment of the present application discloses a TURN server, including:
控制模块, 以及接收所述终端发送的中继地址获取请求消息并返回中继 地址。  And a control module, and receiving a relay address acquisition request message sent by the terminal and returning a relay address.
本申请的另一个实施方式公开一种通信终端, 包括:  Another embodiment of the present application discloses a communication terminal, including:
处理模块, 获取所述通信终端与对方通信终端的私网地址和公网地址信 息; 以及  Processing module, acquiring private network address and public network address information of the communication terminal and the communication terminal of the opposite party;
判断模块, 根据所获取地址信息判断是否能够连通;  The determining module determines whether the connection is possible according to the obtained address information;
如果判断结果为是, 则所述处理模块与所述对方通信终端建立连接; 如果判断结果为否, 所述处理模块获取中继地址。 If the determination result is yes, the processing module establishes a connection with the counterpart communication terminal; If the judgment result is no, the processing module acquires a relay address.
本申请的另一个实施方式还公开了一种通信系统, 包括:  Another embodiment of the present application also discloses a communication system, including:
主叫端与被叫端, 分别获取各自的私网地址公网地址信息, 根据所获取 的地址信息判断是否能够连通, 如果判断结果为是, 则根据所获取的地址信 息建立连接, 如果判断结果为否, 所述主叫端向服务器获取中继地址信息; 所述服务器, 向所述主叫端返回所述中继地址。  The calling end and the called end respectively obtain the public network address information of the private network address, and determine whether the connection is possible according to the obtained address information. If the judgment result is yes, the connection is established according to the obtained address information, if the judgment result is If not, the calling terminal obtains relay address information from the server; the server returns the relay address to the calling terminal.
通过本申请的实施方式, 可以当主叫端与被叫端的私网地址和公网地址 都不能连通时主叫端才收集中继地址, 并且服务器能够选择出最优中继地址 和 /或中继地址排序列表, 以便主叫端与被叫端建立连接。 附图说明  Through the implementation manner of the present application, the calling end collects the relay address when the private network address and the public network address of the calling end and the called end cannot be connected, and the server can select the optimal relay address and/or medium. Following the address sorting list, so that the calling end establishes a connection with the called end. DRAWINGS
图 1 示出了根据本申请的实施方式的穿越中转服务器的方法 1000; 图 2示出了图 1所示的方法 1000中的歩骤 S130;  1 shows a method 1000 of traversing a relay server according to an embodiment of the present application; FIG. 2 shows a step S130 in the method 1000 shown in FIG. 1;
图 3示出了根据本申请的实施方式的穿越中转服务器的方法 1000的信令 流程图;  3 shows a signaling flow diagram of a method 1000 of traversing a relay server in accordance with an embodiment of the present application;
图 4示出了根据本申请一个实施方式的服务器 30; 以及  Figure 4 illustrates a server 30 in accordance with one embodiment of the present application;
图 5示出了根据本申请一个实施方式的通信终端 40。  FIG. 5 shows a communication terminal 40 in accordance with an embodiment of the present application.
具体实施方式 detailed description
下面结合附图详细描述本申请的实施方式。  Embodiments of the present application are described in detail below with reference to the accompanying drawings.
图 1 示出了根据本申请的实施方式的穿越中转服务器的方法 1000。如图 1所示, 在歩骤 S110中, 主叫端与被叫端分别获取各自的私网地址和公网地 址信息。然后歩骤 S120中, 主叫端与被叫端根据所获得的地址信息进行连通 检测。如果能够连通, 则在歩骤 S140中主叫端与被叫端利用所获的私网地址 和公网地址信息建立连接。如果不能够联通, 则在歩骤 S130中, 主叫端获取 中继地址(relay candidate)信息。 然后在歩骤 S140中, 主叫端与被叫端利用 中继地址信息建立连接。  FIG. 1 illustrates a method 1000 of traversing a relay server in accordance with an embodiment of the present application. As shown in FIG. 1, in step S110, the calling end and the called end respectively obtain respective private network addresses and public network address information. Then, in step S120, the calling end and the called end perform connectivity detection according to the obtained address information. If the communication is possible, the calling end and the called end establish a connection by using the obtained private network address and public network address information in step S140. If the communication cannot be performed, in step S130, the calling terminal acquires relay candidate information. Then, in step S140, the calling end and the called end establish a connection by using the relay address information.
例如, 在歩骤 S110中, 首先主叫端获取其私网地址和公网地址信息, 例 如主叫端向 STUN/TURN服务器发送请求消息, 然后 STUN/TURN服务器向 主叫端返回其公网地址; 主叫端将获得的地址进行排序并将其私网地址和公 网地址信息发送 (例如通过 sip信令或其他服务器转发) 给被叫端; 被叫端 接收到主叫端发送的地址信息后也获取自己的私网地址和公网地址信息, 例 如被叫端向 STUN/TURN服务器发送请求消息, 然后 STUN/TURN服务器向 被叫端返回其公网地址; 被叫端将获得的地址进行排序并将其私网地址和公 网地址信息发送(例如通过 sip信令或其他服务器转发)给主叫端。这样, 主 叫端和被叫端都获得了双方的私网地址和公网地址信息。 For example, in step S110, the calling terminal first obtains its private network address and public network address information, for example, the calling end sends a request message to the STUN/TURN server, and then the STUN/TURN server sends the request message to the STUN/TURN server. The calling end returns its public network address; the calling end sorts the obtained address and sends its private network address and public network address information (for example, through sip signaling or other server forwarding) to the called end; the called end receives After obtaining the address information sent by the calling end, the private network address and the public network address information are also obtained. For example, the called end sends a request message to the STUN/TURN server, and then the STUN/TURN server returns its public network address to the called end. The called end sorts the obtained addresses and sends its private network address and public network address information (for example, through sip signaling or other server forwarding) to the calling end. In this way, both the calling end and the called end obtain the private network address and public network address information of both parties.
在歩骤 S120中,主叫端和被叫端对双方的私网地址和公网地址进行地址 配对, 并进行连通检测。如果连通检测成功, 则在歩骤 S140中主叫端与被叫 端利用双方的私网地址或公网地址建立连接。  In step S120, the calling end and the called end perform address pairing on the private network address and the public network address of both parties, and perform connectivity detection. If the connectivity detection succeeds, the calling end and the called end establish a connection by using the private network address or the public network address of both parties in step S140.
如果连通检测失败, 则在歩骤 S130中, 主叫端获取中继地址信息, 以通 过中继地址与被叫端建立连接。  If the connectivity detection fails, in step S130, the calling terminal obtains the relay address information to establish a connection with the called terminal through the relay address.
图 2示出了图 1所示的方法 1000中的歩骤 S130。 如图 2所示, 在歩骤 S1301 中, 主叫端向服务器 (以下将该服务器称为管理服务器) 发送中继地 址获取请求消息, 其中该管理服务器可为 TURN服务器, 其中可以存储有其 他各 TURN服务器的列表, 将其他各 TURN服务器当作中继服务器 (relay server)进行管理。 并且, 中继地址获取请求消息中可包括主叫端与被叫端的 公网地址。  Figure 2 shows a step S130 in the method 1000 shown in Figure 1. As shown in FIG. 2, in step S1301, the calling terminal sends a relay address obtaining request message to the server (hereinafter referred to as the management server), wherein the management server may be a TURN server, and other storages may be stored therein. A list of TURN servers, which manages each of the other TURN servers as a relay server. Moreover, the relay address obtaining request message may include a public network address of the calling end and the called end.
然后在歩骤 S1302中, 管理服务器选择出最优的中继地址。 例如, 管理 服务器接收到中继地址获取请求消息, 并根据其中包括的主叫端与被叫端的 公网地址选择最优的中继地址。  Then in step S1302, the management server selects the optimal relay address. For example, the management server receives the relay address acquisition request message and selects an optimal relay address according to the public network address of the calling end and the called end included therein.
作为一种选择, 管理服务器可以通过静态方式选择最优中继地址和 /或获 得中继地址排序列表,即进行 IP地址匹配以确定最优中继地址和 /或中继地址 排序列表。 例如, 管理服务器可以通过查询公网 IP地址库, 可以查询到 IP 地址所在的位置和 ISP的名称, 从而可以静态地选择一个距离主被叫双方均 较近的中转节点。  Alternatively, the management server may select the optimal relay address and/or obtain a relay address sorted list in a static manner, i.e., perform IP address matching to determine an optimal relay address and/or a relay address sorted list. For example, the management server can query the public IP address pool to query the location of the IP address and the name of the ISP, so that a transit node that is closer to both the calling and the called parties can be statically selected.
作为另外一种选择, 管理服务器可以通过动态方式选择最优中继地址和 / 或获得中继地址排序列表, 即根据获取的主叫端与被叫端的公网地址信息探 测各个中继服务器与主叫端和被叫端通信的时延和 /或丢包率, 然后还可以对 各个中继服务器的负载信息进行比较以确定最优中继地址和 /或中继地址排 序列表。 例如, 管理服务器可以将候选的多个中转节点 (Rl、 R2、 R3 ) 逐一 地与主叫端 (A) 与被叫端 (B)进行动态的通信检测, 比如可以测试和统计 一段时间内的时延和丢包率, 比如对 A— R1— B、 A— R2— B以及 A— R3— B 分别进行检测, 然后选取时延较小、 丢包率较低的中转节点作为媒体的最优 中转节点。 然后, 管理服务器将所选择的最优中继地址 (即最优中转节点的 地址) 和 /或中继地址排序列表发送给主叫端。 Alternatively, the management server may dynamically select an optimal relay address and/or obtain a relay address sorting list, that is, detect each relay server and the master according to the obtained public network address information of the calling end and the called end. The delay and/or packet loss rate of the communication between the called end and the called end, and then can also be The load information of each relay server is compared to determine an optimal relay address and/or relay address sorting list. For example, the management server may perform dynamic communication detection between the candidate multiple transit nodes (R1, R2, and R3) one by one with the calling end (A) and the called end (B), for example, testing and counting for a period of time. Delay and packet loss rate, for example, A-R1-B, A-R2-B, and A-R3-B are detected separately, and then the transit node with smaller delay and lower packet loss rate is selected as the media optimal. Transfer node. The management server then sends the selected optimal relay address (ie, the address of the optimal transit node) and/or the relay address sorted list to the calling end.
接着, 在歩骤 S1303中, 主叫端将最优中继地址和 /或中继地址排序列表 发送给被叫端以建立连接。 作为一种选择, 在歩骤 S1303中, 当被叫端接收 到主叫端发送的最优中继地址和 /或中继地址排序列表之后可以先进行连通 检测, 然后再建立连接。  Next, in step S1303, the calling end sends the optimal relay address and/or relay address sorting list to the called end to establish a connection. As an option, in step S1303, after the called end receives the optimal relay address and/or the relay address sorting list sent by the calling end, the connection detection may be performed first, and then the connection is established.
作为一种选择, 管理服务器可以对各中继服务器进行排序, 从而获得排 序列表, 并将该排序列表返回主叫端。 主叫端将该配序列表发送给被叫端。 然后主叫端与被叫端根据该配序列表进行连通测试以建立连接。  Alternatively, the management server can sort each relay server to obtain an ordered list and return the sorted list to the calling end. The calling end sends the allocation sequence table to the called end. Then, the calling end and the called end perform a connectivity test according to the allocation sequence table to establish a connection.
图 3示出了根据本申请的实施方式的穿越中转服务器的方法 1000的信令 流程图, 如图 3所示, 该方法中的管理服务器采用了动态方式来选择最优中 继地址和 /或获得中继地址排序列表, 即根据获取的主叫端与被叫端的公网地 址信息探测各个中继服务器与主叫端和被叫端通信的时延和 /或丢包率, 然后 还可以对各个中继服务器的负载信息进行比较以确定最优中继地址和 /或中 继地址排序列表。 首先主叫端向管理服务器发送中继地址收集请求消息; 然 后管理服务器获取请求消息中包含的主叫端与被叫端的公网地址, 并响应于 该请求消息向所管理的中继服务器发送测试消息; 各中继服务器响应于测试 消息分别与主叫端和被叫端进行通信从而获取 TTL (Time To Live ; 生存时 间) 等信息, 然后将获取的 TTL信息返回给管理服务器; 管理服务器对根据 各中继服务器返回的 TTL等信息将各中继服务器进行排序, 然后将最优中继 地址 (最优中继服务器的地址) 和 /或中继服务器的排序列表返回给主叫端; 主叫端将接收到的最优中继地址和 /或中继地址排序列表发送给被叫端; 主叫 端与被叫端根据最优中继地址和 /或排序列表进行连通测试以建立连接。  3 illustrates a signaling flow diagram of a method 1000 of traversing a relay server in accordance with an embodiment of the present application. As shown in FIG. 3, the management server in the method employs a dynamic manner to select an optimal relay address and/or Obtaining a relay address sorting list, that is, detecting a delay and/or a packet loss rate of communication between each relay server and the calling end and the called end according to the obtained public network address information of the calling end and the called end, and then also The load information of each relay server is compared to determine an optimal relay address and/or relay address sorting list. First, the calling end sends a relay address collection request message to the management server; then the management server acquires the public network address of the calling end and the called end contained in the request message, and sends a test to the managed relay server in response to the request message. Each relay server communicates with the calling end and the called end in response to the test message to obtain information such as TTL (Time To Live), and then returns the obtained TTL information to the management server; The information such as the TTL returned by each relay server is sorted by each relay server, and then the optimal relay address (the address of the optimal relay server) and/or the sorted list of the relay server are returned to the calling party; The terminal sends the received optimal relay address and/or relay address sorted list to the called end; the calling end and the called end perform connectivity test according to the optimal relay address and/or the sorted list to establish a connection.
通过以上实施方式, 将地址收集分为了两歩, 首先客户端仅收集私网地 址和公网地址信息, 然后进行连通检测; 只有当连通检测失败时, 主叫端才 向管理服务器发送请求消息以收集中继地址。管理服务器仅进行信令的交互, 管理多个用于媒体中继的 TURN服务器, 并且根据主叫端与被叫端的公网地 址信息选择最优的中继地址然后返回主叫端。 这样可从多个中继地址中选择 最优的中继地址, 改善 QoS。 Through the above implementation manner, the address collection is divided into two, first, the client only collects the private network. The address and public network address information are then detected for connectivity; only when the connectivity detection fails, the calling end sends a request message to the management server to collect the relay address. The management server only performs signaling interaction, manages multiple TURN servers for media relay, and selects an optimal relay address according to the public network address information of the calling end and the called end and then returns to the calling end. This can select the optimal relay address from multiple relay addresses to improve QoS.
图 4示出了根据本申请一个实施方式的 TURN服务器 30。 如图 4所示, 该 TURN服务器 30包括控制模块 31。控制模块 31在接收到终端发送的中继 地址获取请求消息后, 向该终端返回中继地址。 作为一种选择, 控制模块 31 在接收到终端发送的获取公网地址请求消息后, 向终端返回该终端的公网地 址。该服务器 30中可以存储有其他各 TURN服务器的列表,将其他各 TURN 服务器当作中继服务器 (relay server) 进行管理。  Figure 4 illustrates a TURN server 30 in accordance with one embodiment of the present application. As shown in FIG. 4, the TURN server 30 includes a control module 31. After receiving the relay address acquisition request message sent by the terminal, the control module 31 returns a relay address to the terminal. As an option, after receiving the public network address request message sent by the terminal, the control module 31 returns the public network address of the terminal to the terminal. The server 30 can store a list of other TURN servers, and manage each of the other TURN servers as a relay server.
如图 4所示, 管理服务器 30还可包括比较模块 32。 比较模块 32根据中 继地址获取请求消息将各个中继服务器与终端的连通质量进行比较以确定最 优中继地址和 /或中继地址排序列表。 控制模块 31 还用于向终端返回最优中 继地址和 /或中继地址排序列表。 作为一种选择, 中继地址获取请求消息中包 括主叫端与被叫端的公网地址信息。作为一种选择, 比较模块 32可以通过静 态方式选择最优中继地址和 /或获得中继地址排序列表,即进行 IP地址匹配以 确定最优中继地址和 /或中继地址排序列表。 例如, 比较模块 32可以通过查 询公网 IP地址库, 可以查询到 IP地址所在的位置和 ISP的名称, 从而可以 静态地选择一个距离主被叫双方均较近的中转节点。 作为另外一种选择, 比 较模块 32可以通过动态方式选择最优中继地址和 /或获得中继地址排序列表, 即根据获取的主叫端与被叫端的公网地址信息探测各个中继服务器与主叫端 和被叫端通信的时延和 /或丢包率, 然后还可以对各个中继服务器的负载信息 进行比较以确定最优中继地址和 /或中继地址排序列表。 例如, 比较模块 32 可将候选的多个中转节点(Rl、 R2、 R3 )逐一地与主叫端(A)与被叫端(B ) 进行动态的通信检测, 比如可以测试和统计一段时间内的时延和丢包率, 比 如对 A— R1— B、 A— R2— B以及 A— R3— B分别进行检测, 然后选取时延 较小、 丢包率较低的中转节点作为媒体的最优中转节点。 然后, 控制模块 31 将所得出的最优中继地址 (即最优中转节点的地址) 和 /或中继地址排序列表 发送给主叫端。 As shown in FIG. 4, the management server 30 can also include a comparison module 32. The comparing module 32 compares the quality of connectivity of each relay server with the terminal according to the relay address acquisition request message to determine an optimal relay address and/or a relay address sorting list. The control module 31 is further configured to return an optimal relay address and/or a relay address sorting list to the terminal. As an option, the relay address obtaining request message includes public network address information of the calling end and the called end. As an option, the comparison module 32 may select the optimal relay address in a static manner and/or obtain a relay address sorted list, ie, perform IP address matching to determine an optimal relay address and/or a relay address sorted list. For example, the comparison module 32 can query the location of the IP address and the name of the ISP by querying the public IP address database, so that a transit node that is closer to both the calling party and the called party can be statically selected. Alternatively, the comparing module 32 may dynamically select an optimal relay address and/or obtain a relay address sorting list, that is, detect each relay server according to the obtained public network address information of the calling end and the called end. The delay and/or packet loss rate of the communication between the calling end and the called end may then be compared to the load information of each relay server to determine an optimal relay address and/or a relay address sorting list. For example, the comparison module 32 can perform dynamic communication detection between the candidate plurality of transit nodes (R1, R2, and R3) one by one with the calling end (A) and the called end (B), for example, can test and count for a period of time. The delay and packet loss rate, for example, A-R1-B, A-R2-B, and A-R3-B are detected separately, and then the transit node with smaller delay and lower packet loss rate is selected as the media. Excellent transit node. Then, the control module 31 sorts the obtained optimal relay address (ie, the address of the optimal transit node) and/or the relay address. Sent to the calling party.
该服务器仅进行信令的交互, 管理多个用于媒体中继的 TURN服务器, 并且根据主叫端与被叫端的公网地址信息选择最优的中继地址然后返回主叫 图 5为根据本申请一个实施方式的通信终端 40。 如图 5所示, 通信终端 40包括处理模块 41和判断模块 42。 处理模块 41, 获取该通信终端与对方通 信终端的私网地址和公网地址信息。判断模块 42根据所获取地址信息判断是 否能够连通。 如果判断模块 42的判断结果为是, 则处理模块 41与对方通信 终端建立连接; 如果判断模块 42的判断结果为否, 则处理模块 41获取中继 地址。  The server only performs signaling interaction, manages multiple TURN servers for media relay, and selects an optimal relay address according to the public network address information of the calling end and the called end, and then returns to the calling party. A communication terminal 40 of one embodiment is applied. As shown in FIG. 5, the communication terminal 40 includes a processing module 41 and a determination module 42. The processing module 41 obtains the private network address and the public network address information of the communication terminal and the counterpart communication terminal. The judging module 42 judges whether or not it is possible to communicate based on the acquired address information. If the determination result of the determination module 42 is YES, the processing module 41 establishes a connection with the counterpart communication terminal; if the determination result of the determination module 42 is negative, the processing module 41 acquires the relay address.
例如,通信终端 40的处理模块 41首先获取该通信终端 40的私网地址和 公网地址信息, 例如向 STUN/TURN 服务器发送请求消息, 然后接收 STUN/TURN服务器返回的公网地址。处理模块 41还将获得的地址进行排序 并将获得的私网地址和公网地址信息发送 (例如通过 sip信令或其他服务器转 发)给对方通信终端。处理模块 41还接收对方通信终端返回的对方通信终端 的私网地址和公网地址信息。判断模块 42对双方通信终端的私网地址和公网 地址进行地址配对, 并判断是否能够连通。处理模块 41还用于当连通检测成 功时与对方通信终端利用双方的私网地址或公网地址建立连接; 以及当连通 检测失败时获取中继地址信息, 以通过中继地址与对方通信终端建立连接。  For example, the processing module 41 of the communication terminal 40 first acquires the private network address and public network address information of the communication terminal 40, for example, sends a request message to the STUN/TURN server, and then receives the public network address returned by the STUN/TURN server. The processing module 41 also sorts the obtained addresses and transmits the obtained private network address and public network address information (for example, by sip signaling or other server forwarding) to the counterpart communication terminal. The processing module 41 also receives the private network address and the public network address information of the counterpart communication terminal returned by the counterpart communication terminal. The judging module 42 performs address matching on the private network address and the public network address of the communication terminals of both parties, and determines whether it is possible to communicate. The processing module 41 is further configured to establish a connection with the counterpart communication terminal by using the private network address or the public network address of the two parties when the connectivity detection succeeds, and acquire the relay address information when the connectivity detection fails, to establish the relay address with the counterpart communication terminal. connection.
处理模块 41还用于当连通检测失败时, 向服务器发送中继地址获取请求 消息, 其中, 中继地址获取请求消息中可包括该通信中断 40与对方通信终端 的公网地址。处理模块 41还用于接收服务器返回的最优的中继地址, 并将最 优中继地址和 /或中继地址排序列表发送给对方通信终端以建立连接。 作为一 种选择, 判断模块 42还用于对最优中继地址和 /或中继地址排序列表进行连 本申请的实施方式还涉及相应的通信系统。 该系统可包括主叫端、 被叫 端和 STUN/TURN服务器。 在该系统中, 主叫端与被叫端分别获取各自的私 网地址和公网地址信息, 并根据所获得的地址信息进行连通检测。 如果能够 连通, 则主叫端与被叫端利用所获的私网地址和公网地址信息建立连接。 如 果不能够联通, 则主叫端获取中继地址 (relay candidate) 信息, 然后与被叫 端利用中继地址信息建立连接。 The processing module 41 is further configured to send a relay address acquisition request message to the server when the connectivity detection fails, where the relay address acquisition request message may include the communication interruption 40 and the public network address of the counterpart communication terminal. The processing module 41 is further configured to receive an optimal relay address returned by the server, and send an optimal relay address and/or a relay address sorting list to the counterpart communication terminal to establish a connection. As an option, the determining module 42 is further configured to perform an application for the optimal relay address and/or the relay address sorting list. The embodiment further relates to a corresponding communication system. The system can include a calling end, a called end, and a STUN/TURN server. In the system, the calling end and the called end respectively obtain respective private network addresses and public network address information, and perform connectivity detection according to the obtained address information. If the connection is possible, the calling end and the called end establish a connection by using the obtained private network address and public network address information. Such as If the communication cannot be made, the calling end obtains the relay candidate information, and then establishes a connection with the called end by using the relay address information.
例如, 主叫端获取其私网地址和公网地址信息。 例如主叫端向 STUN/TURN服务器发送请求消息。 STUN/TURN服务器向主叫端返回其公 网地址; 主叫端将获得的地址进行排序并将其私网地址和公网地址信息发送 (例如通过 sip信令或其他服务器转发)给被叫端;被叫端接收到主叫端发送 的地址信息后也获取自己的私网地址和公网地址信息, 例如被叫端向 STUN/TURN服务器发送请求消息, STUN/TURN服务器向被叫端返回其公 网地址; 被叫端将获得的地址进行排序并将其私网地址和公网地址信息发送 (例如通过 sip信令或其他服务器转发)给主叫端。这样, 主叫端和被叫端都 获得了双方的私网地址和公网地址信息。  For example, the calling end obtains its private network address and public network address information. For example, the calling party sends a request message to the STUN/TURN server. The STUN/TURN server returns its public network address to the calling end; the calling end sorts the obtained address and sends its private network address and public network address information (for example, through sip signaling or other server forwarding) to the called end. After receiving the address information sent by the calling end, the called end also obtains its own private network address and public network address information. For example, the called end sends a request message to the STUN/TURN server, and the STUN/TURN server returns to the called end. Public network address; The called end sorts the obtained addresses and sends its private network address and public network address information (for example, through sip signaling or other servers) to the calling end. In this way, both the calling end and the called end obtain the private network address and public network address information of both parties.
主叫端和被叫端对双方的私网地址和公网地址进行地址配对, 并进行连 通检测。 如果连通检测成功, 则主叫端与被叫端利用双方的私网地址或公网 地址建立连接。 如果连通检测失败, 则主叫端获取中继地址信息, 以通过中 继地址与被叫端建立连接。  The calling end and the called end perform address pairing on the private network address and the public network address of both parties, and perform connection detection. If the connectivity detection succeeds, the calling end and the called end establish a connection by using the private network address or the public network address of both parties. If the connectivity detection fails, the calling end obtains the relay address information to establish a connection with the called terminal through the relay address.
该系统还可包括服务器(以下称管理服务器)。 该管理服务器可为 TURN 服务器, 其中可以存储有其他各 TURN服务器的列表, 将其他各 TURN服务 器当作中继服务器(relay server)进行管理。管理服务器接收主叫端发送的中 继地址获取请求消息。 中继地址获取请求消息中可包括主叫端与被叫端的公 网地址。 管理服务器选择出最优的中继地址。 例如, 管理服务器接收到中继 地址获取请求消息, 并根据其中包括的主叫端与被叫端的公网地址选择最优 的中继地址。  The system may also include a server (hereinafter referred to as a management server). The management server can be a TURN server, which can store a list of other TURN servers, and manage each of the other TURN servers as a relay server. The management server receives the relay address acquisition request message sent by the calling party. The relay address obtaining request message may include a public network address of the calling end and the called end. The management server selects the optimal relay address. For example, the management server receives the relay address acquisition request message and selects an optimal relay address according to the public network address of the calling end and the called end included therein.
作为一种选择, 管理服务器可以通过静态方式选择最优中继地址和 /或获 得中继地址排序列表,即进行 IP地址匹配以确定最优中继地址和 /或中继地址 排序列表。 例如, 管理服务器可以通过查询公网 IP地址库, 可以查询到 IP 地址所在的位置和 ISP的名称, 从而可以静态地选择一个距离主被叫双方均 较近的中转节点。  Alternatively, the management server may select the optimal relay address and/or obtain a relay address sorted list in a static manner, i.e., perform IP address matching to determine an optimal relay address and/or a relay address sorted list. For example, the management server can query the public IP address pool to query the location of the IP address and the name of the ISP, so that a transit node that is closer to both the calling and the called parties can be statically selected.
作为另外一种选择, 管理服务器可以通过动态方式选择最优中继地址和 / 或获得中继地址排序列表, 即根据获取的主叫端与被叫端的公网地址信息探 测各个中继服务器与主叫端和被叫端通信的时延和 /或丢包率, 然后还可以对 各个中继服务器的负载信息进行比较以确定最优中继地址和 /或中继地址排 序列表。 例如, 管理服务器可以将候选的多个中转节点 (Rl、 R2、 R3 ) 逐一 地与主叫端 (A) 与被叫端 (B)进行动态的通信检测, 比如可以测试和统计 一段时间内的时延和丢包率, 比如对 A— R1— B、 A— R2— B以及 A— R3— B 分别进行检测, 然后选取时延较小、 丢包率较低的中转节点作为媒体的最优 中转节点。 然后, 管理服务器将所选择的最优中继地址 (即最优中转节点的 地址) 和 /或中继地址排序列表发送给主叫端。 Alternatively, the management server may dynamically select an optimal relay address and/or obtain a relay address sorting list, that is, according to the obtained public network address information of the calling end and the called end. Measure the delay and/or packet loss rate of each relay server to communicate with the calling and called terminals, and then compare the load information of each relay server to determine the optimal relay address and/or relay address. Sort the list. For example, the management server may perform dynamic communication detection between the candidate multiple transit nodes (R1, R2, and R3) one by one with the calling end (A) and the called end (B), for example, testing and counting for a period of time. Delay and packet loss rate, for example, A-R1-B, A-R2-B, and A-R3-B are detected separately, and then the transit node with smaller delay and lower packet loss rate is selected as the media optimal. Transfer node. The management server then sends the selected optimal relay address (ie, the address of the optimal transit node) and/or the relay address sorted list to the calling end.
主叫端还将最优中继地址和 /或中继地址排序列表发送给被叫端以建立 连接。 作为一种选择, 当被叫端接收到主叫端发送的最优中继地址和 /或中继 地址排序列表之后可以先进行连通检测, 然后再建立连接。  The calling end also sends an optimal relay address and/or relay address sorting list to the called end to establish a connection. As an option, after the called end receives the optimal relay address and/or the relay address sorting list sent by the calling end, the connected terminal may perform connectivity detection before establishing a connection.
作为一种选择, 管理服务器可以对各中继服务器进行排序, 从而获得排 序列表, 并将该排序列表返回主叫端。 主叫端将该配序列表发送给被叫端。 然后主叫端与被叫端根据该配序列表进行连通测试以建立连接。  Alternatively, the management server can sort each relay server to obtain an ordered list and return the sorted list to the calling end. The calling end sends the allocation sequence table to the called end. Then, the calling end and the called end perform a connectivity test according to the allocation sequence table to establish a connection.
以下以管理服务器采用了动态方式来选择最优中继地址和 /或获得中继 地址排序列表时为例进行说明。 也就是管理服务器根据获取的主叫端与被叫 端的公网地址信息探测各个中继服务器与主叫端和被叫端通信的时延和 /或 丢包率, 然后还可以对各个中继服务器的负载信息进行比较以确定最优中继 地址和 /或中继地址排序列表。 首先主叫端向管理服务器发送中继地址收集请 求消息;然后管理服务器获取请求消息中包含的主叫端与被叫端的公网地址, 并响应于该请求消息向所管理的中继服务器发送测试消息; 各中继服务器响 应于测试消息分别与主叫端和被叫端进行通信从而获取 TTL (Time To Live ; 生存时间) 等信息, 然后将获取的 TTL信息返回给管理服务器; 管理服务器 对根据各中继服务器返回的 TTL等信息将各中继服务器进行排序, 然后将最 优中继地址 (最优中继服务器的地址) 和 /或中继服务器的排序列表返回给主 叫端; 主叫端将接收到的最优中继地址和 /或中继地址排序列表发送给被叫 端; 主叫端与被叫端根据最优中继地址和 /或排序列表进行连通测试以建立连 接。  The following is an example in which the management server adopts a dynamic manner to select an optimal relay address and/or obtain a relay address sorting list. That is, the management server detects the delay and/or packet loss rate of communication between each relay server and the calling end and the called end according to the obtained public network address information of the calling end and the called end, and then can also access each relay server. The load information is compared to determine an optimal relay address and/or relay address sorted list. First, the calling terminal sends a relay address collection request message to the management server; then the management server acquires the public network address of the calling end and the called end contained in the request message, and sends a test to the managed relay server in response to the request message. Each relay server communicates with the calling end and the called end in response to the test message to obtain information such as TTL (Time To Live), and then returns the obtained TTL information to the management server; The information such as the TTL returned by each relay server is sorted by each relay server, and then the optimal relay address (the address of the optimal relay server) and/or the sorted list of the relay server are returned to the calling party; The terminal sends the received optimal relay address and/or relay address sorted list to the called end; the calling end and the called end perform connectivity test according to the optimal relay address and/or the sorted list to establish a connection.
以上所述仅为本申请的优选实施方式,并非因此限制本申请的专利范围, 凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换, 或直接 或间接运用在其它相关的技术领域,均同理包括在本申请的专利保护范围内。 The above description is only a preferred embodiment of the present application, and thus does not limit the scope of patents of the present application. The equivalent structure or equivalent process transformations made by the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields, are all included in the scope of patent protection of the present application.

Claims

权利 要求 书 Claim
1. 一种穿越中转服务器的方法, 包括: 1. A method of traversing a relay server, comprising:
主叫端与被叫端分别获取各自的私网地址和公网地址信息;  The calling end and the called end respectively obtain respective private network addresses and public network address information;
根据所获取的地址信息判断是否能够连通;  Whether it is possible to connect according to the obtained address information;
如果判断结果为是, 则根据所获取的地址信息建立连接; 以及  If the result of the determination is yes, a connection is established according to the acquired address information;
如果判断结果为否, 所述主叫端获取中继地址信息以通过所述中继地址 与所述被叫端建立连接。  If the judgment result is no, the calling terminal acquires relay address information to establish a connection with the called terminal through the relay address.
2. 如权利要求 1所述的方法, 其中, 当判断结果为否时所述方法还包括: 所述主叫端向服务器发送中继地址获取请求消息;  The method of claim 1, wherein the method further comprises: the calling end sending a relay address acquisition request message to the server;
所述服务器根据所接收到的中继地址获取请求消息返回中继地址信息; 所述主叫端将所接收到的中继地址信息发送给所述被叫端; 以及 所述主叫端与被叫端根据所获得的中继地址信息建立连接。  The server returns relay address information according to the received relay address acquisition request message; the calling terminal sends the received relay address information to the called terminal; and the calling end is The calling end establishes a connection according to the obtained relay address information.
3. 如权利要求 2所述的方法, 其中, 所述中继地址获取请求消息包括所 述主叫端与被叫端的公网地址信息。  The method according to claim 2, wherein the relay address acquisition request message includes public network address information of the calling end and the called end.
4. 如权利要求 3所述的方法, 其中, 所述服务器根据所接收到的中继地 址获取请求消息返回中继地址信息的歩骤包括:  4. The method according to claim 3, wherein the step of the server returning the relay address information according to the received relay address acquisition request message comprises:
所述服务器根据接收到中继地址获取请求消息以获取所述主叫端与被叫 端的公网地址信息;  Receiving, by the server, a relay address acquisition request message to obtain public network address information of the calling end and the called end;
根据获取的所述主叫端与被叫端的公网地址信息进行 IP地址匹配以确定 最优中继地址和 /或中继地址排序列表; 以及  Performing IP address matching according to the obtained public network address information of the calling end and the called end to determine an optimal relay address and/or a relay address sorting list;
返回所述最优中继地址和 /或中继地址排序列表。  Returns a sorted list of the optimal relay address and/or relay address.
5. 如权利要求 3所述的方法, 其中, 所述服务器根据所接收到的中继地 址获取请求消息返回中继地址的歩骤包括:  5. The method according to claim 3, wherein the step of the server returning a relay address according to the received relay address acquisition request message comprises:
所述服务器根据接收到中继地址获取请求消息以获取所述主叫端与被叫 端的公网地址信息;  Receiving, by the server, a relay address acquisition request message to obtain public network address information of the calling end and the called end;
根据获取的所述主叫端与被叫端的公网地址信息探测各个中继服务器与 所述主叫端和被叫端通信的时延和 /或丢包率,以确定最优中继地址和 /或中继 地址排序列表; 以及 Determining, according to the obtained public network address information of the calling end and the called end, a delay and/or a packet loss rate of each relay server to communicate with the calling end and the called end, to determine an optimal relay address and / or relay a sorted list of addresses;
返回所述最优中继地址和 /或中继地址排序列表。  Returns a sorted list of the optimal relay address and/or relay address.
6. 如权利要求 5所述的方法, 其中, 所述根据获取的所述主叫端与被叫 端的公网地址信息探测各个中继服务器与所述主叫端和被叫端通信的时延和 /或丢包率, 以确定最优中继地址和 /或中继地址排序列表的歩骤还包括:  The method according to claim 5, wherein the detecting, according to the obtained public network address information of the calling end and the called end, detecting a delay of communication between each relay server and the calling end and the called end And/or the packet loss rate, the steps for determining the optimal relay address and/or the relay address sorting list further include:
对各个中继服务器的负载信息进行比较以确定最优中继地址和 /或中继 地址排序列表; 以及  Comparing the load information of each relay server to determine an optimal relay address and/or a relay address sorting list;
返回所述最优中继地址和 /或中继地址排序列表。  Returns a sorted list of the optimal relay address and/or relay address.
7. —种 TURN服务器, 包括:  7. A TURN server, including:
控制模块,接收所述终端发送的中继地址获取请求消息并返回中继地址。 The control module receives the relay address acquisition request message sent by the terminal and returns a relay address.
8. 如权利要求 7所述的服务器, 还包括: 8. The server of claim 7, further comprising:
比较模块, 根据所述中继地址获取请求消息对各中继服务器与所述终端 的连通质量进行比较以确定最优中继地址和 /或中继地址排序列表; 以及  And comparing, by the comparison module, the connectivity quality of each relay server and the terminal according to the relay address acquisition request message to determine an optimal relay address and/or a relay address sorting list;
所述控制模块还用于向所述终端返回所述最优中继地址和 /或中继地址 排序列表。  The control module is further configured to return the optimal relay address and/or relay address sorting list to the terminal.
9. 如权利要求 7所述的服务器, 其中, 所述中继地址获取请求消息包括 主叫端与被叫端的公网地址信息; 以及  The server according to claim 7, wherein the relay address acquisition request message includes public network address information of a calling end and a called end;
比较模块还用于根据所述主叫端与被叫端的公网地址信息进行 IP地址匹 配以确定最优中继地址和 /或中继地址排序列表; 或者  The comparison module is further configured to perform an IP address matching according to the public network address information of the calling end and the called end to determine an optimal relay address and/or a relay address sorting list; or
根据所述主叫端与被叫端的公网地址信息对各个中继服务器的负载信息 进行比较以确定最优中继地址和 /或中继地址排序列表。  The load information of each relay server is compared according to the public network address information of the calling end and the called end to determine an optimal relay address and/or a relay address sorting list.
10. 一种通信终端, 包括:  10. A communication terminal comprising:
处理模块, 获取所述通信终端与对方通信终端的私网地址和公网地址信 息; 以及  Processing module, acquiring private network address and public network address information of the communication terminal and the communication terminal of the opposite party;
判断模块, 根据所获取地址信息判断是否能够连通;  The determining module determines whether the connection is possible according to the obtained address information;
如果判断结果为是, 则所述处理模块与所述对方通信终端建立连接; 如果判断结果为否, 所述处理模块获取中继地址信息。  If the determination result is yes, the processing module establishes a connection with the counterpart communication terminal; if the determination result is no, the processing module acquires the relay address information.
11. 如权利要求 10所述的通信终端, 当判断结果为否时, 所述处理模块 向服务器发送中继地址获取请求消息,接收所述服务器返回的中继地址信息, 将所述中继地址信息发送给所述对方通信终端并与其建立连接。 11. The communication terminal according to claim 10, when the determination result is no, the processing module sends a relay address acquisition request message to the server, and receives relay address information returned by the server, Sending the relay address information to the counterpart communication terminal and establishing a connection therewith.
12. 如权利要求 10所述的通信终端, 其中, 所述中继地址获取请求消息 包括所述通信终端与对方通信终端的公网地址信息。  The communication terminal according to claim 10, wherein the relay address acquisition request message includes public network address information of the communication terminal and the counterpart communication terminal.
13. 一种通信系统, 包括:  13. A communication system comprising:
主叫端与被叫端, 分别获取各自的私网地址公网地址信息, 根据所获取 的地址信息判断是否能够连通, 如果判断结果为是, 则根据所获取的地址信 息建立连接, 如果判断结果为否, 所述主叫端向服务器获取中继地址信息; 所述服务器, 向所述主叫端返回所述中继地址。  The calling end and the called end respectively obtain the public network address information of the private network address, and determine whether the connection is possible according to the obtained address information. If the judgment result is yes, the connection is established according to the obtained address information, if the judgment result is If not, the calling terminal obtains relay address information from the server; the server returns the relay address to the calling terminal.
14. 如权利要求 13所述的系统, 其中, 当判断结果为否时所述主叫端向 服务器还用于向所述服务器发送中继地址获取请求消息, 并接收所述服务器 返回的中继地址信息, 然后将所接收到的中继地址信息发送给所述被叫端, 并与被叫端根据所获得的中继地址信息建立连接。  14. The system according to claim 13, wherein, when the determination result is negative, the calling terminal is further used by the server to send a relay address acquisition request message to the server, and receives a relay returned by the server. The address information is then sent to the called end, and the connected end establishes a connection with the called end according to the obtained relay address information.
15. 如权利要求 14所述的系统, 其中, 所述中继地址获取请求消息包括 所述主叫端与被叫端的公网地址信息。  The system according to claim 14, wherein the relay address acquisition request message includes public network address information of the calling end and the called end.
16. 如权利要求 15所述的系统, 其中, 所述服务器还用于根据接收到中 继地址获取请求消息以获取所述主叫端与被叫端的公网地址信息, 并根据获 取的公网地址信息进行 IP地址匹配, 确定出最优中继地址和 /或中继地址排序 列表。  The system according to claim 15, wherein the server is further configured to obtain the public network address information of the calling end and the called end according to the received relay address obtaining request message, and according to the obtained public network The address information is matched by the IP address to determine an optimal relay address and/or a relay address sorting list.
17. 如权利要求 15所述的系统, 其中, 所述服务器还用于根据接收到中 继地址获取请求消息以获取所述主叫端与被叫端的公网地址信息, 根据获取 的公网地址信息探测各个中继服务器与所述主叫端和被叫端通信的时延和 / 或丢包率, 以确定最优中继地址和 /或中继地址排序列表。  The system according to claim 15, wherein the server is further configured to obtain the public network address information of the calling end and the called end according to the received relay address obtaining request message, according to the obtained public network address. The information detects the delay and/or packet loss rate of each relay server communicating with the calling and called terminals to determine an optimal relay address and/or relay address sorting list.
18. 如权利要求 17所述的系统, 其中, 所述服务器还用于对各个中继服 务器的负载信息进行比较以确定最优中继地址和 /或中继地址排序列表。  18. The system according to claim 17, wherein the server is further configured to compare load information of each relay server to determine an optimal relay address and/or a relay address sorting list.
PCT/CN2012/082125 2011-11-11 2012-09-27 Method for traversing the translator server and the corresponding server, terminal, system WO2013067870A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110356744.3 2011-11-11
CN201110356744.3A CN103108054B (en) 2011-11-11 Pass through method and corresponding server, terminal and the system of transfer server

Publications (1)

Publication Number Publication Date
WO2013067870A1 true WO2013067870A1 (en) 2013-05-16

Family

ID=48288511

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/082125 WO2013067870A1 (en) 2011-11-11 2012-09-27 Method for traversing the translator server and the corresponding server, terminal, system

Country Status (1)

Country Link
WO (1) WO2013067870A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9826044B2 (en) 2013-10-23 2017-11-21 Qualcomm Incorporated Peer-to-peer communication for symmetric NAT

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968226A (en) * 2006-04-18 2007-05-23 华为技术有限公司 Method for crossing network address conversion in point-to-point communication
CN101102310A (en) * 2007-07-25 2008-01-09 中国科学院沈阳计算技术研究所有限公司 SIP soft switching system supporting P2P media transmission and its implementation method
US20100217874A1 (en) * 2009-02-25 2010-08-26 Microsoft Corporation Tunneling of remote desktop sessions through firewalls
CN102035900A (en) * 2009-09-24 2011-04-27 日电(中国)有限公司 NAT (network address translation) traversal method, system and relay server by relay mode

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968226A (en) * 2006-04-18 2007-05-23 华为技术有限公司 Method for crossing network address conversion in point-to-point communication
CN101102310A (en) * 2007-07-25 2008-01-09 中国科学院沈阳计算技术研究所有限公司 SIP soft switching system supporting P2P media transmission and its implementation method
US20100217874A1 (en) * 2009-02-25 2010-08-26 Microsoft Corporation Tunneling of remote desktop sessions through firewalls
CN102035900A (en) * 2009-09-24 2011-04-27 日电(中国)有限公司 NAT (network address translation) traversal method, system and relay server by relay mode

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9826044B2 (en) 2013-10-23 2017-11-21 Qualcomm Incorporated Peer-to-peer communication for symmetric NAT

Also Published As

Publication number Publication date
CN103108054A (en) 2013-05-15

Similar Documents

Publication Publication Date Title
US11075802B2 (en) Methods for dynamic router configuration in a mesh network
US8560607B2 (en) Method based on the combination of the UPnP and STUN for NAT traversal
US7620033B2 (en) Method for optimal path selection in traversal of packets through network address translators
US20100088427A1 (en) Selective Routing of Data Transmission Between Clients
CN101699801B (en) Data transmission method and virtual peer-to-peer network for data transmission
EP2676424B1 (en) System and method for monitoring network link quality
CN104660952B (en) Video conference communication method and system
WO2006089481A1 (en) A method for controlling the direct penetrate communication two parts of which are under the different nats and the device thereof
WO2012171169A1 (en) Communications method and load balancer
WO2013040970A1 (en) Relay node selecting method and device
KR102346109B1 (en) Load balancing apparatus and method
US8601140B2 (en) Method for acquiring traversal resource, peer to peer node and peer to peer system
Perényi et al. Enhanced skype traffic identification
CN101489188B (en) Gateway discovery method in multimedia sensor network access technique
EP3025457A1 (en) Network configuration using service identifier
WO2013067870A1 (en) Method for traversing the translator server and the corresponding server, terminal, system
Phuoc et al. NAT traversal techniques in peer-to-peer networks
US8812694B2 (en) Dialog establishment over a peer-to-peer architecture
Choumas et al. Exploiting OpenFlow resources towards a content-centric LAN
WO2016161765A1 (en) Method and apparatus for sending, transferring and acquiring capability
CN103108054B (en) Pass through method and corresponding server, terminal and the system of transfer server
CA2799507C (en) Dialog establishment over a peer-to-peer architecture
JP6689150B2 (en) Gateway device and transfer method
CN102970756B (en) S-CSCF (Serving-Call Session Control Function) allocation method based on service capability P2P (Peer-to-Peer) distribution
my Father RIP

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12848413

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12848413

Country of ref document: EP

Kind code of ref document: A1