Patent Publication Number: US-11395342-B2

Title: Random access sequence generation method, device, and system

Description:
CROSS-REFERENCE TO RELATED APPLICATIONS 
     This application is a continuation of U.S. patent application Ser. No. 15/928,496, filed on Mar. 22, 2018, which is a continuation of International Application No. PCT/CN2015/090838, filed on Sep. 25, 2015. The afore-mentioned patent applications are hereby incorporated by reference in their entireties. 
    
    
     TECHNICAL FIELD 
     Embodiments of the present application relate to communications technologies, and in particular, to a random access sequence generation method, a device, and a system. 
     BACKGROUND 
     If user equipment (UE) communicates with a base station when the UE moves at a high speed, there is a change between signal frequencies at receive ends of the UE and the base station. The change is referred to as a Doppler frequency shift. 
     In the conventional art, to avoid a problem that random access sequences of multiple UEs interfere with each other when the Doppler frequency shift is greater than one time a physical random access channel (PRACH) subcarrier spacing and is less than two times the PRACH subcarrier spacing, a targeted design is made. In the conventional art, sequence shifts are grouped, three parameters, that is, a quantity of groups, a quantity of UE candidate sequence shifts in a group, and a quantity of UE candidate sequence shifts in the last length that is insufficient for a group, are determined, and a shift sequence number is selected from an interval that is determined according to the three parameters. 
     However, in the conventional art, a range from which a shift sequence number is selected is excessively small. 
     SUMMARY 
     Embodiments of the present application provide a random access sequence generation method, a device, and a system. 
     According to a first aspect, an embodiment of the present application provides a random access sequence generation method, including: 
     generating, by a base station, notification signaling, where the notification signaling includes indication information, the indication information is used to instruct user equipment UE to select a shift sequence number from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts; and 
     sending, by the base station, the notification signaling to the UE, so that the UE generates a random access sequence according to the indication information. 
     With reference to the first aspect, in a first possible implementation of the first aspect, after the sending, by the base station, the notification signaling to the UE, the method further includes: 
     selecting, by the base station, a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1); 
     obtaining, by the base station, a cyclic shift value according to the shift sequence number; and 
     generating, by the base station, a detection sequence according to the cyclic shift value, and detecting, by using the detection sequence, the random access sequence sent by the UE, where the random access sequence is generated by the UE according to the indication information. 
     With reference to the first possible implementation of the first aspect, in a second possible implementation of the first aspect, the obtaining, by the base station, a cyclic shift value according to the shift sequence number includes: 
     obtaining, by the base station, the cyclic shift value C ν  according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts. 
     With reference to the second possible implementation of the first aspect, in a third possible implementation of the first aspect, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (3). 
     With reference to the second or the third possible implementation of the first aspect, in a fourth possible implementation of the first aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), where 
     formulas (4) to (11) are respectively: 
                       n   shift   RA     =     ⌊         4   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;           (   4   )                   d   start     =       4   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;           (   5   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   6   )                     n   _     shift   RA     =     max   (       ⌊         N   ZC     -     3   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )       ;           (   7   )                     n     _   _       shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   8   )                     d     _   _       start     =       N   ZC     -     3   ⁢     d   u       +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;           (   9   )                   n     _     _   _         shift   RA     =     ⌊         (         (     1   -     min   ⁡     (     1   ,       n   _     shift   RA       )         )     ⁢     (       d   u     -       n   group   RA     ·     d   start         )       +       min   ⁡     (     1   ,         n   _     shift   RA     ⁡     (       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS         )         )       ⁢     /     ⁢     N   CS         ⌋     -       n     _   _       shift   RA       ;               (   10   )                     d     _     _   _         start     =       N   ZC     -     2   ⁢     d   u       +       n   group   RA     ·     d   start       +         n     _   _       shift   RA     ⁢     N   CS           ,           (   11   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the second or the third possible implementation of the first aspect, in a fifth possible implementation of the first aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19), where formulas (12) to (19) are respectively: 
                       n   shift   RA     =     ⌊         N   ZC     -     3   ⁢     d   u           N   CS       ⌋       ;           (   12   )                   d   start     =       N   ZC     -     3   ⁢     d   u       +       n   shift   RA     ·     N   CS           ;           (   13   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   14   )                     n   _     shift   RA     =     max   (       ⌊         4   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )       ;           (   15   )                     n     _   _       shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       N   ZC     -     3   ⁢     d   u       -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   16   )                     d     _   _       start     =       d   u     +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;           (   17   )                     n     _     _   _         shift   RA     =   0     ;           (   18   )                     d     _     _   _         start     =   0     ,           (   19   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the second or the third possible implementation of the first aspect, in a sixth possible implementation of the first aspect, shift, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), where 
     formulas (20) to (27) are respectively: 
                       n   shift   RA     =     ⌊         3   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;           (   20   )                   d   start     =       3   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;           (   21   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   22   )                     n   _     shift   RA     =     max   (       ⌊         N   ZC     -     2   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )       ;           (   23   )                     n     _   _       shift   RA     =   0     ;           (   24   )                     d     _   _       start     =   0     ;           (   25   )                     n     _     _   _         shift   RA     =   0     ;           (   26   )                     d     _     _   _         start     =   0     ,           (   27   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the second or the third possible implementation of the first aspect, in a seventh possible implementation of the first aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35), where 
     formulas (28) to (35) are respectively: 
                       n   shift   RA     =     ⌊         N   ZC     -     2   ⁢     d   u           N   CS       ⌋       ;           (   28   )                   d   start     =       2   ⁢     (       N   ZC     -     2   ⁢     d   u         )       +       n   shift   RA     ·     N   CS           ;           (   29   )                   n   group   RA     =     ⌊         N   ZC     -     d   u         d   start       ⌋       ;           (   30   )                     n   _     shift   RA     =     max   (       ⌊         3   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )       ;           (   31   )                     n     _   _       shift   RA     =   0     ;           (   32   )                     d     _   _       start     =   0     ;           (   33   )                     n     _     _   _         shift   RA     =   0     ;           (   34   )                     d     _     _   _         start     =   0     ,           (   35   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to any one of the fourth to the seventh possible implementations of the first aspect, in an eighth possible implementation of the first aspect, in the case of 
                     ⁢             N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,           
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or in the case of
 
                     ⁢             N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,           
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19);
 
     in the case of 
                     ⁢             N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,           
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35); or in the case of
 
                     ⁢             N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,           
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35).
 
     According to a second aspect, an embodiment of the present application provides a random access sequence generation method, including: 
     receiving, by user equipment UE, notification signaling from a base station, where the notification signaling includes indication information, the indication information is used to instruct the UE to select a shift sequence number from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts; 
     selecting, by the UE, a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1) according to the notification signaling; 
     obtaining, by the UE, a cyclic shift value according to the shift sequence number; and 
     generating, by the UE, a random access sequence according to the cyclic shift value. 
     With reference to the second aspect, in a first possible implementation of the second aspect, the obtaining, by the UE, a cyclic shift value according to the shift sequence number includes: 
     obtaining, by the UE, the cyclic shift value C ν  according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts. 
     With reference to the first possible implementation of the second aspect, in a second possible implementation of the second aspect, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the UE obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the UE obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the UE obtains the cyclic shift value C ν  by using formula (3). 
     With reference to the first or the second possible implementation of the second aspect, in a third possible implementation of the second aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), where 
     formulas (4) to (11) are respectively: 
                       n   shift   RA     =     ⌊         4   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;           (   4   )                   d   start     =       4   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;           (   5   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   6   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         N   ZC     -     3   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   7   )                     n   =     shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   8   )                     d   =     start     =       N   ZC     -     3   ⁢     d   u       +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;           (   9   )                     n   ≡     shift   RA     =       ⌊       (         (     1   -     min   ⁡     (     1   ,       n   _     shift   RA       )         )     ⁢     (       d   u     -       n   group   RA     ·     d   start         )       +       min   ⁡     (     1   ,       n   _     shift   RA       )       ⁢     (       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS         )         )     ⁢     /     ⁢     N   CS       ⌋     -       n   =     shift   RA         ;           (   10   )                     d   ≡     start     =       N   ZC     -     2   ⁢     d   u       +       n   group   Ra     ·     d   start       +         n   =     shift   RA     ⁢     N   CS           ,           (   11   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the first or the second possible implementation of the second aspect, in a fourth possible implementation of the second aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19), where 
     formulas (12) to (19) are respectively: 
                       n   shift   RA     =     ⌊         N   ZC     -     3   ⁢     d   u           N   CS       ⌋       ;           (   12   )                   d   start     =       N   ZC     -     3   ⁢     d   u       +       n   shift   RA     ·     N   CS           ;           (   13   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   14   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         4   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   15   )                     n   =     shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       N   ZC     -     3   ⁢     d   u       -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   16   )                     d   =     start     =       d   u     +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;           (   17   )                     n   ≡     shift   RA     =   0     ;           (   18   )                     d   ≡     start     =   0     ,           (   19   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the first or the second possible implementation of the second aspect, in a fifth possible implementation of the second aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), where 
     formulas (20) to (27) are respectively: 
                       n   shift   RA     =     ⌊         3   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;           (   20   )                   d   start     =       3   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;           (   21   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   22   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         N   ZC     -     2   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   23   )                     n   =     shift   RA     =   0     ;           (   24   )                     d   =     start     =   0     ;           (   25   )                     n   ≡     shift   RA     =   0     ;           (   26   )                     d   ≡     start     =   0     ,           (   27   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the first or the second possible implementation of the second aspect, in a sixth possible implementation of the second aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35), where 
     formulas (28) to (35) are respectively: 
                       n   shift   RA     =     ⌊         N   ZC     -     2   ⁢     d   u           N   CS       ⌋       ;           (   28   )                   d   start     =       2   ⁢     (       N   ZC     -     2   ⁢     d   u         )       +       n   shift   RA     ·     N   CS           ;           (   29   )                   n   group   RA     =     ⌊         N   ZC     -     d   u         d   start       ⌋       ;           (   30   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         3   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   31   )                     n   =     shift   RA     =   0     ;           (   32   )                     d   =     start     =   0     ;           (   33   )                     n   ≡     shift   RA     =   0     ;           (   34   )                     d   ≡     start     =   0     ,           (   35   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to any one of the third to the sixth possible implementations of the second aspect, in a seventh possible implementation of the second aspect, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or in the case of
 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19);
 
     in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  start satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35); or in the case of
 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35).
 
     With reference to any one of the second aspect, or the first to the seventh possible implementations of the second aspect, in an eighth possible implementation of the second aspect, the generating, by the UE, a random access sequence according to the cyclic shift value includes: 
     generating, by the UE, the random access sequence x u,C     ν   (n) according to the cyclic shift value C ν  by using the following formula (36):
 
 x   u,C     ν   ( n )= x   u (( n+C   ν )mod  N   ZC )  (36), where
 
     N ZC  is a sequence length, and a ZC sequence whose root is u is defined as: 
                   x   u     ⁡     (   n   )       =     e       -   j     ⁢           ⁢       π   ⁢           ⁢   un   ⁢     (     n   +   1     )         N   ZC             ,         
0≤n≤N ZC −1.
 
     According to a third aspect, an embodiment of the present application provides a random access sequence generation method, including: 
     selecting, by a base station, a shift sequence number ν from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), where ν is an integer, n shift   RA  is a quantity of user equipment UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts; and obtaining, by the base station, a cyclic shift value C ν  according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts, where 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35), where 
                       n   shift   RA     =     ⌊         4   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;           (   4   )                   d   start     =       4   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;           (   5   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   6   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         N   ZC     -     3   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   7   )                     n   =     shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   8   )                     d   =     start     =       N   ZC     -     3   ⁢     d   u       +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;           (   9   )                     n   ≡     shift   RA     =       ⌊       (         (     1   -     min   ⁡     (     1   ,       n   _     shift   RA       )         )     ⁢     (       d   u     -       n   group   RA     ·     d   start         )       +       min   ⁡     (     1   ,       n   _     shift   RA       )       ⁢     (       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS         )         )     ⁢     /     ⁢     N   CS       ⌋     -       n   =     shift   RA         ;           (   10   )                     d   ≡     start     =       N   ZC     -     2   ⁢     d   u       +       n   group   Ra     ·     d   start       +         n   =     shift   RA     ⁢     N   CS           ;           (   11   )                   n   shift   RA     =     ⌊         N   ZC     -     3   ⁢     d   u           N   CS       ⌋       ;           (   12   )                   d   start     =       N   ZC     -     3   ⁢     d   u       +       n   shift   RA     ·     N   CS           ;           (   13   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   14   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         4   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   15   )                     n   =     shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       N   ZC     -     3   ⁢     d   u       -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   16   )                     d   =     start     =       d   u     +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;           (   17   )                     n   ≡     shift   RA     =   0     ;           (   18   )                     d   ≡     start     =   0     ;           (   19   )                   n   shift   RA     =     ⌊         3   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;           (   20   )                   d   start     =       3   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;           (   21   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   22   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         N   ZC     -     2   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   23   )                     n   =     shift   RA     =   0     ;           (   24   )                     d   =     start     =   0     ;           (   25   )                     n   ≡     shift   RA     =   0     ;           (   26   )                     d   ≡     start     =   0     ;           (   27   )                   n   shift   RA     =     ⌊         N   ZC     -     2   ⁢     d   u           N   CS       ⌋       ;           (   28   )                   d   start     =       2   ⁢     (       N   ZC     -     2   ⁢     d   u         )       +       n   shift   RA     ·     N   CS           ;           (   29   )                   n   group   RA     =     ⌊         N   ZC     -     d   u         d   start       ⌋       ;           (   30   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         3   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   31   )                     n   =     shift   RA     =   0     ;           (   32   )                     d   =     start     =   0     ;           (   33   )                     n   ≡     shift   RA     =   0     ;           (   34   )                     d   ≡     start     =   0     ,           (   35   )               
where
 
     N ZC  is a sequence length, and d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the third aspect, in a first possible implementation of the third aspect, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (3). 
     With reference to the third aspect or the first possible implementation of the third aspect, in a second possible implementation of the third aspect, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19); or in the case of
 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                 2   7     ⁢     N   ZC       &lt;     d   u     ≤           N   ZC     -     N   CS       3     .           
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19);
 
     in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  start satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35); or in the case of
 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35).
 
     According to a fourth aspect, an embodiment of the present application provides a random access sequence generation method, including: 
     selecting, by user equipment UE, a shift sequence number ν from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), where ν is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts; 
     obtaining, by the UE, a cyclic shift value C ν  according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts; and 
     generating, by the UE, a random access sequence x u,C     ν   (n) according to the cyclic shift value C ν  by using the following formula (36):
 
 x   u,C     ν   ( n )= x   u (( n+C   ν )mod  N   ZC )  (36), where
 
     N ZC  is a sequence length, and a ZC sequence whose root is u is defined as: 
                   x   u     ⁡     (   n   )       =     e       -   j     ⁢           ⁢       π   ⁢           ⁢   un   ⁢     (     n   +   1     )         N   ZC             ,         
0≤n≤N ZC −1, where
 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35), where
 
 n   shift   RA =└4 d   u   −N   ZC   /N   CS ┘  (4);
 
 d   start =4 d   u   −N   ZC   +n   shift   RA   ·N   CS   (5);
 
 n   group   RA   =└d   u   /d   start ┘  (6);
 
   n     shift   RA =max(└ N   ZC −3 d   u   −n   group   RA   ·d   start   /N   CS ┘,0)  (7);
 
                         n   =     shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   8   )                       ⁢           d   =     start     =       N   ZC     -     3   ⁢     d   u       +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;             (   9   )                     n   ≡     shift   RA     =       ⌊       (         (     1   -     min   ⁡     (     1   ,       n   _     shift   RA       )         )     ⁢     (       d   u     -       n   group   RA     ·     d   start         )       +       min   ⁡     (     1   ,       n   _     shift   RA       )       ⁢     (       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS         )         )     ⁢     /     ⁢     N   CS       ⌋     -       n   =     shift   RA         ;           (   10   )                       ⁢           d   ≡     start     =       N   ZC     -     2   ⁢     d   u       +       n   group   Ra     ·     d   start       +         n   =     shift   RA     ⁢     N   CS           ;             (   11   )                       ⁢         n   shift   RA     =     ⌊         N   ZC     -     3   ⁢     d   u           N   CS       ⌋       ;             (   12   )                       ⁢         d   start     =       N   ZC     -     3   ⁢     d   u       +       n   shift   RA     ·     N   CS           ;             (   13   )                       ⁢         n   group   RA     =     ⌊       d   u       d   start       ⌋       ;             (   14   )                       ⁢           n   _     shift   RA     =     max   ⁡     (       ⌊         4   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;             (   15   )                     n   =     shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       N   ZC     -     3   ⁢     d   u       -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   16   )                       ⁢           d   =     start     =       d   u     +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;             (   17   )                       ⁢           n   ≡     shift   RA     =   0     ;             (   18   )                       ⁢           d   ≡     start     =   0     ;             (   19   )                       ⁢         n   shift   RA     =     ⌊         3   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;             (   20   )                       ⁢         d   start     =       3   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;             (   21   )                       ⁢         n   group   RA     =     ⌊       d   u       d   start       ⌋       ;             (   22   )                       ⁢           n   _     shift   RA     =     max   ⁡     (       ⌊         N   ZC     -     2   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;             (   23   )                       ⁢           n   =     shift   RA     =   0     ;             (   24   )                       ⁢           d   =     start     =   0     ;             (   25   )                       ⁢           n   ≡     shift   RA     =   0     ;             (   26   )                       ⁢           d   ≡     start     =   0     ;             (   27   )                       ⁢         n   shift   RA     =     ⌊         N   ZC     -     2   ⁢     d   u           N   CS       ⌋       ;             (   28   )                       ⁢         d   start     =       2   ⁢     (       N   ZC     -     2   ⁢     d   u         )       +       n   shift   RA     ·     N   CS           ;             (   29   )                       ⁢         n   group   RA     =     ⌊         N   ZC     -     d   u         d   start       ⌋       ;             (   30   )                       ⁢           n   _     shift   RA     =     max   ⁡     (       ⌊         3   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;             (   31   )                       ⁢           n   =     shift   RA     =   0     ;             (   32   )                       ⁢           d   =     start     =   0     ;             (   33   )                       ⁢           n   ≡     shift   RA     =   0     ;             (   34   )                       ⁢           d   ≡     start     =   0     ,             (   35   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the fourth aspect, in a first possible implementation of the fourth aspect, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the UE obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the UE obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the UE obtains the cyclic shift value C ν  by using formula (3). 
     With reference to the fourth aspect or the first possible implementation of the fourth aspect, in a second possible implementation of the fourth aspect, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or in the case of
 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19);
 
     in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35); or in the case of
 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35).
 
     According to a fifth aspect, an embodiment of the present application provides a base station, including: 
     a generation module, configured to generate notification signaling, where the notification signaling includes indication information, the indication information is used to instruct user equipment UE to select a shift sequence number from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts; and 
     a sending module, configured to send the notification signaling to the UE, so that the UE generates a random access sequence according to the indication information. 
     With reference to the fifth aspect, in a first possible implementation of the fifth aspect, the base station further includes: 
     a shift sequence number determining module, configured to select a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1); 
     a cyclic shift value determining module, configured to obtain a cyclic shift value according to the shift sequence number; and 
     a random access sequence detection module, configured to: generate a detection sequence according to the cyclic shift value, and detect, by using the detection sequence, the random access sequence sent by the UE, where the random access sequence is generated by the UE according to the indication information. 
     With reference to the first possible implementation of the fifth aspect, in a second possible implementation of the fifth aspect, the cyclic shift value determining module is specifically configured to: 
     obtain the cyclic shift value C ν  according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts. 
     With reference to the second possible implementation of the first aspect, in a third possible implementation of the first aspect, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (3). 
     With reference to the second or the third possible implementation of the fifth aspect, in a fourth possible implementation of the fifth aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), where 
     formulas (4) to (11) are respectively: 
                           ⁢         n   shift   RA     =     ⌊         4   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;             (   4   )                       ⁢         d   start     =       4   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;             (   5   )                       ⁢         n   group   RA     =     ⌊       d   u       d   start       ⌋       ;             (   6   )                       ⁢           n   _     shift   RA     =     max   ⁡     (       ⌊         N   ZC     -     3   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;             (   7   )                       ⁢           n   =     shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;             (   8   )                       ⁢           d   =     start     =       N   ZC     -     3   ⁢     d   u       +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;             (   9   )                     n   ≡     shift   RA     =       ⌊       (         (     1   -     min   ⁡     (     1   ,       n   _     shift   RA       )         )     ⁢     (       d   u     -       n   group   RA     ·     d   start         )       +       min   ⁡     (     1   ,       n   _     shift   RA       )       ⁢     (       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS         )         )     ⁢     /     ⁢     N   CS       ⌋     -       n   =     shift   RA         ;           (   10   )                       ⁢           d   ≡     start     =       N   ZC     -     2   ⁢     d   u       +       n   group   Ra     ·     d   start       +           ⁢         n   =     shift   RA     ⁢     N   CS           ,             (   11   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the second or the third possible implementation of the fifth aspect, in a fifth possible implementation of the fifth aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19), where 
     formulas (12) to (19) are respectively: 
                       n   shift   RA     =     ⌊         N   ZC     -     3   ⁢     d   u           N   CS       ⌋       ;           (   12   )                   d   start     =       N   ZC     -     3   ⁢     d   u       +       n   shift   RA     ·     N   CS           ;           (   13   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   14   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         4   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   15   )                     n   =     shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       N   ZC     -     3   ⁢     d   u       -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   16   )                     d   =     start     =       d   u     +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;           (   17   )                     n   ≡     shift   RA     =   0     ;           (   18   )                     d   ≡     start     =   0     ,           (   19   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the second or the third possible implementation of the fifth aspect, in a sixth possible implementation of the fifth aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), where 
     formulas (20) to (27) are respectively: 
                       n   shift   RA     =     ⌊         3   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;           (   20   )                   d   start     =       3   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;           (   21   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   22   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         N   ZC     -     2   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   23   )                     n   =     shift   RA     =   0     ;           (   24   )                     d   =     start     =   0     ;           (   25   )                     n   ≡     shift   RA     =   0     ;           (   26   )                     d   ≡     start     =   0     ,           (   27   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the second or the third possible implementation of the fifth aspect, in a seventh possible implementation of the fifth aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35), where 
     formulas (28) to (35) are respectively: 
                       n   shift   RA     =     ⌊         N   ZC     -     2   ⁢     d   u           N   CS       ⌋       ;           (   28   )                   d   start     =       2   ⁢     (       N   ZC     -     2   ⁢     d   u         )       +       n   shift   RA     ·     N   CS           ;           (   29   )                   n   group   RA     =     ⌊         N   ZC     -     d   u         d   start       ⌋       ;           (   30   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         3   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   31   )                     n   =     shift   RA     =   0     ;           (   32   )                     d   =     start     =   0     ;           (   33   )                     n   ≡     shift   RA     =   0     ;           (   34   )                     d   ≡     start     =   0     ,           (   35   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to any one of the fourth to the seventh possible implementations of the fifth aspect, in an eighth possible implementation of the fifth aspect, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or in the case of
 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19);
 
     in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35); or in the case of
 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     According to a sixth aspect, an embodiment of the present application provides user equipment UE, including: 
     a receiving module, configured to receive notification signaling from a base station, where the notification signaling includes indication information, the indication information is used to instruct the UE to select a shift sequence number from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts; 
     a shift sequence number determining module, configured to select a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1) according to the notification signaling; 
     a cyclic shift value determining module, configured to obtain a cyclic shift value according to the shift sequence number; and 
     a random access sequence generation module, configured to generate a random access sequence according to the cyclic shift value. 
     With reference to the sixth aspect, in a first possible implementation of the sixth aspect, the cyclic shift value determining module is specifically configured to: 
     obtain the cyclic shift value C ν  according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts. 
     With reference to the first possible implementation of the sixth aspect, in a second possible implementation of the sixth aspect, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (3). 
     With reference to the first or the second possible implementation of the sixth aspect, in a third possible implementation of the sixth aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), where 
     formulas (4) to (11) are respectively: 
                           ⁢         n   shift   RA     =     ⌊         4   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;             (   4   )                       ⁢         d   start     =       4   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;             (   5   )                       ⁢         n   group   RA     =     ⌊       d   u       d   start       ⌋       ;             (   6   )                       ⁢           n   _     shift   RA     =     max   ⁡     (       ⌊         N   ZC     -     3   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;             (   7   )                     n   =     shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   8   )                       ⁢           d   =     start     =       N   ZC     -     3   ⁢     d   u       +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;             (   9   )                     n   ≡     shift   RA     =       ⌊       (         (     1   -     min   ⁡     (     1   ,       n   _     shift   RA       )         )     ⁢     (       d   u     -       n   group   RA     ·     d   start         )       +       min   ⁡     (     1   ,       n   _     shift   RA       )       ⁢     (       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS         )         )     ⁢     /     ⁢     N   CS       ⌋     -       n   =     shift   RA         ;           (   10   )                       ⁢           d   ≡     start     =       N   ZC     -     2   ⁢     d   u       +       n   group   Ra     ·     d   start       +         n   =     shift   RA     ⁢     N   CS           ,             (   11   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the first or the second possible implementation of the sixth aspect, in a fourth possible implementation of the sixth aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19), where 
     formulas (12) to (19) are respectively: 
                       n   shift   RA     =     ⌊         N   ZC     -     3   ⁢     d   u           N   CS       ⌋       ;           (   12   )                   d   start     =       N   ZC     -     3   ⁢     d   u       +       n   shift   RA     ·     N   CS           ;           (   13   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   14   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         4   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   15   )                     n   =     shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       N   ZC     -     3   ⁢     d   u       -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   16   )                     d   =     start     =       d   u     +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;           (   17   )                     n   ≡     shift   RA     =   0     ;           (   18   )                     d   ≡     start     =   0     ,           (   19   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the first or the second possible implementation of the sixth aspect, in a fifth possible implementation of the sixth aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), where 
     formulas (20) to (27) are respectively: 
                       n   shift   RA     =     ⌊         3   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;           (   20   )                   d   start     =       3   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;           (   21   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   22   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         N   ZC     -     2   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   23   )                     n   =     shift   RA     =   0     ;           (   24   )                     d   =     start     =   0     ;           (   25   )                     n   ≡     shift   RA     =   0     ;           (   26   )                     d   ≡     start     =   0     ,           (   27   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the first or the second possible implementation of the sixth aspect, in a sixth possible implementation of the sixth aspect, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35), where 
     formulas (28) to (35) are respectively: 
                       n   shift   RA     =     ⌊         N   ZC     -     2   ⁢     d   u           N   CS       ⌋       ;           (   28   )                   d   start     =       2   ⁢     (       N   ZC     -     2   ⁢     d   u         )       +       n   shift   RA     ·     N   CS           ;           (   29   )                   n   group   RA     =     ⌊         N   ZC     -     d   u         d   start       ⌋       ;           (   30   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         3   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   31   )                     n   =     shift   RA     =   0     ;           (   32   )                     d   =     start     =   0     ;           (   33   )                     n   ≡     shift   RA     =   0     ;           (   34   )                     d   ≡     start     =   0     ,           (   35   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to any one of the third to the sixth possible implementations of the sixth aspect, in a seventh possible implementation of the sixth aspect, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or in the case of
 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19);
 
     in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35); or in the case of
 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     With reference to any one of the sixth aspect, or the first to the seventh possible implementations of the sixth aspect, in an eighth possible implementation of the sixth aspect, the random access sequence generation module is specifically configured to: 
     generate the random access sequence x u,C     ν   (n) according to the cyclic shift value C ν  by using the following formula (36):
 
 x   u,C     ν   ( n )= x   u (( n+C   ν )mod  N   ZC )  (36), where
 
     N ZC  is a sequence length, and a ZC sequence whose root is u is defined as: 
                   x   u     ⁡     (   n   )       ⁢     e       -   j     ⁢           ⁢       π   ⁢           ⁢   un   ⁢     (     n   +   1     )         N   ZC             ,         
0≤n≤N ZC −1.
 
     According to a seventh aspect, an embodiment of the present application provides a base station, including: 
     a shift sequence number determining module, configured to select a shift sequence number ν from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), where ν is an integer, n shift   RA  is a quantity of user equipment UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts; and 
     a cyclic shift value determining module, configured to obtain a cyclic shift value C ν  according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts, where 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35), where 
     
       
         
           
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         n 
                         shift 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             
                               4 
                               ⁢ 
                               
                                 d 
                                 u 
                               
                             
                             - 
                             
                               N 
                               ZC 
                             
                           
                           
                             N 
                             CS 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         d 
                         start 
                       
                       = 
                       
                         
                           4 
                           ⁢ 
                           
                             d 
                             u 
                           
                         
                         - 
                         
                           N 
                           ZC 
                         
                         + 
                         
                           
                             n 
                             shift 
                             RA 
                           
                           · 
                           
                             N 
                             CS 
                           
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         n 
                         group 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             d 
                             u 
                           
                           
                             d 
                             start 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           _ 
                         
                         shift 
                         RA 
                       
                       = 
                       
                         max 
                         ⁡ 
                         
                           ( 
                           
                             
                               ⌊ 
                               
                                 
                                   
                                     N 
                                     ZC 
                                   
                                   - 
                                   
                                     3 
                                     ⁢ 
                                     
                                       d 
                                       u 
                                     
                                   
                                   - 
                                   
                                     
                                       n 
                                       group 
                                       RA 
                                     
                                     · 
                                     
                                       d 
                                       start 
                                     
                                   
                                 
                                 
                                   N 
                                   CS 
                                 
                               
                               ⌋ 
                             
                             , 
                             0 
                           
                           ) 
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         n 
                         = 
                       
                       shift 
                       RA 
                     
                     = 
                     
                       ⌊ 
                       
                         
                           min 
                           ⁡ 
                           
                             ( 
                             
                               
                                 
                                   d 
                                   u 
                                 
                                 - 
                                 
                                   
                                     n 
                                     group 
                                     RA 
                                   
                                   · 
                                   
                                     d 
                                     start 
                                   
                                 
                               
                               , 
                               
                                 
                                   4 
                                   ⁢ 
                                   
                                     d 
                                     u 
                                   
                                 
                                 - 
                                 
                                   N 
                                   ZC 
                                 
                                 - 
                                 
                                   
                                     
                                       n 
                                       _ 
                                     
                                     shift 
                                     RA 
                                   
                                   ⁢ 
                                   
                                     N 
                                     CS 
                                   
                                 
                               
                             
                             ) 
                           
                         
                         ⁢ 
                         
                           / 
                         
                         ⁢ 
                         
                           N 
                           CS 
                         
                       
                       ⌋ 
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           d 
                           = 
                         
                         start 
                       
                       = 
                       
                         
                           N 
                           ZC 
                         
                         - 
                         
                           3 
                           ⁢ 
                           
                             d 
                             u 
                           
                         
                         + 
                         
                           
                             n 
                             group 
                             RA 
                           
                           · 
                           
                             d 
                             start 
                           
                         
                         + 
                         
                           
                             
                               n 
                               _ 
                             
                             shift 
                             RA 
                           
                           ⁢ 
                           
                             N 
                             CS 
                           
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         n 
                         ≡ 
                       
                       shift 
                       RA 
                     
                     = 
                     
                       
                         ⌊ 
                         
                           
                             ( 
                             
                               
                                 
                                   ( 
                                   
                                     1 
                                     - 
                                     
                                       min 
                                       ⁡ 
                                       
                                         ( 
                                         
                                           1 
                                           , 
                                           
                                             
                                               n 
                                               _ 
                                             
                                             shift 
                                             RA 
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                   ) 
                                 
                                 ⁢ 
                                 
                                   ( 
                                   
                                     
                                       d 
                                       u 
                                     
                                     - 
                                     
                                       
                                         n 
                                         group 
                                         RA 
                                       
                                       · 
                                       
                                         d 
                                         start 
                                       
                                     
                                   
                                   ) 
                                 
                               
                               + 
                               
                                 
                                   min 
                                   ⁡ 
                                   
                                     ( 
                                     
                                       1 
                                       , 
                                       
                                         
                                           n 
                                           _ 
                                         
                                         shift 
                                         RA 
                                       
                                     
                                     ) 
                                   
                                 
                                 ⁢ 
                                 
                                   ( 
                                   
                                     
                                       4 
                                       ⁢ 
                                       
                                         d 
                                         u 
                                       
                                     
                                     - 
                                     
                                       N 
                                       ZC 
                                     
                                     - 
                                     
                                       
                                         
                                           n 
                                           _ 
                                         
                                         shift 
                                         RA 
                                       
                                       ⁢ 
                                       
                                         N 
                                         CS 
                                       
                                     
                                   
                                   ) 
                                 
                               
                             
                             ) 
                           
                           ⁢ 
                           
                             / 
                           
                           ⁢ 
                           
                             N 
                             CS 
                           
                         
                         ⌋ 
                       
                       - 
                       
                         
                           n 
                           = 
                         
                         shift 
                         RA 
                       
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           d 
                           ≡ 
                         
                         start 
                       
                       = 
                       
                         
                           N 
                           ZC 
                         
                         - 
                         
                           2 
                           ⁢ 
                           
                             d 
                             u 
                           
                         
                         + 
                         
                           
                             n 
                             group 
                             Ra 
                           
                           · 
                           
                             d 
                             start 
                           
                         
                         + 
                         
                           
                             
                               n 
                               = 
                             
                             shift 
                             RA 
                           
                           ⁢ 
                           
                             N 
                             CS 
                           
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         n 
                         shift 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             
                               N 
                               ZC 
                             
                             - 
                             
                               3 
                               ⁢ 
                               
                                 d 
                                 u 
                               
                             
                           
                           
                             N 
                             CS 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   12 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         d 
                         start 
                       
                       = 
                       
                         
                           N 
                           ZC 
                         
                         - 
                         
                           3 
                           ⁢ 
                           
                             d 
                             u 
                           
                         
                         + 
                         
                           
                             n 
                             shift 
                             RA 
                           
                           · 
                           
                             N 
                             CS 
                           
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         n 
                         group 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             d 
                             u 
                           
                           
                             d 
                             start 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           _ 
                         
                         shift 
                         RA 
                       
                       = 
                       
                         max 
                         ⁡ 
                         
                           ( 
                           
                             
                               ⌊ 
                               
                                 
                                   
                                     4 
                                     ⁢ 
                                     
                                       d 
                                       u 
                                     
                                   
                                   - 
                                   
                                     N 
                                     ZC 
                                   
                                   - 
                                   
                                     
                                       n 
                                       group 
                                       RA 
                                     
                                     · 
                                     
                                       d 
                                       start 
                                     
                                   
                                 
                                 
                                   N 
                                   CS 
                                 
                               
                               ⌋ 
                             
                             , 
                             0 
                           
                           ) 
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         n 
                         = 
                       
                       shift 
                       RA 
                     
                     = 
                     
                       ⌊ 
                       
                         
                           min 
                           ⁡ 
                           
                             ( 
                             
                               
                                 
                                   d 
                                   u 
                                 
                                 - 
                                 
                                   
                                     n 
                                     group 
                                     RA 
                                   
                                   · 
                                   
                                     d 
                                     start 
                                   
                                 
                               
                               , 
                               
                                 
                                   N 
                                   ZC 
                                 
                                 - 
                                 
                                   3 
                                   ⁢ 
                                   
                                     d 
                                     u 
                                   
                                 
                                 - 
                                 
                                   
                                     
                                       n 
                                       _ 
                                     
                                     shift 
                                     RA 
                                   
                                   ⁢ 
                                   
                                     N 
                                     CS 
                                   
                                 
                               
                             
                             ) 
                           
                         
                         ⁢ 
                         
                           / 
                         
                         ⁢ 
                         
                           N 
                           CS 
                         
                       
                       ⌋ 
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           d 
                           = 
                         
                         start 
                       
                       = 
                       
                         
                           d 
                           u 
                         
                         + 
                         
                           
                             n 
                             group 
                             RA 
                           
                           · 
                           
                             d 
                             start 
                           
                         
                         + 
                         
                           
                             
                               n 
                               _ 
                             
                             shift 
                             RA 
                           
                           ⁢ 
                           
                             N 
                             CS 
                           
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   17 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           ≡ 
                         
                         shift 
                         RA 
                       
                       = 
                       0 
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   18 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           d 
                           ≡ 
                         
                         start 
                       
                       = 
                       0 
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   19 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         n 
                         shift 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             
                               3 
                               ⁢ 
                               
                                 d 
                                 u 
                               
                             
                             - 
                             
                               N 
                               ZC 
                             
                           
                           
                             N 
                             CS 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   20 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         d 
                         start 
                       
                       = 
                       
                         
                           3 
                           ⁢ 
                           
                             d 
                             u 
                           
                         
                         - 
                         
                           N 
                           ZC 
                         
                         + 
                         
                           
                             n 
                             shift 
                             RA 
                           
                           · 
                           
                             N 
                             CS 
                           
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   21 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         n 
                         group 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             d 
                             u 
                           
                           
                             d 
                             start 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   22 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           _ 
                         
                         shift 
                         RA 
                       
                       = 
                       
                         max 
                         ⁡ 
                         
                           ( 
                           
                             
                               ⌊ 
                               
                                 
                                   
                                     N 
                                     ZC 
                                   
                                   - 
                                   
                                     2 
                                     ⁢ 
                                     
                                       d 
                                       u 
                                     
                                   
                                   - 
                                   
                                     
                                       n 
                                       group 
                                       RA 
                                     
                                     · 
                                     
                                       d 
                                       start 
                                     
                                   
                                 
                                 
                                   N 
                                   CS 
                                 
                               
                               ⌋ 
                             
                             , 
                             0 
                           
                           ) 
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   23 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           = 
                         
                         shift 
                         RA 
                       
                       = 
                       0 
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   24 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           d 
                           = 
                         
                         start 
                       
                       = 
                       0 
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   25 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           ≡ 
                         
                         shift 
                         RA 
                       
                       = 
                       0 
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   26 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           d 
                           ≡ 
                         
                         start 
                       
                       = 
                       0 
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   27 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         n 
                         shift 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             
                               N 
                               ZC 
                             
                             - 
                             
                               2 
                               ⁢ 
                               
                                 d 
                                 u 
                               
                             
                           
                           
                             N 
                             CS 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   28 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         d 
                         start 
                       
                       = 
                       
                         
                           2 
                           ⁢ 
                           
                             ( 
                             
                               
                                 N 
                                 ZC 
                               
                               - 
                               
                                 2 
                                 ⁢ 
                                 
                                   d 
                                   u 
                                 
                               
                             
                             ) 
                           
                         
                         + 
                         
                           
                             n 
                             shift 
                             RA 
                           
                           · 
                           
                             N 
                             CS 
                           
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   29 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         n 
                         group 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             
                               N 
                               ZC 
                             
                             - 
                             
                               d 
                               u 
                             
                           
                           
                             d 
                             start 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   30 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           _ 
                         
                         shift 
                         RA 
                       
                       = 
                       
                         max 
                         ⁡ 
                         
                           ( 
                           
                             
                               ⌊ 
                               
                                 
                                   
                                     3 
                                     ⁢ 
                                     
                                       d 
                                       u 
                                     
                                   
                                   - 
                                   
                                     N 
                                     ZC 
                                   
                                   - 
                                   
                                     
                                       n 
                                       group 
                                       RA 
                                     
                                     · 
                                     
                                       d 
                                       start 
                                     
                                   
                                 
                                 
                                   N 
                                   CS 
                                 
                               
                               ⌋ 
                             
                             , 
                             0 
                           
                           ) 
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   31 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           = 
                         
                         shift 
                         RA 
                       
                       = 
                       0 
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   32 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           d 
                           = 
                         
                         start 
                       
                       = 
                       0 
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   33 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           ≡ 
                         
                         shift 
                         RA 
                       
                       = 
                       0 
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   34 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           d 
                           ≡ 
                         
                         start 
                       
                       = 
                       0 
                     
                     , 
                   
                 
               
               
                 
                   ( 
                   35 
                   ) 
                 
               
             
           
         
       
     
     N ZC  is a sequence length, and d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the seventh aspect, in a first possible implementation of the seventh aspect, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (3). 
     With reference to the seventh aspect or the first possible implementation of the seventh aspect, in a second possible implementation of the seventh aspect, in the case of 
                     N   ZC     +     N   C       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   C       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or in the case of
 
                     ⁢             N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,           
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19);
 
     in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35); or in the case of
 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35).
 
     According to an eighth aspect, an embodiment of the present application provides user equipment UE, including: 
     a shift sequence number determining module, configured to select a shift sequence number ν from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), where ν is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts; 
     a cyclic shift value determining module, configured to obtain a cyclic shift value C ν  according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts; and 
     a random access sequence generation module, configured to generate a random access sequence x u,C     ν   (n) according to the cyclic shift value C ν  by using the following formula (36):
 
 x   u,C     ν   ( n )= x   u (( n+C   ν )mod  N   ZC )  (36), where
 
     N ZC  is a sequence length, and a ZC sequence whose root is u is defined as: 
                   x   u     ⁡     (   n   )       =     e       -   j     ⁢       π   ⁢           ⁢   un   ⁢           ⁢     (     n   +   1     )         N   ZC             ,         
0≤n≤N ZC −1, where
 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35), where 
                       n   shift   RA     =     ⌊         4   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;           (   4   )                   d   start     =       4   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;           (   5   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   6   )                     n   _     shift   RA     =     max   (       ⌊         N   ZC     -     3   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )       ;           (   7   )                     n     _   _       shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   8   )                     d     _   _       start     =       N   ZC     -     3   ⁢     d   u       +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;           (   9   )                   n     _     _   _         shift   RA     =     ⌊         (         (     1   -     min   ⁡     (     1   ,       n   _     shift   RA       )         )     ⁢     (       d   u     -       n   group   RA     ·     d   start         )       +       min   ⁡     (     1   ,         n   _     shift   RA     ⁡     (       4   ⁢     d   u       -     N   ZC     -         n   _     shift   RA     ⁢     N   CS         )         )       ⁢     /     ⁢     N   CS         ⌋     -       n     _   _       shift   RA       ;               (   10   )                     d     _     _   _         start     =       N   ZC     -     2   ⁢     d   u       +       n   group   RA     ·     d   start       +         n     _   _       shift   RA     ⁢     N   CS           ;           (   11   )                   n   shift   RA     =     ⌊         N   ZC     -     3   ⁢     d   u           N   CS       ⌋       ;           (   12   )                   d   start     =       N   ZC     -     3   ⁢     d   u       +       n   shift   RA     ·     N   CS           ;           (   13   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   14   )                     n   _     shift   RA     =     max   (       ⌊         4   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )       ;           (   15   )                     n     _   _       shift   RA     =     ⌊       min   ⁡     (         d   u     -       n   group   RA     ·     d   start         ,       N   ZC     -     3   ⁢     d   u       -         n   _     shift   RA     ⁢     N   CS           )       ⁢     /     ⁢     N   CS       ⌋       ;           (   16   )                     d     _   _       start     =       d   u     +       n   group   RA     ·     d   start       +         n   _     shift   RA     ⁢     N   CS           ;           (   17   )                     n     _     _   _         shift   RA     =   0     ;           (   18   )                     d     _     _   _         start     =   0     ;           (   19   )                   n   shift   RA     =     ⌊         3   ⁢     d   u       -     N   ZC         N   CS       ⌋       ;           (   20   )                   d   start     =       3   ⁢     d   u       -     N   ZC     +       n   shift   RA     ·     N   CS           ;           (   21   )                   n   group   RA     =     ⌊       d   u       d   start       ⌋       ;           (   22   )                     n   _     shift   RA     =     max   (       ⌊         N   ZC     -     2   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )       ;           (   23   )                     n     _   _       shift   RA     =   0     ;           (   24   )                     d     _   _       start     =   0     ;           (   25   )                     n     _     _   _         shift   RA     =   0     ;           (   26   )                     d     _     _   _         start     =   0     ;           (   27   )                   n   shift   RA     =     ⌊         N   ZC     -     2   ⁢     d   u           N   CS       ⌋       ;           (   28   )                   d   start     =       2   ⁢     (       N   ZC     -     2   ⁢     d   u         )       +       n   shift   RA     ·     N   CS           ;           (   29   )                   n   group   RA     =     ⌊         N   ZC     -     d   u         d   start       ⌋       ;           (   30   )                     n   _     shift   RA     =     max   (       ⌊         3   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )       ;           (   31   )                     n     _   _       shift   RA     =   0     ;           (   32   )                     d     _   _       start     =   0     ;           (   33   )                     n     _     _   _         shift   RA     =   0     ;           (   34   )                     d     _     _   _         start     =   0     ,           (   35   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     With reference to the eighth aspect, in a first possible implementation of the eighth aspect, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the cyclic shift value determining module obtains the cyclic shift value C ν  by using formula (3). 
     With reference to the eighth aspect or the first possible implementation of the eighth aspect, in a second possible implementation of the eighth aspect, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19); or in the case of
 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19);
 
     in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35); or in the case of
 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢           ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35).
 
     According to a ninth aspect, an embodiment of the present application provides a random access sequence generation system, including: the base station described in any one of the fifth aspect, or the first to the eighth possible implementations of the fifth aspect, and the user equipment UE described in any one of the sixth aspect, or the first to the eighth possible implementations of the sixth aspect. 
     According to a tenth aspect, an embodiment of the present application provides a random access sequence generation system, including: the base station described in any one of the seventh aspect, or the first to the second possible implementations of the seventh aspect, and the user equipment UE described in any one of the eighth aspect, or the first to the second possible implementations of the eighth aspect. 
     According to the random access sequence generation method, the device, and the system in the embodiments of the present application, the random access sequence generation method includes: generating, by the base station, the notification signaling, where the notification signaling includes the indication information, the indication information is used to instruct the user equipment UE to select the shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is the quantity of UE candidate sequence shifts in the second remaining sequence shifts; and sending, by the base station, the notification signaling to the UE, so that the UE generates the random access sequence according to the indication information. 
    
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
       To describe the technical solutions in the embodiments of the present application more clearly, the following briefly describes the accompanying drawings required for describing the embodiments. Apparently, the accompanying drawings in the following description show some embodiments of the present application, and persons of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts. 
         FIG. 1  is a flowchart of Embodiment 1 of a random access sequence generation method according to the present application; 
         FIG. 2  is a flowchart of Embodiment 2 of a random access sequence generation method according to the present application; 
         FIG. 3  is a schematic diagram of scenario 1 according to an embodiment of the present application; 
         FIG. 4  is a schematic diagram of scenario 2 according to an embodiment of the present application; 
         FIG. 5  is a schematic diagram of scenario 3 according to an embodiment of the present application; 
         FIG. 6  is a schematic diagram of scenario 4 according to an embodiment of the present application; 
         FIG. 7  is a schematic diagram of scenario 5 according to an embodiment of the present application; 
         FIG. 8  is a schematic diagram of scenario 6 according to an embodiment of the present application; 
         FIG. 9  is a schematic diagram of scenario 7 according to an embodiment of the present application; 
         FIG. 10  is a flowchart of Embodiment 3 of a random access sequence generation method according to the present application; 
         FIG. 11  is a flowchart of Embodiment 5 of a random access sequence generation method according to the present application; 
         FIG. 12  is a flowchart of Embodiment 6 of a random access sequence generation method according to the present application; 
         FIG. 13  is a schematic structural diagram of Embodiment 1 of a base station according to the present application; 
         FIG. 14  is a schematic structural diagram of Embodiment 2 of a base station according to the present application; 
         FIG. 15  is a schematic structural diagram of Embodiment 1 of user equipment according to the present application; 
         FIG. 16  is a schematic structural diagram of Embodiment 3 of a base station according to the present application; 
         FIG. 17  is a schematic structural diagram of Embodiment 3 of user equipment according to the present application; 
         FIG. 18  is a schematic structural diagram of Embodiment 4 of a base station according to the present application; 
         FIG. 19  is a schematic structural diagram of Embodiment 4 of user equipment according to the present application; and 
         FIG. 20  is a schematic structural diagram of Embodiment 5 of a base station according to the present application. 
     
    
    
     DESCRIPTION OF EMBODIMENTS 
     To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the following clearly describes the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some but not all of the embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application. 
       FIG. 1  is a flowchart of Embodiment 1 of a random access sequence generation method according to the present application. As shown in  FIG. 1 , the method in this embodiment may include: 
     Step  101 : A base station generates notification signaling, where the notification signaling includes indication information, the indication information is used to instruct user equipment UE to select a shift sequence number from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts. 
     It should be noted that, a “group” in the present application is a sequence shift group; n group   RA  indicates a quantity of groups obtained after sequence shifts are grouped; n shift   RA  indicates a quantity of UEs that can be distinguished in a sequence shift group after sequence shifts are grouped;  n   shift   RA  indicates a quantity of UEs that are further distinguished in a sequence shift in a remaining length that is insufficient for a group after sequence shifts are grouped;  n   shift   RA  and    shift   RA  indicate quantities of UEs that can be distinguished in remaining discrete sequence shifts of all sequence shifts other than sequence shifts that are definitely occupied by n shift   RA , n group   RA , and  n   shift   RA . 
     Step  102 : The base station sends the notification signaling to the UE, so that the UE generates a random access sequence according to the indication information. 
     In the conventional art, the UE selects a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA −1). In the present application, the base station instructs, by using the notification signaling, the UE to select a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1). 
     In the conventional art, shift sequences are grouped to determine three parameters: a quantity (n group   RA ) of groups, a quantity (n shift   RA ) of UE candidate sequence shifts in a group, and a quantity ( n   shift   RA ) of UE candidate sequence shifts in the last length that is insufficient for a group; and a shift sequence number is selected from an interval that is determined according to the three parameters. As can be learned, in the conventional art, during determining of a range from which a shift sequence number is selected, a quantity of UEs that can be distinguished is considered from only a perspective of a group, and other remaining discrete shift sequences obtained after grouping are not considered. In the present application, after a quantity of UEs that can be distinguished is considered from a perspective of a group, quantities of UEs that can be further distinguished in other remaining discrete shift sequences obtained after grouping, that is, a quantity ( n   shift   RA ) of UE candidate sequence shifts in first remaining sequence shifts and a quantity ( ) of UE candidate sequence shifts in second remaining sequence shifts, are further considered; and the UE is instructed, by using the notification signaling, to select a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), thereby expanding a range from which a shift sequence number is selected. 
       FIG. 2  is a flowchart of Embodiment 2 of a random access sequence generation method according to the present application. As shown in  FIG. 2 , optionally, after step  102 , the method may further include: 
     Step  201 : The base station selects a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1). 
     Optionally, because the base station cannot learn a shift sequence number that is used by the UE when the UE sends the random access sequence, when the base station detects the random access sequence sent by the UE, the base station sequentially chooses to traverse each shift sequence number in the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1). Alternatively, the base station sequentially chooses to traverse each shift sequence number in a range of 0 to X. X is an integer less than (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1). 
     Step  202 : The base station obtains a cyclic shift value according to the shift sequence number. 
     Optionally, the base station obtains the cyclic shift value C ν  of the UE according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts. 
     It should be noted that, d offset  is an integer (which is usually a constant integer), and d offset  used on a base station side and d offset  used on a UE side need to be the same. Optionally, that d offset  used on the base station side and d offset  used on the UE side have a same value may be implemented by means of agreement in advance. For example, d offset =0. 
     It should be noted that, in the present application, └Y┘ indicates rounded-down of Y. That is, if Y is equal to 2.5, └Y┘ is equal to 2. For example, └ν/n shift   RA ┘ indicates rounded-down of ν/n shift   RA . 
     It should be noted that, in the present application, mod indicates a modulo operation. For example, 4 mod 2=0, and 5 mod 2=1. 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (2); or 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (3). 
     Step  203 : The base station generates a detection sequence according to the cyclic shift value, and detects, by using the detection sequence, the random access sequence sent by the UE, where the random access sequence is generated by the UE according to the indication information. 
     A ZC sequence x u (n) whose root is u may be defined as: 
     
       
         
           
             
               
                 
                   x 
                   u 
                 
                 ⁡ 
                 
                   ( 
                   n 
                   ) 
                 
               
               = 
               
                 e 
                 
                   
                     - 
                     j 
                   
                   ⁢ 
                   
                     
                       π 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       
                         un 
                         ⁡ 
                         
                           ( 
                           
                             n 
                             + 
                             1 
                           
                           ) 
                         
                       
                     
                     
                       N 
                       ZC 
                     
                   
                 
               
             
             , 
           
         
       
     
     0≤n≤N ZC −1, where N ZC  is a length of the ZC sequence, and u is the root of the ZC sequence. 
     Specifically, the base station performs cyclic shift on the ZC sequence x u (n) whose root is u. If the cyclic shift value is K, a ZC sequence generated according to the cyclic shift value is x u ((n+K)mod N ZC ), where N ZC  is a length of the ZC sequence. 
     Optionally, the base station performs, by using the detection sequence generated according to the cyclic shift value, related detection on the random access sequence sent by the UE. The base station may perform related detection in a time domain, or may perform detection in a frequency domain according to a frequency domain detection manner corresponding to a time domain—related detection manner. 
     Optionally, in step  202 , n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11): 
     
       
         
           
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         n 
                         shift 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             
                               4 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 d 
                                 u 
                               
                             
                             - 
                             
                               N 
                               ZC 
                             
                           
                           
                             N 
                             CS 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         d 
                         start 
                       
                       = 
                       
                         
                           4 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             d 
                             u 
                           
                         
                         - 
                         
                           N 
                           ZC 
                         
                         + 
                         
                           
                             n 
                             shift 
                             RA 
                           
                           · 
                           
                             N 
                             CS 
                           
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         n 
                         group 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             d 
                             u 
                           
                           
                             d 
                             start 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   6 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           _ 
                         
                         shift 
                         RA 
                       
                       = 
                       
                         max 
                         ⁡ 
                         
                           ( 
                           
                             
                               ⌊ 
                               
                                 
                                   
                                     N 
                                     ZC 
                                   
                                   - 
                                   
                                     3 
                                     ⁢ 
                                     
                                         
                                     
                                     ⁢ 
                                     
                                       d 
                                       u 
                                     
                                   
                                   - 
                                   
                                     
                                       n 
                                       group 
                                       RA 
                                     
                                     · 
                                     
                                       d 
                                       start 
                                     
                                   
                                 
                                 
                                   N 
                                   CS 
                                 
                               
                               ⌋ 
                             
                             , 
                             0 
                           
                           ) 
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   7 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           n 
                           ⩵ 
                         
                         shift 
                         RA 
                       
                       = 
                       
                         ⌊ 
                         
                           
                             min 
                             ⁡ 
                             
                               ( 
                               
                                 
                                   
                                     d 
                                     u 
                                   
                                   - 
                                   
                                     
                                       n 
                                       group 
                                       RA 
                                     
                                     · 
                                     
                                       d 
                                       start 
                                     
                                   
                                 
                                 , 
                                 
                                   
                                     4 
                                     ⁢ 
                                     
                                         
                                     
                                     ⁢ 
                                     
                                       d 
                                       u 
                                     
                                   
                                   - 
                                   
                                     N 
                                     ZC 
                                   
                                   - 
                                   
                                     
                                       
                                         n 
                                         _ 
                                       
                                       shift 
                                       RA 
                                     
                                     ⁢ 
                                     
                                       N 
                                       CS 
                                     
                                   
                                 
                               
                               ) 
                             
                           
                           / 
                           
                             N 
                             CS 
                           
                         
                         ⌋ 
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   8 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         
                           d 
                           ⩵ 
                         
                         start 
                       
                       = 
                       
                         
                           N 
                           ZC 
                         
                         - 
                         
                           3 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           
                             d 
                             u 
                           
                         
                         + 
                         
                           
                             n 
                             group 
                             RA 
                           
                           · 
                           
                             d 
                             start 
                           
                         
                         + 
                         
                           
                             
                               n 
                               _ 
                             
                             shift 
                             RA 
                           
                           ⁢ 
                           
                             
                               N 
                               _ 
                             
                             CS 
                           
                         
                       
                     
                     ; 
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         n 
                         ≡ 
                       
                       shift 
                       RA 
                     
                     = 
                     
                       
                         ⌊ 
                         
                           
                             ( 
                             
                               
                                 
                                   ( 
                                   
                                     1 
                                     - 
                                     
                                       min 
                                       ⁡ 
                                       
                                         ( 
                                         
                                           1 
                                           , 
                                           
                                             
                                               n 
                                               _ 
                                             
                                             shift 
                                             RA 
                                           
                                         
                                         ) 
                                       
                                     
                                   
                                   ) 
                                 
                                 ⁢ 
                                 
                                   ( 
                                   
                                     
                                       d 
                                       u 
                                     
                                     - 
                                     
                                       
                                         n 
                                         group 
                                         RA 
                                       
                                       · 
                                       
                                         d 
                                         start 
                                       
                                     
                                   
                                   ) 
                                 
                               
                               + 
                               
                                 
                                   min 
                                   ⁡ 
                                   
                                     ( 
                                     
                                       1 
                                       , 
                                       
                                         
                                           n 
                                           _ 
                                         
                                         shift 
                                         RA 
                                       
                                     
                                     ) 
                                   
                                 
                                 ⁢ 
                                 
                                   ( 
                                   
                                     
                                       4 
                                       ⁢ 
                                       
                                           
                                       
                                       ⁢ 
                                       
                                         d 
                                         u 
                                       
                                     
                                     - 
                                     
                                       N 
                                       ZC 
                                     
                                     - 
                                     
                                       
                                         
                                           n 
                                           _ 
                                         
                                         shift 
                                         RA 
                                       
                                       ⁢ 
                                       
                                         N 
                                         CS 
                                       
                                     
                                   
                                   ) 
                                 
                               
                             
                             ) 
                           
                           / 
                           
                             N 
                             CS 
                           
                         
                         ⌋ 
                       
                       - 
                       
                         
                           n 
                           ⩵ 
                         
                         shift 
                         RA 
                       
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
             
               
                 
                   
                       
                   
                   ⁢ 
                   
                     
                       
                         d 
                         ≡ 
                       
                       start 
                     
                     = 
                     
                       
                         N 
                         ZC 
                       
                       - 
                       
                         2 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         
                           d 
                           u 
                         
                       
                       + 
                       
                         
                           n 
                           group 
                           RA 
                         
                         · 
                         
                           d 
                           start 
                         
                       
                       + 
                       
                         
                           
                             n 
                             ⩵ 
                           
                           shift 
                           RA 
                         
                         ⁢ 
                         
                           
                             N 
                             CS 
                           
                           . 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
     Alternatively, in step  202 , n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19): 
     
       
         
           
             
               
                 
                   
                     
                       n 
                       shift 
                       RA 
                     
                     = 
                     
                       ⌊ 
                       
                         
                           
                             N 
                             ZC 
                           
                           - 
                           
                             3 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               d 
                               u 
                             
                           
                         
                         
                           N 
                           CS 
                         
                       
                       ⌋ 
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   12 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       d 
                       start 
                     
                     = 
                     
                       
                         N 
                         ZC 
                       
                       - 
                       
                         3 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         
                           d 
                           u 
                         
                       
                       + 
                       
                         
                           n 
                           shift 
                           RA 
                         
                         · 
                         
                           N 
                           CS 
                         
                       
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       n 
                       group 
                       RA 
                     
                     = 
                     
                       ⌊ 
                       
                         
                           d 
                           u 
                         
                         
                           d 
                           start 
                         
                       
                       ⌋ 
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         n 
                         _ 
                       
                       shift 
                       RA 
                     
                     = 
                     
                       max 
                       ⁡ 
                       
                         ( 
                         
                           
                             ⌊ 
                             
                               
                                 
                                   4 
                                   ⁢ 
                                   
                                       
                                   
                                   ⁢ 
                                   
                                     d 
                                     u 
                                   
                                 
                                 - 
                                 
                                   N 
                                   ZC 
                                 
                                 - 
                                 
                                   
                                     n 
                                     group 
                                     RA 
                                   
                                   · 
                                   
                                     d 
                                     start 
                                   
                                 
                               
                               
                                 N 
                                 CS 
                               
                             
                             ⌋ 
                           
                           , 
                           0 
                         
                         ) 
                       
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   15 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         n 
                         ⩵ 
                       
                       shift 
                       RA 
                     
                     = 
                     
                       ⌊ 
                       
                         
                           min 
                           ⁡ 
                           
                             ( 
                             
                               
                                 
                                   d 
                                   u 
                                 
                                 - 
                                 
                                   
                                     n 
                                     group 
                                     RA 
                                   
                                   · 
                                   
                                     d 
                                     start 
                                   
                                 
                               
                               , 
                               
                                 
                                   N 
                                   ZC 
                                 
                                 - 
                                 
                                   3 
                                   ⁢ 
                                   
                                       
                                   
                                   ⁢ 
                                   
                                     d 
                                     u 
                                   
                                 
                                 - 
                                 
                                   
                                     
                                       n 
                                       _ 
                                     
                                     shift 
                                     RA 
                                   
                                   ⁢ 
                                   
                                     N 
                                     CS 
                                   
                                 
                               
                             
                             ) 
                           
                         
                         / 
                         
                           N 
                           CS 
                         
                       
                       ⌋ 
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         d 
                         ⩵ 
                       
                       start 
                     
                     = 
                     
                       
                         d 
                         u 
                       
                       + 
                       
                         
                           n 
                           group 
                           RA 
                         
                         · 
                         
                           d 
                           start 
                         
                       
                       + 
                       
                         
                           
                             n 
                             _ 
                           
                           shift 
                           RA 
                         
                         ⁢ 
                         
                           N 
                           CS 
                         
                       
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   17 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         n 
                         ≡ 
                       
                       shift 
                       RA 
                     
                     = 
                     0 
                   
                   ; 
                 
               
               
                 
                   ( 
                   18 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       d 
                       ≡ 
                     
                     start 
                   
                   = 
                   0. 
                 
               
               
                 
                   ( 
                   19 
                   ) 
                 
               
             
           
         
       
     
     Alternatively, in step  202 , n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27): 
     
       
         
           
             
               
                 
                   
                     
                       n 
                       shift 
                       RA 
                     
                     = 
                     
                       ⌊ 
                       
                         
                           
                             3 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             
                               d 
                               u 
                             
                           
                           - 
                           
                             N 
                             ZC 
                           
                         
                         
                           N 
                           CS 
                         
                       
                       ⌋ 
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   20 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       d 
                       start 
                     
                     = 
                     
                       
                         3 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         
                           d 
                           u 
                         
                       
                       - 
                       
                         N 
                         ZC 
                       
                       + 
                       
                         
                           n 
                           shift 
                           RA 
                         
                         · 
                         
                           N 
                           CS 
                         
                       
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   21 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       n 
                       group 
                       RA 
                     
                     = 
                     
                       ⌊ 
                       
                         
                           d 
                           u 
                         
                         
                           d 
                           start 
                         
                       
                       ⌋ 
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   22 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         n 
                         _ 
                       
                       shift 
                       RA 
                     
                     = 
                     
                       max 
                       ⁡ 
                       
                         ( 
                         
                           
                             ⌊ 
                             
                               
                                 
                                   N 
                                   ZC 
                                 
                                 - 
                                 
                                   2 
                                   ⁢ 
                                   
                                       
                                   
                                   ⁢ 
                                   
                                     d 
                                     u 
                                   
                                 
                                 - 
                                 
                                   
                                     n 
                                     group 
                                     RA 
                                   
                                   · 
                                   
                                     d 
                                     start 
                                   
                                 
                               
                               
                                 N 
                                 CS 
                               
                             
                             ⌋ 
                           
                           , 
                           0 
                         
                         ) 
                       
                     
                   
                   ; 
                 
               
               
                 
                   ( 
                   23 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         n 
                         ⩵ 
                       
                       shift 
                       RA 
                     
                     = 
                     0 
                   
                   ; 
                 
               
               
                 
                   ( 
                   24 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         d 
                         ⩵ 
                       
                       start 
                     
                     = 
                     0 
                   
                   ; 
                 
               
               
                 
                   ( 
                   25 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       
                         n 
                         ≡ 
                       
                       shift 
                       RA 
                     
                     = 
                     0 
                   
                   ; 
                 
               
               
                 
                   ( 
                   26 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       d 
                       ≡ 
                     
                     start 
                   
                   = 
                   0. 
                 
               
               
                 
                   ( 
                   27 
                   ) 
                 
               
             
           
         
       
     
     Alternatively, in step  202 , n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35): 
                       n   shift   RA     =     ⌊       NC   -     2   ⁢           ⁢     d   u           N   CS       ⌋       ;           (   28   )                   d   start     =       2   ⁢     (       N   ZC     -     2   ⁢           ⁢     d   u         )       +       n   shift   RA     ·     N   CS           ;           (   29   )                   n   group   RA     =     ⌊         N   ZC     -     d   u         d   start       ⌋       ;           (   30   )                     n   _     shift   RA     =     max   ⁡     (       ⌊         3   ⁢           ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )         ;           (   31   )                     n   ⩵     shift   RA     =   0     ;           (   32   )                     d   ⩵     start     =   0     ;           (   33   )                     n   ≡     shift   RA     =   0     ;           (   34   )                     d   ≡     start     =   0     ,           (   35   )               
where
 
     d u  is a cyclic shift corresponding to the random access sequence when a Doppler frequency shift is one time a PRACH subcarrier spacing. 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢           ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢           ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢           ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢           ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     It should be noted that, in the present application, max indicates obtaining a maximum value. For example, max (0,1)=1, and max (4,5)=5. min indicates obtaining a minimum value. For example, min (0,1)=0, and min (4,5)=4. 
     It should be noted that, any n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  that satisfy formulas (4) to (11), formulas (12) to (19), formulas (20) to (27), or formulas (28) to (35) fall within the protection scope of the present application. 
     In this embodiment, the base station selects the shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1); the base station obtains the cyclic shift value according to the shift sequence number; and the base station generates the detection sequence according to the cyclic shift value, and detects, by using the detection sequence, the random access sequence sent by the UE, where the random access sequence is generated by the UE according to the indication information. This resolves a problem that random access sequences of multiple UEs interfere with each other when a Doppler frequency shift is greater than one time a PRACH subcarrier spacing and is less than two times the PRACH subcarrier spacing, avoids interference between random access sequences of multiple UEs, and enables the base station to decode the random access sequence more accurately. 
     The following describes a reason why the problem that random access sequences of multiple UEs interfere with each other when a Doppler frequency shift is greater than one time a PRACH subcarrier spacing and is less than two times the PRACH subcarrier spacing in this embodiment can be avoided in the case of n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11), formulas (12) to (19), formulas (20) to (27), or formulas (28) to (35). 
     Assuming that a signal sent by the UE is r(t)e j2πft , r(t) is a baseband signal, and e j2πft  is a carrier, a signal obtained after a Doppler frequency shift mΔf is r(t)e j2π(f+mΔf)t , where m is a positive integer, and Δf is one time a PRACH subcarrier spacing. 
     According to a property of inverse fast Fourier transform (IFFT), a reciprocal of a frequency domain spacing is equal to a time domain period, and this is equivalent to 
                 Δ   ⁢           ⁢   f     =     1     N   ⁢           ⁢   Δ   ⁢           ⁢   t         ,         
where Δf is a subcarrier spacing, Δt is a time domain sampling interval, and N is a value of discrete Fourier transform (DFT) or inverse discrete Fourier transform (IDFT).
 
     t=nΔt is set, and in this case, r(t)e j2π(f+mΔf)t =(r(t)e j2π(mn)/N )e j2πft . (r(t)e j2π(mn)/N ) is an equivalent baseband signal. 
     Property 1: 
     The UE sends the random access sequence to the base station. If there is a Doppler frequency shift ±mΔf between receive ends of the UE and the base station, a random access sequence received on the receive end of the base station is a shift sequence of the random access sequence sent by the UE, and there is a fixed phase shift between the two sequences. 
     Proof: For example, the Doppler frequency shift is −mΔf. A baseband sampling signal of a time domain t=nΔt is marked as r(n). For the equivalent baseband signal (r(t)e −j2π(mn)/N ), N=N ZC  is set. In this case, a baseband sampling signal of the equivalent baseband signal of a ZC sequence is 
                 r   ⁡     (   n   )       =       W       un   ⁡     (     n   +   1     )       2       ⁢     W   mn         ,         
where
 
                 r   ⁡     (   n   )       =       W       un   ⁡     (     n   +   1     )       2       ⁢     W   mn         ;         
and
 
                           r   ⁡     (   n   )       =       ⁢       W       un   ⁡     (     n   +   1     )       2       ⁢     W   mn                   =       ⁢     W       u   ⁡     [       n   ⁡     (     n   +   1     )       +     2   ⁢           ⁢     m   ⁡     (     1   /   u     )       ⁢   n       ]       2                   =       ⁢     W       u   ⁡     [       n   2     +   n   +     2   ⁢           ⁢     m   ⁡     (     1   /   u     )       ⁢   n       ]       2                   =       ⁢     W       u   ⁡     [       n   ⁡     (     n   +     m   ⁡     (     1   /   u     )       +   1     )       +       m   ⁡     (     1   /   u     )       ⁢     (     n   +     m   ⁡     (     1   /   u     )       +   1     )       -       m   ⁡     (     1   /   u     )       ⁢     (       m   ⁡     (     1   /   u     )       +   1     )         ]       2                   =       ⁢     W       u   ⁡     [         (     n   +     m   ⁡     (     1   /   u     )         )     ⁢     (     n   +     m   ⁡     (     1   /   u     )       +   1     )       -       m   ⁡     (     1   /   u     )       ⁢     (       m   ⁡     (     1   /   u     )       +   1     )         ]       2                   =       ⁢       W         u   ⁡     (     n   +     m   ⁡     (     1   /   u     )         )       ⁢     (     n   +     m   ⁡     (     1   /   u     )       +   1     )       2       ⁢     W         -     um   ⁡     (     1   /   u     )         ⁢     (       m   ⁡     (     1   /   u     )       +   1         2                       =       ⁢         x   u     ⁡     (     n   +     m   ⁡     (     1   /   u     )         )       ⁢     W         -     um   ⁡     (     1   /   u     )         ⁢     (       m   ⁡     (     1   /   u     )       +   1     )       2           ,                 (   37   )               
where
 
     x u (n) indicates a ZC sequence whose root is u, that is, 
                   x   u     ⁡     (   n   )       =     e       -   j     ⁢       π   ⁢           ⁢     un   ⁡     (     n   +   1     )           N   ZC             ;         
and x u (n+m(1/u)) indicates a shift sequence of the ZC sequence whose root is u, that is, right cyclic shift is performed on the ZC sequence whose root is u by m(1/u) bits.
 
     In formula (37), 
             1   u         
is defined as a minimum non-negative integer that satisfies ((1/u)×u)mod N ZC =1.
 
     As can be learned from formula (37): 
             1   u         
is a cyclic shift corresponding to the random access sequence when the Doppler frequency shift is one time a PRACH subcarrier spacing, that is, a length that is of a cyclic shift between the random access sequence received by the base station and the random access sequence sent by the UE and that exists when the Doppler frequency shift is one time a PRACH subcarrier spacing.
 
     For example, if the random access sequence sent by the UE is x u (n), when the Doppler frequency shift is one time a PRACH subcarrier spacing, the random access sequence received by the base station is 
     
       
         
           
             
               
                 x 
                 u 
               
               ⁡ 
               
                 ( 
                 
                   
                     ( 
                     
                       n 
                       + 
                       
                         1 
                         u 
                       
                     
                     ) 
                   
                   ⁢ 
                   mod 
                   ⁢ 
                   
                       
                   
                   ⁢ 
                   
                     N 
                     ZC 
                   
                 
                 ) 
               
             
             ⁢ 
             
                 
             
             ⁢ 
             or 
             ⁢ 
             
                 
             
             ⁢ 
             
               
                 
                   x 
                   u 
                 
                 ⁡ 
                 
                   ( 
                   
                     
                       ( 
                       
                         n 
                         - 
                         
                           1 
                           u 
                         
                       
                       ) 
                     
                     ⁢ 
                     mod 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     
                       N 
                       ZC 
                     
                   
                   ) 
                 
               
               . 
             
           
         
       
     
     As can be learned from formula (15): if there is a Doppler frequency shift −mΔf between receive ends of the UE and the base station, in a time domain, the random access sequence received by the base station is a shift sequence of the random access sequence sent by the UE, and there is a fixed phase offset 
             W         -     um   ⁡     (     1   /   u     )         ⁢     (       m   ⁡     (     1   /   u     )       +   1     )       2           
(unrelated to n) between the two sequences. Similarly, for a Doppler frequency shift +mΔf, the random access sequence received by the base station in a time domain is also a shift sequence of the random access sequence sent by the UE. Details are not described herein again.
 
     Property 2: When the Doppler frequency shift is relatively large, and the Doppler frequency shift f off  is less than one time a PRACH subcarrier spacing Δf, related peak values may appear in three positions of sequence shifts 
               1   u     ,   0   ,     and   ⁢           -     1   u             
when sequences are correlated.
 
     That is, for the ZC sequence x u (n) whose root is u, when the Doppler frequency shift f off  is less than one time a PRACH subcarrier spacing Δf, and the random access sequence sent by the UE is x u (n), there is a peak value when the receive end of the base station uses a sequence x u (n), 
                 x   u     ⁡     (       (     n   +     1   u       )     ⁢   mod   ⁢           ⁢     N   ZC       )       ,     or   ⁢           ⁢       x   u     ⁡     (       (     n   -     1   u       )     ⁢   mod   ⁢           ⁢     N   ZC       )               
to correlate with the random access sequence sent by the UE.
 
     It should be noted that, property 2 is determined through an experiment. 
     As can be learned from property 1 and property 2: 
     1) When a Doppler frequency shift is f off =Δf+x, and 0&lt;x&lt;Δf, during receiving by the base station, peak values are generated in three positions of shifts 
               -     1   u       ,       -   2     ⁢     1   u       ,         
and 0.
 
     That is, for the ZC sequence x u (n) whose root is u, when a Doppler frequency shift is f off =Δf+x (0&lt;x&lt;Δf), and the random access sequence sent by the UE is x u (n), there is a peak value when the receive end of the base station uses a sequence x u (n), 
                 x   u     ⁡     (       (     n   +     1   u       )     ⁢   mod   ⁢           ⁢     N   ZC       )       ,     or   ⁢           ⁢       x   u     ⁡     (       (     n   -     1   u       )     ⁢   mod   ⁢           ⁢     N   ZC       )               
to correlate with the random access sequence sent by the UE.
 
     2) When the Doppler frequency shift is f off =Δf+x, and 0&lt;x&lt;Δf, during receiving by the base station, peak values are generated in three positions of shifts 
               -     1   u       ,       -   2     ⁢     1   u       ,         
and 0.
 
     That is, for the ZC sequence x u (n) whose root is u, when the Doppler frequency shift is f off =Δf+x (0&lt;x&lt;Δf), and the random access sequence sent by the UE is x u (n), there is a peak value when the receive end of the base station uses a sequence x u (n), 
                 x   u     ⁡     (       (     n   -     1   u       )     ⁢   mod   ⁢           ⁢     N   ZC       )       ,     or   ⁢           ⁢       x   u     ⁡     (       (     n   -     2   ⁢     1   u         )     ⁢   mod   ⁢           ⁢     N   ZC       )               
to correlate with the random access sequence sent by the UE.
 
     Therefore, when the Doppler frequency shift is greater than one time a PRACH subcarrier spacing Δf and is less than two times the PRACH subcarrier spacing, during receiving by the base station, peak values may be generated in five positions of shifts 
     
       
         
           
             
               - 
               
                 1 
                 u 
               
             
             , 
             
               
                 - 
                 2 
               
               ⁢ 
               
                 1 
                 u 
               
             
             , 
             0 
             , 
             
               1 
               u 
             
             , 
             
               and 
               ⁢ 
               
                   
               
               ⁢ 
               2 
               ⁢ 
               
                 
                   1 
                   u 
                 
                 . 
               
             
           
         
       
     
     That is, for the ZC sequence x u (n) whose root is u, when the Doppler frequency shift is greater than one time a PRACH subcarrier spacing Δf and is less than two times the PRACH subcarrier spacing, and the random access sequence sent by the UE is x u (n), there may be a peak value when the receive end of the base station uses a sequence 
                 x   u     ⁡     (       (     n   -     2   ⁢           ⁢     1   u         )     ⁢   mod   ⁢           ⁢     N   ZC       )       ,       x   u     ⁡     (       (     n   -     1   u       )     ⁢   mod   ⁢           ⁢     N   ZC       )       ,     
     ⁢       x   u     ⁡     (   n   )       ,       x   u     ⁡     (       (     n   +     1   u       )     ⁢   mod   ⁢           ⁢     N   ZC       )       ,     or   ⁢           ⁢       x   u     ⁡     (       (     n   +     2   ⁢           ⁢     1   u         )     ⁢   mod   ⁢           ⁢     N   ZC       )               
to correlate with the random access sequence sent by the UE.
 
     In this embodiment, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11), formulas (12) to (19), formulas (20) to (27), or formulas (28) to (35), to prevent the receive end of the base station from allocating, to another user, a sequence corresponding to five peak value points generated when the Doppler frequency shift is greater than one time a PRACH subcarrier spacing and is less than two times the PRACH subcarrier spacing, and thereby avoid interference between users that is caused by the Doppler frequency shift. 
     When 
                 1   u     ≥       N   ZC     2       ,         
a sequence obtained when left cyclic shift is performed on the ZC sequence by
 
             1   u         
is the same as a sequence obtained when right cyclic shift is performed on the ZC sequence by
 
               N   ZC     -       1   u     .           
Therefore, in the present application,
 
               d   u     =     {           p         0   ≤   p   &lt;       N   ZC     /   2                   N   ZC     -   p           another   ⁢           ⁢   value           ,             
where
 
             p   =       1   u     .           
As can be learned, d u  is a cyclic shift corresponding to the random access sequence when the Doppler frequency shift is one time a PRACH subcarrier spacing.
 
       FIG. 3  is a schematic diagram of scenario 1 according to an embodiment of the present application. In the figure, N=N ZC , and satisfies 
                   N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢         N   ZC     ⁡     (       or   ⁢           ⁢         N   ZC     +     N   CS       4       ≤     d   u     ≤       2   7     ⁢     N   ZC         )       .             
As shown in  FIG. 3 , sequence shifts that are occupied by 1 0 , 1 +1 , 1 +2 , 1 −1 , and 1 +2  are used as a first group, and sequence shifts that are occupied by 2 0 , 2 +1 , 2 +2 , 2 −1 , and 2 +2  are used as a second group. A quantity of UE candidate sequence shifts in a group is
 
                 n   shift   RA     =     ⌊         4   ⁢     d   u       -     N   ZC         N   CS       ⌋       ,         
where N CS  indicates a quantity of cyclic shifts that are occupied by a user. For example, a sequence length is N ZC , and a user occupies N CS  shifts. When the Doppler frequency shift is not considered, a maximum of └N ZC /N CS ┘ users are simultaneously supported to simultaneously send the random access sequence.
 
     n shift   RA  also indicates a quantity of users that can be distinguished in a group. From a perspective of a system, n shift   RA  users can be distinguished in a group. From a perspective of a UE side, one UE may select a maximum of n shift   RA  sequence shifts in a group. 
     It should be noted that, for the ZC sequence whose sequence length is N ZC  when the Doppler frequency shift is not considered and N CS =0, the ZC sequence may have N ZC  candidate sequence shifts, which respectively correspond to cyclic shift values 0 to N ZC −1. For example, if the ZC sequence whose root is u is marked as x u (n), when the cyclic shift value is 0, a generated sequence thereof is x u (n). When the cyclic shift value is 1, a generated sequence thereof is x u (n+1). When the Doppler frequency shift is not considered and N CS  is greater than 0, there may be └N ZC /N CS ┘ candidate sequence shifts, which respectively correspond to cyclic shift values Y*N CS , where Y is an integer greater than or equal to 0 and less than └N ZC /N CS ┘−1. 
     When the Doppler frequency shift is greater than one time a PRACH subcarrier spacing and is less than two times the PRACH subcarrier spacing, first user equipment generates a random access sequence according to a first cyclic shift value and sends the random access sequence to the base station. When the base station detects, by using a sequence corresponding to five cyclic shift values, the random access sequence sent by the first user equipment, there may be a peak value, and differences between the cyclic shift values and the first cyclic shift value are respectively 0, d u , −d u , 2d u , and −2d u . Therefore, to avoid interference between the first user equipment and another user equipment, none of candidate sequence shifts corresponding to the five cyclic shift values can be allocated to the another user equipment. In addition, for the base station side, this is equivalent to that the candidate sequence shifts corresponding to the five cyclic shift values are all allocated to the first user equipment. That is, as shown in  FIG. 3 , sequence shifts (that is, sequence shifts that are occupied by 1 0 , 1 +1 , 1 +2 , 1 −1 , and 1 +2 ) related to “1” are used as candidate sequence shifts of a same group of UEs, and sequence shifts (that is, sequence shifts that are occupied by 2 0 , 2 +1 , 2 +2 , 2 −1 , and 2 +2 ) related to “2” are used as candidate sequence shifts of a same group of UEs. 
     In addition, because the differences between the five cyclic shift values and the first cyclic shift value are respectively 0, d u , −d u , 2d u , and −2d u , it can also be learned that, for first UE in a first group of UEs, an initial sequence shift of sequence shifts that are occupied by 1 0  is a cyclic shift value of the first UE in the first group of UEs. For first UE in a second group of UEs, an initial sequence shift of sequence shifts that are occupied by 2 0  is a cyclic shift value of the first UE in the second group of UEs. 
     d start =4d u −N ZC +n shift   RA ·N CS  indicates a cyclic shift distance between neighboring groups, as shown by filling patterns of lattice patterns in  FIG. 3 . 
               n   group   RA     =     ⌊       d   u       d   start       ⌋           
indicates a quantity of groups in a sequence whose sequence length is N ZC . As shown in  FIG. 3 , a quantity of groups is 2 (that is, the first group and the second group).
 
                 n   _     shift   RA     =     max   (       ⌊         N   ZC     -     3   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )           
indicates a quantity of UE candidate sequence shifts in the last length that is insufficient for a group. The quantity of UE candidate sequence shifts in the last length that is insufficient for a group is 0 in  FIG. 3 .
 
       n   shift   RA =└min(d u −n group   RA ·d start , 4d u −N ZC − n   shift   RA N CS )/N CS ┘ indicates a quantity of UE candidate sequence shifts in first remaining sequence shifts, where the first remaining sequence shift is shown by filling patterns of stripes slanting towards left in  FIG. 3 . 
       =└((1−min(1, n   shift   RA ))(d u −n group   RA ·d start )+min(1, n   shift   RA )(4d u −N ZC +n shift   RA ·N CS ))/N CS ┘− n   shift   RA  indicates a quantity of UE candidate sequence shifts in second remaining sequence shifts, where the second remaining sequence shift is shown by filling patterns of stripes slanting towards right in  FIG. 3 . 
       d   start =N ZC −3d u +n group   RA ·d start + n   shift   RA N CS  indicates a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and is identified by an arrow X in  FIG. 3 . 
         start =N ZC −2d u +n group   RA ·d start + n   shift   RA N CS  indicates a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts, and is identified by an arrow Y in  FIG. 3 . 
     For example, when N ZC =839, N CS =18, and d u =222, a corresponding scenario may be shown in  FIG. 3 . 
     It should be noted that, filling patterns of round point patterns in  FIG. 3  are used to synchronously indicate one of five shift sequences occupied by a group, to more easily describe how to allocate each group. 
       FIG. 4  is a schematic diagram of scenario 2 according to an embodiment of the present application. In the figure, N=N ZC , and satisfies 
                   N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢         N   ZC     ⁡     (       or   ⁢           ⁢         N   ZC     +     N   CS       4       ≤     d   u     ≤       2   7     ⁢     N   ZC         )       .             
As shown in  FIG. 4 , sequence shifts that are occupied by 1 0 , 1 +1 , 1 +2 , 1 −1 , and 1 +2  are used as a first group, and sequence shifts that are occupied by 2 0 , 2 +1 , 2 +2 , 2 −1 , and 2 +2  are used as a second group. A quantity of UE candidate sequence shifts in a group is
 
                 n   shift   RA     =     ⌊         N   ZC     -     3   ⁢     d   u           N   CS       ⌋       ,         
where N CS  indicates a quantity of cyclic shifts that are occupied by a user.
 
     It should be noted that, in  FIG. 4  and  FIG. 3 , physical meanings of n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  and formulas that need to be satisfied are all the same. Details are not described herein again. 
     d start  is shown by filling patterns of lattice patterns in  FIG. 4 ,  n   shift   RA  is shown by filling patterns of stripes slanting towards left in  FIG. 4 , and  d   start  is identified by an arrow X in  FIG. 4 . 
     In  FIG. 4 , n group   RA  is 2,  n   shift   RA  is 0,    shift   RA  is 0, and  is 0 (corresponding to that    shift   RA  is 0). 
     For example, when N ZC =839, N CS =22, and d u =221, this may correspond to the scenario shown in  FIG. 4 . 
     It should be noted that, filling patterns of round point patterns in  FIG. 4  are used to synchronously indicate one of five shift sequences occupied by one group, to more easily describe how to allocate each group. 
       FIG. 5  is a schematic diagram of scenario 3 according to an embodiment of the present application. In the figure, N=N ZC , and satisfies 
                   N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢         N   ZC     ⁡     (       or   ⁢           ⁢         N   ZC     +     N   CS       4       ≤     d   u     ≤       2   7     ⁢     N   ZC         )       .             
As shown in  FIG. 5 , sequence shifts that are occupied by 1 0 , 1 +1 , 1 +2 , 1 −1 , and 1 +2  are used as a first group, and sequence shifts that are occupied by 2 0 , 2 +1 , 2 +2 , 2 −1 , and 2 +2  are used as a second group. A quantity of UE candidate sequence shifts in a group is
 
                 n   shift   RA     =     ⌊         3   ⁢     d   u       -     N   ZC         N   CS       ⌋       ,         
where N CS  indicates a quantity of cyclic shifts that are occupied by a user.
 
     It should be noted that, in  FIG. 5  and  FIG. 3 , physical meanings of n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  and formulas that need to be satisfied are all the same. Details are not described herein again. 
     d start  is shown by filling patterns of lattice patterns in  FIG. 5 ,  n   shift   RA  is shown by filling patterns of stripes slanting towards left in  FIG. 5 , and  d   start  is identified by an arrow X in  FIG. 5 . 
     In  FIG. 5 , n group   RA  is 2,    shift   RA  is 0, and  is 0 (corresponding to that    shift   RA  is 0). 
     In  FIG. 5 ,  n   shift   RA  may be 1. That is, five candidate sequence shifts corresponding to filling patterns of characters A (which may correspond to 0), B (which may correspond to +d u ), C (which may correspond to +2d u ), D (which may correspond to −d u ), and E (which may correspond to −2d u ) are used as a new candidate sequence shift and are allocated to UE. 
     For example, when N ZC =839, N CS =18, and d u =220, this may correspond to the scenario shown in  FIG. 5 . 
     It should be noted that, filling patterns of round point patterns in  FIG. 5  are used to synchronously indicate one of five shift sequences occupied by one group, to more easily describe how to allocate each group. 
       FIG. 6  is a schematic diagram of scenario 4 according to an embodiment of the present application. In the figure, N=N ZC , and satisfies 
                 2   7     ⁢     N   ZC       ≤     d   u     ≤           N   ZC     -     N   CS       3     ⁢       (       or   ⁢           ⁢     2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       )     .             
As shown in  FIG. 6 , sequence shifts that are occupied by 1 0 , 1 +1 , 1 +2 , 1 −1 , and 1 +2  are used as a first group, and sequence shifts that are occupied by 2 0 , 2 +1 , 2 +2 , 2 −1 , and 2 +2  are used as a second group. A quantity of UE candidate sequence shifts in a group is
 
     
       
         
           
             
               n 
               shift 
               RA 
             
             = 
             
               
                 ⌊ 
                 
                   
                     
                       N 
                       ZC 
                     
                     - 
                     
                       3 
                       ⁢ 
                       
                         d 
                         u 
                       
                     
                   
                   
                     N 
                     CS 
                   
                 
                 ⌋ 
               
               . 
             
           
         
       
     
     It should be noted that, in  FIG. 6  and  FIG. 3 , n shift   RA , d start , n group   RA , and  n   shift   RA  have save physical meanings, and only formulas that need to be satisfied are different. An analysis process is similar to that of  FIG. 3 . Details are not described herein again. 
     d start =N ZC −3d u +n shift   RA ·N CS  indicates a cyclic shift distance between neighboring groups, and is shown by filling patterns of lattice patterns in  FIG. 6 . 
               n   group   RA     =     ⌊       d   u       d   start       ⌋           
indicates a quantity of groups in a sequence whose sequence length is N ZC . As shown in  FIG. 6 , a quantity of groups is 2.
 
                 n   _     shift   RA     =     max   ⁡     (       ⌊         4   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )             
indicates a quantity of UE candidate sequence shifts in the last length that is insufficient for a group. As shown in  FIG. 6 , the quantity of UE candidate sequence shifts in the last length that is insufficient for a group may be 1. That is, five candidate sequence shifts corresponding to filling patterns of characters A, B, C, D, and E are used as a new candidate sequence shift and are allocated to UE.
 
       n   shift   RA =└min(d u −n group   RA ·d start , N ZC −3d u − n   shift   RA N CS )/N CS ┘ indicates a quantity of UE candidate sequence shifts in first remaining sequence shifts. The first remaining sequence shift is shown by filling patterns of stripes slanting towards left in  FIG. 6 . 
         shift   RA =0 indicates that a quantity of UE candidate sequence shifts in second remaining sequence shifts is 0. 
       d   start =d u +n group   RA ·d start + n   shift   RA N CS  indicates a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and is identified by an arrow X in  FIG. 6 . 
         start =0 (corresponding to    shift   RA =0). 
     For example, when N ZC =839, N CS =22, and d u =264, this may correspond to the scenario shown in  FIG. 6 . 
     It should be noted that, filling patterns of round point patterns in  FIG. 6  are used to synchronously indicate one of five shift sequences occupied by one group, and filling patterns of vertical line patterns are used to synchronously indicate sequence shifts that are occupied by filling patterns of characters, to more easily describe how to allocate each group. 
       FIG. 7  is a schematic diagram of scenario 5 according to an embodiment of the present application. In the figure, N=N ZC , and satisfies and satisfies 
                 2   7     ⁢     N   ZC       ≤     d   u     ≤           N   ZC     -     N   CS       3     ⁢       (       or   ⁢           ⁢     2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       )     .             
As shown in  FIG. 7 , sequence shifts that are occupied by 1 0 , 1 +1 , 1 +2 , 1 −1 , and 1 +2  are used as a first group, and sequence shifts that are occupied by 2 0 , 2 +1 , 2 +2 , 2 −1 , and 2 +2  are used as a second group. A quantity of UE candidate sequence shifts in a group is
 
                 n   shift   RA     =     ⌊         N   ZC     -     3   ⁢     d   u           N   CS       ⌋       ,         
where N CS  indicates a quantity of cyclic shifts that are occupied by a user.
 
     It should be noted that, in  FIG. 7  and  FIG. 6 , physical meanings of n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  and formulas that need to be satisfied are all the same. Details are not described herein again. 
     d start  is shown by filling patterns of lattice patterns in  FIG. 7 ,  n   shift   RA  is shown by filling patterns of stripes slanting towards left in  FIG. 7 , and  d   start  is identified by an arrow X in  FIG. 7 . 
     In  FIG. 7 , n group   RA  is 2,  n   shift   RA  is 0,    shift   RA  is 0, and  is 0 (corresponding to that    shift   RA  is 0). 
     For example, when N ZC =839, N CS =22, and d u =261, this may correspond to the scenario shown in  FIG. 7 . 
     It should be noted that, filling patterns of round point patterns in  FIG. 7  are used to synchronously indicate one of five shift sequences occupied by one group, to more easily describe how to allocate each group. 
       FIG. 8  is a schematic diagram of scenario 6 according to an embodiment of the present application. In the figure, N=N ZC , and satisfies 
                   N   ZC     +     N   CS       3     ≤     d   u     &lt;         2   ⁢     N   ZC       5     ⁢       (       or   ⁢           ⁢         N   ZC     +     N   CS       3       ≤     d   u     ≤       2   ⁢     N   ZC       5       )     .             
As shown in  FIG. 7 , sequence shifts that are occupied by 1 0 , 1 +1 , 1 +2 , 1 −1 , and 1 +2  are used as a first group, and sequence shifts that are occupied by 2 0 , 2 +1 , 2 +2 , 2 −1 , and 2 +2  are used as a second group. A quantity of UE candidate sequence shifts in a group is
 
     
       
         
           
             
               n 
               shift 
               RA 
             
             = 
             
               
                 ⌊ 
                 
                   
                     
                       3 
                       ⁢ 
                       
                         d 
                         u 
                       
                     
                     - 
                     
                       N 
                       ZC 
                     
                   
                   
                     N 
                     CS 
                   
                 
                 ⌋ 
               
               . 
             
           
         
       
     
     It should be noted that, in  FIG. 8  and  FIG. 3 , n shift   RA , d start , n group   RA , and  n   shift   RA  have save physical meanings, and only formulas that need to be satisfied are different. An analysis process is similar to that of  FIG. 3 . Details are not described herein again. 
     d start =N ZC −3d u +n shift   RA ·N CS  indicates a cyclic shift distance between neighboring groups, and is shown by filling patterns of lattice patterns in  FIG. 8 . 
               n   group   RA     =     ⌊       d   u       d   start       ⌋           
indicates a quantity of groups in a sequence whose sequence length is N ZC . As shown in  FIG. 8 , a quantity of groups is 2.
 
                 n   _     shift   RA     =     max   ⁡     (       ⌊         N   ZC     -     2   ⁢     d   u       -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )             
indicates a quantity of UE candidate sequence shifts in the last length that is insufficient for a group. As shown in  FIG. 8 , the quantity of UE candidate sequence shifts in the last length that is insufficient for a group may be 1. That is, five candidate sequence shifts corresponding to filling patterns of characters A, B, C, D, and E are used as a new candidate sequence shift and are allocated to UE.
 
       n   shift   RA =0 indicates that a quantity of UE candidate sequence shifts in first remaining sequence shifts is 0. 
         shift   RA =0 indicates that a quantity of UE candidate sequence shifts in second remaining sequence shifts is 0. 
       d   start =0 (corresponding to  n   shift   RA =0). 
         start =0 (corresponding to    shift   RA =0). 
     For example, when N ZC =839, N CS =22, and d u =300, this may correspond to the scenario shown in  FIG. 8 . 
       FIG. 9  is a schematic diagram of scenario 7 according to an embodiment of the present application. In the figure, N=N ZC , and satisfies 
                 2   ⁢     N   ZC       5     ≤     d   u     &lt;           N   ZC     -     N   CS       2     ⁢       (       or   ⁢           ⁢       2   ⁢     N   ZC       5       ≤     d   u     ≤         N   ZC     -     N   CS       2       )     .             
As shown in  FIG. 9 , sequence shifts that are occupied by 1 0 , 1 +1 , 1 +2 , 1 −1 , and 1 +2  are used as a first group, and sequence shifts that are occupied by 2 0 , 2 +1 , 2 +2 , 2 −1 , and 2 +2  are used as a second group. A quantity of UE candidate sequence shifts in a group is
 
     
       
         
           
             
               n 
               shift 
               RA 
             
             = 
             
               
                 ⌊ 
                 
                   
                     
                       N 
                       ZC 
                     
                     - 
                     
                       2 
                       ⁢ 
                       
                         d 
                         u 
                       
                     
                   
                   
                     N 
                     CS 
                   
                 
                 ⌋ 
               
               . 
             
           
         
       
     
     It should be noted that, in  FIG. 9  and  FIG. 3 , n shift   RA , d start , n group   RA , and  n   shift   RA  have save physical meanings, and only formulas that need to be satisfied are different. An analysis process is similar to that of  FIG. 3 . Details are not described herein again. 
     d start =2(N ZC −2d u )+n shift   RA ·N CS  indicates a cyclic shift distance between neighboring groups, and is shown by filling patterns of lattice patterns in  FIG. 9 . 
               n   group   RA     =     ⌊         N   ZC     -     d   u         d   start       ⌋           
indicates a quantity of groups in a sequence whose sequence length is N ZC . As shown in  FIG. 9 , a quantity of groups is 2.
 
                 n   _     shift   RA     =     max   ⁡     (       ⌊         3   ⁢     d   u       -     N   ZC     -       n   group   RA     ·     d   start           N   CS       ⌋     ,   0     )             
indicates a quantity of UE candidate sequence shifts in the last length that is insufficient for a group. As shown in  FIG. 9 , the quantity of UE candidate sequence shifts in the last length that is insufficient for a group may be 1. That is, five candidate sequence shifts corresponding to filling patterns of characters A, B, C, D, and E are used as a new candidate sequence shift and are allocated to UE.
 
       n   shift   RA =0 indicates that a quantity of UE candidate sequence shifts in first remaining sequence shifts is 0. 
         shift   RA =0 indicates that a quantity of UE candidate sequence shifts in second remaining sequence shifts is 0. 
       d   start =0 (corresponding to  n   shift   RA =0). 
         start =0 (corresponding to    shift   RA =0). 
     For example, when N ZC =839, N CS =22, and d u =393, this may correspond to the scenario shown in  FIG. 9 . 
       FIG. 10  is a flowchart of Embodiment 3 of a random access sequence generation method according to the present application. As shown in  FIG. 10 , the method in this embodiment may include: 
     Step  1001 : UE receives notification signaling from a base station, where the notification signaling includes indication information, the indication information is used to instruct the UE to select a shift sequence number from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts. 
     Step  1002 : The UE selects a shift sequence number according to the notification signaling. 
     Specifically, the UE selects the shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1) according to the notification signaling. 
     Step  1003 : The UE obtains a cyclic shift value according to the shift sequence number. 
     Step  1004 : The UE generates a random access sequence according to the cyclic shift value. 
     In this embodiment, the UE selects the shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1) according to the notification signaling, so that after a quantity of UEs that can be distinguished is considered from a perspective of a group, quantities of UEs that can be further distinguished in other remaining discrete shift sequences obtained after grouping are further considered, thereby expanding a range from which a shift sequence number is selected. 
     Embodiment 4 of the random access sequence generation method is as follows: 
     Optionally, based on Embodiment 3 of the random access sequence generation method in the present application, step  1003  may specifically include: 
     obtaining, by the UE, the cyclic shift value C ν  according to the shift sequence number ν by using formula (1), formula (2), or formula (3). 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the UE obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the UE obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the UE obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, step  1004  may specifically include: 
     generating, by the UE, the random access sequence x u,C     ν   (n) according to the cyclic shift value C ν  by using the following formula (36):
 
 x   u,C     ν   ( n )= x   u (( n+C   ν )mod  N   ZC )  (36), where
 
     N ZC  is a sequence length, and a ZC sequence whose root is u is defined as: 
                   x   u     ⁡     (   n   )       =     e       -   j     ⁢           ⁢       π   ⁢           ⁢     un   ⁡     (     n   +   1     )           N   ZC             ,         
0≤n≤N ZC −1.
 
     In this embodiment, detailed descriptions of n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  are the same as those in Embodiment 2 of the random access sequence generation method. Details are not described herein again. 
       FIG. 11  is a flowchart of Embodiment 5 of a random access sequence generation method according to the present application. As shown in  FIG. 11 , the method in this embodiment may include: 
     Step  1101 : A base station selects a shift sequence number. 
     Specifically, the base station selects the shift sequence number ν from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), where ν is an integer, n shift   RA  is a quantity of user equipment UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts. 
     Step  1102 : The base station obtains a cyclic shift value according to the shift sequence number. 
     Specifically, the base station obtains the cyclic shift value C ν  according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts. 
     In this embodiment, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35). 
     It should be noted that, in this embodiment, detailed descriptions of n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  are the same as those in Embodiment 2 of the random access sequence generation method. Details are not described herein again. 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     In this embodiment, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  that satisfy formulas (4) to (11), formulas (12) to (19), formulas (20) to (27), or formulas (28) to (35) are used, and the shift sequence number is selected from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), thereby expanding a range from which a shift sequence number is selected. 
       FIG. 12  is a flowchart of Embodiment 6 of a random access sequence generation method according to the present application. As shown in  FIG. 12 , the method in this embodiment may include: 
     Step  1201 : UE selects a shift sequence number. 
     Specifically, the UE selects the shift sequence number ν from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1). 
     ν is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts. 
     Step  1202 : The UE obtains a cyclic shift value according to the shift sequence number. 
     Specifically, the UE obtains the cyclic shift value C ν  according to the shift sequence number ν by using the following formula (1), formula (2), or formula (3):
 
 C   ν   =d   offset   +d   start   └ν/n   shift   RA ┘+(ν mod  n   shift   RA ) N   CS   (1);
 
 C   ν   =d   offset   + d     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA ) N   CS   (2);
 
 C   ν   =d   offset   +     start +(ν− n   shift   RA   n   group   RA   + n     shift   RA   + n     shift   RA ) N   CS   (3), where
 
     d offset  is a shift offset, d start  is a cyclic shift distance between neighboring groups, n shift   RA  is a quantity of UE candidate sequence shifts in a group, N CS  is a quantity of cyclic shifts that are occupied by a user,  d   start  is a cyclic shift value of a first UE candidate sequence shift in the first remaining sequence shifts, and  is a cyclic shift value of a first UE candidate sequence shift in the second remaining sequence shifts. 
     Step  1203 : The UE generates a random access sequence according to the cyclic shift value. 
     Specifically, the UE generates the random access sequence x u,C     ν   (n) according to the cyclic shift value C ν  by using the following formula (36):
 
 x   u,C     ν   ( n )= x   u (( n+C   ν )mod  N   ZC )  (36), where
 
     N ZC  is a sequence length, and a ZC sequence whose root is u is defined as: 
                   x   u     ⁡     (   n   )       =     e       -   j     ⁢           ⁢       π   ⁢           ⁢     un   ⁡     (     n   +   1     )           N   ZC             ,         
0≤n≤N ZC −1.
 
     In this embodiment, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35). 
     It should be noted that, in this embodiment, detailed descriptions of n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  are the same as those in Embodiment 2 of the random access sequence generation method. Details are not described herein again. 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the base station obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     In this embodiment, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  that satisfy formulas (4) to (11), formulas (12) to (19), formulas (20) to (27), or formulas (28) to (35) are used, and the shift sequence number is selected from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), thereby expanding a range from which a shift sequence number is selected. 
       FIG. 13  is a schematic structural diagram of Embodiment 1 of a base station according to the present application. As shown in  FIG. 13 , the base station in this embodiment may include: a generation module  1301  and a sending module  1302 . The generation module  1301  is configured to generate notification signaling, where the notification signaling includes indication information, the indication information is configured to instruct user equipment UE to select a shift sequence number from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts. The sending module  1302  is configured to send the notification signaling to the UE, so that the UE generates a random access sequence according to the indication information. 
     The base station in this embodiment may be configured to execute the technical solution in the method embodiment shown in  FIG. 1 . An implementation principle and a technical effect thereof are similar, and details are not described herein again. 
       FIG. 14  is a schematic structural diagram of Embodiment 2 of a base station according to the present application. As shown in  FIG. 14 , based on the structure of the base station shown in  FIG. 13 , the base station in this embodiment may further include: a shift sequence number determining module  1303 , a cyclic shift value determining module  1304 , and a random access sequence detection module  1305 . The shift sequence number determining module  1303  is configured to select a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1). The cyclic shift value determining module  1304  is configured to obtain a cyclic shift value according to the shift sequence number. The random access sequence detection module  1305  is configured to: generate a detection sequence according to the cyclic shift value, and detect, by using the detection sequence, a random access sequence sent by the UE, where the random access sequence is generated by the UE according to the indication information. 
     Optionally, the cyclic shift value determining module  1304  is specifically configured to: 
     obtain the cyclic shift value C ν  according to the shift sequence number ν by using formula (1), formula (2), or formula (3). 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the cyclic shift value determining module  1304  obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the cyclic shift value determining module  1304  obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the cyclic shift value determining module  1304  obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35). 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     The base station in this embodiment may be configured to execute the technical solution in the method embodiment shown in  FIG. 2 . An implementation principle and a technical effect thereof are similar, and details are not described herein again. 
       FIG. 15  is a schematic structural diagram of Embodiment 1 of user equipment according to the present application. As shown in  FIG. 15 , the user equipment in this embodiment may include: 
     a receiving module  1501 , a shift sequence number determining module  1502 , a cyclic shift value determining module  1503 , and a random access sequence generation module  1504 . The receiving module  1501  is configured to receive notification signaling from a base station, where the notification signaling includes indication information, the indication information is used to instruct the UE to select a shift sequence number from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts. The shift sequence number determining module  1502  is configured to select a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1) according to the notification signaling. 
     The cyclic shift value determining module  1503  is configured to obtain a cyclic shift value according to the shift sequence number. The random access sequence generation module  1504  is configured to generate a random access sequence according to the cyclic shift value. 
     The UE in this embodiment may be configured to execute the technical solution in the method embodiment shown in  FIG. 10 . An implementation principle and a technical effect thereof are similar, and details are not described herein again. 
     Embodiment 2 of the user equipment is as follows: 
     Optionally, based on Embodiment 1 of the user equipment of the present application, the cyclic shift value determining module  1503  is specifically configured to: 
     obtain the cyclic shift value C ν  according to the shift sequence number ν by using formula (1), formula (2), or formula (3). 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the cyclic shift value determining module  1503  obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the cyclic shift value determining module  1503  obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the cyclic shift value determining module  1503  obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35). 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Optionally, the random access sequence generation module  1504  is specifically configured to: 
     generate the random access sequence x u,C     ν   (n) according to the cyclic shift value C ν  by using the following formula (36):
 
 x   u,C     ν   ( n )= x   u (( n+C   ν )mod  N   ZC )  (36), where
 
     N ZC  is a sequence length, and a ZC sequence whose root is u is defined as: 
                   x   u     ⁡     (   n   )       =     e       -   j     ⁢           ⁢       π   ⁢           ⁢     un   ⁡     (     n   +   1     )           N   ZC             ,         
0≤n≤N ZC −1.
 
     The UE in this embodiment may be configured to execute the technical solution in Embodiment 4 of the random access sequence generation method. An implementation principle and a technical effect thereof are similar, and details are not described herein again. 
     The present application further provides a random access sequence generation system, including the base station in Embodiment 1 or Embodiment 2 of the base station, and the user equipment in Embodiment 1 or Embodiment 2 of the user equipment. 
       FIG. 16  is a schematic structural diagram of Embodiment 3 of a base station according to the present application. As shown in  FIG. 16 , the base station in this embodiment may include a shift sequence number determining module  1601  and a cyclic shift value determining module  1602 . The shift sequence number determining module  1601  is configured to select a shift sequence number ν from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), where ν is an integer, n shift   RA  is a quantity of user equipment UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts. 
     The cyclic shift value determining module  1602  is configured to obtain the cyclic shift value C ν  according to the shift sequence number ν by using formula (1), formula (2), or formula (3). 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35). 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the cyclic shift value determining module  1602  obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the cyclic shift value determining module  1602  obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the cyclic shift value determining module  1602  obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     The base station in this embodiment may be configured to execute the technical solution in the method embodiment shown in  FIG. 11 . An implementation principle and a technical effect thereof are similar, and details are not described herein again. 
       FIG. 17  is a schematic structural diagram of Embodiment 3 of user equipment according to the present application. As shown in  FIG. 17 , the base station in this embodiment may include: a shift sequence number determining module  1701 , a cyclic shift value determining module  1702 , and a random access sequence generation module  1703 . The shift sequence number determining module  1701  is configured to select a shift sequence number ν from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), where ν is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts. The cyclic shift value determining module  1702  is configured to obtain a cyclic shift value C ν  according to the shift sequence number ν by using formula (1), formula (2), or formula (3). The random access sequence generation module  1703  is configured to generate a random access sequence x u,C     ν   (n) according to the cyclic shift value C ν  by using formula (36). 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35). 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the cyclic shift value determining module  1702  obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the cyclic shift value determining module  1702  obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the cyclic shift value determining module  1702  obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     The user equipment in this embodiment may be configured to execute the technical solution in the method embodiment shown in  FIG. 12 . An implementation principle and a technical effect thereof are similar, and details are not described herein again. 
     The present application further provides a random access sequence generation system, including the base station in Embodiment 3 of the base station, and the user equipment in Embodiment 3 of the user equipment. 
       FIG. 18  is a schematic structural diagram of Embodiment 4 of a base station according to the present application. As shown in  FIG. 18 , the base station in this embodiment may include: a processor  1801  and a transmitter  1802 . The processor  1801  is configured to generate notification signaling, where the notification signaling includes indication information, the indication information is used to instruct user equipment UE to select a shift sequence number from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts. The transmitter  1802  is configured to send the notification signaling to the UE, so that the UE generates a random access sequence according to the indication information. 
     Optionally, the processor  1802  is further configured to: 
     select a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1); 
     obtain a cyclic shift value according to the shift sequence number; and 
     generate a detection sequence according to the cyclic shift value, and detect, by using the detection sequence, a random access sequence sent by the UE, where the random access sequence is generated by the UE according to the indication information. 
     Optionally, the obtaining, by the processor  1802 , a cyclic shift value according to the shift sequence number specifically includes: 
     obtaining the cyclic shift value C ν  according to the shift sequence number ν by using formula (1), formula (2), or formula (3). 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the processor  1802  obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the processor  1802  obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the processor  1802  obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35). 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N     ZC   ⁢                 5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     The base station in this embodiment may be configured to execute the technical solution in the method embodiment shown in  FIG. 1  or  FIG. 2 . An implementation principle and a technical effect thereof are similar, and details are not described herein again. 
       FIG. 19  is a schematic structural diagram of Embodiment 4 of user equipment according to the present application. As shown in  FIG. 19 , the user equipment in this embodiment may include a receiver  1901  and a processor  1902 . The receiver  1901  is configured to receive notification signaling from a base station, where the notification signaling include indication information, the indication information is used to instruct the UE to select a shift sequence number from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the shift sequence number is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts. The processor  1902  is configured to: select a shift sequence number from the range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1) according to the notification signaling, obtain a cyclic shift value according to the shift sequence number, and generate a random access sequence according to the cyclic shift value. 
     Optionally, the obtaining, by the processor  1902 , a cyclic shift value according to the shift sequence number specifically includes: 
     obtaining the cyclic shift value C ν  according to the shift sequence number ν by using formula (1), formula (2), or formula (3). 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the processor  1902  obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the processor  1902  obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the processor  1902  obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (12) to (19); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (20) to (27); or 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (28) to (35). 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N     CS   ⁢                 4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Optionally, the generating, by the processor  1902 , a random access sequence according to the cyclic shift value specifically includes: 
     generating the random access sequence x u,C     ν   (n) according to the cyclic shift value C ν  by using the following formula (36):
 
 x   u,C     ν   ( n )= x   u (( n+C   ν )mod  N   ZC )  (36), where
 
     N ZC  is a sequence length, and a ZC sequence whose root is u is defined as: 
                   x   u     ⁡     (   n   )       =     e       -   j     ⁢           ⁢       π   ⁢           ⁢     un   ⁡     (     n   +   1     )           N   ZC             ,         
0≤n≤N ZC −1.
 
     The UE in this embodiment may be configured to execute the technical solution in Embodiment 3 or Embodiment 4 of the random access sequence generation method. An implementation principle and a technical effect thereof are similar, and details are not described herein again. 
       FIG. 20  is a schematic structural diagram of Embodiment 5 of a base station according to the present application. As shown in  FIG. 20 , the base station in this embodiment may include a processor  2001  and a memory  2002 . The apparatus may further include a transmitter  2003  and a receiver  2004 . The transmitter  2003  and the receiver  2004  may be connected to the processor  2001 . The transmitter  2003  is configured to send data or information. The receiver  2004  is configured to receive data or information. The memory  2002  stores an executable instruction. When the apparatus runs, the processor  2001  communicates with the memory  2002 . The processor  2001  invokes the executable instruction in the memory  2002 , to perform the following operations: 
     selecting a shift sequence number ν from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), where ν is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts; and 
     obtaining a cyclic shift value C ν  according to the shift sequence number ν by using formula (1), formula (2), or formula (3). 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35). 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the processor  2001  obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the processor  2001  obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the processor  2001  obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     The base station in this embodiment may be configured to execute the technical solution in the method embodiment shown in  FIG. 11 . An implementation principle and a technical effect thereof are similar, and details are not described herein again. 
     In a schematic structural diagram of Embodiment 5 of user equipment, the user equipment in this embodiment has a same structure as that of the base station shown in  FIG. 20 , and may also include a processor and a memory. The apparatus may further include a transmitter and a receiver. 
     The transmitter and the receiver may be connected to the processor. The transmitter is configured to send data or information. The receiver is configured to receive data or information. The memory stores an executable instruction. When the apparatus runs, the processor communicates with the memory. The processor invokes the executable instruction in the memory, to perform the following operations: 
     selecting a shift sequence number ν from a range of 0 to (n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), where ν is an integer, n shift   RA  is a quantity of UE candidate sequence shifts in a group, n group   RA  is a quantity of groups,  n   shift   RA  is a quantity of UE candidate sequence shifts in the last length that is insufficient for a group,  n   shift   RA  is a quantity of UE candidate sequence shifts in first remaining sequence shifts, and    shift   RA  is a quantity of UE candidate sequence shifts in second remaining sequence shifts; 
     obtaining a cyclic shift value C ν  according to the shift sequence number ν by using formula (1), formula (2), or formula (3); and 
     generating a random access sequence x u,C     ν   (n) according to the cyclic shift value C ν  by using formula (36). 
     n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and    start  satisfy formulas (4) to (11); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27); or n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35). 
     Optionally, in the case of ν≤(n shift   RA n group   RA + n   shift   RA −1), the processor obtains the cyclic shift value C ν  by using formula (1); 
     in the case of (n shift   RA n group   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA −1), the processor obtains the cyclic shift value C ν  by using formula (2); 
     in the case of (n shift   RA n group   RA + n   shift   RA + n   shift   RA −1)&lt;ν≤(n shift   RA n group   RA + n   shift   RA + n   shift   RA +   shift   RA −1), the processor obtains the cyclic shift value C ν  by using formula (3). 
     Optionally, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     &lt;       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       ≤     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       4     ≤     d   u     ≤       2   7     ⁢     N   ZC         ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (4) to (11), in the case of
 
                   2   7     ⁢     N   ZC       &lt;     d   u     ≤         N   ZC     -     N   CS       3       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (12) to (19).
 
     Optionally, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     &lt;       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     ≤     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     Alternatively, in the case of 
                     N   ZC     +     N   CS       3     ≤     d   u     ≤       2   ⁢     N   ZC       5       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (20) to (27), in the case of
 
                   2   ⁢     N   ZC       5     &lt;     d   u     ≤         N   ZC     -     N   CS       2       ,         
n shift   RA , d start , n group   RA ,  n   shift   RA ,  n   shift   RA ,  ,  d   start , and  satisfy formulas (28) to (35).
 
     The user equipment in this embodiment may be configured to execute the technical solution in the method embodiment shown in  FIG. 12 . An implementation principle and a technical effect thereof are similar, and details are not described herein again. 
     Persons of ordinary skill in the art may understand that all or some of the steps of the method embodiments may be implemented by a program instructing relevant hardware. The program may be stored in a computer-readable storage medium. When the program runs, the steps of the method embodiments are performed. The foregoing storage medium includes any medium that can store program code, such as a ROM, a RAM, a magnetic disk, or an optical disc. 
     Finally, it should be noted that the foregoing embodiments are merely intended for describing the technical solutions of the present application, but not for limiting the present application. Although the present application is described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that they may still make modifications to the technical solutions described in the foregoing embodiments or make equivalent replacements to some or all technical features thereof, without departing from the scope of the technical solutions of the embodiments of the present application.