A method for sparse code multiple access, SCMA, data transmission, comprising: Obtaining, by a first device (600, 700), a first parameter, wherein the first parameter is used to indicate a first quantity of resource elements comprised in a resource mapping unit; wherein the first quantity of resource elements comprised in the resource mapping unit is the number of resource elements onto which a set of bits is sparsely mapped according to SCMA data transmission; Determining, by the first device (600, 700), a first transport block size based on the first parameter; and Transmitting, by the first device (600, 700), data using SCMA, based on the first transport block size. wherein the method further comprises: obtaining, by the first device (600, 700), a second quantity of resource elements that are in an allocated physical resource and that are used to transmit data, a spatial layer quantity, a modulation order, and a bit rate, wherein the determining, by the first device (600, 700), a first transport block size based on the first parameter comprises: determining, by the first device (600, 700), the first transport block size based on the second quantity of resource elements that are in the allocated physical resource and that are used to transmit data using SCMA, and based on the spatial layer quantity, the modulation order, the bit rate, and the first parameter. Obtaining, by a first device (600, 700), a first parameter, wherein the first parameter is used to indicate a first quantity of resource elements comprised in a resource mapping unit; wherein the first quantity of resource elements comprised in the resource mapping unit is the number of resource elements onto which a set of bits is sparsely mapped according to SCMA data transmission; Determining, by the first device (600, 700), a first transport block size based on the first parameter; and Transmitting, by the first device (600, 700), data using SCMA, based on the first transport block size. wherein the method further comprises: obtaining, by the first device (600, 700), a second quantity of resource elements that are in an allocated physical resource and that are used to transmit data, a spatial layer quantity, a modulation order, and a bit rate, wherein the determining, by the first device (600, 700), a first transport block size based on the first parameter comprises: determining, by the first device (600, 700), the first transport block size based on the second quantity of resource elements that are in the allocated physical resource and that are used to transmit data using SCMA, and based on the spatial layer quantity, the modulation order, the bit rate, and the first parameter. obtaining, by the first device (600, 700), a second quantity of resource elements that are in an allocated physical resource and that are used to transmit data, a spatial layer quantity, a modulation order, and a bit rate, wherein the determining, by the first device (600, 700), a first transport block size based on the first parameter comprises: determining, by the first device (600, 700), the first transport block size based on the second quantity of resource elements that are in the allocated physical resource and that are used to transmit data using SCMA, and based on the spatial layer quantity, the modulation order, the bit rate, and the first parameter.