A data transmission method, wherein the method is applied to a part or all of a gateway, and the method comprises: mapping a to-be-transmitted service flow to a virtual connection based on a mapping relationship between an identifier of the to-be-transmitted service flow in a mobile network and an identifier of the virtual connection, wherein the virtual connection is a virtual connection between the gateway and an optical line terminal that are corresponding to the to-be-transmitted service flow; mapping the to-be-transmitted service flow to a virtual bearer based on a mapping relationship between the identifier of the virtual connection and an identifier of the virtual bearer, wherein the virtual bearer is a virtual bearer between the gateway and the optical line terminal that are corresponding to the virtual connection; and characterised by: mapping the to-be-transmitted service flow to a virtual bearer queue based on a mapping relationship between a quality of service characteristic identifier of the to-be-transmitted service flow and an identifier of the virtual bearer queue in the virtual bearer, to transmit the to-be-transmitted service flow to the optical line terminal; and wherein before mapping the to-be-transmitted service flow to the virtual connection based on the mapping relationship between the identifier of the to-be-transmitted service flow in the mobile network and the identifier of the virtual connection, the method further comprises: receiving the identifier that is of the to-be-transmitted service flow in the mobile network and that is sent by a terminal, and the quality of service characteristic identifier that is of the to-be-transmitted service flow and that is sent by the terminal. mapping a to-be-transmitted service flow to a virtual connection based on a mapping relationship between an identifier of the to-be-transmitted service flow in a mobile network and an identifier of the virtual connection, wherein the virtual connection is a virtual connection between the gateway and an optical line terminal that are corresponding to the to-be-transmitted service flow; mapping the to-be-transmitted service flow to a virtual bearer based on a mapping relationship between the identifier of the virtual connection and an identifier of the virtual bearer, wherein the virtual bearer is a virtual bearer between the gateway and the optical line terminal that are corresponding to the virtual connection; and characterised by: mapping the to-be-transmitted service flow to a virtual bearer queue based on a mapping relationship between a quality of service characteristic identifier of the to-be-transmitted service flow and an identifier of the virtual bearer queue in the virtual bearer, to transmit the to-be-transmitted service flow to the optical line terminal; and wherein before mapping the to-be-transmitted service flow to the virtual connection based on the mapping relationship between the identifier of the to-be-transmitted service flow in the mobile network and the identifier of the virtual connection, the method further comprises: receiving the identifier that is of the to-be-transmitted service flow in the mobile network and that is sent by a terminal, and the quality of service characteristic identifier that is of the to-be-transmitted service flow and that is sent by the terminal. mapping the to-be-transmitted service flow to a virtual bearer queue based on a mapping relationship between a quality of service characteristic identifier of the to-be-transmitted service flow and an identifier of the virtual bearer queue in the virtual bearer, to transmit the to-be-transmitted service flow to the optical line terminal; and wherein before mapping the to-be-transmitted service flow to the virtual connection based on the mapping relationship between the identifier of the to-be-transmitted service flow in the mobile network and the identifier of the virtual connection, the method further comprises: receiving the identifier that is of the to-be-transmitted service flow in the mobile network and that is sent by a terminal, and the quality of service characteristic identifier that is of the to-be-transmitted service flow and that is sent by the terminal.