A method for data transmission, comprising: determining a quantity N of first virtual resource blocks, VRBs, corresponding to first user equipment, UE,, wherein the N first VRBs correspond to N virtual subbands for carrying to-be-transmitted data of the first UE, and N is a natural number greater than or equal to 1; determining, based on the quantity N of the first VRBs, a first step corresponding to the N first VRBs, wherein the first step is used to indicate a distance between two adjacent physical subbands to which the N first VRBs are mapped in a physical resource, and the first step is greater than 1; wherein the determining, based on the quantity N of the first VRBs, a first step corresponding to the N first VRBs comprises: determining M physical resource blocks, PRBs, that can be used for data transmission, wherein M is a natural number greater than or equal to N, the M PRBs correspond to M PRB sequence numbers, the M PRB sequence numbers are sequentially arranged in an order from 0 to M-1 based on a step of 1, and the M PRB sequence numbers are used to consecutively indicate M physical subbands used by the M PRBs; and determining the first step based on a PRB sequence number of a PRB corresponding to a first first PRB in the N first PRBs and the quantity N of the first VRBs, and determining that a PRB whose PRB sequence number is m in the M PRBs is the first first PRB in the N first PRBs, wherein m is a natural number greater than or equal to M-N; and determining, based on m and N, that a value range of the first step W 1 is [1, (M-1-m)/(N-1)]; or determining the first step based on a PRB sequence number of a PRB corresponding to a last first PRB in the N first PRBs and the quantity N of the first VRBs, wherein the N first PRBs correspond to the N first VRBs, and determining that a PRB whose PRB sequence number is n in the M PRBs is the last first PRB in the N first PRBs, wherein n is a natural number greater than or equal to N; and determining, based on n and N, that a value range of the first step W 1 is [1, n/(N-1)]; and determining, based on the first step, N first PRBs corresponding to the N first VRBs (S 130), wherein the N first PRBs correspond to N physical subbands for carrying the to-be-transmitted data. determining a quantity N of first virtual resource blocks, VRBs, corresponding to first user equipment, UE,, wherein the N first VRBs correspond to N virtual subbands for carrying to-be-transmitted data of the first UE, and N is a natural number greater than or equal to 1; determining, based on the quantity N of the first VRBs, a first step corresponding to the N first VRBs, wherein the first step is used to indicate a distance between two adjacent physical subbands to which the N first VRBs are mapped in a physical resource, and the first step is greater than 1; wherein the determining, based on the quantity N of the first VRBs, a first step corresponding to the N first VRBs comprises: determining M physical resource blocks, PRBs, that can be used for data transmission, wherein M is a natural number greater than or equal to N, the M PRBs correspond to M PRB sequence numbers, the M PRB sequence numbers are sequentially arranged in an order from 0 to M-1 based on a step of 1, and the M PRB sequence numbers are used to consecutively indicate M physical subbands used by the M PRBs; and determining the first step based on a PRB sequence number of a PRB corresponding to a first first PRB in the N first PRBs and the quantity N of the first VRBs, and determining that a PRB whose PRB sequence number is m in the M PRBs is the first first PRB in the N first PRBs, wherein m is a natural number greater than or equal to M-N; and determining, based on m and N, that a value range of the first step W 1 is [1, (M-1-m)/(N-1)]; or determining M physical resource blocks, PRBs, that can be used for data transmission, wherein M is a natural number greater than or equal to N, the M PRBs correspond to M PRB sequence numbers, the M PRB sequence numbers are sequentially arranged in an order from 0 to M-1 based on a step of 1, and the M PRB sequence numbers are used to consecutively indicate M physical subbands used by the M PRBs; and determining the first step based on a PRB sequence number of a PRB corresponding to a first first PRB in the N first PRBs and the quantity N of the first VRBs, and determining that a PRB whose PRB sequence number is m in the M PRBs is the first first PRB in the N first PRBs, wherein m is a natural number greater than or equal to M-N; and determining, based on m and N, that a value range of the first step W 1 is [1, (M-1-m)/(N-1)]; or determining the first step based on a PRB sequence number of a PRB corresponding to a last first PRB in the N first PRBs and the quantity N of the first VRBs, wherein the N first PRBs correspond to the N first VRBs, and determining that a PRB whose PRB sequence number is n in the M PRBs is the last first PRB in the N first PRBs, wherein n is a natural number greater than or equal to N; and determining, based on n and N, that a value range of the first step W 1 is [1, n/(N-1)]; and determining, based on the first step, N first PRBs corresponding to the N first VRBs (S 130), wherein the N first PRBs correspond to N physical subbands for carrying the to-be-transmitted data.