Route information update method, communication apparatus, and storage medium
A route information update method includes: A second terminal generates route information of a first terminal, where a relay function of the second terminal provides a communication service for the first terminal and a first device based on the route information of the first terminal, and the first device includes a third terminal and/or a network device. The second terminal updates the route information of the first terminal to generate updated route information of the first terminal. The second terminal sends a second message to the first terminal, where the second message includes the updated route information of the first terminal. When the first device includes the third terminal, the second terminal sends the updated route information of the first terminal to the third terminal.
1 . A route information update method performed at a second terminal, wherein the method comprises:
generating route information of a first terminal, wherein
a relay function of the second terminal provides a communication service for the first terminal and a first device based on the route information of the first terminal, and
the first device comprises at least one of a third terminal or a network device;
updating the route information of the first terminal to generate updated route information of the first terminal;
sending a second message to the first terminal, wherein the second message comprises the updated route information of the first terminal;
responsive to the first device comprising the third terminal, sending the updated route information of the first terminal to the third terminal; and
responsive to the first device comprising the network device, sending the updated route information of the first terminal to the network device.
2 . The method according to claim 1 , wherein
before the updating the route information of the first terminal, the method further comprises:
receiving a first message from the first terminal, wherein the first message indicates the second terminal to update the route information of the first terminal;
the updating the route information of the first terminal comprises:
updating the route information of the first terminal based on the first message;
the first message is a link identifier update request message, and the second message is a link identifier update response message;
the first message comprises an updated layer 2 identifier of the first terminal;
the method further comprises:
updating a layer 2 identifier of the second terminal, to generate an updated layer 2 identifier of the second terminal; and
the second message further comprises the updated layer 2 identifier of the second terminal.
3 . The method according to claim 1 , wherein
before the updating the route information of the first terminal, the method further comprises:
receiving a first message from the first terminal, wherein the first message indicates the second terminal to update the route information of the first terminal;
the updating the route information of the first terminal comprises:
updating the route information of the first terminal based on the first message;
the route information of the first terminal comprises:
first route information of the first terminal to directly communicate with the second terminal, and
second route information of the first terminal to use the relay function of the second terminal;
the first message comprises an update indication, wherein the update indication indicates the second terminal to update the second route information to generate updated second route information; and
the updated route information of the first terminal comprises the updated second route information.
4 . The method according to claim 1 , wherein
before the updating the route information of the first terminal, the method further comprises:
receiving a first message from the first terminal, wherein the first message indicates the second terminal to update the route information of the first terminal;
the updating the route information of the first terminal comprises:
updating the route information of the first terminal based on the first message;
the method further comprises:
generating updated route information of the second terminal based on the first message; and
the second message further comprises the updated route information of the second terminal.
5 . The method according to claim 1 , wherein
before the updating the route information of the first terminal, the method further comprises:
receiving a first message from the first terminal, wherein the first message indicates the second terminal to update the route information of the first terminal;
the updating the route information of the first terminal comprises:
updating the route information of the first terminal based on the first message;
the first message further comprises identification information of a fourth terminal, and the fourth terminal comprises the third terminal; and
the method further comprises:
sending the updated route information of the first terminal to the fourth terminal based on the identification information of the fourth terminal.
6 . The method according to claim 1 , wherein
before the updating the route information of the first terminal, the method further comprises:
receiving a first message from the first terminal, wherein the first message indicates the second terminal to update the route information of the first terminal;
the updating the route information of the first terminal comprises:
updating the route information of the first terminal based on the first message;
the method further comprises:
updating route information of the third terminal, to generate updated route information of the third terminal; and
sending the updated route information of the third terminal to the third terminal and the first terminal.
7 . The method according to claim 6 , wherein
the updating the route information of the third terminal comprises:
updating the route information of the third terminal in response to receiving the first message from the first terminal.
8 . The method according to claim 1 , wherein
responsive to the first device comprising the network device, the method further comprises:
sending a first radio resource control (RRC) message to the network device, wherein the first RRC message comprises identification information of an air interface that provides data transmission for the first terminal, and the first RRC message indicates the network device to update the identification information of the air interface; and
receiving a second RRC message from the network device, wherein the second RRC message comprises updated identification information of the air interface.
9 . A route information update method performed at a first terminal, wherein the method comprises:
generating a first message, wherein
the first message indicates a second terminal to update route information of the first terminal,
the first terminal communicates with a first device based on the route information of the first terminal using a relay function of the second terminal, and
the first device comprises at least one of a third terminal or a network device;
sending the first message to the second terminal;
receiving a second message from the second terminal, wherein the second message comprises updated route information of the first terminal; and
replacing the route information of the first terminal before update with the updated route information of the first terminal,
wherein
the route information of the first terminal comprises:
first route information of the first terminal to directly communicate with the second terminal, and
second route information of the first terminal to use the relay function of the second terminal;
the first message comprises an update indication, wherein the update indication indicates the second terminal to update the second route information to generate updated second route information; and
the updated route information of the first terminal comprises the updated second route information.
10 . The method according to claim 9 , wherein
the first message is a link identifier update request message, and the second message is a link identifier update response message;
before the generating the first message, the method further comprises:
updating a layer 2 identifier of the first terminal, to generate an updated layer 2 identifier of the first terminal;
the first message comprises the updated layer 2 identifier of the first terminal; and
the second message further comprises an updated layer 2 identifier of the second terminal.
11 . The method according to claim 9 , wherein
the second message further comprises updated route information of the second terminal.
12 . The method according to claim 9 , wherein
the first message further comprises identification information of a fourth terminal, and the fourth terminal comprises the third terminal.
13 . The method according to claim 9 , wherein
the method further comprises:
sending the updated route information of the first terminal to a fourth terminal via the second terminal, wherein the fourth terminal comprises the third terminal.
14 . The method according to claim 9 , wherein
the method further comprises:
receiving updated route information of the third terminal from the second terminal.
15 . A communication apparatus, comprising:
at least one processor; and
one or more memories coupled to the at least one processor and storing programming instructions executable by the at least one processor to cause the communication apparatus to:
generate route information of a first terminal, wherein
the communication apparatus comprises a relay function configured to provide a communication service for the first terminal and a first device based on the route information of the first terminal, and
the first device comprises at least one of a third terminal or a network device;
update the route information of the first terminal to generate updated route information of the first terminal;
send a second message to the first terminal, wherein the second message comprises the updated route information of the first terminal;
responsive to the first device comprising the third terminal, send the updated route information of the first terminal to the third terminal, and
responsive to the first device comprising the network device,
send a first radio resource control (RRC) message to the network device, wherein the first RRC message comprises identification information of an air interface that provides data transmission for the first terminal, and the first RRC message indicates the network device to update the identification information of the air interface; and
receive a second RRC message from the network device, wherein the second RRC message comprises updated identification information of the air interface.
16 . A communication apparatus, comprising:
at least one processor; and
one or more memories coupled to the at least one processor and storing programming instructions executable by the at least one processor to cause the communication apparatus to:
generate a first message, wherein
the first message indicates a second terminal to update route information of the communication apparatus,
the communication apparatus is configured to communicate with a first device based on the route information of the communication apparatus using a relay function of the second terminal, and
the first device comprises at least one of a third terminal or a network device;
send the first message to the second terminal;
receive a second message from the second terminal, wherein the second message comprises updated route information of the communication apparatus; and
replace the route information of the communication apparatus before update with the updated route information of the communication apparatus,
wherein
the route information of the communication apparatus comprises:
first route information of the communication apparatus to directly communicate with the second terminal, and
second route information of the communication apparatus to use the relay function of the second terminal;
the first message comprises an update indication, wherein the update indication indicates the second terminal to update the second route information to generate updated second route information; and
the updated route information of the communication apparatus comprises the updated second route information.