A resource allocation method, comprising: receiving, by a communications device, logical channel configuration information sent by a network device, wherein the logical channel configuration information comprises a time duration and a volume of data transmitted within the time duration, and the volume of the data is a parameter of a logical channel; determining, by the communications device, a first logical channel based on a first condition, wherein the first condition is: for a logical channel, a sum of a size of a to-be-transmitted data packet of the communications device and a volume of data that is already transmitted within the time duration before a moment at which the to-be-transmitted data packet is transmitted is less than or equal to the volume of the data; and allocating, by the communications device to the first logical channel based on the size of the to-be-transmitted data packet, a resource used for transmitting the to-be-transmitted data packet; characterized in that the method further comprises: determining, by the communications device, a second logical channel set based on a second condition, wherein the second logical channel set comprises at least one logical channel, and the second condition is: for a logical channel, the volume of the data that is already transmitted within the time duration before the moment at which the to-be-transmitted data packet is transmitted is less than or equal to the volume of the data; and the determining, by the communications device, a first logical channel based on a first condition comprises: determining, by the communications device, the first logical channel from the second logical channel set based on the first condition. receiving, by a communications device, logical channel configuration information sent by a network device, wherein the logical channel configuration information comprises a time duration and a volume of data transmitted within the time duration, and the volume of the data is a parameter of a logical channel; determining, by the communications device, a first logical channel based on a first condition, wherein the first condition is: for a logical channel, a sum of a size of a to-be-transmitted data packet of the communications device and a volume of data that is already transmitted within the time duration before a moment at which the to-be-transmitted data packet is transmitted is less than or equal to the volume of the data; and allocating, by the communications device to the first logical channel based on the size of the to-be-transmitted data packet, a resource used for transmitting the to-be-transmitted data packet; characterized in that the method further comprises: determining, by the communications device, a second logical channel set based on a second condition, wherein the second logical channel set comprises at least one logical channel, and the second condition is: for a logical channel, the volume of the data that is already transmitted within the time duration before the moment at which the to-be-transmitted data packet is transmitted is less than or equal to the volume of the data; and the determining, by the communications device, a first logical channel based on a first condition comprises: determining, by the communications device, the first logical channel from the second logical channel set based on the first condition. determining, by the communications device, a second logical channel set based on a second condition, wherein the second logical channel set comprises at least one logical channel, and the second condition is: for a logical channel, the volume of the data that is already transmitted within the time duration before the moment at which the to-be-transmitted data packet is transmitted is less than or equal to the volume of the data; and the determining, by the communications device, a first logical channel based on a first condition comprises: determining, by the communications device, the first logical channel from the second logical channel set based on the first condition.