A data transmission method, comprising: determining, by a first device, a first resource set and a second resource set in a first transmission subframe comprising a plurality of resource elements, wherein the first resource set is a set of remaining resource elements other than resource elements paired based on a first pairing rule in all resource elements used for data transmission in the first transmission subframe, and the second resource set is a set of the resource elements paired based on the first pairing rule in all the resource elements used for data transmission in the first transmission subframe; determining, by the first device, a data transmission manner on the first resource set and the second resource set; and communicating data with a second device based on the determined data transmission manner by using the first transmission subframe; wherein the determining, by a first device, a first resource set and a second resource set in a first transmission subframe comprises: successively determining, by the first device in a preset sequence, whether all the resource elements used for data transmission in the first transmission subframe meet the first pairing rule; when a resource element used for data channel mapping on a k th subcarrier and a resource element used for data channel mapping on a (k+n) th subcarrier meet the first pairing rule, determining, by the first device, that the resource elements used for data channel mapping on the k th subcarrier and the (k+n) th subcarrier belong to the second resource set, wherein n is a positive integer less than 3, k is a sequence number of a subcarrier corresponding to a resource element used for data channel mapping, and k is a positive integer greater than or equal to 1; and determining, by the first device, a set of all resource elements other than resource elements in the second resource set in all the resource elements used for data transmission in the first transmission subframe as the first resource set. determining, by a first device, a first resource set and a second resource set in a first transmission subframe comprising a plurality of resource elements, wherein the first resource set is a set of remaining resource elements other than resource elements paired based on a first pairing rule in all resource elements used for data transmission in the first transmission subframe, and the second resource set is a set of the resource elements paired based on the first pairing rule in all the resource elements used for data transmission in the first transmission subframe; determining, by the first device, a data transmission manner on the first resource set and the second resource set; and communicating data with a second device based on the determined data transmission manner by using the first transmission subframe; wherein the determining, by a first device, a first resource set and a second resource set in a first transmission subframe comprises: successively determining, by the first device in a preset sequence, whether all the resource elements used for data transmission in the first transmission subframe meet the first pairing rule; when a resource element used for data channel mapping on a k th subcarrier and a resource element used for data channel mapping on a (k+n) th subcarrier meet the first pairing rule, determining, by the first device, that the resource elements used for data channel mapping on the k th subcarrier and the (k+n) th subcarrier belong to the second resource set, wherein n is a positive integer less than 3, k is a sequence number of a subcarrier corresponding to a resource element used for data channel mapping, and k is a positive integer greater than or equal to 1; and determining, by the first device, a set of all resource elements other than resource elements in the second resource set in all the resource elements used for data transmission in the first transmission subframe as the first resource set. successively determining, by the first device in a preset sequence, whether all the resource elements used for data transmission in the first transmission subframe meet the first pairing rule; when a resource element used for data channel mapping on a k th subcarrier and a resource element used for data channel mapping on a (k+n) th subcarrier meet the first pairing rule, determining, by the first device, that the resource elements used for data channel mapping on the k th subcarrier and the (k+n) th subcarrier belong to the second resource set, wherein n is a positive integer less than 3, k is a sequence number of a subcarrier corresponding to a resource element used for data channel mapping, and k is a positive integer greater than or equal to 1; and determining, by the first device, a set of all resource elements other than resource elements in the second resource set in all the resource elements used for data transmission in the first transmission subframe as the first resource set.