A data transmission method, wherein the method comprises: receiving, by a terminal device (120, 500, 700), a first identifier ID, wherein the first ID is an ID allocated by a first network side device (110, 600, 800) to the terminal device (120, 500, 700), the terminal device (120, 500, 700) is located in a first area, the first area is an area in which the first network side device (110, 600, 800) provides a service, and the first ID is valid in the first area; indicating, by the terminal device (120, 500, 700), mobility information of the terminal device (120, 500, 700) to the first network side device (110, 600, 800); and receiving, by the terminal device (120, 500, 700), target grant free information indicated by the first network side device (110, 600, 800) based on the mobility information, wherein the target grant free information is a dedicated grant free resource or a universal grant free resource, data information sent by the terminal device (120, 500, 700) to the first network side device (110, 600, 800) by using the dedicated grant free resource comprises data sent by the terminal device (120, 500, 700), and data information sent by the terminal device (120, 500, 700) to the first network side device (110, 600, 800) by using the universal grant free resource comprises data sent by the terminal device (120, 500, 700) and the first ID, wherein the indicating, by the terminal device (120, 500, 700), mobility information of the terminal device (120, 500, 700) to the first network side device (110, 600, 800) comprises: determining, by the terminal device (120, 500, 700), the mobility information, and sending the mobility information to the first network side device (110, 600, 800); or sending, by the terminal device (120, 500, 700), first data information to the first network side device (110, 600, 800), wherein the first data information comprises the first ID and data sent by the terminal device (120, 500, 700), wherein the terminal device (120, 500, 700) provides the mobility information for the network side device (110, 600, 800), so that the network side device (110, 600, 800) determines, based on the mobility information, a grant free resource available for the terminal device (120, 500, 700). receiving, by a terminal device (120, 500, 700), a first identifier ID, wherein the first ID is an ID allocated by a first network side device (110, 600, 800) to the terminal device (120, 500, 700), the terminal device (120, 500, 700) is located in a first area, the first area is an area in which the first network side device (110, 600, 800) provides a service, and the first ID is valid in the first area; indicating, by the terminal device (120, 500, 700), mobility information of the terminal device (120, 500, 700) to the first network side device (110, 600, 800); and receiving, by the terminal device (120, 500, 700), target grant free information indicated by the first network side device (110, 600, 800) based on the mobility information, wherein the target grant free information is a dedicated grant free resource or a universal grant free resource, data information sent by the terminal device (120, 500, 700) to the first network side device (110, 600, 800) by using the dedicated grant free resource comprises data sent by the terminal device (120, 500, 700), and data information sent by the terminal device (120, 500, 700) to the first network side device (110, 600, 800) by using the universal grant free resource comprises data sent by the terminal device (120, 500, 700) and the first ID, wherein the indicating, by the terminal device (120, 500, 700), mobility information of the terminal device (120, 500, 700) to the first network side device (110, 600, 800) comprises: determining, by the terminal device (120, 500, 700), the mobility information, and sending the mobility information to the first network side device (110, 600, 800); or sending, by the terminal device (120, 500, 700), first data information to the first network side device (110, 600, 800), wherein the first data information comprises the first ID and data sent by the terminal device (120, 500, 700), wherein the terminal device (120, 500, 700) provides the mobility information for the network side device (110, 600, 800), so that the network side device (110, 600, 800) determines, based on the mobility information, a grant free resource available for the terminal device (120, 500, 700). determining, by the terminal device (120, 500, 700), the mobility information, and sending the mobility information to the first network side device (110, 600, 800); or sending, by the terminal device (120, 500, 700), first data information to the first network side device (110, 600, 800), wherein the first data information comprises the first ID and data sent by the terminal device (120, 500, 700), wherein the terminal device (120, 500, 700) provides the mobility information for the network side device (110, 600, 800), so that the network side device (110, 600, 800) determines, based on the mobility information, a grant free resource available for the terminal device (120, 500, 700).