A resource allocation method, comprising: determining, by a network device, downlink control information, wherein the downlink control information comprises a first information field and a second information field, and the first information field is used to indicate whether an active bandwidth part of a terminal device needs to be switched, wherein when the first information field indicates that the active bandwidth part of the terminal device needs to be switched, the second information field is used to indicate one or more active bandwidth parts to which the terminal device needs to be switched and a frequency domain resource location of a data channel in the one or more active bandwidth parts to which the terminal device needs to be switched; and sending, by the network device, the downlink control information, wherein when the first information field indicates that the active bandwidth part of the terminal device needs to be switched, the second information field comprises a first information subfield and a second information subfield; the first information subfield is used to indicate the one or more active bandwidth parts to which the terminal device needs to be switched in one or more bandwidth parts, wherein the bandwidth part is less than or equal to bandwidth of the terminal device, the bandwidth of the terminal device consists of a plurality of consecutive subbands in frequency domain, the bandwidth part consists of a plurality of consecutive subbands in frequency domain in the bandwidth of the terminal device, and the subband consists of a plurality of consecutive physical resource blocks RBs in frequency domain; the first information subfield is further used to indicate at least one subband on which a frequency domain resource of the data channel is located in the one or more active bandwidth parts to which the terminal device needs to be switched; and the second information subfield is used to indicate a location of the frequency domain resource of the data channel in a physical resource block on the at least one subband. determining, by a network device, downlink control information, wherein the downlink control information comprises a first information field and a second information field, and the first information field is used to indicate whether an active bandwidth part of a terminal device needs to be switched, wherein when the first information field indicates that the active bandwidth part of the terminal device needs to be switched, the second information field is used to indicate one or more active bandwidth parts to which the terminal device needs to be switched and a frequency domain resource location of a data channel in the one or more active bandwidth parts to which the terminal device needs to be switched; and sending, by the network device, the downlink control information, wherein when the first information field indicates that the active bandwidth part of the terminal device needs to be switched, the second information field comprises a first information subfield and a second information subfield; the first information subfield is used to indicate the one or more active bandwidth parts to which the terminal device needs to be switched in one or more bandwidth parts, wherein the bandwidth part is less than or equal to bandwidth of the terminal device, the bandwidth of the terminal device consists of a plurality of consecutive subbands in frequency domain, the bandwidth part consists of a plurality of consecutive subbands in frequency domain in the bandwidth of the terminal device, and the subband consists of a plurality of consecutive physical resource blocks RBs in frequency domain; the first information subfield is further used to indicate at least one subband on which a frequency domain resource of the data channel is located in the one or more active bandwidth parts to which the terminal device needs to be switched; and the second information subfield is used to indicate a location of the frequency domain resource of the data channel in a physical resource block on the at least one subband.