Data transmission method and communication apparatus
A data transmission method and a communication apparatus are disclosed. The method includes: A first device receives a trigger frame, where the trigger frame indicates a resource unit (RU) allocated to the first device; and the first device sends first data to a second device, where the first data occupies a discrete subcarrier in the RU. In this way, the transmit power of a subcarrier can be increased, and the transmission performance can be ensured.
1 . A data transmission method, comprising:
receiving, by a first device, a trigger frame indicating a resource unit (RU) allocated to the first device; and
sending, by the first device, first data to a second device, wherein the first data occupies a discrete subcarrier in the RU,
wherein the sending of the first data to the second device comprises:
dividing, by the first device, the first data into M data sub-blocks, wherein M is greater than 1, M is less than N, and N is a quantity of subcarriers in the RU;
mapping, by the first device, each of the M data sub-blocks to K discrete subcarriers in the RU respectively, to obtain subcarrier data corresponding to the M data sub-blocks, wherein K is equal to N divided by M,
performing, by the first device, inverse fast Fourier transform (IFFT) on the subcarrier data corresponding to the M data sub-blocks, to obtain M pieces of first time-domain data; and
dividing, by the first device, each of the M pieces of first time-domain data into blocks, wherein each piece of first time-domain data corresponds to M data blocks;
obtaining, by the first device, M pieces of second time-domain data based on data blocks corresponding to the M pieces of first time-domain data, wherein an i th piece of second time-domain data in the M pieces of second time-domain data is obtained by combining an i th data block of each piece of first time-domain data, and i is greater than 0 and less than or equal to M; and
sending, by the first device, the M pieces of second time-domain data.
2 . The method according to claim 1 , wherein the M data sub-blocks comprise a first data sub-block and a second data sub-block, and the first data sub-block and the second data sub-block are mapped to different K subcarriers.
3 . The method according to claim 1 , wherein all of the M data sub-blocks are mapped to same K subcarriers, and the K subcarriers are subcarriers with best channel quality in the RU.
4 . The method according to claim 1 , wherein the RU is allocated to a plurality of first devices, and data sent by different first devices occupies different K subcarriers in the RU.
5 . The method according to claim 4 , wherein the trigger frame further indicates a subcarrier set occupied by the first device for sending the first data.
6 . A first device, comprising at least one processor, wherein the at least one processor is coupled to a memory storing instructions that, when executed by the at least one processor, enable the first device to perform operations comprising:
receiving a trigger frame indicating a resource unit (RU) allocated to the first device; and
sending first data to a second device, wherein the first data occupies a discrete subcarrier in the RU,
wherein the sending of the first data to the second device comprises:
dividing the first data into M data sub-blocks, wherein M is greater than 1, M is less than N, and N is a quantity of subcarriers in the RU;
mapping each of the M data sub-blocks to K discrete subcarriers in the RU respectively, to obtain subcarrier data corresponding to the M data sub-blocks, wherein K is equal to N divided by M;
performing inverse fast Fourier transform (IFFT) on the subcarrier data corresponding to the M data sub-blocks, to obtain M pieces of first time-domain data; and
dividing each of the M pieces of first time-domain data into blocks, wherein each piece of first time-domain data corresponds to M data blocks;
obtaining M pieces of second time-domain data based on data blocks corresponding to the M pieces of first time-domain data, wherein an i th piece of second time-domain data in the M pieces of second time-domain data is obtained by combining an i th data block of each piece of first time-domain data, and i is greater than 0 and less than or equal to M; and
sending the M pieces of second time-domain data.
7 . The first device according to claim 6 , wherein the M data sub-blocks comprise a first data sub-block and a second data sub-block, and the first data sub-block and the second data sub-block are mapped to different K subcarriers.
8 . The first device according to claim 6 , wherein all of the M data sub-blocks are mapped to same K subcarriers, and the K subcarriers are subcarriers with best channel quality in the RU.
9 . The first device according to claim 6 , wherein the RU is allocated to a plurality of first devices, and data sent by different first devices occupies different K subcarriers in the RU.
10 . A second device, comprising at least one processor, wherein the processor is coupled to a memory storing instructions that, when executed by the at least one processor, enable the second device to perform operations comprising:
sending a trigger frame, wherein the trigger frame indicates a resource unit (RU) allocated to a first device; and
receiving first data sent by the first device, wherein the first data occupies a discrete subcarrier in the RU,
wherein the receiving of the first data sent by the first device comprises:
receiving M pieces of second time-domain data from the first device;
dividing each of the M pieces of second time-domain data into blocks, wherein each piece of second time-domain data corresponds to M data blocks;
obtaining M pieces of first time-domain data based on data blocks corresponding to the M pieces of second time-domain data, wherein an i th piece of first time-domain data in the M pieces of first time-domain data is obtained by combining an i th data block of each piece of second time-domain data, and i is greater than 0 and less than or equal to M;
performing fast Fourier transform (FFT) on the M pieces of first time-domain data, to obtain subcarrier data corresponding to M data sub-blocks of the first data; and
obtaining the M data sub-blocks of the first data based on the subcarrier data corresponding to the M data sob-blocks.
11 . The second device according to claim 10 , wherein the M data sub-blocks of the first data comprise a first data sub-block and a second data sub-block, and the first data sub-block and the second data sub-block are mapped to different K subcarriers.
12 . The second device according to claim 10 , wherein all of the M data sub-blocks of the first data are mapped to same K subcarriers, and the K subcarriers are subcarriers with best channel quality in the RU.
13 . The second device according to claim 10 , wherein the RU is allocated to a plurality of first devices, and data sent by different first devices occupies different K subcarriers in the RU.