A communication method, comprising: receiving, by a network device, a preamble sequence that is sent by a first terminal in a time window; sending, by the network device, a response message to the first terminal based on the preamble sequence; receiving, by the network device, a first message sent by the first terminal, wherein the first message comprises information used to identify the first terminal; and sending, by the network device, a second message to a second terminal and the first terminal, wherein the second message is used to indicate that the first terminal and the second terminal belong to a same user equipment cooperative group, wherein the first message further comprises - an index of a preamble sequence configured by the network device for the second terminal, and the preamble sequence configured by the network device for the second terminal is used to identify the second terminal, or - information about a time-frequency resource configured by the network device for the second terminal to send a preamble sequence, and the time-frequency resource configured by the network device for the second terminal to send the preamble sequence is used to identify the second terminal, or - an index of a preamble sequence configured by the network device for the second terminal and information about a time-frequency resource configured by the network device for the second terminal to send the preamble sequence, and the preamble sequence configured by the network device for the second terminal and the time-frequency resource configured by the network device for the second terminal to send the preamble sequence are used to jointly identify the second terminal. receiving, by a network device, a preamble sequence that is sent by a first terminal in a time window; sending, by the network device, a response message to the first terminal based on the preamble sequence; receiving, by the network device, a first message sent by the first terminal, wherein the first message comprises information used to identify the first terminal; and sending, by the network device, a second message to a second terminal and the first terminal, wherein the second message is used to indicate that the first terminal and the second terminal belong to a same user equipment cooperative group, wherein the first message further comprises - an index of a preamble sequence configured by the network device for the second terminal, and the preamble sequence configured by the network device for the second terminal is used to identify the second terminal, or - information about a time-frequency resource configured by the network device for the second terminal to send a preamble sequence, and the time-frequency resource configured by the network device for the second terminal to send the preamble sequence is used to identify the second terminal, or - an index of a preamble sequence configured by the network device for the second terminal and information about a time-frequency resource configured by the network device for the second terminal to send the preamble sequence, and the preamble sequence configured by the network device for the second terminal and the time-frequency resource configured by the network device for the second terminal to send the preamble sequence are used to jointly identify the second terminal. - an index of a preamble sequence configured by the network device for the second terminal, and the preamble sequence configured by the network device for the second terminal is used to identify the second terminal, or - information about a time-frequency resource configured by the network device for the second terminal to send a preamble sequence, and the time-frequency resource configured by the network device for the second terminal to send the preamble sequence is used to identify the second terminal, or - an index of a preamble sequence configured by the network device for the second terminal and information about a time-frequency resource configured by the network device for the second terminal to send the preamble sequence, and the preamble sequence configured by the network device for the second terminal and the time-frequency resource configured by the network device for the second terminal to send the preamble sequence are used to jointly identify the second terminal.