A method for determining quality of service in a system comprising a first device and a second device, comprising: receiving, by the first device, a first Internet protocol, IP, packet, wherein the first IP packet comprises a user datagram protocol, UDP, packet and a first IP header; determining, by the first device, based on information in the first IP packet, a target quality of service, QoS, level to which the UDP packet belongs; dividing, by the first device, the UDP packet into at least two segments; encapsulating, by the first device, each of the at least two segments into a multipath transmission control protocol, MPTCP, packet; encapsulating, by the first device, each MPTCP packet into at least one second IP packet, wherein a payload length of a target IP packet in the at least one second IP packet is equal to a byte length corresponding to the target QoS level; and for each segment of the at least two segments sending, by the first device the at least one second IP packet to the second device by using an MPTCP connection with the second device: receiving, by the second device, using a multipath transmission control protocol, MPTCP, connection with the first device, at least one Internet protocol, IP, packet that belongs to a same MPTCP packet and that is sent by the first device; obtaining, by the second device, a payload length of a target IP packet in the at least one IP packet; and determining, by the second device, based on the payload length of the target IP packet, a target quality of service, QoS, level of the at least one IP packet; wherein the target IP packet is a packet at a preset location in the at least one second IP packet. receiving, by the first device, a first Internet protocol, IP, packet, wherein the first IP packet comprises a user datagram protocol, UDP, packet and a first IP header; determining, by the first device, based on information in the first IP packet, a target quality of service, QoS, level to which the UDP packet belongs; dividing, by the first device, the UDP packet into at least two segments; encapsulating, by the first device, each of the at least two segments into a multipath transmission control protocol, MPTCP, packet; encapsulating, by the first device, each MPTCP packet into at least one second IP packet, wherein a payload length of a target IP packet in the at least one second IP packet is equal to a byte length corresponding to the target QoS level; and for each segment of the at least two segments sending, by the first device the at least one second IP packet to the second device by using an MPTCP connection with the second device: receiving, by the second device, using a multipath transmission control protocol, MPTCP, connection with the first device, at least one Internet protocol, IP, packet that belongs to a same MPTCP packet and that is sent by the first device; obtaining, by the second device, a payload length of a target IP packet in the at least one IP packet; and determining, by the second device, based on the payload length of the target IP packet, a target quality of service, QoS, level of the at least one IP packet; wherein the target IP packet is a packet at a preset location in the at least one second IP packet. receiving, by the second device, using a multipath transmission control protocol, MPTCP, connection with the first device, at least one Internet protocol, IP, packet that belongs to a same MPTCP packet and that is sent by the first device; obtaining, by the second device, a payload length of a target IP packet in the at least one IP packet; and determining, by the second device, based on the payload length of the target IP packet, a target quality of service, QoS, level of the at least one IP packet; wherein the target IP packet is a packet at a preset location in the at least one second IP packet.