IP Library › Granted Patent US 12,641,066
Granted Patent B2
US 12,641,066 · App. 18/573,556 · Granted May 26, 2026

Communication based on relay cluster

Inventors: Ke Zeng (Hangzhou, CN); Yong Chen (Hangzhou, CN); Hongquan Zhang (Hangzhou, CN); Lingtao Kong (Hangzhou, CN); Han Xiao (Hangzhou, CN); Xiaokang Qin (Hangzhou, CN); Bin Yang (Hangzhou, CN)
Assignee: Alipay (Hangzhou) Information Technology Co., Ltd.
H04L63/0485H04L45/745H04L47/125H04L61/2589
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,641,066
App. No.
18/573,556
Granted
May 26, 2026
Kind
B2
Abstract

Embodiments of this specification provide a communication method and apparatus based on a relay cluster. The relay cluster includes a load balancing server and at least two relay servers. The communication method includes: receiving a relay request packet sent by a client, where the relay request packet includes a transaction identifier, and the transaction identifier includes a mode field and a routing information field; acquiring routing information of a first relay server of the at least two relay servers based on a value of the mode field and a value of the routing information field in the relay request packet; and sending a relay allocation packet carrying the routing information of the first relay server to the client, so that the client establishes a relay channel based on the routing information of the first relay server.

Claims (77)

1 . A communication method based on a relay cluster, wherein the relay cluster comprises a load balancing server and at least two relay servers; the communication method comprises:

receiving a relay request packet sent by a client, wherein the relay request packet comprises a transaction identifier, and the transaction identifier comprises a mode field and a routing information field;

acquiring routing information of a first relay server of the at least two relay servers based on a value of the mode field and a value of the routing information field in the relay request packet; and

sending a relay allocation packet carrying the routing information of the first relay server to the client, so that the client establishes a relay channel based on the routing information of the first relay server;

wherein the method further comprises:

receiving a data packet sent by the client through the relay channel, wherein the data packet comprises the mode field and the routing information field in the transaction identifier; and

sending the data packet to the first relay server based on a value of the mode field and a value of the routing information field in the data packet;

wherein in the data packet, the value of the mode field represents a specific address mode, the routing information field comprises an encrypted address field and an encrypted port field, a value of the encrypted address field is an encrypted intranet IP address of the first relay server, and a value of the encrypted port field is encrypted information about a first port;

the sending the data packet to the first relay server comprises:

decrypting the encrypted address field and the encrypted port field in the data packet separately based on a pre-acquired decryption key; and

after it is learned through parsing that, in the data packet, the value of the mode field represents a specific address mode, sending the data packet to the first port of the first relay server based on the intranet IP address of the first relay server and the information about the first port that are obtained through decryption.

2 . The method according to claim 1 , wherein

the routing information of the first relay server comprises an encrypted intranet IP address of the first relay server and encrypted information about a first port;

the intranet IP address is an IP address of the first relay server in an intranet formed by the relay cluster; the first port is a relay port allocated to the client on the first relay server.

3 . The method according to claim 2 , wherein the relay allocation packet comprises an encrypted relay address;

the encrypted relay address comprises an encrypted address field and an encrypted port field;

in the relay allocation packet, the encrypted address field is used to carry the encrypted intranet IP address of the first relay server, and the encrypted port field is used to carry the encrypted information about the first port.

4 . The method according to claim 3 , wherein the encrypted relay address further comprises an attribute type field and/or a reserved field;

in the relay allocation packet, a value of the attribute type field represents secure routing information.

5 . The method according to claim 1 , wherein the client is an initiator of establishing the relay channel;

in the relay request packet, the value of the mode field represents an arbitrary mode, and the value of the routing information field is a random string;

the acquiring routing information of a first relay server of the at least two relay servers comprises:

when it is learned through parsing that, in the relay request packet, the value of the mode field represents an arbitrary mode, and the value of the routing information field is a random string, selecting the first relay server from the at least two relay servers according to a load balancing rule;

sending the relay request packet to a default service port of the first relay server; and

receiving the routing information sent by the first relay server.

6 . The method according to claim 1 , wherein the client is a responder of establishing the relay channel;

in the relay request packet, the value of the mode field represents a specific server mode, the routing information field comprises an encrypted address field, and a value of the encrypted address field is an encrypted intranet IP address of the first relay server;

the acquiring routing information of a first relay server of the at least two relay servers comprises:

decrypting the encrypted address field in the relay request packet based on a pre-acquired decryption key to obtain the intranet IP address of the first relay server;

after it is learned through parsing that, in the relay request packet, the value of the mode field represents a specific server mode, sending the relay request packet to a default service port of the first relay server based on the obtained intranet IP address; and

receiving the routing information sent by the first relay server.

7 . The method according to claim 1 , wherein each packet is a packet based on the Traversal Using Relays around NAT (TURN) protocol.

8 . A communication method based on a relay cluster, wherein the relay cluster comprises a load balancing server and at least two relay servers; the at least two relay servers comprise a first relay server; the communication method comprises:

sending a relay request packet to the load balancing server, wherein the relay request packet comprises a transaction identifier, and the transaction identifier comprises a mode field and a routing information field, so that the load balancing server acquires routing information of the first relay server based on a value of the mode field and a value of the routing information field in the relay request packet;

acquiring the routing information of the first relay server from a relay allocation packet sent by the load balancing server;

establishing a relay channel based on the routing information of the first relay server; and

sending a data packet to the load balancing server through the relay channel, so that the load balancing server forwards the data packet to the first relay server based on the value of the mode field and the value of the routing information field in the transaction identifier comprised in the data packet;

wherein the routing information field comprises an encrypted address field and an encrypted port field; the sending a data packet to the load balancing server comprises:

setting the value of the mode field in the data packet to represent a specific address mode;

setting a value of the encrypted address field in the data packet to an encrypted intranet IP address of the first relay server;

setting a value of the encrypted port field in the data packet to encrypted information about a first port; and then

sending the data packet to the load balancing server.

9 . The method according to claim 8 , wherein the routing information of the first relay server comprises an encrypted intranet IP address of the first relay server and encrypted information about a first port of the first relay server;

the intranet IP address is an IP address of the first relay server in an intranet formed by the relay cluster; the first port is a relay port allocated to the client on the first relay server.

10 . The method according to claim 9 , wherein the relay allocation packet comprises an encrypted relay address;

the encrypted relay address comprises an encrypted address field and an encrypted port field;

the acquiring routing information of the first relay server comprises:

obtaining the encrypted intranet IP address of the first relay server from the encrypted address field of the relay allocation packet, and obtaining the encrypted information about the first port from the encrypted port field of the relay allocation packet.

11 . The method according to claim 8 , wherein the client is an initiator of establishing the relay channel;

the sending a relay request packet to the load balancing server comprises:

setting the value of the mode field in the relay request packet to represent an arbitrary mode, and setting the value of the routing information field in the relay request packet to a random string, and then sending the relay request packet to the load balancing server.

12 . The method according to claim 8 , wherein the client is a responder of establishing the relay channel, and the routing information field comprises an encrypted address field;

the sending a relay request packet to the load balancing server comprises:

setting the value of the mode field in the relay request packet to represent a specific server mode, and setting a value of the encrypted address field in the relay request packet to an encrypted intranet IP address of the first relay server, and then sending the relay request packet to the load balancing server.

13 . The method according to claim 8 , wherein each packet is a packet based on the Traversal Using Relays around NAT (TURN) protocol.

14 . A computing device, comprising a memory and a processor, wherein the memory stores executable instructions that, in response to execution by the processor, cause the processor to:

receive a relay request packet sent by a client, wherein the relay request packet comprises a transaction identifier, and the transaction identifier comprises a mode field and a routing information field;

acquire routing information of a first relay server of the at least two relay servers based on a value of the mode field and a value of the routing information field in the relay request packet; and

send a relay allocation packet carrying the routing information of the first relay server to the client, so that the client establishes a relay channel based on the routing information of the first relay server;

wherein the memory further stores executable instructions that, in response to execution by the processor, cause the processor to:

receive a data packet sent by the client through the relay channel, wherein the data packet comprises the mode field and the routing information field in the transaction identifier; and

send the data packet to the first relay server based on a value of the mode field and a value of the routing information field in the data packet;

wherein in the data packet, the value of the mode field represents a specific address mode, the routing information field comprises an encrypted address field and an encrypted port field, a value of the encrypted address field is an encrypted intranet IP address of the first relay server, and a value of the encrypted port field is encrypted information about a first port;

the sending the data packet to the first relay server comprises:

decrypting the encrypted address field and the encrypted port field in the data packet separately based on a pre-acquired decryption key; and

after it is learned through parsing that, in the data packet, the value of the mode field represents a specific address mode, sending the data packet to the first port of the first relay server based on the intranet IP address of the first relay server and the information about the first port that are obtained through decryption.

15 . A non-transitory computer-readable storage medium comprising instructions stored therein that, when executed by a processor of a computing device, cause the processor to:

receive a relay request packet sent by a client, wherein the relay request packet comprises a transaction identifier, and the transaction identifier comprises a mode field and a routing information field;

acquire routing information of a first relay server of the at least two relay servers based on a value of the mode field and a value of the routing information field in the relay request packet; and

send a relay allocation packet carrying the routing information of the first relay server to the client, so that the client establishes a relay channel based on the routing information of the first relay server;

wherein instructions, when executed by the processor of the computing device, further cause the processor to:

receive a data packet sent by the client through the relay channel, wherein the data packet comprises the mode field and the routing information field in the transaction identifier; and

send the data packet to the first relay server based on a value of the mode field and a value of the routing information field in the data packet;

wherein in the data packet, the value of the mode field represents a specific address mode, the routing information field comprises an encrypted address field and an encrypted port field, a value of the encrypted address field is an encrypted intranet IP address of the first relay server, and a value of the encrypted port field is encrypted information about a first port;

the sending the data packet to the first relay server comprises:

decrypting the encrypted address field and the encrypted port field in the data packet separately based on a pre-acquired decryption key; and

after it is learned through parsing that, in the data packet, the value of the mode field represents a specific address mode, sending the data packet to the first port of the first relay server based on the intranet IP address of the first relay server and the information about the first port that are obtained through decryption.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 16, 2026
From: ZHANG, HONGQUAN
To: ALIPAY (HANGZHOU) INFORMATION TECHNOLOGY CO., LTD.
Reel/Frame 074391/0455 →
Priority Claims (1)
CN 202111187242.2 · Oct 12, 2021 · national
Continuity (1)
Related Publication 20240244040A1 · Jul 18, 2024
References Cited (30)
US 8832179B2 · Owen · 2014 [cited by examiner]
US 10129412B1 · Singh · 2018 [cited by examiner]
US 11263059B2 · Fry · 2022 [cited by examiner]
US 20030120734A1 · Kagan · 2003 [cited by examiner]
US 20060046713A1 · Yokota · 2006 [cited by examiner]
US 20150067033A1 · Martinsen · 2015 [cited by examiner]
US 20180165040A1 · Matsuda · 2018 [cited by examiner]
US 20200081746A1 · Fry · 2020 [cited by examiner]
US 20220393856A1 · Goel · 2022 [cited by examiner]
US 20230093278A1 · Majila · 2023 [cited by examiner]
CN 102014115B · 2013 [cited by examiner]
CN 103414799A · 2013 [cited by applicant]
CN 103636173B · 2017 [cited by examiner]
CN 111935314A · 2020 [cited by examiner]
CN 115529478B · 2025 [cited by examiner]
EP 2408153A1 · 2012 [cited by examiner]
EP 2408153B1 · 2018 [cited by examiner]
EP 2787692B1 · 2019 [cited by examiner]
EP 4047833A1 · 2022 [cited by examiner]
FR 2886795A1 · 2006 [cited by examiner]
JP 2012165269A · 2012 [cited by examiner]
RU 2010152823A · 2012 [cited by examiner]
TW I474683B · 2015 [cited by examiner]
WO WO2011035528A1 · 2011 [cited by examiner]
WO WO2012107983A1 · 2012 [cited by examiner]
WO WO2012120767A1 · 2012 [cited by examiner]
WO WO2016205560A1 · 2016 [cited by examiner]
WO WO2017187260A1 · 2017 [cited by examiner]
The International Search Report and Written Opinion of the International Searching Authority for International Application No. PCT/CN2022/124647 mailed on Jan. 4, 2023. [cited by applicant]
Yudai Kaneko et al. “2018 sixth international symposium on computing and metworking 1-25 workshops. IEEE”, “DHT Clustering for Load Balancing Considering Blockchain Data Size”, Nov. 28, 2018. [cited by applicant]