A resource allocation method, carried out by a terminal device, comprising: determining one or more bandwidth regions in system bandwidth that are used by the terminal device, wherein the terminal device receives or sends a data channel in the bandwidth region, the system bandwidth comprises at least one interleaving region, each interleaving region comprises at least one physical resource unit contiguous in frequency domain, each bandwidth region comprises one first frequency domain region or a plurality of first frequency domain regions non-overlapping in frequency domain, each first frequency domain region completely overlaps with one interleaving region or a plurality of interleaving regions in frequency domain, the one first frequency domain region or the plurality of first frequency domain regions is in a one-to-one correspondence with at least one first set, and each first set comprises at least one virtual resource unit; and receiving indication information sent by a network device, wherein the indication information is used to indicate a type of a virtual resource unit in the at least one first set, wherein the type of the virtual resource unit in the first set is a localized virtual resource unit or a distributed virtual resource unit; and determining a number of each virtual resource unit in each first set and a number of each physical resource unit in a first frequency domain region corresponding to the first set, wherein: when a type of a virtual resource unit in a first set is a localized virtual resource unit, the virtual resource unit in the first set is mapped to a physical resource unit, of a same number as the virtual resource unit, in a first frequency domain region corresponding to the first set; when a type of a virtual resource unit in a first set is a distributed virtual resource unit, a number of the virtual resource unit in the first set is mapped, by using an interleaving matrix, to a number of a physical resource unit in a frequency domain region corresponding to the first set; in a process of mapping the distributed virtual resource unit to the physical resource unit, the interleaving is implemented in a complete interleaving region. determining one or more bandwidth regions in system bandwidth that are used by the terminal device, wherein the terminal device receives or sends a data channel in the bandwidth region, the system bandwidth comprises at least one interleaving region, each interleaving region comprises at least one physical resource unit contiguous in frequency domain, each bandwidth region comprises one first frequency domain region or a plurality of first frequency domain regions non-overlapping in frequency domain, each first frequency domain region completely overlaps with one interleaving region or a plurality of interleaving regions in frequency domain, the one first frequency domain region or the plurality of first frequency domain regions is in a one-to-one correspondence with at least one first set, and each first set comprises at least one virtual resource unit; and receiving indication information sent by a network device, wherein the indication information is used to indicate a type of a virtual resource unit in the at least one first set, wherein the type of the virtual resource unit in the first set is a localized virtual resource unit or a distributed virtual resource unit; and determining a number of each virtual resource unit in each first set and a number of each physical resource unit in a first frequency domain region corresponding to the first set, wherein: when a type of a virtual resource unit in a first set is a localized virtual resource unit, the virtual resource unit in the first set is mapped to a physical resource unit, of a same number as the virtual resource unit, in a first frequency domain region corresponding to the first set; when a type of a virtual resource unit in a first set is a distributed virtual resource unit, a number of the virtual resource unit in the first set is mapped, by using an interleaving matrix, to a number of a physical resource unit in a frequency domain region corresponding to the first set; in a process of mapping the distributed virtual resource unit to the physical resource unit, the interleaving is implemented in a complete interleaving region.