1. A first terminal device, comprising:a receiver, configured to receive a first message sent by a base station via a second terminal device, wherein the first terminal device communicates with the base station via the second terminal device, with a first communication link established between the first terminal device and the second terminal device, and wherein the first message comprises access information required by the first terminal device to access the base station and resource information that is allocated by the base station;
a transmitter, configured to:in response to receiving the first message comprising the access information and the resource information, send a release message of the first communication link to the second terminal device based on the resource information, wherein the release message instructs the second terminal device to release the first communication link between the first terminal device and the second terminal device;
a processor; and
a non-transitory computer-readable storage medium storing a program to be executed by the processor, the program including instructions for:switching, in response to receiving the first message, from communicating with the base station via the second terminal device using the first communication link to communicating with the base station using a second communication link without passing through the second terminal device.