Random access method and apparatus
Embodiments of this application disclose a random access method and apparatus. In one example method, when a terminal device supports positioning, the terminal device may adjust, based on a positioning capability, time for sending a preamble on a RACH Occasion (RO) resource. When the terminal device does not support positioning, a corresponding RO resource periodicity may be configured to be large. Therefore, regardless of whether the terminal device supports positioning, a network device can receive, at the same time or in a short preamble receiving time window, preambles sent on a same RO resource, and receive, at different time, in different small time ranges, or in different short preamble receiving time windows, preambles sent on different RO resources.
1 . A random access method, comprising:
receiving, by a terminal device, a plurality of random access channel (RACH) resources from a network device, wherein the plurality of RACH resources include a first RACH resource and a second RACH resource, the first RACH resource is configured for first terminal devices that each has a positioning capability, and the second RACH resource is configured for second terminal devices that each does not have the positioning capability, and wherein each of the second terminal devices does not have any positioning capability;
selecting, by the terminal device, one of the plurality of RACH resources based on the positioning capability of the terminal device; and
sending, by the terminal device, a random access preamble based on the selected RACH resource.
2 . The method according to claim 1 , wherein:
when the terminal device does not have the positioning capability, the terminal device selects the second RACH resource.
3 . The method according to claim 1 , wherein, when the terminal device has the positioning capability, sending, by the terminal device, the random access preamble based on the selected RACH resource comprises:
determining, by the terminal device, a time adjustment value based on a position of the terminal device and a position of the network device; and
sending, by the terminal device, the random access preamble based on the time adjustment value and the selected RACH resource.
4 . The method according to claim 1 , wherein the method further comprises:
receiving, by the terminal device, indication information of the plurality of RACH resources broadcast by the network device, wherein the indication information is used to indicate at least a first positioning capability corresponding to the first RACH resource and a second positioning capability corresponding to the second RACH resource, the first positioning capability includes the positioning capability, and the second positioning capability does not include the positioning capability.
5 . The method according to claim 1 , wherein, after sending, by the terminal device, the random access preamble based on the selected RACH resource, the method further comprises:
when the terminal device meets a resource reselection condition, reselecting, by the terminal device, another one of the plurality of RACH resources; and
sending, by the terminal device, the random access preamble based on the reselected RACH resource, wherein
the resource reselection condition comprises at least one of the following:
a quantity of times the terminal device sends the random access preamble reaches or exceeds a preset maximum quantity of times; or
a timer expires, wherein the timer starts after the terminal device sends the random access preamble for the first time.
6 . The method according to claim 5 , wherein reselecting, by the terminal device, the another one of the plurality of RACH resources comprises:
when the RACH resource currently selected by the terminal device is the first RACH resource, reselecting, by the terminal device from the plurality of RACH resources, the second RACH resource;
when the RACH resource currently selected by the terminal device is a RACH resource corresponding to a first positioning precision, reselecting, by the terminal device from the plurality of RACH resources, a RACH resource corresponding to a second positioning precision, wherein the second positioning precision is lower than the first positioning precision; or
reselecting, by the terminal device, the another one of the plurality of RACH resources based on an indication of the network device, wherein the indication of the network device indicates a set of RACH resources to be reselected by the terminal device.
7 . The method according to claim 6 , wherein the first positioning precision includes a positioning precision of one meter or a positioning precision of 10 meters.
8 . The method according to claim 1 , wherein the plurality of RACH resources include a third RACH resource, the first RACH resource is configured for the first terminal devices supporting positioning with a first positioning precision, and the third RACH resource is configured for third terminal devices supporting positioning with a second positioning precision different from the first positioning precision.
9 . A random access method, comprising:
broadcasting, by a network device, a plurality of random access channel (RACH) resources, wherein the plurality of RACH resources include a first RACH resource and a second RACH resource, the first RACH resource is configured for first terminal devices that each has a positioning capability, and the second RACH resource is configured for second terminal devices without that each does not have the positioning capability, and wherein each of the second terminal devices does not have any positioning capability; and
receiving, by the network device, a random access preamble sent by a terminal device based on one of the plurality of RACH resources, wherein the one of the plurality of RACH resources is selected from the plurality of RACH resources based on the positioning capability of the terminal device.
10 . The method according to claim 9 , wherein the plurality of RACH resources broadcast by the network device comprises RACH resources corresponding to different positioning precisions.
11 . The method according to claim 9 , wherein the method further comprises:
broadcasting, by the network device, indication information of the plurality of RACH resources, wherein the indication information indicates at least a first positioning capability corresponding to the first RACH resource and a second positioning capability corresponding to the second RACH resource, the first positioning capability includes the positioning capability, and the second positioning capability does not include the positioning capability.
12 . A communication apparatus, comprising at least one processor, and one or more memories coupled to the at least one processor, wherein the one or more memories store programming instructions, and when executing the programming instructions stored in the one or more memories, the at least one processor executes operations comprising:
receiving a plurality of random access channel (RACH) resources from a network device, wherein the plurality of RACH resources include a first RACH resource and a second RACH resource, the first RACH resource is configured for first terminal devices that each has a positioning capability, and the second RACH resource is configured for second terminal devices that each does not have the positioning capability, and wherein each of the second terminal devices does not have any positioning capability;
selecting one of the plurality of RACH resources based on the positioning capability of the apparatus; and
sending a random access preamble based on the selected RACH resource.
13 . The apparatus according to claim 12 , wherein:
when the apparatus does not have the positioning capability, the apparatus selects the second RACH resource; or
when the apparatus has the positioning capability, the apparatus selects the first RACH resource.
14 . The apparatus according to claim 13 , wherein, when the apparatus has the positioning capability, sending the random access preamble based on the selected RACH resource comprises:
determining a time adjustment value based on a position of the apparatus and a position of the network device; and
sending the random access preamble based on the time adjustment value and the selected RACH resource.
15 . The apparatus according to claim 12 , wherein the operations further comprise:
receiving indication information of the plurality of RACH resources broadcast by the network device, wherein the indication information is used to indicate at least a first positioning capability corresponding to the first RACH resource and a second positioning capability corresponding to the second RACH resource, the first positioning capability includes the positioning capability, and the second positioning capability does not include the positioning capability.
16 . The apparatus according to claim 12 , wherein after sending the random access preamble based on the selected RACH resource, the operations further comprise:
when the apparatus meets a resource reselection condition, reselecting another one of the plurality of RACH resources; and
sending the random access preamble based on the reselected RACH resource, wherein
the resource reselection condition comprises at least one of the following:
a quantity of times the apparatus sends the random access preamble reaches or exceeds a preset maximum quantity of times; or
a timer expires, wherein the timer starts after the apparatus sends the random access preamble for the first time.
17 . The apparatus according to claim 16 , wherein reselecting the another one of the plurality of RACH resources comprises:
when the RACH resource currently selected by the apparatus is the first RACH resource, reselecting, from the plurality of RACH resources, the second RACH resource;
when the RACH resource currently selected by the apparatus is a RACH resource corresponding to a first positioning precision, reselecting, from the plurality of RACH resources, a RACH resource corresponding to a second positioning precision, wherein the second positioning precision is lower than the first positioning precision; or
reselecting the another one of the plurality of RACH resources based on an indication of the network device, wherein the indication of the network device indicates a set of RACH resources to be reselected by the apparatus.
18 . A communication apparatus, comprising at least one processor, and one or more memories coupled to the at least one processor, wherein the one or more memories store programming instructions, and when executing the programming instructions stored in the one or more memories, the at least one processor executes operations comprising:
broadcasting a plurality of random access channel (RACH) resources, wherein the plurality of RACH resources include a first RACH resource and a second RACH resource, the first RACH resource is configured for first terminal devices that each has a positioning capability, and the second RACH resource is configured for second terminal devices that each does not have the positioning capability, and wherein each of the second terminal devices does not have any positioning capability; and
receiving a random access preamble sent by a terminal device based on one of the plurality of RACH resources, wherein the one of the plurality of RACH resources is selected from the plurality of RACH resources based on the positioning capability of the terminal device.
19 . The apparatus according to claim 18 , wherein the plurality of RACH resources broadcast by the apparatus comprises RACH resources corresponding to different positioning precisions.
20 . The apparatus according to claim 18 , wherein the at least one processor executes the operations further comprising:
broadcasting indication information of the plurality of RACH resources, wherein the indication information indicates at least a first positioning capability corresponding to the first RACH resource and a second positioning capability corresponding to the second RACH resource, the first positioning capability includes the positioning capability, and the second positioning capability does not include the positioning capability.