A data transmission method, wherein the method comprises: receiving (S220), by a network device, first data sent by a first terminal device on a multiplexing resource, wherein the first data is generated based on a first multiple access signature , MAS; receiving (S240), by the network device, second data sent by a second terminal device on the multiplexing resource, wherein the second data is generated based on a second MAS, and the first MAS and the second MAS comprise different demodulation reference signals, DMRSs, and/or different preamble sequences; and detecting (S250), by the network device based on the first MAS and the second MAS, the first data and the second data that are sent on the multiplexing resource, and the method being characterized in that : the method further comprises: sending, by the network device, first indication information to the first terminal device, wherein the first indication information is used to instruct the first terminal device to send the first data by using the first MAS in a first MAS set; and before the sending, by the network device, first indication information to the first terminal device, the method further comprises: sending, by the network device, second indication information to the first terminal device, wherein the second indication information is used to indicate the first MAS set. receiving (S220), by a network device, first data sent by a first terminal device on a multiplexing resource, wherein the first data is generated based on a first multiple access signature , MAS; receiving (S240), by the network device, second data sent by a second terminal device on the multiplexing resource, wherein the second data is generated based on a second MAS, and the first MAS and the second MAS comprise different demodulation reference signals, DMRSs, and/or different preamble sequences; and detecting (S250), by the network device based on the first MAS and the second MAS, the first data and the second data that are sent on the multiplexing resource, and the method being characterized in that : the method further comprises: sending, by the network device, first indication information to the first terminal device, wherein the first indication information is used to instruct the first terminal device to send the first data by using the first MAS in a first MAS set; and before the sending, by the network device, first indication information to the first terminal device, the method further comprises: sending, by the network device, second indication information to the first terminal device, wherein the second indication information is used to indicate the first MAS set. sending, by the network device, first indication information to the first terminal device, wherein the first indication information is used to instruct the first terminal device to send the first data by using the first MAS in a first MAS set; and before the sending, by the network device, first indication information to the first terminal device, the method further comprises: sending, by the network device, second indication information to the first terminal device, wherein the second indication information is used to indicate the first MAS set. <EOS>