Communication system, method, and apparatus
A communication system, method, and apparatus are provided. The communication system includes a first edge cloud deploying first group of user service nodes (USNs) that form a hash ring corresponding to the first edge cloud and a second edge cloud deploying a second group of USNs that form a hash ring corresponding to the second edge cloud. A USN is configured to provide a service for a terminal device corresponding to the USN. The communication system may further include a mapping system including one or more distributed mapping nodes that store information about the USNs on the first and second edge cloud. The information about a USN includes identification information of the USN and identification information of the terminal device corresponding to the USN. When the mapping system includes a plurality of distributed mapping nodes, the mapping nodes form one or more hash rings corresponding to the mapping system.
1 . A communication method, comprising:
receiving, by a first user service node (USN), first information from a first terminal device, wherein the first USN belongs to a first group of USNs deployed on a first edge cloud, the first group of USNs form a hash ring corresponding to the first edge cloud, and the first information comprises identification information of a second terminal device;
determining, by the first USN based on the identification information of the second terminal device, identification information of a USN corresponding to the second terminal device; and
when the USN corresponding to the second terminal device is a second USN, sending, by the first USN, the first information to the second USN through the hash ring corresponding to the first edge cloud, wherein the second USN belongs to the first group of USNs; and
when the USN corresponding to the second terminal device is a third USN, sending, by the first USN, the first information to the third USN through a channel between the first edge cloud and a second edge cloud and a hash ring corresponding to the second edge cloud, wherein the third USN belongs to a second group of USNs deployed on the second edge cloud, and the second group of USNs form the hash ring corresponding to the second edge cloud.
2 . The method according to claim 1 , wherein the determining, based on the identification information of the second terminal device, of the identification information of the USN corresponding to the second terminal device comprises:
determining, by the first USN based on prestored information about one or more USNs, the identification information of the USN corresponding to the second terminal device, wherein the prestored information about the USN comprises the identification information of the second terminal device and the identification information of the USN corresponding to the second terminal device.
3 . The method according to claim 1 , wherein the determining, based on the identification information of the second terminal device, of the identification information of the USN corresponding to the second terminal device comprises:
sending, by the first USN, request information to a distributed mapping node, wherein the request information comprises the identification information of the second terminal device, the request information requests the identification information of the USN corresponding to the second terminal device, and the distributed mapping node belongs to a mapping system; and
receiving, by the first USN, a response message from the distributed mapping node, wherein the response message comprises the identification information of the USN corresponding to the second terminal device.
4 . The method according to claim 1 , wherein
the identification information of the USN corresponding to the second terminal device comprises first identification information and second identification information, wherein the first identification information indicates information about an edge cloud to which the USN belongs, and the second identification information indicates identity information of the USN.
5 . The method according to claim 1 , wherein the sending of the first information to the third USN through the channel between the first edge cloud and the second edge cloud and a hash ring corresponding to the second edge cloud comprises:
sending, by the first USN, the first information to the USN on the second edge cloud through the channel between the first edge cloud and the second edge cloud, to enable the USN on the second edge cloud to send the first information to the third USN through the hash ring corresponding to the second edge cloud.
6 . The method according to claim 1 , wherein the method further comprises:
obtaining, by the first USN, identification information of a fourth USN, wherein the fourth USN is a USN to which the first terminal device is handed over, and the fourth USN belongs to the second group of USNs; and
sending, by the first USN, user information of the first terminal device to the fourth USN through the channel between the first edge cloud and the second edge cloud and the hash ring corresponding to the second edge cloud.
7 . A communication apparatus, wherein the communication apparatus comprises at least one processor, when the at least one processor runs a computer program or instructions, the computer program or instructions cause the communication apparatus to:
receive by a first user service node (USN) first information from a first terminal device, wherein the first USN belongs to a first group of USNs deployed on a first edge cloud, the first group of USNs form a hash ring corresponding to the first edge cloud, and the first information comprises identification information of a second terminal device;
determine based on the identification information of the second terminal device, identification information of a USN corresponding to the second terminal device; and
when the USN corresponding to the second terminal device is a second USN, send the first information to the second USN through the hash ring corresponding to the first edge cloud, wherein the second USN belongs to the first group of USNs; and
when the USN corresponding to the second terminal device is a third USN, sending the first information to the third USN through a channel between the first edge cloud and a second edge cloud and a hash ring corresponding to the second edge cloud, wherein the third USN belongs to a second group of USNs deployed on the second edge cloud, and the second group of USNs form the hash ring corresponding to the second edge cloud.
8 . The communication apparatus according to claim 7 , wherein the determining of the identification information of the USN corresponding to the second terminal device comprises:
determining, based on prestored information about one or more USNs, the identification information of the USN corresponding to the second terminal device, wherein the information about the USN comprises the identification information of the second terminal device and the identification information of the USN corresponding to the second terminal device.
9 . The communication apparatus according to claim 7 , wherein the determining, based on the identification information of the second terminal device, of the identification information of the USN corresponding to the second terminal device comprises:
sending request information to a distributed mapping node, wherein the request information comprises the identification information of the second terminal device, the request information requests the identification information of the USN corresponding to the second terminal device, and the distributed mapping node belongs to a mapping system; and
receiving a response message from the distributed mapping node, wherein the response message comprises the identification information of the USN corresponding to the second terminal device.
10 . The communication apparatus according to claim 7 , wherein
the identification information of the USN corresponding to the second terminal device comprises first identification information and second identification information, wherein the first identification information indicates information about an edge cloud to which the USN belongs, and the second identification information indicates identity information of the USN.
11 . The communication apparatus according to claim 7 , wherein the sending of the first information to the third USN through a channel between the first edge cloud and the second edge cloud and the hash ring corresponding to the second edge cloud comprises:
sending the first information to the USN on the second edge cloud through the channel between the first edge cloud and the second edge cloud, to enable the USN on the second edge cloud to send the first information to the third USN through the hash ring corresponding to the second edge cloud.
12 . The communication apparatus according to claim 7 , wherein the communication apparatus is further caused to:
obtain identification information of a fourth USN, wherein the fourth USN is a USN to which the first terminal device is handed over, and the fourth USN belongs to the second group of USNs; and
send user information of the first terminal device to the fourth USN through the channel between the first edge cloud and the second edge cloud and the hash ring corresponding to the second edge cloud.
13 . A non-transitory computer-readable medium storing a computer program, wherein, when the computer program is executed by a computing device, the computer program causes the computing device to:
receive, by a first user service node (USN), first information from a first terminal device, wherein the first USN belongs to a first group of USNs deployed on a first edge cloud, the first group of USNs form a hash ring corresponding to the first edge cloud, and the first information comprises identification information of a second terminal device;
determine, by the first USN based on the identification information of the second terminal device, identification information of a USN corresponding to the second terminal device; and
when the USN corresponding to the second terminal device is a second USN, sending, by the first USN, the first information to the second USN through the hash ring corresponding to the first edge cloud, wherein the second USN belongs to the first group of USNs; and
when the USN corresponding to the second terminal device is a third USN, sending, by the first USN, the first information to the third USN through a channel between the first edge cloud and a second edge cloud and a hash ring corresponding to the second edge cloud, wherein the third USN belongs to a second group of USNs deployed on the second edge cloud, and the second group of USNs form the hash ring corresponding to the second edge cloud.
14 . The non-transitory computer-readable medium of claim 13 , wherein the determination, based on the identification information of the second terminal device, of the identification information of the USN corresponding to the second terminal device comprises:
determining, by the first USN based on prestored information about one or more USNs, the identification information of the USN corresponding to the second terminal device, wherein the prestored information about the USN comprises the identification information of the second terminal device and the identification information of the USN corresponding to the second terminal device.
15 . The non-transitory computer-readable medium of claim 13 , wherein the determination, based on the identification information of the second terminal device, of the identification information of the USN corresponding to the second terminal device comprises:
sending, by the first USN, request information to a distributed mapping node, wherein the request information comprises the identification information of the second terminal device, the request information requests the identification information of the USN corresponding to the second terminal device, and the distributed mapping node belongs to a mapping system; and
receiving, by the first USN, a response message from the distributed mapping node, wherein the response message comprises the identification information of the USN corresponding to the second terminal device.
16 . The non-transitory computer-readable medium of claim 13 , wherein
the identification information of the USN corresponding to the second terminal device comprises first identification information and second identification information, wherein the first identification information indicates information about an edge cloud to which the USN belongs, and the second identification information indicates identity information of the USN.
17 . The non-transitory computer-readable medium of claim 13 , wherein the sending of the first information to the third USN through the channel between the first edge cloud and the second edge cloud and a hash ring corresponding to the second edge cloud comprises:
sending, by the first USN, the first information to the USN on the second edge cloud through the channel between the first edge cloud and the second edge cloud, to enable the USN on the second edge cloud to send the first information to the third USN through the hash ring corresponding to the second edge cloud.
18 . The non-transitory computer-readable medium of claim 13 , wherein, when being executed by the computing device, the computer program further causes the computing device to:
obtain, by the first USN, identification information of a fourth USN, wherein the fourth USN is a USN to which the first terminal device is handed over, and the fourth USN belongs to the second group of USNs; and
send, by the first USN, user information of the first terminal device to the fourth USN through the channel between the first edge cloud and the second edge cloud and the hash ring corresponding to the second edge cloud.