A data transmission method, comprising: obtaining (S 101), by a first network device, a to-be-sent first data packet; identifying (S 102), by the first network device, whether the first data packet belongs to a delay-sensitive service flow; if the first data packet belongs to the delay-sensitive service flow, encapsulating (S103), by the first network device, the first data packet into a first quick user datagram protocol internet connections, QUIC, packet according to the QUIC protocol; and sending (S104), by the first network device, the first QUIC packet to a second network device, receiving, by the first network device, a second QUIC packet sent by the second network device; and parsing, by the first network device, the second QUIC packet according to the QUIC protocol to obtain a second data packet; and identifying, by the first network device, a connection identifier from the second QUIC packet; and scheduling, by the first network device, retransmission of a lost packet in the second data packet based on a service flow priority corresponding to the connection identifier; wherein, the first network device and the second network device are any two devices of a gateway device, an access point device, and a terminal device in a same network. obtaining (S 101), by a first network device, a to-be-sent first data packet; identifying (S 102), by the first network device, whether the first data packet belongs to a delay-sensitive service flow; if the first data packet belongs to the delay-sensitive service flow, encapsulating (S103), by the first network device, the first data packet into a first quick user datagram protocol internet connections, QUIC, packet according to the QUIC protocol; and identifying (S 102), by the first network device, whether the first data packet belongs to a delay-sensitive service flow; if the first data packet belongs to the delay-sensitive service flow, encapsulating (S103), by the first network device, the first data packet into a first quick user datagram protocol internet connections, QUIC, packet according to the QUIC protocol; and sending (S104), by the first network device, the first QUIC packet to a second network device, receiving, by the first network device, a second QUIC packet sent by the second network device; and parsing, by the first network device, the second QUIC packet according to the QUIC protocol to obtain a second data packet; and identifying, by the first network device, a connection identifier from the second QUIC packet; and scheduling, by the first network device, retransmission of a lost packet in the second data packet based on a service flow priority corresponding to the connection identifier; wherein, the first network device and the second network device are any two devices of a gateway device, an access point device, and a terminal device in a same network. scheduling, by the first network device, retransmission of a lost packet in the second data packet based on a service flow priority corresponding to the connection identifier; wherein, the first network device and the second network device are any two devices of a gateway device, an access point device, and a terminal device in a same network. <EOS>